From 689e15f6172aef3e08a99fb050ee819df04649c4 Mon Sep 17 00:00:00 2001 From: Eugene Kazakov Date: Wed, 11 Dec 2024 15:45:26 +0100 Subject: [PATCH 1/5] Update tests for compatibility with new phpunit --- .gitignore | 4 ++ docker-compose.yml | 53 +++++++++++++------------- phpunit.xml.dist | 6 +-- src/Context/Context.php | 2 +- src/Context/ContextBuilder.php | 10 +++-- tests/Context/ContextBuilderTest.php | 4 +- tests/Context/ContextTest.php | 4 +- tests/Manager/ContainerManagerTest.php | 6 +-- tests/Manager/ImageManagerTest.php | 18 ++++----- tests/Manager/MiscManagerTest.php | 4 +- tests/TestCase.php | 3 +- 11 files changed, 59 insertions(+), 55 deletions(-) diff --git a/.gitignore b/.gitignore index 2dc36f945..d2d605d07 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,7 @@ vendor/ bin/ composer.lock .vagrant +phpunit.xml +.phpunit.result.cache +.phpunit.coverage +.phpunit.coverage.* diff --git a/docker-compose.yml b/docker-compose.yml index fc715ddbd..205e1cf2a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,26 +1,27 @@ -php54: - image: jolicode/php54 - command: sh -c 'cd /app && composer update && vendor/bin/phpunit' - user: root - volumes: - - ./:/app - - /var/run/docker.sock:/var/run/docker.sock -php55: - image: jolicode/php55 - command: sh -c 'cd /app && composer update && vendor/bin/phpunit' - user: root - volumes: - - ./:/app - - /var/run/docker.sock:/var/run/docker.sock -php56: - image: phundament/php-one:5.6-fpm - command: sh -c 'composer update && vendor/bin/phpunit' - volumes: - - ./:/app - - /var/run/docker.sock:/var/run/docker.sock -php70: - image: phundament/php-one:7.0-fpm - command: sh -c 'composer update && vendor/bin/phpunit' - volumes: - - ./:/app - - /var/run/docker.sock:/var/run/docker.sock +services: + php54: + image: jolicode/php54 + command: sh -c 'cd /app && composer update && vendor/bin/phpunit' + user: root + volumes: + - ./:/app + - /var/run/docker.sock:/var/run/docker.sock + php55: + image: jolicode/php55 + command: sh -c 'cd /app && composer update && vendor/bin/phpunit' + user: root + volumes: + - ./:/app + - /var/run/docker.sock:/var/run/docker.sock + php56: + image: phundament/php-one:5.6-fpm + command: sh -c 'composer update && vendor/bin/phpunit' + volumes: + - ./:/app + - /var/run/docker.sock:/var/run/docker.sock + php70: + image: phundament/php-one:7.0-fpm + command: sh -c 'composer update && vendor/bin/phpunit' + volumes: + - ./:/app + - /var/run/docker.sock:/var/run/docker.sock diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6b2f70633..5e418bc23 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,14 +3,10 @@ diff --git a/src/Context/Context.php b/src/Context/Context.php index c4df01dd4..c3d3c6ca0 100644 --- a/src/Context/Context.php +++ b/src/Context/Context.php @@ -99,7 +99,7 @@ public function read() */ public function toTar(): string { - $process = new Process('/usr/bin/env tar c .', $this->directory); + $process = new Process(['/usr/bin/env', 'tar', 'c', '.'], $this->directory); $process->run(); if (!$process->isSuccessful()) { diff --git a/src/Context/ContextBuilder.php b/src/Context/ContextBuilder.php index bbbadaf4d..8ff10433e 100644 --- a/src/Context/ContextBuilder.php +++ b/src/Context/ContextBuilder.php @@ -233,7 +233,7 @@ public function volume(string $volume): ContextBuilder */ public function getContext(): Context { - if ($this->directory !== null) { + if (isset($this->directory)) { $this->cleanDirectory(); } @@ -249,7 +249,9 @@ public function getContext(): Context */ public function __destruct() { - $this->cleanDirectory(); + if (isset($this->directory)) { + $this->cleanDirectory(); + } } /** @@ -330,6 +332,8 @@ private function getFile(string $directory, string $content): string */ private function cleanDirectory(): void { - $this->fs->remove($this->directory); + if (isset($this->directory)) { + $this->fs->remove($this->directory); + } } } diff --git a/tests/Context/ContextBuilderTest.php b/tests/Context/ContextBuilderTest.php index 9ed4c62a7..815d62866 100644 --- a/tests/Context/ContextBuilderTest.php +++ b/tests/Context/ContextBuilderTest.php @@ -16,7 +16,7 @@ public function testRemovesFilesOnDestruct() unset($contextBuilder); - $this->assertFileNotExists($context->getDirectory().'/Dockerfile'); + $this->assertFileDoesNotExist($context->getDirectory().'/Dockerfile'); } public function testWritesContextToDisk() @@ -75,7 +75,7 @@ public function testWritesAddCommands() $context = $contextBuilder->getContext(); - $this->assertRegExp(<<assertMatchesRegularExpression(<<run(); $this->assertEquals(strlen($process->getOutput()), strlen($context->toTar())); @@ -24,6 +24,6 @@ public function testReturnsValidTarStream() $directory = __DIR__.DIRECTORY_SEPARATOR."context-test"; $context = new Context($directory); - $this->assertInternalType('resource', $context->toStream()); + $this->assertIsResource($context->toStream()); } } diff --git a/tests/Manager/ContainerManagerTest.php b/tests/Manager/ContainerManagerTest.php index b552fdcb8..136f82c91 100644 --- a/tests/Manager/ContainerManagerTest.php +++ b/tests/Manager/ContainerManagerTest.php @@ -21,7 +21,7 @@ private function getManager() /** * Be sure to have image before doing test */ - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { self::getDocker()->getImageManager()->create(null, [ 'fromImage' => 'busybox:latest' @@ -93,7 +93,7 @@ public function testAttachWebsocket() $output .= $data; } - $this->assertContains("echo", $output); + $this->assertStringContainsString("echo", $output); // Exit the container $webSocketStream->write("exit\n"); @@ -118,6 +118,6 @@ public function testLogs() ]); - $this->assertContains("output", $logs['stdout'][0]); + $this->assertStringContainsString("output", $logs['stdout'][0]); } } diff --git a/tests/Manager/ImageManagerTest.php b/tests/Manager/ImageManagerTest.php index 0137924de..f8c82e31e 100644 --- a/tests/Manager/ImageManagerTest.php +++ b/tests/Manager/ImageManagerTest.php @@ -40,7 +40,7 @@ public function testBuildStream() }); $buildStream->wait(); - $this->assertContains("Successfully", $lastMessage); + $this->assertStringContainsString("Successfully", $lastMessage); } public function testBuildObject() @@ -52,8 +52,8 @@ public function testBuildObject() $context = $contextBuilder->getContext(); $buildInfos = $this->getManager()->build($context->read(), ['t' => 'test-image'], ImageManager::FETCH_OBJECT); - $this->assertInternalType('array', $buildInfos); - $this->assertContains("Successfully", $buildInfos[count($buildInfos) - 1]->getStream()); + $this->assertIsArray($buildInfos); + $this->assertStringContainsString("Successfully", $buildInfos[count($buildInfos) - 1]->getStream()); } public function testCreateStream() @@ -73,7 +73,7 @@ public function testCreateStream() }); $createImageStream->wait(); - $this->assertContains("Pulling from library/registry", $firstMessage); + $this->assertStringContainsString("Pulling from library/registry", $firstMessage); } public function testCreateObject() @@ -82,8 +82,8 @@ public function testCreateObject() 'fromImage' => 'registry:latest' ], ImageManager::FETCH_OBJECT); - $this->assertInternalType('array', $createImagesInfos); - $this->assertContains("Pulling from library/registry", $createImagesInfos[0]->getStatus()); + $this->assertIsArray($createImagesInfos); + $this->assertStringContainsString("Pulling from library/registry", $createImagesInfos[0]->getStatus()); } public function testPushStream() @@ -112,7 +112,7 @@ public function testPushStream() }); $pushImageStream->wait(); - $this->assertContains("The push refers to repository [localhost:5000/test-image]", $firstMessage); + $this->assertStringContainsString("The push refers to repository [localhost:5000/test-image]", $firstMessage); } public function testPushObject() @@ -130,7 +130,7 @@ public function testPushObject() 'X-Registry-Auth' => $registryConfig ], ImageManager::FETCH_OBJECT); - $this->assertInternalType('array', $pushImageInfos); - $this->assertContains("The push refers to repository [localhost:5000/test-image]", $pushImageInfos[0]->getStatus()); + $this->assertIsArray($pushImageInfos); + $this->assertStringContainsString("The push refers to repository [localhost:5000/test-image]", $pushImageInfos[0]->getStatus()); } } diff --git a/tests/Manager/MiscManagerTest.php b/tests/Manager/MiscManagerTest.php index 05e70d4dd..6c2ecd905 100644 --- a/tests/Manager/MiscManagerTest.php +++ b/tests/Manager/MiscManagerTest.php @@ -41,11 +41,11 @@ public function testGetEventsStream() public function testGetEventsObject() { $events = $this->getManager()->getEvents([ - 'since' => time() - (60 * 60 * 24), + 'since' => time() - 60, 'until' => time() ], MiscManager::FETCH_OBJECT); - $this->assertInternalType('array', $events); + $this->assertIsArray($events); $this->assertInstanceOf('Docker\API\Model\Event', $events[0]); } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 3bc435d9e..a769c7d9d 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -3,9 +3,8 @@ namespace Docker\Tests; use Docker\Docker; -use PHPUnit_Framework_TestCase; -class TestCase extends PHPUnit_Framework_TestCase +class TestCase extends \PHPUnit\Framework\TestCase { private static $docker; From 017eada27897676f417522a4b63882d6434b863c Mon Sep 17 00:00:00 2001 From: Eugene Kazakov Date: Thu, 9 Jan 2025 17:49:51 +0100 Subject: [PATCH 2/5] Switch to generation using jane-php/open-api-2 --- .jane-openapi | 3 +- README.md | 9 +- composer.json | 13 +- docker-swagger.json | 5261 ----------- generate.sh | 2 +- generated/Client.php | 1845 ++++ generated/Endpoint/ContainerArchiveHead.php | 77 + generated/Endpoint/ContainerAttach.php | 170 + .../Endpoint/ContainerAttachWebsocket.php | 84 + generated/Endpoint/ContainerChanges.php | 65 + generated/Endpoint/ContainerCreate.php | 84 + generated/Endpoint/ContainerDelete.php | 79 + generated/Endpoint/ContainerExec.php | 66 + generated/Endpoint/ContainerExport.php | 60 + generated/Endpoint/ContainerGetArchive.php | 77 + generated/Endpoint/ContainerInspect.php | 73 + generated/Endpoint/ContainerKill.php | 73 + generated/Endpoint/ContainerList.php | 92 + generated/Endpoint/ContainerLogs.php | 92 + generated/Endpoint/ContainerPause.php | 63 + generated/Endpoint/ContainerPrune.php | 69 + generated/Endpoint/ContainerPutArchive.php | 88 + generated/Endpoint/ContainerRename.php | 77 + generated/Endpoint/ContainerResize.php | 75 + generated/Endpoint/ContainerRestart.php | 73 + generated/Endpoint/ContainerStart.php | 76 + generated/Endpoint/ContainerStats.php | 76 + generated/Endpoint/ContainerStop.php | 76 + generated/Endpoint/ContainerTop.php | 73 + generated/Endpoint/ContainerUnpause.php | 60 + generated/Endpoint/ContainerUpdate.php | 62 + generated/Endpoint/ContainerWait.php | 60 + generated/Endpoint/ExecInspect.php | 60 + generated/Endpoint/ExecResize.php | 79 + generated/Endpoint/ExecStart.php | 62 + generated/Endpoint/GetPluginPrivileges.php | 66 + generated/Endpoint/ImageBuild.php | 146 + generated/Endpoint/ImageCommit.php | 84 + generated/Endpoint/ImageCreate.php | 91 + generated/Endpoint/ImageDelete.php | 82 + generated/Endpoint/ImageGet.php | 79 + generated/Endpoint/ImageGetAll.php | 71 + generated/Endpoint/ImageHistory.php | 60 + generated/Endpoint/ImageInspect.php | 60 + generated/Endpoint/ImageList.php | 78 + generated/Endpoint/ImageLoad.php | 71 + generated/Endpoint/ImagePrune.php | 72 + generated/Endpoint/ImagePush.php | 102 + generated/Endpoint/ImageSearch.php | 75 + generated/Endpoint/ImageTag.php | 83 + generated/Endpoint/NetworkConnect.php | 66 + generated/Endpoint/NetworkCreate.php | 67 + generated/Endpoint/NetworkDelete.php | 60 + generated/Endpoint/NetworkDisconnect.php | 66 + generated/Endpoint/NetworkInspect.php | 56 + generated/Endpoint/NetworkList.php | 73 + generated/Endpoint/NetworkPrune.php | 69 + generated/Endpoint/NodeDelete.php | 73 + generated/Endpoint/NodeInspect.php | 60 + generated/Endpoint/NodeList.php | 74 + generated/Endpoint/NodeUpdate.php | 75 + generated/Endpoint/PluginCreate.php | 68 + generated/Endpoint/PluginDelete.php | 73 + generated/Endpoint/PluginDisable.php | 56 + generated/Endpoint/PluginEnable.php | 69 + generated/Endpoint/PluginInspect.php | 60 + generated/Endpoint/PluginList.php | 46 + generated/Endpoint/PluginPull.php | 90 + generated/Endpoint/PluginPush.php | 60 + generated/Endpoint/PluginSet.php | 62 + generated/Endpoint/SecretCreate.php | 63 + generated/Endpoint/SecretDelete.php | 60 + generated/Endpoint/SecretInspect.php | 64 + generated/Endpoint/SecretList.php | 69 + generated/Endpoint/ServiceCreate.php | 80 + generated/Endpoint/ServiceDelete.php | 60 + generated/Endpoint/ServiceInspect.php | 60 + generated/Endpoint/ServiceList.php | 71 + generated/Endpoint/ServiceLogs.php | 94 + generated/Endpoint/ServiceUpdate.php | 90 + generated/Endpoint/SwarmInit.php | 63 + generated/Endpoint/SwarmInspect.php | 46 + generated/Endpoint/SwarmJoin.php | 63 + generated/Endpoint/SwarmLeave.php | 70 + generated/Endpoint/SwarmUnlock.php | 55 + generated/Endpoint/SwarmUnlockkey.php | 46 + generated/Endpoint/SwarmUpdate.php | 82 + generated/Endpoint/SystemAuth.php | 58 + generated/Endpoint/SystemDataUsage.php | 46 + generated/Endpoint/SystemEvents.php | 93 + generated/Endpoint/SystemInfo.php | 46 + generated/Endpoint/SystemPing.php | 46 + generated/Endpoint/SystemVersion.php | 46 + generated/Endpoint/TaskInspect.php | 60 + generated/Endpoint/TaskList.php | 74 + generated/Endpoint/VolumeCreate.php | 55 + generated/Endpoint/VolumeDelete.php | 77 + generated/Endpoint/VolumeInspect.php | 60 + generated/Endpoint/VolumeList.php | 76 + generated/Endpoint/VolumePrune.php | 69 + generated/Exception/ApiException.php | 7 + generated/Exception/BadRequestException.php | 11 + generated/Exception/ClientException.php | 7 + generated/Exception/ConflictException.php | 11 + ...ontainerArchiveHeadBadRequestException.php | 29 + ...rchiveHeadInternalServerErrorException.php | 29 + .../ContainerArchiveHeadNotFoundException.php | 29 + .../ContainerAttachBadRequestException.php | 29 + ...inerAttachInternalServerErrorException.php | 29 + .../ContainerAttachNotFoundException.php | 29 + ...inerAttachWebsocketBadRequestException.php | 29 + ...hWebsocketInternalServerErrorException.php | 29 + ...tainerAttachWebsocketNotFoundException.php | 29 + ...nerChangesInternalServerErrorException.php | 29 + .../ContainerChangesNotFoundException.php | 29 + .../ContainerCreateBadRequestException.php | 29 + .../ContainerCreateConflictException.php | 29 + ...inerCreateInternalServerErrorException.php | 29 + .../ContainerCreateNotAcceptableException.php | 29 + .../ContainerCreateNotFoundException.php | 29 + .../ContainerDeleteBadRequestException.php | 29 + ...inerDeleteInternalServerErrorException.php | 29 + .../ContainerDeleteNotFoundException.php | 29 + .../ContainerExecConflictException.php | 29 + ...tainerExecInternalServerErrorException.php | 29 + .../ContainerExecNotFoundException.php | 29 + ...inerExportInternalServerErrorException.php | 29 + .../ContainerExportNotFoundException.php | 29 + ...ContainerGetArchiveBadRequestException.php | 29 + ...GetArchiveInternalServerErrorException.php | 29 + .../ContainerGetArchiveNotFoundException.php | 29 + ...nerInspectInternalServerErrorException.php | 29 + .../ContainerInspectNotFoundException.php | 29 + ...tainerKillInternalServerErrorException.php | 29 + .../ContainerKillNotFoundException.php | 29 + .../ContainerListBadRequestException.php | 29 + ...tainerListInternalServerErrorException.php | 29 + ...tainerLogsInternalServerErrorException.php | 29 + .../ContainerLogsNotFoundException.php | 29 + ...ainerPauseInternalServerErrorException.php | 29 + .../ContainerPauseNotFoundException.php | 29 + ...ainerPruneInternalServerErrorException.php | 29 + ...ContainerPutArchiveBadRequestException.php | 29 + .../ContainerPutArchiveForbiddenException.php | 29 + ...PutArchiveInternalServerErrorException.php | 29 + .../ContainerPutArchiveNotFoundException.php | 29 + .../ContainerRenameConflictException.php | 29 + ...inerRenameInternalServerErrorException.php | 29 + .../ContainerRenameNotFoundException.php | 29 + ...inerResizeInternalServerErrorException.php | 29 + .../ContainerResizeNotFoundException.php | 29 + ...nerRestartInternalServerErrorException.php | 29 + .../ContainerRestartNotFoundException.php | 29 + ...ainerStartInternalServerErrorException.php | 29 + .../ContainerStartNotFoundException.php | 29 + ...ainerStatsInternalServerErrorException.php | 29 + .../ContainerStatsNotFoundException.php | 29 + ...tainerStopInternalServerErrorException.php | 29 + .../ContainerStopNotFoundException.php | 29 + ...ntainerTopInternalServerErrorException.php | 29 + .../ContainerTopNotFoundException.php | 29 + ...nerUnpauseInternalServerErrorException.php | 29 + .../ContainerUnpauseNotFoundException.php | 29 + ...inerUpdateInternalServerErrorException.php | 29 + .../ContainerUpdateNotFoundException.php | 29 + ...tainerWaitInternalServerErrorException.php | 29 + .../ContainerWaitNotFoundException.php | 29 + ...xecInspectInternalServerErrorException.php | 29 + .../ExecInspectNotFoundException.php | 29 + .../ExecResizeBadRequestException.php | 29 + ...ExecResizeInternalServerErrorException.php | 29 + .../Exception/ExecResizeNotFoundException.php | 29 + .../Exception/ExecStartConflictException.php | 29 + .../Exception/ExecStartNotFoundException.php | 29 + generated/Exception/ForbiddenException.php | 11 + ...PrivilegesInternalServerErrorException.php | 29 + ...ImageBuildInternalServerErrorException.php | 29 + ...mageCommitInternalServerErrorException.php | 29 + .../ImageCommitNotFoundException.php | 29 + ...mageCreateInternalServerErrorException.php | 29 + .../ImageCreateNotFoundException.php | 29 + .../ImageDeleteConflictException.php | 29 + ...mageDeleteInternalServerErrorException.php | 29 + .../ImageDeleteNotFoundException.php | 29 + ...mageGetAllInternalServerErrorException.php | 29 + .../ImageGetInternalServerErrorException.php | 29 + ...ageHistoryInternalServerErrorException.php | 29 + .../ImageHistoryNotFoundException.php | 29 + ...ageInspectInternalServerErrorException.php | 29 + .../ImageInspectNotFoundException.php | 29 + .../ImageListInternalServerErrorException.php | 29 + .../ImageLoadInternalServerErrorException.php | 29 + ...ImagePruneInternalServerErrorException.php | 29 + .../ImagePushInternalServerErrorException.php | 29 + .../Exception/ImagePushNotFoundException.php | 29 + ...mageSearchInternalServerErrorException.php | 29 + .../Exception/ImageTagBadRequestException.php | 29 + .../Exception/ImageTagConflictException.php | 29 + .../ImageTagInternalServerErrorException.php | 29 + .../Exception/ImageTagNotFoundException.php | 29 + .../InternalServerErrorException.php | 11 + .../NetworkConnectForbiddenException.php | 29 + ...orkConnectInternalServerErrorException.php | 29 + .../NetworkConnectNotFoundException.php | 29 + .../NetworkCreateBadRequestException.php | 29 + .../NetworkCreateForbiddenException.php | 29 + ...workCreateInternalServerErrorException.php | 29 + .../NetworkCreateNotFoundException.php | 29 + ...workDeleteInternalServerErrorException.php | 29 + .../NetworkDeleteNotFoundException.php | 29 + .../NetworkDisconnectForbiddenException.php | 29 + ...DisconnectInternalServerErrorException.php | 29 + .../NetworkDisconnectNotFoundException.php | 29 + .../NetworkInspectNotFoundException.php | 29 + ...etworkListInternalServerErrorException.php | 29 + ...tworkPruneInternalServerErrorException.php | 29 + ...NodeDeleteInternalServerErrorException.php | 29 + .../Exception/NodeDeleteNotFoundException.php | 29 + ...odeInspectInternalServerErrorException.php | 29 + .../NodeInspectNotFoundException.php | 29 + .../NodeListInternalServerErrorException.php | 29 + ...NodeUpdateInternalServerErrorException.php | 29 + .../Exception/NodeUpdateNotFoundException.php | 29 + .../Exception/NotAcceptableException.php | 11 + generated/Exception/NotFoundException.php | 11 + ...uginCreateInternalServerErrorException.php | 29 + ...uginDeleteInternalServerErrorException.php | 29 + .../PluginDeleteNotFoundException.php | 29 + ...ginDisableInternalServerErrorException.php | 29 + ...uginEnableInternalServerErrorException.php | 29 + ...ginInspectInternalServerErrorException.php | 29 + .../PluginInspectNotFoundException.php | 29 + ...PluginListInternalServerErrorException.php | 29 + ...PluginPullInternalServerErrorException.php | 29 + ...PluginPushInternalServerErrorException.php | 29 + .../Exception/PluginPushNotFoundException.php | 29 + .../PluginSetInternalServerErrorException.php | 29 + .../Exception/PluginSetNotFoundException.php | 29 + .../SecretCreateConflictException.php | 29 + ...cretCreateInternalServerErrorException.php | 29 + .../SecretCreateNotAcceptableException.php | 29 + ...cretDeleteInternalServerErrorException.php | 29 + .../SecretDeleteNotFoundException.php | 29 + ...retInspectInternalServerErrorException.php | 29 + .../SecretInspectNotAcceptableException.php | 29 + .../SecretInspectNotFoundException.php | 29 + ...SecretListInternalServerErrorException.php | 29 + generated/Exception/ServerException.php | 7 + .../ServiceCreateConflictException.php | 29 + .../ServiceCreateForbiddenException.php | 29 + ...viceCreateInternalServerErrorException.php | 29 + ...rviceCreateServiceUnavailableException.php | 29 + ...viceDeleteInternalServerErrorException.php | 29 + .../ServiceDeleteNotFoundException.php | 29 + ...iceInspectInternalServerErrorException.php | 29 + .../ServiceInspectNotFoundException.php | 29 + ...erviceListInternalServerErrorException.php | 29 + ...erviceLogsInternalServerErrorException.php | 29 + .../ServiceLogsNotFoundException.php | 29 + .../Exception/ServiceUnavailableException.php | 11 + ...viceUpdateInternalServerErrorException.php | 29 + .../ServiceUpdateNotFoundException.php | 29 + .../SwarmInitBadRequestException.php | 29 + .../SwarmInitInternalServerErrorException.php | 29 + .../SwarmInitNotAcceptableException.php | 29 + ...armInspectInternalServerErrorException.php | 29 + .../SwarmJoinBadRequestException.php | 29 + .../SwarmJoinInternalServerErrorException.php | 29 + .../SwarmJoinServiceUnavailableException.php | 29 + ...SwarmLeaveInternalServerErrorException.php | 29 + .../SwarmLeaveServiceUnavailableException.php | 29 + ...warmUnlockInternalServerErrorException.php | 29 + ...mUnlockkeyInternalServerErrorException.php | 29 + .../SwarmUpdateBadRequestException.php | 29 + ...warmUpdateInternalServerErrorException.php | 29 + ...SwarmUpdateServiceUnavailableException.php | 29 + ...SystemAuthInternalServerErrorException.php | 29 + ...mDataUsageInternalServerErrorException.php | 29 + ...stemEventsInternalServerErrorException.php | 29 + ...SystemInfoInternalServerErrorException.php | 29 + ...SystemPingInternalServerErrorException.php | 29 + ...temVersionInternalServerErrorException.php | 29 + ...askInspectInternalServerErrorException.php | 29 + .../TaskInspectNotFoundException.php | 29 + .../TaskListInternalServerErrorException.php | 29 + ...lumeCreateInternalServerErrorException.php | 29 + .../VolumeDeleteConflictException.php | 29 + ...lumeDeleteInternalServerErrorException.php | 29 + .../VolumeDeleteNotFoundException.php | 29 + ...umeInspectInternalServerErrorException.php | 29 + .../VolumeInspectNotFoundException.php | 29 + ...VolumeListInternalServerErrorException.php | 29 + ...olumePruneInternalServerErrorException.php | 29 + generated/Model/Annotations.php | 55 - generated/Model/AuthConfig.php | 114 +- generated/Model/AuthPostResponse200.php | 71 + generated/Model/AuthResult.php | 55 - generated/Model/BuildInfo.php | 150 +- generated/Model/ClusterInfo.php | 155 + generated/Model/ClusterInfoVersion.php | 43 + generated/Model/CommitResult.php | 31 - generated/Model/Config.php | 733 ++ generated/Model/ConfigHealthcheck.php | 145 + generated/Model/ConfigVolumes.php | 43 + generated/Model/Container.php | 535 -- generated/Model/ContainerChange.php | 55 - generated/Model/ContainerConfig.php | 535 -- generated/Model/ContainerConnect.php | 55 - generated/Model/ContainerCreateResult.php | 55 - generated/Model/ContainerDisconnect.php | 55 - generated/Model/ContainerInfo.php | 391 - generated/Model/ContainerNetwork.php | 223 - generated/Model/ContainerNode.php | 103 - generated/Model/ContainerSpec.php | 223 - generated/Model/ContainerSpecMount.php | 151 - .../Model/ContainerSpecMountBindOptions.php | 31 - .../Model/ContainerSpecMountVolumeOptions.php | 79 - generated/Model/ContainerState.php | 223 - generated/Model/ContainerStatus.php | 79 - generated/Model/ContainerSummaryItem.php | 435 + .../Model/ContainerSummaryItemHostConfig.php | 43 + .../ContainerSummaryItemNetworkSettings.php | 43 + generated/Model/ContainerTop.php | 55 - generated/Model/ContainerUpdateResult.php | 31 - generated/Model/ContainerWait.php | 31 - generated/Model/ContainersCreatePostBody.php | 789 ++ ...ntainersCreatePostBodyNetworkingConfig.php | 43 + .../Model/ContainersCreatePostResponse201.php | 71 + .../ContainersIdChangesGetResponse200Item.php | 71 + generated/Model/ContainersIdExecPostBody.php | 267 + .../Model/ContainersIdJsonGetResponse200.php | 715 ++ .../ContainersIdJsonGetResponse200State.php | 323 + .../Model/ContainersIdTopGetResponse200.php | 71 + .../Model/ContainersIdUpdatePostBody.php | 882 ++ .../ContainersIdUpdatePostResponse200.php | 43 + .../Model/ContainersIdWaitPostResponse200.php | 43 + .../Model/ContainersPrunePostResponse200.php | 71 + generated/Model/CreateImageInfo.php | 108 +- generated/Model/Device.php | 79 - generated/Model/DeviceMapping.php | 99 + generated/Model/DeviceRate.php | 55 - generated/Model/DeviceWeight.php | 55 - generated/Model/Driver.php | 55 - generated/Model/Endpoint.php | 79 - generated/Model/EndpointConfig.php | 55 - generated/Model/EndpointIPAMConfig.php | 79 - generated/Model/EndpointPortConfig.php | 127 + generated/Model/EndpointSettings.php | 250 +- .../Model/EndpointSettingsIPAMConfig.php | 99 + generated/Model/EndpointSpec.php | 52 +- generated/Model/EndpointVirtualIP.php | 55 - generated/Model/ErrorDetail.php | 50 +- generated/Model/ErrorResponse.php | 43 + generated/Model/Event.php | 127 - generated/Model/EventsGetResponse200.php | 155 + generated/Model/EventsGetResponse200Actor.php | 71 + generated/Model/ExecCommand.php | 223 - generated/Model/ExecConfig.php | 151 - generated/Model/ExecCreateResult.php | 55 - generated/Model/ExecIdJsonGetResponse200.php | 267 + generated/Model/ExecIdStartPostBody.php | 71 + generated/Model/ExecStartConfig.php | 55 - generated/Model/GlobalService.php | 7 - generated/Model/GraphDriver.php | 50 +- generated/Model/HostConfig.php | 1733 ++-- generated/Model/HostConfigLogConfig.php | 71 + .../Model/HostConfigPortBindingsItem.php | 71 + generated/Model/IPAM.php | 72 +- generated/Model/IPAMConfig.php | 79 - generated/Model/IdResponse.php | 43 + generated/Model/Image.php | 436 +- generated/Model/ImageDeleteResponse.php | 71 + generated/Model/ImageHistoryItem.php | 151 - generated/Model/ImageItem.php | 199 - generated/Model/ImageRootFS.php | 71 + generated/Model/ImageSearchResult.php | 127 - generated/Model/ImageSummary.php | 295 + .../ImagesNameHistoryGetResponse200Item.php | 183 + .../Model/ImagesPrunePostResponse200.php | 71 + .../Model/ImagesSearchGetResponse200Item.php | 155 + generated/Model/InfoGetResponse200.php | 1163 +++ generated/Model/InfoGetResponse200Plugins.php | 71 + .../InfoGetResponse200RegistryConfig.php | 71 + ...ponse200RegistryConfigIndexConfigsItem.php | 127 + generated/Model/LogConfig.php | 55 - generated/Model/Mount.php | 209 +- generated/Model/MountBindOptions.php | 43 + generated/Model/MountPoint.php | 305 + generated/Model/MountTmpfsOptions.php | 71 + generated/Model/MountVolumeOptions.php | 99 + .../Model/MountVolumeOptionsDriverConfig.php | 71 + generated/Model/Network.php | 238 +- generated/Model/NetworkAttachment.php | 55 - generated/Model/NetworkAttachmentConfig.php | 55 - generated/Model/NetworkConfig.php | 178 +- generated/Model/NetworkContainer.php | 108 +- generated/Model/NetworkCreateConfig.php | 199 - generated/Model/NetworkCreateResult.php | 55 - generated/Model/NetworkingConfig.php | 31 - generated/Model/NetworksCreatePostBody.php | 239 + .../Model/NetworksCreatePostResponse201.php | 71 + generated/Model/NetworksIdConnectPostBody.php | 71 + .../Model/NetworksIdDisconnectPostBody.php | 71 + .../Model/NetworksPrunePostResponse200.php | 43 + generated/Model/Node.php | 178 +- generated/Model/NodeDescription.php | 90 +- generated/Model/NodeDescriptionEngine.php | 99 + .../NodeDescriptionEnginePluginsItem.php | 71 + generated/Model/NodeDescriptionPlatform.php | 71 + generated/Model/NodeDescriptionResources.php | 71 + generated/Model/NodeEngine.php | 79 - generated/Model/NodeManagerStatus.php | 79 - generated/Model/NodePlatform.php | 55 - generated/Model/NodePlugin.php | 55 - generated/Model/NodeResources.php | 55 - generated/Model/NodeSpec.php | 108 +- generated/Model/NodeStatus.php | 31 - generated/Model/NodeVersion.php | 30 +- generated/Model/Plugin.php | 155 + generated/Model/PluginConfig.php | 379 + generated/Model/PluginConfigArgs.php | 127 + generated/Model/PluginConfigInterface.php | 71 + generated/Model/PluginConfigLinux.php | 99 + generated/Model/PluginConfigNetwork.php | 43 + generated/Model/PluginConfigRootfs.php | 71 + generated/Model/PluginConfigUser.php | 71 + generated/Model/PluginDevice.php | 127 + generated/Model/PluginEnv.php | 127 + generated/Model/PluginInterfaceType.php | 99 + generated/Model/PluginMount.php | 211 + generated/Model/PluginSettings.php | 127 + .../PluginsPrivilegesGetResponse200Item.php | 99 + generated/Model/PluginsPullPostBodyItem.php | 99 + generated/Model/Port.php | 98 +- generated/Model/PortBinding.php | 55 - generated/Model/PortConfig.php | 103 - generated/Model/ProcessConfig.php | 110 +- generated/Model/ProgressDetail.php | 98 +- generated/Model/PushImageInfo.php | 90 +- generated/Model/Registry.php | 103 - generated/Model/RegistryConfig.php | 55 - generated/Model/ReplicatedService.php | 31 - generated/Model/ResourceUpdate.php | 271 - generated/Model/Resources.php | 845 ++ .../Model/ResourcesBlkioWeightDeviceItem.php | 71 + generated/Model/ResourcesUlimitsItem.php | 99 + generated/Model/RestartPolicy.php | 67 +- generated/Model/Secret.php | 155 + generated/Model/SecretSpec.php | 99 + generated/Model/SecretVersion.php | 43 + generated/Model/SecretsCreatePostBody.php | 99 + .../Model/SecretsCreatePostResponse201.php | 43 + generated/Model/Service.php | 150 +- generated/Model/ServiceCreateResponse.php | 31 - generated/Model/ServiceEndpoint.php | 99 + .../Model/ServiceEndpointVirtualIPsItem.php | 71 + generated/Model/ServiceSpec.php | 150 +- generated/Model/ServiceSpecMode.php | 48 +- generated/Model/ServiceSpecModeReplicated.php | 43 + generated/Model/ServiceSpecNetworksItem.php | 71 + generated/Model/ServiceSpecUpdateConfig.php | 155 + generated/Model/ServiceUpdateResponse.php | 43 + generated/Model/ServiceUpdateStatus.php | 127 + generated/Model/ServiceVersion.php | 43 + generated/Model/ServicesCreatePostBody.php | 211 + .../Model/ServicesCreatePostResponse201.php | 71 + generated/Model/ServicesIdUpdatePostBody.php | 211 + generated/Model/SwarmConfig.php | 103 - generated/Model/SwarmConfigSpec.php | 103 - generated/Model/SwarmConfigSpecCAConfig.php | 55 - .../SwarmConfigSpecCAConfigExternalCA.php | 79 - generated/Model/SwarmConfigSpecDispatcher.php | 31 - .../Model/SwarmConfigSpecOrchestration.php | 31 - generated/Model/SwarmConfigSpecRaft.php | 127 - generated/Model/SwarmGetResponse200.php | 183 + .../Model/SwarmGetResponse200JoinTokens.php | 71 + generated/Model/SwarmIPAMOptions.php | 55 - generated/Model/SwarmInitPostBody.php | 127 + generated/Model/SwarmJoinConfig.php | 103 - generated/Model/SwarmJoinPostBody.php | 127 + generated/Model/SwarmJoinTokens.php | 55 - generated/Model/SwarmNetwork.php | 175 - generated/Model/SwarmNetworkSpec.php | 151 - generated/Model/SwarmSpec.php | 239 + generated/Model/SwarmSpecCAConfig.php | 71 + .../SwarmSpecCAConfigExternalCAsItem.php | 99 + generated/Model/SwarmSpecDispatcher.php | 43 + generated/Model/SwarmSpecEncryptionConfig.php | 43 + generated/Model/SwarmSpecOrchestration.php | 43 + generated/Model/SwarmSpecRaft.php | 173 + generated/Model/SwarmSpecTaskDefaults.php | 52 + .../Model/SwarmSpecTaskDefaultsLogDriver.php | 71 + generated/Model/SwarmUnlockPostBody.php | 43 + .../Model/SwarmUnlockkeyGetResponse200.php | 43 + generated/Model/SwarmUpdateConfig.php | 151 - generated/Model/SystemDfGetResponse200.php | 127 + generated/Model/SystemInformation.php | 1039 --- generated/Model/Task.php | 326 +- generated/Model/TaskSpec.php | 174 +- generated/Model/TaskSpecContainerSpec.php | 323 + .../Model/TaskSpecContainerSpecDNSConfig.php | 99 + generated/Model/TaskSpecLogDriver.php | 71 + generated/Model/TaskSpecNetworksItem.php | 71 + generated/Model/TaskSpecPlacement.php | 30 +- .../Model/TaskSpecResourceRequirements.php | 55 - generated/Model/TaskSpecResources.php | 71 + generated/Model/TaskSpecResourcesLimits.php | 71 + .../Model/TaskSpecResourcesReservations.php | 71 + generated/Model/TaskSpecRestartPolicy.php | 94 +- generated/Model/TaskStatus.php | 110 +- generated/Model/TaskStatusContainerStatus.php | 99 + generated/Model/TaskVersion.php | 43 + generated/Model/ThrottleDevice.php | 71 + generated/Model/Ulimit.php | 79 - generated/Model/UpdateConfig.php | 79 - generated/Model/UpdateStatus.php | 103 - generated/Model/Version.php | 223 - generated/Model/VersionGetResponse200.php | 295 + generated/Model/Volume.php | 228 +- generated/Model/VolumeConfig.php | 79 - generated/Model/VolumeList.php | 31 - generated/Model/VolumeUsageData.php | 71 + generated/Model/VolumesCreatePostBody.php | 127 + generated/Model/VolumesGetResponse200.php | 71 + .../Model/VolumesPrunePostResponse200.php | 71 + .../Normalizer/AnnotationsNormalizer.php | 83 - generated/Normalizer/AuthConfigNormalizer.php | 209 +- .../AuthPostResponse200Normalizer.php | 132 + generated/Normalizer/AuthResultNormalizer.php | 63 - generated/Normalizer/BuildInfoNormalizer.php | 291 +- .../Normalizer/ClusterInfoNormalizer.php | 190 + .../ClusterInfoVersionNormalizer.php | 118 + .../Normalizer/CommitResultNormalizer.php | 57 - .../ConfigHealthcheckNormalizer.php | 188 + generated/Normalizer/ConfigNormalizer.php | 710 ++ .../Normalizer/ConfigVolumesNormalizer.php | 118 + .../Normalizer/ContainerChangeNormalizer.php | 62 - .../Normalizer/ContainerConfigNormalizer.php | 307 - .../Normalizer/ContainerConnectNormalizer.php | 71 - .../ContainerCreateResultNormalizer.php | 83 - .../ContainerDisconnectNormalizer.php | 63 - .../Normalizer/ContainerInfoNormalizer.php | 227 - .../Normalizer/ContainerNetworkNormalizer.php | 104 - .../Normalizer/ContainerNodeNormalizer.php | 75 - generated/Normalizer/ContainerNormalizer.php | 223 - ...ontainerSpecMountBindOptionsNormalizer.php | 57 - .../ContainerSpecMountNormalizer.php | 87 - ...tainerSpecMountVolumeOptionsNormalizer.php | 89 - .../Normalizer/ContainerSpecNormalizer.php | 205 - .../Normalizer/ContainerStateNormalizer.php | 105 - .../Normalizer/ContainerStatusNormalizer.php | 69 - ...ntainerSummaryItemHostConfigNormalizer.php | 118 + ...erSummaryItemNetworkSettingsNormalizer.php | 134 + .../ContainerSummaryItemNormalizer.php | 434 + .../Normalizer/ContainerTopNormalizer.php | 125 - .../ContainerUpdateResultNormalizer.php | 77 - .../Normalizer/ContainerWaitNormalizer.php | 57 - ...eatePostBodyNetworkingConfigNormalizer.php | 134 + .../ContainersCreatePostBodyNormalizer.php | 746 ++ ...tainersCreatePostResponse201Normalizer.php | 144 + ...sIdChangesGetResponse200ItemNormalizer.php | 136 + .../ContainersIdExecPostBodyNormalizer.php | 294 + ...ntainersIdJsonGetResponse200Normalizer.php | 582 ++ ...ersIdJsonGetResponse200StateNormalizer.php | 298 + ...ontainersIdTopGetResponse200Normalizer.php | 184 + .../ContainersIdUpdatePostBodyNormalizer.php | 752 ++ ...inersIdUpdatePostResponse200Normalizer.php | 134 + ...tainersIdWaitPostResponse200Normalizer.php | 114 + ...ntainersPrunePostResponse200Normalizer.php | 152 + .../Normalizer/CreateImageInfoNormalizer.php | 209 +- .../Normalizer/DeviceMappingNormalizer.php | 154 + generated/Normalizer/DeviceNormalizer.php | 69 - generated/Normalizer/DeviceRateNormalizer.php | 77 - .../Normalizer/DeviceWeightNormalizer.php | 63 - generated/Normalizer/DriverNormalizer.php | 83 - .../Normalizer/EndpointConfigNormalizer.php | 63 - .../EndpointIPAMConfigNormalizer.php | 77 - generated/Normalizer/EndpointNormalizer.php | 109 - .../EndpointPortConfigNormalizer.php | 172 + .../EndpointSettingsIPAMConfigNormalizer.php | 170 + .../Normalizer/EndpointSettingsNormalizer.php | 437 +- .../Normalizer/EndpointSpecNormalizer.php | 189 +- .../EndpointVirtualIPNormalizer.php | 63 - .../Normalizer/ErrorDetailNormalizer.php | 163 +- .../Normalizer/ErrorResponseNormalizer.php | 114 + generated/Normalizer/EventNormalizer.php | 81 - .../EventsGetResponse200ActorNormalizer.php | 152 + .../EventsGetResponse200Normalizer.php | 190 + .../Normalizer/ExecCommandNormalizer.php | 105 - generated/Normalizer/ExecConfigNormalizer.php | 107 - .../Normalizer/ExecCreateResultNormalizer.php | 83 - .../ExecIdJsonGetResponse200Normalizer.php | 262 + .../ExecIdStartPostBodyNormalizer.php | 136 + .../Normalizer/ExecStartConfigNormalizer.php | 63 - .../Normalizer/GlobalServiceNormalizer.php | 51 - .../Normalizer/GraphDriverNormalizer.php | 179 +- .../HostConfigLogConfigNormalizer.php | 152 + generated/Normalizer/HostConfigNormalizer.php | 2253 +++-- .../HostConfigPortBindingsItemNormalizer.php | 136 + generated/Normalizer/IPAMConfigNormalizer.php | 69 - generated/Normalizer/IPAMNormalizer.php | 271 +- generated/Normalizer/IdResponseNormalizer.php | 114 + .../ImageDeleteResponseNormalizer.php | 136 + .../Normalizer/ImageHistoryItemNormalizer.php | 107 - generated/Normalizer/ImageItemNormalizer.php | 159 - generated/Normalizer/ImageNormalizer.php | 573 +- .../Normalizer/ImageRootFSNormalizer.php | 152 + .../ImageSearchResultNormalizer.php | 81 - .../Normalizer/ImageSummaryNormalizer.php | 288 + ...ameHistoryGetResponse200ItemNormalizer.php | 224 + .../ImagesPrunePostResponse200Normalizer.php | 152 + ...agesSearchGetResponse200ItemNormalizer.php | 190 + .../InfoGetResponse200Normalizer.php | 918 ++ .../InfoGetResponse200PluginsNormalizer.php | 168 + ...gistryConfigIndexConfigsItemNormalizer.php | 188 + ...GetResponse200RegistryConfigNormalizer.php | 168 + generated/Normalizer/JaneObjectNormalizer.php | 1040 +++ generated/Normalizer/LogConfigNormalizer.php | 83 - .../Normalizer/MountBindOptionsNormalizer.php | 118 + generated/Normalizer/MountNormalizer.php | 291 +- generated/Normalizer/MountPointNormalizer.php | 244 + .../MountTmpfsOptionsNormalizer.php | 136 + ...untVolumeOptionsDriverConfigNormalizer.php | 152 + .../MountVolumeOptionsNormalizer.php | 170 + .../NetworkAttachmentConfigNormalizer.php | 82 - .../NetworkAttachmentNormalizer.php | 82 - .../Normalizer/NetworkConfigNormalizer.php | 345 +- .../Normalizer/NetworkContainerNormalizer.php | 209 +- .../NetworkCreateConfigNormalizer.php | 126 - .../NetworkCreateResultNormalizer.php | 63 - generated/Normalizer/NetworkNormalizer.php | 441 +- .../Normalizer/NetworkingConfigNormalizer.php | 65 - .../NetworksCreatePostBodyNormalizer.php | 272 + ...etworksCreatePostResponse201Normalizer.php | 136 + .../NetworksIdConnectPostBodyNormalizer.php | 136 + ...NetworksIdDisconnectPostBodyNormalizer.php | 136 + ...NetworksPrunePostResponse200Normalizer.php | 134 + .../NodeDescriptionEngineNormalizer.php | 186 + ...DescriptionEnginePluginsItemNormalizer.php | 136 + .../Normalizer/NodeDescriptionNormalizer.php | 204 +- .../NodeDescriptionPlatformNormalizer.php | 136 + .../NodeDescriptionResourcesNormalizer.php | 136 + generated/Normalizer/NodeEngineNormalizer.php | 96 - .../NodeManagerStatusNormalizer.php | 69 - generated/Normalizer/NodeNormalizer.php | 279 +- .../Normalizer/NodePlatformNormalizer.php | 63 - generated/Normalizer/NodePluginNormalizer.php | 63 - .../Normalizer/NodeResourcesNormalizer.php | 63 - generated/Normalizer/NodeSpecNormalizer.php | 233 +- generated/Normalizer/NodeStatusNormalizer.php | 56 - .../Normalizer/NodeVersionNormalizer.php | 142 +- generated/Normalizer/NormalizerFactory.php | 127 - .../Normalizer/PluginConfigArgsNormalizer.php | 188 + .../PluginConfigInterfaceNormalizer.php | 144 + .../PluginConfigLinuxNormalizer.php | 174 + .../PluginConfigNetworkNormalizer.php | 114 + .../Normalizer/PluginConfigNormalizer.php | 338 + .../PluginConfigRootfsNormalizer.php | 152 + .../Normalizer/PluginConfigUserNormalizer.php | 136 + .../Normalizer/PluginDeviceNormalizer.php | 172 + generated/Normalizer/PluginEnvNormalizer.php | 172 + .../PluginInterfaceTypeNormalizer.php | 142 + .../Normalizer/PluginMountNormalizer.php | 230 + generated/Normalizer/PluginNormalizer.php | 174 + .../Normalizer/PluginSettingsNormalizer.php | 220 + ...PrivilegesGetResponse200ItemNormalizer.php | 170 + .../PluginsPullPostBodyItemNormalizer.php | 170 + .../Normalizer/PortBindingNormalizer.php | 63 - generated/Normalizer/PortConfigNormalizer.php | 74 - generated/Normalizer/PortNormalizer.php | 192 +- .../Normalizer/ProcessConfigNormalizer.php | 257 +- .../Normalizer/ProgressDetailNormalizer.php | 169 +- .../Normalizer/PushImageInfoNormalizer.php | 205 +- .../Normalizer/RegistryConfigNormalizer.php | 90 - generated/Normalizer/RegistryNormalizer.php | 94 - .../ReplicatedServiceNormalizer.php | 57 - .../Normalizer/ResourceUpdateNormalizer.php | 117 - ...sourcesBlkioWeightDeviceItemNormalizer.php | 136 + generated/Normalizer/ResourcesNormalizer.php | 734 ++ .../ResourcesUlimitsItemNormalizer.php | 154 + .../Normalizer/RestartPolicyNormalizer.php | 162 +- generated/Normalizer/SecretNormalizer.php | 190 + generated/Normalizer/SecretSpecNormalizer.php | 186 + .../Normalizer/SecretVersionNormalizer.php | 118 + .../SecretsCreatePostBodyNormalizer.php | 186 + ...SecretsCreatePostResponse201Normalizer.php | 118 + .../ServiceCreateResponseNormalizer.php | 57 - .../Normalizer/ServiceEndpointNormalizer.php | 186 + ...erviceEndpointVirtualIPsItemNormalizer.php | 136 + generated/Normalizer/ServiceNormalizer.php | 291 +- .../Normalizer/ServiceSpecModeNormalizer.php | 163 +- .../ServiceSpecModeReplicatedNormalizer.php | 118 + .../ServiceSpecNetworksItemNormalizer.php | 152 + .../Normalizer/ServiceSpecNormalizer.php | 328 +- .../ServiceSpecUpdateConfigNormalizer.php | 196 + .../ServiceUpdateResponseNormalizer.php | 134 + .../ServiceUpdateStatusNormalizer.php | 172 + .../Normalizer/ServiceVersionNormalizer.php | 118 + .../ServicesCreatePostBodyNormalizer.php | 258 + ...ervicesCreatePostResponse201Normalizer.php | 136 + .../ServicesIdUpdatePostBodyNormalizer.php | 258 + .../Normalizer/SwarmConfigNormalizer.php | 75 - ...ConfigSpecCAConfigExternalCANormalizer.php | 89 - .../SwarmConfigSpecCAConfigNormalizer.php | 63 - .../SwarmConfigSpecDispatcherNormalizer.php | 56 - .../Normalizer/SwarmConfigSpecNormalizer.php | 75 - ...SwarmConfigSpecOrchestrationNormalizer.php | 57 - .../SwarmConfigSpecRaftNormalizer.php | 81 - ...warmGetResponse200JoinTokensNormalizer.php | 136 + .../SwarmGetResponse200Normalizer.php | 208 + .../Normalizer/SwarmIPAMOptionsNormalizer.php | 83 - .../SwarmInitPostBodyNormalizer.php | 172 + .../Normalizer/SwarmJoinConfigNormalizer.php | 95 - .../SwarmJoinPostBodyNormalizer.php | 172 + .../Normalizer/SwarmJoinTokensNormalizer.php | 63 - .../Normalizer/SwarmNetworkNormalizer.php | 93 - .../Normalizer/SwarmNetworkSpecNormalizer.php | 107 - ...mSpecCAConfigExternalCAsItemNormalizer.php | 170 + .../SwarmSpecCAConfigNormalizer.php | 152 + .../SwarmSpecDispatcherNormalizer.php | 118 + .../SwarmSpecEncryptionConfigNormalizer.php | 118 + generated/Normalizer/SwarmSpecNormalizer.php | 260 + .../SwarmSpecOrchestrationNormalizer.php | 118 + .../Normalizer/SwarmSpecRaftNormalizer.php | 190 + ...armSpecTaskDefaultsLogDriverNormalizer.php | 152 + .../SwarmSpecTaskDefaultsNormalizer.php | 118 + .../SwarmUnlockPostBodyNormalizer.php | 118 + ...SwarmUnlockkeyGetResponse200Normalizer.php | 118 + .../SwarmUpdateConfigNormalizer.php | 87 - .../SystemDfGetResponse200Normalizer.php | 236 + .../SystemInformationNormalizer.php | 432 - generated/Normalizer/TaskNormalizer.php | 433 +- ...skSpecContainerSpecDNSConfigNormalizer.php | 202 + .../TaskSpecContainerSpecNormalizer.php | 378 + .../TaskSpecLogDriverNormalizer.php | 152 + .../TaskSpecNetworksItemNormalizer.php | 152 + generated/Normalizer/TaskSpecNormalizer.php | 275 +- .../TaskSpecPlacementNormalizer.php | 167 +- ...TaskSpecResourceRequirementsNormalizer.php | 63 - .../TaskSpecResourcesLimitsNormalizer.php | 136 + .../TaskSpecResourcesNormalizer.php | 136 + ...askSpecResourcesReservationsNormalizer.php | 136 + .../TaskSpecRestartPolicyNormalizer.php | 205 +- .../TaskStatusContainerStatusNormalizer.php | 154 + generated/Normalizer/TaskStatusNormalizer.php | 227 +- .../Normalizer/TaskVersionNormalizer.php | 118 + .../Normalizer/ThrottleDeviceNormalizer.php | 136 + generated/Normalizer/UlimitNormalizer.php | 69 - .../Normalizer/UpdateConfigNormalizer.php | 68 - .../Normalizer/UpdateStatusNormalizer.php | 74 - .../VersionGetResponse200Normalizer.php | 280 + generated/Normalizer/VersionNormalizer.php | 105 - .../Normalizer/VolumeConfigNormalizer.php | 77 - generated/Normalizer/VolumeListNormalizer.php | 77 - generated/Normalizer/VolumeNormalizer.php | 297 +- .../Normalizer/VolumeUsageDataNormalizer.php | 128 + .../VolumesCreatePostBodyNormalizer.php | 204 + .../VolumesGetResponse200Normalizer.php | 160 + .../VolumesPrunePostResponse200Normalizer.php | 152 + generated/Resource/ContainerResource.php | 830 -- generated/Resource/ExecResource.php | 148 - generated/Resource/ImageResource.php | 495 -- generated/Resource/MiscResource.php | 159 - generated/Resource/NetworkResource.php | 208 - generated/Resource/NodeResource.php | 76 - generated/Resource/ServiceResource.php | 167 - generated/Resource/SwarmResource.php | 121 - generated/Resource/TaskResource.php | 76 - generated/Resource/VolumeResource.php | 140 - generated/Runtime/Client/BaseEndpoint.php | 67 + generated/Runtime/Client/Client.php | 82 + .../Runtime/Client/CustomQueryResolver.php | 9 + generated/Runtime/Client/Endpoint.php | 42 + generated/Runtime/Client/EndpointTrait.php | 15 + generated/Runtime/Normalizer/CheckArray.php | 13 + .../Normalizer/ReferenceNormalizer.php | 48 + .../Normalizer/ValidationException.php | 20 + .../Runtime/Normalizer/ValidatorTrait.php | 17 + src/Custom/ArrayDenormalizer.php | 43 - src/Custom/QueryParam.php | 76 - src/Custom/Resource.php | 27 - src/Docker.php | 75 +- src/Manager/BaseManager.php | 46 + src/Manager/ContainerManager.php | 183 +- src/Manager/ExecManager.php | 21 +- src/Manager/ImageManager.php | 116 +- src/Manager/MiscManager.php | 35 +- src/Manager/NetworkManager.php | 33 +- src/Manager/NodeManager.php | 13 +- src/Manager/ServiceManager.php | 34 +- src/Manager/SwarmManager.php | 23 +- src/Manager/TaskManager.php | 13 +- src/Manager/VolumeManager.php | 23 +- src/Stream/BuildStream.php | 2 +- src/Stream/CreateImageStream.php | 2 +- src/Stream/EventStream.php | 2 +- src/Stream/PushStream.php | 2 +- tests/Manager/ContainerManagerTest.php | 11 +- tests/Manager/ExecManagerTest.php | 19 +- tests/Manager/ImageManagerTest.php | 18 + tests/Manager/MiscManagerTest.php | 8 +- v1.25.yaml | 7710 +++++++++++++++++ 802 files changed, 76190 insertions(+), 29566 deletions(-) delete mode 100644 docker-swagger.json create mode 100644 generated/Client.php create mode 100644 generated/Endpoint/ContainerArchiveHead.php create mode 100644 generated/Endpoint/ContainerAttach.php create mode 100644 generated/Endpoint/ContainerAttachWebsocket.php create mode 100644 generated/Endpoint/ContainerChanges.php create mode 100644 generated/Endpoint/ContainerCreate.php create mode 100644 generated/Endpoint/ContainerDelete.php create mode 100644 generated/Endpoint/ContainerExec.php create mode 100644 generated/Endpoint/ContainerExport.php create mode 100644 generated/Endpoint/ContainerGetArchive.php create mode 100644 generated/Endpoint/ContainerInspect.php create mode 100644 generated/Endpoint/ContainerKill.php create mode 100644 generated/Endpoint/ContainerList.php create mode 100644 generated/Endpoint/ContainerLogs.php create mode 100644 generated/Endpoint/ContainerPause.php create mode 100644 generated/Endpoint/ContainerPrune.php create mode 100644 generated/Endpoint/ContainerPutArchive.php create mode 100644 generated/Endpoint/ContainerRename.php create mode 100644 generated/Endpoint/ContainerResize.php create mode 100644 generated/Endpoint/ContainerRestart.php create mode 100644 generated/Endpoint/ContainerStart.php create mode 100644 generated/Endpoint/ContainerStats.php create mode 100644 generated/Endpoint/ContainerStop.php create mode 100644 generated/Endpoint/ContainerTop.php create mode 100644 generated/Endpoint/ContainerUnpause.php create mode 100644 generated/Endpoint/ContainerUpdate.php create mode 100644 generated/Endpoint/ContainerWait.php create mode 100644 generated/Endpoint/ExecInspect.php create mode 100644 generated/Endpoint/ExecResize.php create mode 100644 generated/Endpoint/ExecStart.php create mode 100644 generated/Endpoint/GetPluginPrivileges.php create mode 100644 generated/Endpoint/ImageBuild.php create mode 100644 generated/Endpoint/ImageCommit.php create mode 100644 generated/Endpoint/ImageCreate.php create mode 100644 generated/Endpoint/ImageDelete.php create mode 100644 generated/Endpoint/ImageGet.php create mode 100644 generated/Endpoint/ImageGetAll.php create mode 100644 generated/Endpoint/ImageHistory.php create mode 100644 generated/Endpoint/ImageInspect.php create mode 100644 generated/Endpoint/ImageList.php create mode 100644 generated/Endpoint/ImageLoad.php create mode 100644 generated/Endpoint/ImagePrune.php create mode 100644 generated/Endpoint/ImagePush.php create mode 100644 generated/Endpoint/ImageSearch.php create mode 100644 generated/Endpoint/ImageTag.php create mode 100644 generated/Endpoint/NetworkConnect.php create mode 100644 generated/Endpoint/NetworkCreate.php create mode 100644 generated/Endpoint/NetworkDelete.php create mode 100644 generated/Endpoint/NetworkDisconnect.php create mode 100644 generated/Endpoint/NetworkInspect.php create mode 100644 generated/Endpoint/NetworkList.php create mode 100644 generated/Endpoint/NetworkPrune.php create mode 100644 generated/Endpoint/NodeDelete.php create mode 100644 generated/Endpoint/NodeInspect.php create mode 100644 generated/Endpoint/NodeList.php create mode 100644 generated/Endpoint/NodeUpdate.php create mode 100644 generated/Endpoint/PluginCreate.php create mode 100644 generated/Endpoint/PluginDelete.php create mode 100644 generated/Endpoint/PluginDisable.php create mode 100644 generated/Endpoint/PluginEnable.php create mode 100644 generated/Endpoint/PluginInspect.php create mode 100644 generated/Endpoint/PluginList.php create mode 100644 generated/Endpoint/PluginPull.php create mode 100644 generated/Endpoint/PluginPush.php create mode 100644 generated/Endpoint/PluginSet.php create mode 100644 generated/Endpoint/SecretCreate.php create mode 100644 generated/Endpoint/SecretDelete.php create mode 100644 generated/Endpoint/SecretInspect.php create mode 100644 generated/Endpoint/SecretList.php create mode 100644 generated/Endpoint/ServiceCreate.php create mode 100644 generated/Endpoint/ServiceDelete.php create mode 100644 generated/Endpoint/ServiceInspect.php create mode 100644 generated/Endpoint/ServiceList.php create mode 100644 generated/Endpoint/ServiceLogs.php create mode 100644 generated/Endpoint/ServiceUpdate.php create mode 100644 generated/Endpoint/SwarmInit.php create mode 100644 generated/Endpoint/SwarmInspect.php create mode 100644 generated/Endpoint/SwarmJoin.php create mode 100644 generated/Endpoint/SwarmLeave.php create mode 100644 generated/Endpoint/SwarmUnlock.php create mode 100644 generated/Endpoint/SwarmUnlockkey.php create mode 100644 generated/Endpoint/SwarmUpdate.php create mode 100644 generated/Endpoint/SystemAuth.php create mode 100644 generated/Endpoint/SystemDataUsage.php create mode 100644 generated/Endpoint/SystemEvents.php create mode 100644 generated/Endpoint/SystemInfo.php create mode 100644 generated/Endpoint/SystemPing.php create mode 100644 generated/Endpoint/SystemVersion.php create mode 100644 generated/Endpoint/TaskInspect.php create mode 100644 generated/Endpoint/TaskList.php create mode 100644 generated/Endpoint/VolumeCreate.php create mode 100644 generated/Endpoint/VolumeDelete.php create mode 100644 generated/Endpoint/VolumeInspect.php create mode 100644 generated/Endpoint/VolumeList.php create mode 100644 generated/Endpoint/VolumePrune.php create mode 100644 generated/Exception/ApiException.php create mode 100644 generated/Exception/BadRequestException.php create mode 100644 generated/Exception/ClientException.php create mode 100644 generated/Exception/ConflictException.php create mode 100644 generated/Exception/ContainerArchiveHeadBadRequestException.php create mode 100644 generated/Exception/ContainerArchiveHeadInternalServerErrorException.php create mode 100644 generated/Exception/ContainerArchiveHeadNotFoundException.php create mode 100644 generated/Exception/ContainerAttachBadRequestException.php create mode 100644 generated/Exception/ContainerAttachInternalServerErrorException.php create mode 100644 generated/Exception/ContainerAttachNotFoundException.php create mode 100644 generated/Exception/ContainerAttachWebsocketBadRequestException.php create mode 100644 generated/Exception/ContainerAttachWebsocketInternalServerErrorException.php create mode 100644 generated/Exception/ContainerAttachWebsocketNotFoundException.php create mode 100644 generated/Exception/ContainerChangesInternalServerErrorException.php create mode 100644 generated/Exception/ContainerChangesNotFoundException.php create mode 100644 generated/Exception/ContainerCreateBadRequestException.php create mode 100644 generated/Exception/ContainerCreateConflictException.php create mode 100644 generated/Exception/ContainerCreateInternalServerErrorException.php create mode 100644 generated/Exception/ContainerCreateNotAcceptableException.php create mode 100644 generated/Exception/ContainerCreateNotFoundException.php create mode 100644 generated/Exception/ContainerDeleteBadRequestException.php create mode 100644 generated/Exception/ContainerDeleteInternalServerErrorException.php create mode 100644 generated/Exception/ContainerDeleteNotFoundException.php create mode 100644 generated/Exception/ContainerExecConflictException.php create mode 100644 generated/Exception/ContainerExecInternalServerErrorException.php create mode 100644 generated/Exception/ContainerExecNotFoundException.php create mode 100644 generated/Exception/ContainerExportInternalServerErrorException.php create mode 100644 generated/Exception/ContainerExportNotFoundException.php create mode 100644 generated/Exception/ContainerGetArchiveBadRequestException.php create mode 100644 generated/Exception/ContainerGetArchiveInternalServerErrorException.php create mode 100644 generated/Exception/ContainerGetArchiveNotFoundException.php create mode 100644 generated/Exception/ContainerInspectInternalServerErrorException.php create mode 100644 generated/Exception/ContainerInspectNotFoundException.php create mode 100644 generated/Exception/ContainerKillInternalServerErrorException.php create mode 100644 generated/Exception/ContainerKillNotFoundException.php create mode 100644 generated/Exception/ContainerListBadRequestException.php create mode 100644 generated/Exception/ContainerListInternalServerErrorException.php create mode 100644 generated/Exception/ContainerLogsInternalServerErrorException.php create mode 100644 generated/Exception/ContainerLogsNotFoundException.php create mode 100644 generated/Exception/ContainerPauseInternalServerErrorException.php create mode 100644 generated/Exception/ContainerPauseNotFoundException.php create mode 100644 generated/Exception/ContainerPruneInternalServerErrorException.php create mode 100644 generated/Exception/ContainerPutArchiveBadRequestException.php create mode 100644 generated/Exception/ContainerPutArchiveForbiddenException.php create mode 100644 generated/Exception/ContainerPutArchiveInternalServerErrorException.php create mode 100644 generated/Exception/ContainerPutArchiveNotFoundException.php create mode 100644 generated/Exception/ContainerRenameConflictException.php create mode 100644 generated/Exception/ContainerRenameInternalServerErrorException.php create mode 100644 generated/Exception/ContainerRenameNotFoundException.php create mode 100644 generated/Exception/ContainerResizeInternalServerErrorException.php create mode 100644 generated/Exception/ContainerResizeNotFoundException.php create mode 100644 generated/Exception/ContainerRestartInternalServerErrorException.php create mode 100644 generated/Exception/ContainerRestartNotFoundException.php create mode 100644 generated/Exception/ContainerStartInternalServerErrorException.php create mode 100644 generated/Exception/ContainerStartNotFoundException.php create mode 100644 generated/Exception/ContainerStatsInternalServerErrorException.php create mode 100644 generated/Exception/ContainerStatsNotFoundException.php create mode 100644 generated/Exception/ContainerStopInternalServerErrorException.php create mode 100644 generated/Exception/ContainerStopNotFoundException.php create mode 100644 generated/Exception/ContainerTopInternalServerErrorException.php create mode 100644 generated/Exception/ContainerTopNotFoundException.php create mode 100644 generated/Exception/ContainerUnpauseInternalServerErrorException.php create mode 100644 generated/Exception/ContainerUnpauseNotFoundException.php create mode 100644 generated/Exception/ContainerUpdateInternalServerErrorException.php create mode 100644 generated/Exception/ContainerUpdateNotFoundException.php create mode 100644 generated/Exception/ContainerWaitInternalServerErrorException.php create mode 100644 generated/Exception/ContainerWaitNotFoundException.php create mode 100644 generated/Exception/ExecInspectInternalServerErrorException.php create mode 100644 generated/Exception/ExecInspectNotFoundException.php create mode 100644 generated/Exception/ExecResizeBadRequestException.php create mode 100644 generated/Exception/ExecResizeInternalServerErrorException.php create mode 100644 generated/Exception/ExecResizeNotFoundException.php create mode 100644 generated/Exception/ExecStartConflictException.php create mode 100644 generated/Exception/ExecStartNotFoundException.php create mode 100644 generated/Exception/ForbiddenException.php create mode 100644 generated/Exception/GetPluginPrivilegesInternalServerErrorException.php create mode 100644 generated/Exception/ImageBuildInternalServerErrorException.php create mode 100644 generated/Exception/ImageCommitInternalServerErrorException.php create mode 100644 generated/Exception/ImageCommitNotFoundException.php create mode 100644 generated/Exception/ImageCreateInternalServerErrorException.php create mode 100644 generated/Exception/ImageCreateNotFoundException.php create mode 100644 generated/Exception/ImageDeleteConflictException.php create mode 100644 generated/Exception/ImageDeleteInternalServerErrorException.php create mode 100644 generated/Exception/ImageDeleteNotFoundException.php create mode 100644 generated/Exception/ImageGetAllInternalServerErrorException.php create mode 100644 generated/Exception/ImageGetInternalServerErrorException.php create mode 100644 generated/Exception/ImageHistoryInternalServerErrorException.php create mode 100644 generated/Exception/ImageHistoryNotFoundException.php create mode 100644 generated/Exception/ImageInspectInternalServerErrorException.php create mode 100644 generated/Exception/ImageInspectNotFoundException.php create mode 100644 generated/Exception/ImageListInternalServerErrorException.php create mode 100644 generated/Exception/ImageLoadInternalServerErrorException.php create mode 100644 generated/Exception/ImagePruneInternalServerErrorException.php create mode 100644 generated/Exception/ImagePushInternalServerErrorException.php create mode 100644 generated/Exception/ImagePushNotFoundException.php create mode 100644 generated/Exception/ImageSearchInternalServerErrorException.php create mode 100644 generated/Exception/ImageTagBadRequestException.php create mode 100644 generated/Exception/ImageTagConflictException.php create mode 100644 generated/Exception/ImageTagInternalServerErrorException.php create mode 100644 generated/Exception/ImageTagNotFoundException.php create mode 100644 generated/Exception/InternalServerErrorException.php create mode 100644 generated/Exception/NetworkConnectForbiddenException.php create mode 100644 generated/Exception/NetworkConnectInternalServerErrorException.php create mode 100644 generated/Exception/NetworkConnectNotFoundException.php create mode 100644 generated/Exception/NetworkCreateBadRequestException.php create mode 100644 generated/Exception/NetworkCreateForbiddenException.php create mode 100644 generated/Exception/NetworkCreateInternalServerErrorException.php create mode 100644 generated/Exception/NetworkCreateNotFoundException.php create mode 100644 generated/Exception/NetworkDeleteInternalServerErrorException.php create mode 100644 generated/Exception/NetworkDeleteNotFoundException.php create mode 100644 generated/Exception/NetworkDisconnectForbiddenException.php create mode 100644 generated/Exception/NetworkDisconnectInternalServerErrorException.php create mode 100644 generated/Exception/NetworkDisconnectNotFoundException.php create mode 100644 generated/Exception/NetworkInspectNotFoundException.php create mode 100644 generated/Exception/NetworkListInternalServerErrorException.php create mode 100644 generated/Exception/NetworkPruneInternalServerErrorException.php create mode 100644 generated/Exception/NodeDeleteInternalServerErrorException.php create mode 100644 generated/Exception/NodeDeleteNotFoundException.php create mode 100644 generated/Exception/NodeInspectInternalServerErrorException.php create mode 100644 generated/Exception/NodeInspectNotFoundException.php create mode 100644 generated/Exception/NodeListInternalServerErrorException.php create mode 100644 generated/Exception/NodeUpdateInternalServerErrorException.php create mode 100644 generated/Exception/NodeUpdateNotFoundException.php create mode 100644 generated/Exception/NotAcceptableException.php create mode 100644 generated/Exception/NotFoundException.php create mode 100644 generated/Exception/PluginCreateInternalServerErrorException.php create mode 100644 generated/Exception/PluginDeleteInternalServerErrorException.php create mode 100644 generated/Exception/PluginDeleteNotFoundException.php create mode 100644 generated/Exception/PluginDisableInternalServerErrorException.php create mode 100644 generated/Exception/PluginEnableInternalServerErrorException.php create mode 100644 generated/Exception/PluginInspectInternalServerErrorException.php create mode 100644 generated/Exception/PluginInspectNotFoundException.php create mode 100644 generated/Exception/PluginListInternalServerErrorException.php create mode 100644 generated/Exception/PluginPullInternalServerErrorException.php create mode 100644 generated/Exception/PluginPushInternalServerErrorException.php create mode 100644 generated/Exception/PluginPushNotFoundException.php create mode 100644 generated/Exception/PluginSetInternalServerErrorException.php create mode 100644 generated/Exception/PluginSetNotFoundException.php create mode 100644 generated/Exception/SecretCreateConflictException.php create mode 100644 generated/Exception/SecretCreateInternalServerErrorException.php create mode 100644 generated/Exception/SecretCreateNotAcceptableException.php create mode 100644 generated/Exception/SecretDeleteInternalServerErrorException.php create mode 100644 generated/Exception/SecretDeleteNotFoundException.php create mode 100644 generated/Exception/SecretInspectInternalServerErrorException.php create mode 100644 generated/Exception/SecretInspectNotAcceptableException.php create mode 100644 generated/Exception/SecretInspectNotFoundException.php create mode 100644 generated/Exception/SecretListInternalServerErrorException.php create mode 100644 generated/Exception/ServerException.php create mode 100644 generated/Exception/ServiceCreateConflictException.php create mode 100644 generated/Exception/ServiceCreateForbiddenException.php create mode 100644 generated/Exception/ServiceCreateInternalServerErrorException.php create mode 100644 generated/Exception/ServiceCreateServiceUnavailableException.php create mode 100644 generated/Exception/ServiceDeleteInternalServerErrorException.php create mode 100644 generated/Exception/ServiceDeleteNotFoundException.php create mode 100644 generated/Exception/ServiceInspectInternalServerErrorException.php create mode 100644 generated/Exception/ServiceInspectNotFoundException.php create mode 100644 generated/Exception/ServiceListInternalServerErrorException.php create mode 100644 generated/Exception/ServiceLogsInternalServerErrorException.php create mode 100644 generated/Exception/ServiceLogsNotFoundException.php create mode 100644 generated/Exception/ServiceUnavailableException.php create mode 100644 generated/Exception/ServiceUpdateInternalServerErrorException.php create mode 100644 generated/Exception/ServiceUpdateNotFoundException.php create mode 100644 generated/Exception/SwarmInitBadRequestException.php create mode 100644 generated/Exception/SwarmInitInternalServerErrorException.php create mode 100644 generated/Exception/SwarmInitNotAcceptableException.php create mode 100644 generated/Exception/SwarmInspectInternalServerErrorException.php create mode 100644 generated/Exception/SwarmJoinBadRequestException.php create mode 100644 generated/Exception/SwarmJoinInternalServerErrorException.php create mode 100644 generated/Exception/SwarmJoinServiceUnavailableException.php create mode 100644 generated/Exception/SwarmLeaveInternalServerErrorException.php create mode 100644 generated/Exception/SwarmLeaveServiceUnavailableException.php create mode 100644 generated/Exception/SwarmUnlockInternalServerErrorException.php create mode 100644 generated/Exception/SwarmUnlockkeyInternalServerErrorException.php create mode 100644 generated/Exception/SwarmUpdateBadRequestException.php create mode 100644 generated/Exception/SwarmUpdateInternalServerErrorException.php create mode 100644 generated/Exception/SwarmUpdateServiceUnavailableException.php create mode 100644 generated/Exception/SystemAuthInternalServerErrorException.php create mode 100644 generated/Exception/SystemDataUsageInternalServerErrorException.php create mode 100644 generated/Exception/SystemEventsInternalServerErrorException.php create mode 100644 generated/Exception/SystemInfoInternalServerErrorException.php create mode 100644 generated/Exception/SystemPingInternalServerErrorException.php create mode 100644 generated/Exception/SystemVersionInternalServerErrorException.php create mode 100644 generated/Exception/TaskInspectInternalServerErrorException.php create mode 100644 generated/Exception/TaskInspectNotFoundException.php create mode 100644 generated/Exception/TaskListInternalServerErrorException.php create mode 100644 generated/Exception/VolumeCreateInternalServerErrorException.php create mode 100644 generated/Exception/VolumeDeleteConflictException.php create mode 100644 generated/Exception/VolumeDeleteInternalServerErrorException.php create mode 100644 generated/Exception/VolumeDeleteNotFoundException.php create mode 100644 generated/Exception/VolumeInspectInternalServerErrorException.php create mode 100644 generated/Exception/VolumeInspectNotFoundException.php create mode 100644 generated/Exception/VolumeListInternalServerErrorException.php create mode 100644 generated/Exception/VolumePruneInternalServerErrorException.php delete mode 100644 generated/Model/Annotations.php create mode 100644 generated/Model/AuthPostResponse200.php delete mode 100644 generated/Model/AuthResult.php create mode 100644 generated/Model/ClusterInfo.php create mode 100644 generated/Model/ClusterInfoVersion.php delete mode 100644 generated/Model/CommitResult.php create mode 100644 generated/Model/Config.php create mode 100644 generated/Model/ConfigHealthcheck.php create mode 100644 generated/Model/ConfigVolumes.php delete mode 100644 generated/Model/Container.php delete mode 100644 generated/Model/ContainerChange.php delete mode 100644 generated/Model/ContainerConfig.php delete mode 100644 generated/Model/ContainerConnect.php delete mode 100644 generated/Model/ContainerCreateResult.php delete mode 100644 generated/Model/ContainerDisconnect.php delete mode 100644 generated/Model/ContainerInfo.php delete mode 100644 generated/Model/ContainerNetwork.php delete mode 100644 generated/Model/ContainerNode.php delete mode 100644 generated/Model/ContainerSpec.php delete mode 100644 generated/Model/ContainerSpecMount.php delete mode 100644 generated/Model/ContainerSpecMountBindOptions.php delete mode 100644 generated/Model/ContainerSpecMountVolumeOptions.php delete mode 100644 generated/Model/ContainerState.php delete mode 100644 generated/Model/ContainerStatus.php create mode 100644 generated/Model/ContainerSummaryItem.php create mode 100644 generated/Model/ContainerSummaryItemHostConfig.php create mode 100644 generated/Model/ContainerSummaryItemNetworkSettings.php delete mode 100644 generated/Model/ContainerTop.php delete mode 100644 generated/Model/ContainerUpdateResult.php delete mode 100644 generated/Model/ContainerWait.php create mode 100644 generated/Model/ContainersCreatePostBody.php create mode 100644 generated/Model/ContainersCreatePostBodyNetworkingConfig.php create mode 100644 generated/Model/ContainersCreatePostResponse201.php create mode 100644 generated/Model/ContainersIdChangesGetResponse200Item.php create mode 100644 generated/Model/ContainersIdExecPostBody.php create mode 100644 generated/Model/ContainersIdJsonGetResponse200.php create mode 100644 generated/Model/ContainersIdJsonGetResponse200State.php create mode 100644 generated/Model/ContainersIdTopGetResponse200.php create mode 100644 generated/Model/ContainersIdUpdatePostBody.php create mode 100644 generated/Model/ContainersIdUpdatePostResponse200.php create mode 100644 generated/Model/ContainersIdWaitPostResponse200.php create mode 100644 generated/Model/ContainersPrunePostResponse200.php delete mode 100644 generated/Model/Device.php create mode 100644 generated/Model/DeviceMapping.php delete mode 100644 generated/Model/DeviceRate.php delete mode 100644 generated/Model/DeviceWeight.php delete mode 100644 generated/Model/Driver.php delete mode 100644 generated/Model/Endpoint.php delete mode 100644 generated/Model/EndpointConfig.php delete mode 100644 generated/Model/EndpointIPAMConfig.php create mode 100644 generated/Model/EndpointPortConfig.php create mode 100644 generated/Model/EndpointSettingsIPAMConfig.php delete mode 100644 generated/Model/EndpointVirtualIP.php create mode 100644 generated/Model/ErrorResponse.php delete mode 100644 generated/Model/Event.php create mode 100644 generated/Model/EventsGetResponse200.php create mode 100644 generated/Model/EventsGetResponse200Actor.php delete mode 100644 generated/Model/ExecCommand.php delete mode 100644 generated/Model/ExecConfig.php delete mode 100644 generated/Model/ExecCreateResult.php create mode 100644 generated/Model/ExecIdJsonGetResponse200.php create mode 100644 generated/Model/ExecIdStartPostBody.php delete mode 100644 generated/Model/ExecStartConfig.php delete mode 100644 generated/Model/GlobalService.php create mode 100644 generated/Model/HostConfigLogConfig.php create mode 100644 generated/Model/HostConfigPortBindingsItem.php delete mode 100644 generated/Model/IPAMConfig.php create mode 100644 generated/Model/IdResponse.php create mode 100644 generated/Model/ImageDeleteResponse.php delete mode 100644 generated/Model/ImageHistoryItem.php delete mode 100644 generated/Model/ImageItem.php create mode 100644 generated/Model/ImageRootFS.php delete mode 100644 generated/Model/ImageSearchResult.php create mode 100644 generated/Model/ImageSummary.php create mode 100644 generated/Model/ImagesNameHistoryGetResponse200Item.php create mode 100644 generated/Model/ImagesPrunePostResponse200.php create mode 100644 generated/Model/ImagesSearchGetResponse200Item.php create mode 100644 generated/Model/InfoGetResponse200.php create mode 100644 generated/Model/InfoGetResponse200Plugins.php create mode 100644 generated/Model/InfoGetResponse200RegistryConfig.php create mode 100644 generated/Model/InfoGetResponse200RegistryConfigIndexConfigsItem.php delete mode 100644 generated/Model/LogConfig.php create mode 100644 generated/Model/MountBindOptions.php create mode 100644 generated/Model/MountPoint.php create mode 100644 generated/Model/MountTmpfsOptions.php create mode 100644 generated/Model/MountVolumeOptions.php create mode 100644 generated/Model/MountVolumeOptionsDriverConfig.php delete mode 100644 generated/Model/NetworkAttachment.php delete mode 100644 generated/Model/NetworkAttachmentConfig.php delete mode 100644 generated/Model/NetworkCreateConfig.php delete mode 100644 generated/Model/NetworkCreateResult.php delete mode 100644 generated/Model/NetworkingConfig.php create mode 100644 generated/Model/NetworksCreatePostBody.php create mode 100644 generated/Model/NetworksCreatePostResponse201.php create mode 100644 generated/Model/NetworksIdConnectPostBody.php create mode 100644 generated/Model/NetworksIdDisconnectPostBody.php create mode 100644 generated/Model/NetworksPrunePostResponse200.php create mode 100644 generated/Model/NodeDescriptionEngine.php create mode 100644 generated/Model/NodeDescriptionEnginePluginsItem.php create mode 100644 generated/Model/NodeDescriptionPlatform.php create mode 100644 generated/Model/NodeDescriptionResources.php delete mode 100644 generated/Model/NodeEngine.php delete mode 100644 generated/Model/NodeManagerStatus.php delete mode 100644 generated/Model/NodePlatform.php delete mode 100644 generated/Model/NodePlugin.php delete mode 100644 generated/Model/NodeResources.php delete mode 100644 generated/Model/NodeStatus.php create mode 100644 generated/Model/Plugin.php create mode 100644 generated/Model/PluginConfig.php create mode 100644 generated/Model/PluginConfigArgs.php create mode 100644 generated/Model/PluginConfigInterface.php create mode 100644 generated/Model/PluginConfigLinux.php create mode 100644 generated/Model/PluginConfigNetwork.php create mode 100644 generated/Model/PluginConfigRootfs.php create mode 100644 generated/Model/PluginConfigUser.php create mode 100644 generated/Model/PluginDevice.php create mode 100644 generated/Model/PluginEnv.php create mode 100644 generated/Model/PluginInterfaceType.php create mode 100644 generated/Model/PluginMount.php create mode 100644 generated/Model/PluginSettings.php create mode 100644 generated/Model/PluginsPrivilegesGetResponse200Item.php create mode 100644 generated/Model/PluginsPullPostBodyItem.php delete mode 100644 generated/Model/PortBinding.php delete mode 100644 generated/Model/PortConfig.php delete mode 100644 generated/Model/Registry.php delete mode 100644 generated/Model/RegistryConfig.php delete mode 100644 generated/Model/ReplicatedService.php delete mode 100644 generated/Model/ResourceUpdate.php create mode 100644 generated/Model/Resources.php create mode 100644 generated/Model/ResourcesBlkioWeightDeviceItem.php create mode 100644 generated/Model/ResourcesUlimitsItem.php create mode 100644 generated/Model/Secret.php create mode 100644 generated/Model/SecretSpec.php create mode 100644 generated/Model/SecretVersion.php create mode 100644 generated/Model/SecretsCreatePostBody.php create mode 100644 generated/Model/SecretsCreatePostResponse201.php delete mode 100644 generated/Model/ServiceCreateResponse.php create mode 100644 generated/Model/ServiceEndpoint.php create mode 100644 generated/Model/ServiceEndpointVirtualIPsItem.php create mode 100644 generated/Model/ServiceSpecModeReplicated.php create mode 100644 generated/Model/ServiceSpecNetworksItem.php create mode 100644 generated/Model/ServiceSpecUpdateConfig.php create mode 100644 generated/Model/ServiceUpdateResponse.php create mode 100644 generated/Model/ServiceUpdateStatus.php create mode 100644 generated/Model/ServiceVersion.php create mode 100644 generated/Model/ServicesCreatePostBody.php create mode 100644 generated/Model/ServicesCreatePostResponse201.php create mode 100644 generated/Model/ServicesIdUpdatePostBody.php delete mode 100644 generated/Model/SwarmConfig.php delete mode 100644 generated/Model/SwarmConfigSpec.php delete mode 100644 generated/Model/SwarmConfigSpecCAConfig.php delete mode 100644 generated/Model/SwarmConfigSpecCAConfigExternalCA.php delete mode 100644 generated/Model/SwarmConfigSpecDispatcher.php delete mode 100644 generated/Model/SwarmConfigSpecOrchestration.php delete mode 100644 generated/Model/SwarmConfigSpecRaft.php create mode 100644 generated/Model/SwarmGetResponse200.php create mode 100644 generated/Model/SwarmGetResponse200JoinTokens.php delete mode 100644 generated/Model/SwarmIPAMOptions.php create mode 100644 generated/Model/SwarmInitPostBody.php delete mode 100644 generated/Model/SwarmJoinConfig.php create mode 100644 generated/Model/SwarmJoinPostBody.php delete mode 100644 generated/Model/SwarmJoinTokens.php delete mode 100644 generated/Model/SwarmNetwork.php delete mode 100644 generated/Model/SwarmNetworkSpec.php create mode 100644 generated/Model/SwarmSpec.php create mode 100644 generated/Model/SwarmSpecCAConfig.php create mode 100644 generated/Model/SwarmSpecCAConfigExternalCAsItem.php create mode 100644 generated/Model/SwarmSpecDispatcher.php create mode 100644 generated/Model/SwarmSpecEncryptionConfig.php create mode 100644 generated/Model/SwarmSpecOrchestration.php create mode 100644 generated/Model/SwarmSpecRaft.php create mode 100644 generated/Model/SwarmSpecTaskDefaults.php create mode 100644 generated/Model/SwarmSpecTaskDefaultsLogDriver.php create mode 100644 generated/Model/SwarmUnlockPostBody.php create mode 100644 generated/Model/SwarmUnlockkeyGetResponse200.php delete mode 100644 generated/Model/SwarmUpdateConfig.php create mode 100644 generated/Model/SystemDfGetResponse200.php delete mode 100644 generated/Model/SystemInformation.php create mode 100644 generated/Model/TaskSpecContainerSpec.php create mode 100644 generated/Model/TaskSpecContainerSpecDNSConfig.php create mode 100644 generated/Model/TaskSpecLogDriver.php create mode 100644 generated/Model/TaskSpecNetworksItem.php delete mode 100644 generated/Model/TaskSpecResourceRequirements.php create mode 100644 generated/Model/TaskSpecResources.php create mode 100644 generated/Model/TaskSpecResourcesLimits.php create mode 100644 generated/Model/TaskSpecResourcesReservations.php create mode 100644 generated/Model/TaskStatusContainerStatus.php create mode 100644 generated/Model/TaskVersion.php create mode 100644 generated/Model/ThrottleDevice.php delete mode 100644 generated/Model/Ulimit.php delete mode 100644 generated/Model/UpdateConfig.php delete mode 100644 generated/Model/UpdateStatus.php delete mode 100644 generated/Model/Version.php create mode 100644 generated/Model/VersionGetResponse200.php delete mode 100644 generated/Model/VolumeConfig.php delete mode 100644 generated/Model/VolumeList.php create mode 100644 generated/Model/VolumeUsageData.php create mode 100644 generated/Model/VolumesCreatePostBody.php create mode 100644 generated/Model/VolumesGetResponse200.php create mode 100644 generated/Model/VolumesPrunePostResponse200.php delete mode 100644 generated/Normalizer/AnnotationsNormalizer.php create mode 100644 generated/Normalizer/AuthPostResponse200Normalizer.php delete mode 100644 generated/Normalizer/AuthResultNormalizer.php create mode 100644 generated/Normalizer/ClusterInfoNormalizer.php create mode 100644 generated/Normalizer/ClusterInfoVersionNormalizer.php delete mode 100644 generated/Normalizer/CommitResultNormalizer.php create mode 100644 generated/Normalizer/ConfigHealthcheckNormalizer.php create mode 100644 generated/Normalizer/ConfigNormalizer.php create mode 100644 generated/Normalizer/ConfigVolumesNormalizer.php delete mode 100644 generated/Normalizer/ContainerChangeNormalizer.php delete mode 100644 generated/Normalizer/ContainerConfigNormalizer.php delete mode 100644 generated/Normalizer/ContainerConnectNormalizer.php delete mode 100644 generated/Normalizer/ContainerCreateResultNormalizer.php delete mode 100644 generated/Normalizer/ContainerDisconnectNormalizer.php delete mode 100644 generated/Normalizer/ContainerInfoNormalizer.php delete mode 100644 generated/Normalizer/ContainerNetworkNormalizer.php delete mode 100644 generated/Normalizer/ContainerNodeNormalizer.php delete mode 100644 generated/Normalizer/ContainerNormalizer.php delete mode 100644 generated/Normalizer/ContainerSpecMountBindOptionsNormalizer.php delete mode 100644 generated/Normalizer/ContainerSpecMountNormalizer.php delete mode 100644 generated/Normalizer/ContainerSpecMountVolumeOptionsNormalizer.php delete mode 100644 generated/Normalizer/ContainerSpecNormalizer.php delete mode 100644 generated/Normalizer/ContainerStateNormalizer.php delete mode 100644 generated/Normalizer/ContainerStatusNormalizer.php create mode 100644 generated/Normalizer/ContainerSummaryItemHostConfigNormalizer.php create mode 100644 generated/Normalizer/ContainerSummaryItemNetworkSettingsNormalizer.php create mode 100644 generated/Normalizer/ContainerSummaryItemNormalizer.php delete mode 100644 generated/Normalizer/ContainerTopNormalizer.php delete mode 100644 generated/Normalizer/ContainerUpdateResultNormalizer.php delete mode 100644 generated/Normalizer/ContainerWaitNormalizer.php create mode 100644 generated/Normalizer/ContainersCreatePostBodyNetworkingConfigNormalizer.php create mode 100644 generated/Normalizer/ContainersCreatePostBodyNormalizer.php create mode 100644 generated/Normalizer/ContainersCreatePostResponse201Normalizer.php create mode 100644 generated/Normalizer/ContainersIdChangesGetResponse200ItemNormalizer.php create mode 100644 generated/Normalizer/ContainersIdExecPostBodyNormalizer.php create mode 100644 generated/Normalizer/ContainersIdJsonGetResponse200Normalizer.php create mode 100644 generated/Normalizer/ContainersIdJsonGetResponse200StateNormalizer.php create mode 100644 generated/Normalizer/ContainersIdTopGetResponse200Normalizer.php create mode 100644 generated/Normalizer/ContainersIdUpdatePostBodyNormalizer.php create mode 100644 generated/Normalizer/ContainersIdUpdatePostResponse200Normalizer.php create mode 100644 generated/Normalizer/ContainersIdWaitPostResponse200Normalizer.php create mode 100644 generated/Normalizer/ContainersPrunePostResponse200Normalizer.php create mode 100644 generated/Normalizer/DeviceMappingNormalizer.php delete mode 100644 generated/Normalizer/DeviceNormalizer.php delete mode 100644 generated/Normalizer/DeviceRateNormalizer.php delete mode 100644 generated/Normalizer/DeviceWeightNormalizer.php delete mode 100644 generated/Normalizer/DriverNormalizer.php delete mode 100644 generated/Normalizer/EndpointConfigNormalizer.php delete mode 100644 generated/Normalizer/EndpointIPAMConfigNormalizer.php delete mode 100644 generated/Normalizer/EndpointNormalizer.php create mode 100644 generated/Normalizer/EndpointPortConfigNormalizer.php create mode 100644 generated/Normalizer/EndpointSettingsIPAMConfigNormalizer.php delete mode 100644 generated/Normalizer/EndpointVirtualIPNormalizer.php create mode 100644 generated/Normalizer/ErrorResponseNormalizer.php delete mode 100644 generated/Normalizer/EventNormalizer.php create mode 100644 generated/Normalizer/EventsGetResponse200ActorNormalizer.php create mode 100644 generated/Normalizer/EventsGetResponse200Normalizer.php delete mode 100644 generated/Normalizer/ExecCommandNormalizer.php delete mode 100644 generated/Normalizer/ExecConfigNormalizer.php delete mode 100644 generated/Normalizer/ExecCreateResultNormalizer.php create mode 100644 generated/Normalizer/ExecIdJsonGetResponse200Normalizer.php create mode 100644 generated/Normalizer/ExecIdStartPostBodyNormalizer.php delete mode 100644 generated/Normalizer/ExecStartConfigNormalizer.php delete mode 100644 generated/Normalizer/GlobalServiceNormalizer.php create mode 100644 generated/Normalizer/HostConfigLogConfigNormalizer.php create mode 100644 generated/Normalizer/HostConfigPortBindingsItemNormalizer.php delete mode 100644 generated/Normalizer/IPAMConfigNormalizer.php create mode 100644 generated/Normalizer/IdResponseNormalizer.php create mode 100644 generated/Normalizer/ImageDeleteResponseNormalizer.php delete mode 100644 generated/Normalizer/ImageHistoryItemNormalizer.php delete mode 100644 generated/Normalizer/ImageItemNormalizer.php create mode 100644 generated/Normalizer/ImageRootFSNormalizer.php delete mode 100644 generated/Normalizer/ImageSearchResultNormalizer.php create mode 100644 generated/Normalizer/ImageSummaryNormalizer.php create mode 100644 generated/Normalizer/ImagesNameHistoryGetResponse200ItemNormalizer.php create mode 100644 generated/Normalizer/ImagesPrunePostResponse200Normalizer.php create mode 100644 generated/Normalizer/ImagesSearchGetResponse200ItemNormalizer.php create mode 100644 generated/Normalizer/InfoGetResponse200Normalizer.php create mode 100644 generated/Normalizer/InfoGetResponse200PluginsNormalizer.php create mode 100644 generated/Normalizer/InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer.php create mode 100644 generated/Normalizer/InfoGetResponse200RegistryConfigNormalizer.php create mode 100644 generated/Normalizer/JaneObjectNormalizer.php delete mode 100644 generated/Normalizer/LogConfigNormalizer.php create mode 100644 generated/Normalizer/MountBindOptionsNormalizer.php create mode 100644 generated/Normalizer/MountPointNormalizer.php create mode 100644 generated/Normalizer/MountTmpfsOptionsNormalizer.php create mode 100644 generated/Normalizer/MountVolumeOptionsDriverConfigNormalizer.php create mode 100644 generated/Normalizer/MountVolumeOptionsNormalizer.php delete mode 100644 generated/Normalizer/NetworkAttachmentConfigNormalizer.php delete mode 100644 generated/Normalizer/NetworkAttachmentNormalizer.php delete mode 100644 generated/Normalizer/NetworkCreateConfigNormalizer.php delete mode 100644 generated/Normalizer/NetworkCreateResultNormalizer.php delete mode 100644 generated/Normalizer/NetworkingConfigNormalizer.php create mode 100644 generated/Normalizer/NetworksCreatePostBodyNormalizer.php create mode 100644 generated/Normalizer/NetworksCreatePostResponse201Normalizer.php create mode 100644 generated/Normalizer/NetworksIdConnectPostBodyNormalizer.php create mode 100644 generated/Normalizer/NetworksIdDisconnectPostBodyNormalizer.php create mode 100644 generated/Normalizer/NetworksPrunePostResponse200Normalizer.php create mode 100644 generated/Normalizer/NodeDescriptionEngineNormalizer.php create mode 100644 generated/Normalizer/NodeDescriptionEnginePluginsItemNormalizer.php create mode 100644 generated/Normalizer/NodeDescriptionPlatformNormalizer.php create mode 100644 generated/Normalizer/NodeDescriptionResourcesNormalizer.php delete mode 100644 generated/Normalizer/NodeEngineNormalizer.php delete mode 100644 generated/Normalizer/NodeManagerStatusNormalizer.php delete mode 100644 generated/Normalizer/NodePlatformNormalizer.php delete mode 100644 generated/Normalizer/NodePluginNormalizer.php delete mode 100644 generated/Normalizer/NodeResourcesNormalizer.php delete mode 100644 generated/Normalizer/NodeStatusNormalizer.php delete mode 100644 generated/Normalizer/NormalizerFactory.php create mode 100644 generated/Normalizer/PluginConfigArgsNormalizer.php create mode 100644 generated/Normalizer/PluginConfigInterfaceNormalizer.php create mode 100644 generated/Normalizer/PluginConfigLinuxNormalizer.php create mode 100644 generated/Normalizer/PluginConfigNetworkNormalizer.php create mode 100644 generated/Normalizer/PluginConfigNormalizer.php create mode 100644 generated/Normalizer/PluginConfigRootfsNormalizer.php create mode 100644 generated/Normalizer/PluginConfigUserNormalizer.php create mode 100644 generated/Normalizer/PluginDeviceNormalizer.php create mode 100644 generated/Normalizer/PluginEnvNormalizer.php create mode 100644 generated/Normalizer/PluginInterfaceTypeNormalizer.php create mode 100644 generated/Normalizer/PluginMountNormalizer.php create mode 100644 generated/Normalizer/PluginNormalizer.php create mode 100644 generated/Normalizer/PluginSettingsNormalizer.php create mode 100644 generated/Normalizer/PluginsPrivilegesGetResponse200ItemNormalizer.php create mode 100644 generated/Normalizer/PluginsPullPostBodyItemNormalizer.php delete mode 100644 generated/Normalizer/PortBindingNormalizer.php delete mode 100644 generated/Normalizer/PortConfigNormalizer.php delete mode 100644 generated/Normalizer/RegistryConfigNormalizer.php delete mode 100644 generated/Normalizer/RegistryNormalizer.php delete mode 100644 generated/Normalizer/ReplicatedServiceNormalizer.php delete mode 100644 generated/Normalizer/ResourceUpdateNormalizer.php create mode 100644 generated/Normalizer/ResourcesBlkioWeightDeviceItemNormalizer.php create mode 100644 generated/Normalizer/ResourcesNormalizer.php create mode 100644 generated/Normalizer/ResourcesUlimitsItemNormalizer.php create mode 100644 generated/Normalizer/SecretNormalizer.php create mode 100644 generated/Normalizer/SecretSpecNormalizer.php create mode 100644 generated/Normalizer/SecretVersionNormalizer.php create mode 100644 generated/Normalizer/SecretsCreatePostBodyNormalizer.php create mode 100644 generated/Normalizer/SecretsCreatePostResponse201Normalizer.php delete mode 100644 generated/Normalizer/ServiceCreateResponseNormalizer.php create mode 100644 generated/Normalizer/ServiceEndpointNormalizer.php create mode 100644 generated/Normalizer/ServiceEndpointVirtualIPsItemNormalizer.php create mode 100644 generated/Normalizer/ServiceSpecModeReplicatedNormalizer.php create mode 100644 generated/Normalizer/ServiceSpecNetworksItemNormalizer.php create mode 100644 generated/Normalizer/ServiceSpecUpdateConfigNormalizer.php create mode 100644 generated/Normalizer/ServiceUpdateResponseNormalizer.php create mode 100644 generated/Normalizer/ServiceUpdateStatusNormalizer.php create mode 100644 generated/Normalizer/ServiceVersionNormalizer.php create mode 100644 generated/Normalizer/ServicesCreatePostBodyNormalizer.php create mode 100644 generated/Normalizer/ServicesCreatePostResponse201Normalizer.php create mode 100644 generated/Normalizer/ServicesIdUpdatePostBodyNormalizer.php delete mode 100644 generated/Normalizer/SwarmConfigNormalizer.php delete mode 100644 generated/Normalizer/SwarmConfigSpecCAConfigExternalCANormalizer.php delete mode 100644 generated/Normalizer/SwarmConfigSpecCAConfigNormalizer.php delete mode 100644 generated/Normalizer/SwarmConfigSpecDispatcherNormalizer.php delete mode 100644 generated/Normalizer/SwarmConfigSpecNormalizer.php delete mode 100644 generated/Normalizer/SwarmConfigSpecOrchestrationNormalizer.php delete mode 100644 generated/Normalizer/SwarmConfigSpecRaftNormalizer.php create mode 100644 generated/Normalizer/SwarmGetResponse200JoinTokensNormalizer.php create mode 100644 generated/Normalizer/SwarmGetResponse200Normalizer.php delete mode 100644 generated/Normalizer/SwarmIPAMOptionsNormalizer.php create mode 100644 generated/Normalizer/SwarmInitPostBodyNormalizer.php delete mode 100644 generated/Normalizer/SwarmJoinConfigNormalizer.php create mode 100644 generated/Normalizer/SwarmJoinPostBodyNormalizer.php delete mode 100644 generated/Normalizer/SwarmJoinTokensNormalizer.php delete mode 100644 generated/Normalizer/SwarmNetworkNormalizer.php delete mode 100644 generated/Normalizer/SwarmNetworkSpecNormalizer.php create mode 100644 generated/Normalizer/SwarmSpecCAConfigExternalCAsItemNormalizer.php create mode 100644 generated/Normalizer/SwarmSpecCAConfigNormalizer.php create mode 100644 generated/Normalizer/SwarmSpecDispatcherNormalizer.php create mode 100644 generated/Normalizer/SwarmSpecEncryptionConfigNormalizer.php create mode 100644 generated/Normalizer/SwarmSpecNormalizer.php create mode 100644 generated/Normalizer/SwarmSpecOrchestrationNormalizer.php create mode 100644 generated/Normalizer/SwarmSpecRaftNormalizer.php create mode 100644 generated/Normalizer/SwarmSpecTaskDefaultsLogDriverNormalizer.php create mode 100644 generated/Normalizer/SwarmSpecTaskDefaultsNormalizer.php create mode 100644 generated/Normalizer/SwarmUnlockPostBodyNormalizer.php create mode 100644 generated/Normalizer/SwarmUnlockkeyGetResponse200Normalizer.php delete mode 100644 generated/Normalizer/SwarmUpdateConfigNormalizer.php create mode 100644 generated/Normalizer/SystemDfGetResponse200Normalizer.php delete mode 100644 generated/Normalizer/SystemInformationNormalizer.php create mode 100644 generated/Normalizer/TaskSpecContainerSpecDNSConfigNormalizer.php create mode 100644 generated/Normalizer/TaskSpecContainerSpecNormalizer.php create mode 100644 generated/Normalizer/TaskSpecLogDriverNormalizer.php create mode 100644 generated/Normalizer/TaskSpecNetworksItemNormalizer.php delete mode 100644 generated/Normalizer/TaskSpecResourceRequirementsNormalizer.php create mode 100644 generated/Normalizer/TaskSpecResourcesLimitsNormalizer.php create mode 100644 generated/Normalizer/TaskSpecResourcesNormalizer.php create mode 100644 generated/Normalizer/TaskSpecResourcesReservationsNormalizer.php create mode 100644 generated/Normalizer/TaskStatusContainerStatusNormalizer.php create mode 100644 generated/Normalizer/TaskVersionNormalizer.php create mode 100644 generated/Normalizer/ThrottleDeviceNormalizer.php delete mode 100644 generated/Normalizer/UlimitNormalizer.php delete mode 100644 generated/Normalizer/UpdateConfigNormalizer.php delete mode 100644 generated/Normalizer/UpdateStatusNormalizer.php create mode 100644 generated/Normalizer/VersionGetResponse200Normalizer.php delete mode 100644 generated/Normalizer/VersionNormalizer.php delete mode 100644 generated/Normalizer/VolumeConfigNormalizer.php delete mode 100644 generated/Normalizer/VolumeListNormalizer.php create mode 100644 generated/Normalizer/VolumeUsageDataNormalizer.php create mode 100644 generated/Normalizer/VolumesCreatePostBodyNormalizer.php create mode 100644 generated/Normalizer/VolumesGetResponse200Normalizer.php create mode 100644 generated/Normalizer/VolumesPrunePostResponse200Normalizer.php delete mode 100644 generated/Resource/ContainerResource.php delete mode 100644 generated/Resource/ExecResource.php delete mode 100644 generated/Resource/ImageResource.php delete mode 100644 generated/Resource/MiscResource.php delete mode 100644 generated/Resource/NetworkResource.php delete mode 100644 generated/Resource/NodeResource.php delete mode 100644 generated/Resource/ServiceResource.php delete mode 100644 generated/Resource/SwarmResource.php delete mode 100644 generated/Resource/TaskResource.php delete mode 100644 generated/Resource/VolumeResource.php create mode 100644 generated/Runtime/Client/BaseEndpoint.php create mode 100644 generated/Runtime/Client/Client.php create mode 100644 generated/Runtime/Client/CustomQueryResolver.php create mode 100644 generated/Runtime/Client/Endpoint.php create mode 100644 generated/Runtime/Client/EndpointTrait.php create mode 100644 generated/Runtime/Normalizer/CheckArray.php create mode 100644 generated/Runtime/Normalizer/ReferenceNormalizer.php create mode 100644 generated/Runtime/Normalizer/ValidationException.php create mode 100644 generated/Runtime/Normalizer/ValidatorTrait.php delete mode 100644 src/Custom/ArrayDenormalizer.php delete mode 100644 src/Custom/QueryParam.php delete mode 100644 src/Custom/Resource.php create mode 100644 src/Manager/BaseManager.php create mode 100644 v1.25.yaml diff --git a/.jane-openapi b/.jane-openapi index 6822343e4..1807bf269 100644 --- a/.jane-openapi +++ b/.jane-openapi @@ -3,5 +3,6 @@ return [ 'directory' => 'generated/', 'namespace' => 'Docker\\API', - 'openapi-file' => __DIR__ . '/docker-swagger.json', + 'strict' => false, + 'openapi-file' => __DIR__ . '/v1.25.yaml', ]; diff --git a/README.md b/README.md index 8d9726601..3b9e01ba3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Docker PHP **Docker PHP** (for lack of a better name) is a [Docker](http://docker.com/) client written in PHP. This library aim to reach 100% API support of the Docker Engine. -The test suite currently passes against the [Docker Remote API v1.24](http://docs.docker.com/reference/api/docker_remote_api_v1.24/). +The test suite currently passes against the [Docker Remote API v1.25](https://docs.docker.com/reference/api/engine/version/v1.25/). [![Documentation Status](https://readthedocs.org/projects/docker-php/badge/?version=latest)](http://docker-php.readthedocs.org/en/latest/) [![Latest Version](https://img.shields.io/github/release/plesk/docker-php.svg?style=flat-square)](https://github.com/plesk/docker-php/releases) @@ -77,13 +77,6 @@ Credits This README heavily inspired by [willdurand/Negotiation](https://github.com/willdurand/Negotiation) by @willdurand. This guy is pretty awesome. -Change of jane/open-api dependency ----------------------------------- - -Previous version of **Docker PHP** library had **"jane/open-api": "^1.3"** composer dependency. This project is deprecated and archived. -Authors suggest to use https://github.com/janephp/janephp but we used a few classes only so we rewrote them in this library (src/custom). -If some issues happen we should consider to use recommended library and rewrite this library in appropriate way which could be tricky task since code is completely different - License ------- diff --git a/composer.json b/composer.json index 2fa1b348f..650a0a09d 100644 --- a/composer.json +++ b/composer.json @@ -23,16 +23,23 @@ "guzzlehttp/psr7": "^2.6", "symfony/serializer": "^6.3", "symfony/options-resolver": "^6.3", - "php-http/message-factory": "^1.1" + "php-http/message-factory": "^1.1", + "jane-php/open-api-runtime": "^7.8" }, "require-dev": { "phpunit/phpunit": "^10.4", - "friendsofphp/php-cs-fixer": "^3.35" + "friendsofphp/php-cs-fixer": "^3.35", + "jane-php/open-api-2": "^7.8" }, "scripts": { "test": "vendor/bin/phpunit", "test-ci": "vendor/bin/phpunit --coverage-clover build/coverage.xml" }, "prefer-stable": true, - "minimum-stability": "dev" + "minimum-stability": "dev", + "config": { + "allow-plugins": { + "php-http/discovery": false + } + } } diff --git a/docker-swagger.json b/docker-swagger.json deleted file mode 100644 index eb982bbbb..000000000 --- a/docker-swagger.json +++ /dev/null @@ -1,5261 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Docker Remote API", - "description": "The API for each docker installation.", - "termsOfService": "http://example.com/tos/", - "version": "v1.22" - }, - "host": "localhost", - "schemes": [ - "http", - "https" - ], - "produces": [ - "application/json" - ], - "consumes": [ - "application/json" - ], - "definitions": { - "Version": { - "type": "object", - "properties": { - "Version": { - "type": "string" - }, - "Os": { - "type": "string" - }, - "KernelVersion": { - "type": "string" - }, - "GoVersion": { - "type": "string" - }, - "GitCommit": { - "type": "string" - }, - "Arch": { - "type": "string" - }, - "ApiVersion": { - "type": "string" - }, - "Experimental": { - "type": "boolean" - }, - "BuildTime": { - "type": "string" - } - } - }, - "Port": { - "type": "object", - "properties": { - "PrivatePort": { - "type": "integer" - }, - "PublicPort": { - "type": "integer" - }, - "Type": { - "type": "string" - } - } - }, - "Mount": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "Source": { - "type": "string" - }, - "Destination": { - "type": "string" - }, - "Driver": { - "type": "string" - }, - "Mode": { - "type": "string" - }, - "RW": { - "type": "boolean" - }, - "Propagation": { - "type": "string" - } - } - }, - "LogConfig": { - "type": "object", - "properties": { - "Type": { - "type": "string" - }, - "Config": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - } - } - }, - "Ulimit": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "Soft": { - "type": "integer" - }, - "Hard": { - "type": "integer" - } - } - }, - "Device": { - "type": "object", - "properties": { - "PathOnHost": { - "type": "string" - }, - "PathInContainer": { - "type": "string" - }, - "CgroupPermissions": { - "type": "string" - } - } - }, - "RestartPolicy": { - "type": "object", - "properties": { - "Name": { - "type": "string", - "enum": ["always", "on-failure"] - }, - "MaximumRetryCount": { - "type": "integer" - } - }, - "default": {} - }, - "PortBinding": { - "type": "object", - "properties": { - "HostPort": { - "type": "string" - }, - "HostIp": { - "type": "string" - } - } - }, - "HostConfig": { - "type": "object", - "properties": { - "Binds": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "Tmpfs": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - }, - "Links": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "LxcConf": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - }, - "Memory": { - "type": "integer", - "default": 0 - }, - "MemorySwap": { - "type": "integer", - "default": 0 - }, - "MemoryReservation": { - "type": "integer" - }, - "KernelMemory": { - "type": "integer" - }, - "CpuShares": { - "type": "integer" - }, - "CpuPeriod": { - "type": "integer" - }, - "CpuQuota": { - "type": "integer" - }, - "CpusetCpus": { - "type": "string" - }, - "CpusetMems": { - "type": "string" - }, - "MaximumIOps": { - "type": "integer" - }, - "MaximumIOBps": { - "type": "integer" - }, - "BlkioWeight": { - "type": "integer" - }, - "BlkioWeightDevice": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/DeviceWeight" - } - }, - "BlkioDeviceReadBps": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/DeviceRate" - } - }, - "BlkioDeviceReadIOps": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/DeviceRate" - } - }, - "BlkioDeviceWriteBps": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/DeviceRate" - } - }, - "BlkioDeviceWriteIOps": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/DeviceRate" - } - }, - "MemorySwappiness": { - "type": "integer" - }, - "OomKillDisable": { - "type": "boolean" - }, - "OomScoreAdj": { - "type": "integer" - }, - "PidsLimit": { - "type": "integer" - }, - "PortBindings": { - "type": ["object", "null"], - "additionalProperties": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/PortBinding" - } - } - }, - "PublishAllPorts": { - "type": "boolean" - }, - "Privileged": { - "type": "boolean" - }, - "ReadonlyRootfs": { - "type": "boolean" - }, - "Sysctls": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - }, - "StorageOpt": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - }, - "Dns": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "DnsOptions": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "DnsSearch": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "ExtraHosts": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "VolumesFrom": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "CapAdd": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "CapDrop": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "GroupAdd": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "RestartPolicy": { - "$ref": "#/definitions/RestartPolicy" - }, - "UsernsMode": { - "type": "string" - }, - "NetworkMode": { - "type": "string" - }, - "Devices": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/Device" - } - }, - "Ulimits": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/Ulimit" - } - }, - "SecurityOpt": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "LogConfig": { - "$ref": "#/definitions/LogConfig" - }, - "CgroupParent": { - "type": "string" - }, - "VolumeDriver": { - "type": "string" - }, - "ShmSize": { - "type": "integer" - } - } - }, - "DeviceWeight": { - "type": "object", - "properties": { - "Path": { - "type": "string" - }, - "Weight": { - "type": "integer" - } - } - }, - "DeviceRate": { - "type": "object", - "properties": { - "Path": { - "type": "string" - }, - "Rate": { - "type": ["integer","string"] - } - } - }, - "ContainerInfo": { - "type": "object", - "properties": { - "Id": { - "type": "string" - }, - "Names": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "Image": { - "type": "string" - }, - "ImageID": { - "type": "string" - }, - "Command": { - "type": "string" - }, - "Created": { - "type": "integer" - }, - "State": { - "type": "string" - }, - "Status": { - "type": "string" - }, - "Ports": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/Port" - } - }, - "Labels": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - }, - "SizeRw": { - "type": "integer" - }, - "SizeRootFs": { - "type": "integer" - }, - "HostConfig": { - "$ref": "#/definitions/HostConfig" - }, - "NetworkSettings": { - "$ref": "#/definitions/NetworkConfig" - }, - "Mounts": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/Mount" - } - }, - "Node": { - "$ref": "#/definitions/ContainerNode" - } - } - }, - "ContainerConfig": { - "type": "object", - "properties": { - "Hostname": { - "type": "string" - }, - "Domainname": { - "type": "string" - }, - "User": { - "type": "string" - }, - "AttachStdin": { - "type": "boolean", - "default": false - }, - "AttachStdout": { - "type": "boolean", - "default": true - }, - "AttachStderr": { - "type": "boolean", - "default": true - }, - "Tty": { - "type": "boolean", - "default": false - }, - "OpenStdin": { - "type": "boolean", - "default": false - }, - "StdinOnce": { - "type": "boolean", - "default": false - }, - "Env": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "Cmd": { - "type": ["array", "string"], - "items": { - "type": "string" - } - }, - "Entrypoint": { - "type": ["array", "string"], - "items": { - "type": "string" - } - }, - "Image": { - "type": "string" - }, - "Labels": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - }, - "Volumes": { - "type": ["object", "null"], - "additionalProperties": { - "type": "object" - } - }, - "WorkingDir": { - "type": "string" - }, - "NetworkDisabled": { - "type": "boolean" - }, - "MacAddress": { - "type": "string" - }, - "ExposedPorts": { - "type": ["object", "null"], - "additionalProperties": { - "type": "object", - "enum": [{}], - "default": {} - } - }, - "StopSignal": { - "type": "string" - }, - "HostConfig": { - "$ref": "#/definitions/HostConfig" - }, - "NetworkingConfig": { - "$ref": "#/definitions/NetworkingConfig" - } - } - }, - "NetworkingConfig": { - "type": "object", - "properties": { - "EndpointsConfig": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/EndpointSettings" - } - } - } - }, - "EndpointSettings": { - "type": "object", - "properties": { - "IPAMConfig": { - "$ref": "#/definitions/EndpointIPAMConfig" - }, - "Links": { - "type": "array", - "items": { - "type": "string" - } - }, - "Aliases": { - "type": "array", - "items": { - "type": "string" - } - }, - "NetworkID": { - "type": "string" - }, - "EndpointID": { - "type": "string" - }, - "Gateway": { - "type": "string" - }, - "IPAddress": { - "type": "string" - }, - "IPPrefixLen": { - "type": "integer" - }, - "IPv6Gateway": { - "type": "string" - }, - "GlobalIPv6Address": { - "type": "string" - }, - "GlobalIPv6PrefixLen": { - "type": "integer" - }, - "MacAddress": { - "type": "string" - } - } - }, - "EndpointIPAMConfig": { - "type": "object", - "properties": { - "IPv4Address": { - "type": "string" - }, - "IPv6Address": { - "type": "string" - }, - "LinkLocalIPs": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "NetworkConfig": { - "type": "object", - "properties": { - "Bridge": { - "type": "string" - }, - "Gateway": { - "type": "string" - }, - "IPAddress": { - "type": "string" - }, - "IPPrefixLen": { - "type": "integer" - }, - "MacAddress": { - "type": "string" - }, - "PortMapping": { - "type": "string" - }, - "Networks": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ContainerNetwork" - } - }, - "Ports": { - "type": ["object", "null"], - "additionalProperties": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/PortBinding" - } - } - } - } - }, - "ContainerNetwork": { - "type": "object", - "properties": { - "NetworkID": { - "type": "string" - }, - "EndpointID": { - "type": "string" - }, - "Gateway": { - "type": "string" - }, - "IPAddress": { - "type": "string" - }, - "IPPrefixLen": { - "type": "integer" - }, - "IPv6Gateway": { - "type": "string" - }, - "GlobalIPv6Address": { - "type": "string" - }, - "GlobalIPv6PrefixLen": { - "type": "integer" - }, - "MacAddress": { - "type": "string" - } - } - }, - "ContainerState": { - "type": "object", - "properties": { - "Error": { - "type": "string" - }, - "ExitCode": { - "type": "integer" - }, - "FinishedAt": { - "type": "string" - }, - "OOMKilled": { - "type": "boolean" - }, - "Paused": { - "type": "boolean" - }, - "Pid": { - "type": "integer" - }, - "Restarting": { - "type": "boolean" - }, - "Running": { - "type": "boolean" - }, - "StartedAt": { - "type": "string" - } - } - }, - "Container": { - "type": "object", - "properties": { - "AppArmorProfile": { - "type": "string" - }, - "Args": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "Config": { - "$ref": "#/definitions/ContainerConfig" - }, - "Created": { - "type": "string" - }, - "Driver": { - "type": "string" - }, - "ExecDriver": { - "type": "string" - }, - "ExecIDs": { - "type": "string" - }, - "HostConfig": { - "$ref": "#/definitions/HostConfig" - }, - "HostnamePath": { - "type": "string" - }, - "HostsPath": { - "type": "string" - }, - "LogPath": { - "type": "string" - }, - "Id": { - "type": "string" - }, - "Image": { - "type": "string" - }, - "MountLabel": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "NetworkSettings": { - "$ref": "#/definitions/NetworkConfig" - }, - "Path": { - "type": "string" - }, - "ProcessLabel": { - "type": "string" - }, - "ResolvConfPath": { - "type": "string" - }, - "RestartCount": { - "type": "integer" - }, - "State": { - "$ref": "#/definitions/ContainerState" - }, - "Mounts": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/Mount" - } - } - } - }, - "ContainerTop": { - "type": "object", - "properties": { - "Titles": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "Processes": { - "type": ["array", "null"], - "items": { - "type": ["array", "null"], - "items": { - "type": "string" - } - } - } - } - }, - "ContainerChange": { - "type": "object", - "properties": { - "Path": { - "type": "string" - }, - "Kind": { - "type": "integer" - } - } - }, - "ContainerWait": { - "type": "object", - "properties": { - "StatusCode": { - "type": "integer" - } - } - }, - "GraphDriver": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "Data": { - "type": "object" - } - } - }, - "ImageItem": { - "type": "object", - "properties": { - "RepoTags": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "Id": { - "type": "string" - }, - "ParentId": { - "type": "string" - }, - "Created": { - "type": "integer" - }, - "Size": { - "type": "integer" - }, - "VirtualSize": { - "type": "integer" - }, - "Labels": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - }, - "RepoDigests": { - "type": ["array", "null"], - "items": { - "type": "string" - } - } - } - }, - "Image": { - "type": "object", - "properties": { - "Id": { - "type": "string" - }, - "Container": { - "type": "string" - }, - "Comment": { - "type": "string" - }, - "Os": { - "type": "string" - }, - "Architecture": { - "type": "string" - }, - "Parent": { - "type": "string" - }, - "ContainerConfig": { - "$ref": "#/definitions/ContainerConfig" - }, - "DockerVersion": { - "type": "string" - }, - "VirtualSize": { - "type": "integer" - }, - "Size": { - "type": "integer" - }, - "Author": { - "type": "string" - }, - "Created": { - "type": "string" - }, - "GraphDriver": { - "$ref": "#/definitions/GraphDriver" - }, - "RepoDigests": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "RepoTags": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "Config": { - "$ref": "#/definitions/ContainerConfig" - } - } - }, - "ImageHistoryItem": { - "type": "object", - "properties": { - "Id": { - "type": "string" - }, - "Created": { - "type": "integer" - }, - "CreatedBy": { - "type": "string" - }, - "Tags": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "Size": { - "type": "integer" - }, - "Comment": { - "type": "string" - } - } - }, - "ImageSearchResult": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "is_official": { - "type": "boolean" - }, - "is_automated": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "star_count": { - "type": "integer" - } - } - }, - "AuthConfig": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "password": { - "type": "string" - }, - "email": { - "type": "string" - }, - "serveraddress": { - "type": "string" - }, - "registrytoken": { - "type": "string" - } - } - }, - "SystemInformation": { - "type": "object", - "properties": { - "Architecture": { - "type": "string" - }, - "ClusterStore": { - "type": "string" - }, - "CgroupDriver": { - "type": "string" - }, - "Containers": { - "type": "integer" - }, - "ContainersRunning": { - "type": "integer" - }, - "ContainersStopped": { - "type": "integer" - }, - "ContainersPaused": { - "type": "integer" - }, - "CpuCfsPeriod": { - "type": "boolean" - }, - "CpuCfsQuota": { - "type": "boolean" - }, - "Debug": { - "type": "boolean" - }, - "DiscoveryBackend": { - "type": "string" - }, - "DockerRootDir": { - "type": "string" - }, - "Driver": { - "type": "string" - }, - "DriverStatus": { - "type": ["array", "null"], - "items": { - "type": ["array", "null"], - "items": { - "type": "string" - } - } - }, - "SystemStatus": { - "type": ["array", "null"], - "items": { - "type": ["array", "null"], - "items": { - "type": "string" - } - } - }, - "ExperimentalBuild": { - "type": "boolean" - }, - "HttpProxy": { - "type": "string" - }, - "HttpsProxy": { - "type": "string" - }, - "ID": { - "type": "string" - }, - "IPv4Forwarding": { - "type": "boolean" - }, - "Images": { - "type": "integer" - }, - "IndexServerAddress": { - "type": "string" - }, - "InitPath": { - "type": "string" - }, - "InitSha1": { - "type": "string" - }, - "KernelMemory": { - "type": "boolean" - }, - "KernelVersion": { - "type": "string" - }, - "Labels": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - }, - "MemTotal": { - "type": "integer" - }, - "MemoryLimit": { - "type": "boolean" - }, - "NCPU": { - "type": "integer" - }, - "NEventsListener": { - "type": "integer" - }, - "NFd": { - "type": "integer" - }, - "NGoroutines": { - "type": "integer" - }, - "Name": { - "type": "string" - }, - "NoProxy": { - "type": "string" - }, - "OomKillDisable": { - "type": "boolean" - }, - "OSType": { - "type": "string" - }, - "OperatingSystem": { - "type": "string" - }, - "RegistryConfig": { - "$ref": "#/definitions/RegistryConfig" - }, - "SecurityOptions": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "SwapLimit": { - "type": "boolean" - }, - "SystemTime": { - "type": "string" - }, - "ServerVersion": { - "type": "string" - } - } - }, - "RegistryConfig": { - "type": "object", - "properties": { - "IndexConfigs": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Registry" - } - }, - "InsecureRegistryCIDRs": { - "type": ["array", "null"], - "items": { - "type": "string" - } - } - } - }, - "Registry": { - "type": "object", - "properties": { - "Mirrors": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "Name": { - "type": "string" - }, - "Official": { - "type": "boolean" - }, - "Secure": { - "type": "boolean" - } - } - }, - "CommitResult": { - "type": "object", - "properties": { - "Id": { - "type": "string" - } - } - }, - "ExecCreateResult": { - "type": "object", - "properties": { - "Id": { - "type": "string" - }, - "Warnings": { - "type": ["array", "null"], - "items": { - "type": "string" - } - } - } - }, - "ExecConfig": { - "type": "object", - "properties": { - "AttachStdin": { - "type": "boolean" - }, - "AttachStdout": { - "type": "boolean" - }, - "AttachStderr": { - "type": "boolean" - }, - "Tty": { - "type": "boolean" - }, - "Cmd": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "DetachKeys": { - "type": "string" - } - } - }, - "ExecStartConfig": { - "type": "object", - "properties": { - "Detach": { - "type": "boolean" - }, - "Tty": { - "type": "boolean" - } - } - }, - "ExecCommand": { - "type": "object", - "properties": { - "ID": { - "type": "string" - }, - "Running": { - "type": "boolean" - }, - "ExitCode": { - "type": "integer" - }, - "ProcessConfig": { - "$ref": "#/definitions/ProcessConfig" - }, - "OpenStdin": { - "type": "boolean" - }, - "OpenStderr": { - "type": "boolean" - }, - "OpenStdout": { - "type": "boolean" - }, - "Container": { - "$ref": "#/definitions/Container" - }, - "DetachKeys": { - "type": "string" - } - } - }, - "ProcessConfig": { - "type": "object", - "properties": { - "privileged": { - "type": "boolean" - }, - "user": { - "type": "string" - }, - "tty": { - "type": "boolean" - }, - "entrypoint": { - "type": "string" - }, - "arguments": { - "type": ["array", "null"], - "items": { - "type": "string" - } - } - } - }, - "VolumeList": { - "type": "object", - "properties": { - "Volumes": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/Volume" - } - } - } - }, - "Volume": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "Driver": { - "type": "string" - }, - "Mountpoint": { - "type": "string" - } - } - }, - "VolumeConfig": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "Driver": { - "type": "string" - }, - "DriverOpts": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "Network": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "Id": { - "type": "string" - }, - "Scope": { - "type": "string" - }, - "Driver": { - "type": "string" - }, - "EnableIPv6": { - "type": "boolean" - }, - "IPAM": { - "$ref": "#/definitions/IPAM" - }, - "Internal": { - "type": "boolean" - }, - "Containers": { - "type": ["object", "null"], - "additionalProperties": { - "$ref": "#/definitions/NetworkContainer" - } - }, - "Options": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "Labels": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - } - } - }, - "IPAM": { - "type": "object", - "properties": { - "Driver": { - "type": "string" - }, - "Config": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/IPAMConfig" - } - }, - "Options": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - } - } - }, - "IPAMConfig": { - "type": "object", - "properties": { - "Subnet": { - "type": "string" - }, - "IPRange": { - "type": "string" - }, - "Gateway": { - "type": "string" - } - } - }, - "NetworkContainer": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "EndpointID": { - "type": "string" - }, - "MacAddress": { - "type": "string" - }, - "IPv4Address": { - "type": "string" - }, - "IPv6Address": { - "type": "string" - } - } - }, - "NetworkCreateResult": { - "type": "object", - "properties": { - "Id": { - "type": "string" - }, - "Warning": { - "type": "string" - } - } - }, - "NetworkCreateConfig": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "CheckDuplicate": { - "type": "boolean" - }, - "Driver": { - "type": "string" - }, - "EnableIPv6": { - "type": "boolean" - }, - "IPAM": { - "$ref": "#/definitions/IPAM" - }, - "Internal": { - "type": "boolean" - }, - "Options": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "Labels": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - } - } - }, - "ContainerConnect": { - "type": "object", - "properties": { - "Container": { - "type": "string" - }, - "EndpointConfig": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/EndpointConfig" - } - } - } - }, - "ContainerDisconnect": { - "type": "object", - "properties": { - "Container": { - "type": "string" - }, - "Force": { - "type": "boolean" - } - } - }, - "EndpointConfig": { - "type": "object", - "properties": { - "IPv4Address": { - "type": "string" - }, - "IPv6Address": { - "type": "string" - } - } - }, - "ContainerCreateResult": { - "type": "object", - "properties": { - "Id": { - "type": "string" - }, - "Warnings": { - "type": ["array", "null"], - "items": { - "type": "string" - } - } - } - }, - "BuildInfo": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "stream": { - "type": "string" - }, - "error": { - "type": "string" - }, - "errorDetail": { - "$ref": "#/definitions/ErrorDetail" - }, - "status": { - "type": "string" - }, - "progress": { - "type": "string" - }, - "progressDetail": { - "$ref": "#/definitions/ProgressDetail" - } - } - }, - "CreateImageInfo": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "error": { - "type": "string" - }, - "status": { - "type": "string" - }, - "progress": { - "type": "string" - }, - "progressDetail": { - "$ref": "#/definitions/ProgressDetail" - } - } - }, - "PushImageInfo": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "status": { - "type": "string" - }, - "progress": { - "type": "string" - }, - "progressDetail": { - "$ref": "#/definitions/ProgressDetail" - } - } - }, - "ErrorDetail": { - "type": "object", - "properties": { - "code": { - "type": "integer" - }, - "message": { - "type": "string" - } - } - }, - "ProgressDetail": { - "type": "object", - "properties": { - "code": { - "type": "integer" - }, - "message": { - "type": "integer" - }, - "current": { - "type": "integer" - }, - "total": { - "type": "integer" - } - } - }, - "Event": { - "type": "object", - "properties": { - "status": { - "type": "string" - }, - "id": { - "type": "string" - }, - "from": { - "type": "string" - }, - "time": { - "type": "integer" - }, - "timeNano": { - "type": "integer" - } - } - }, - "ResourceUpdate": { - "type": "object", - "properties": { - "BlkioWeight": { - "type": "integer" - }, - "CpuShares": { - "type": "integer" - }, - "CpuPeriod": { - "type": "integer" - }, - "CpuQuota": { - "type": "integer" - }, - "CpusetCpus": { - "type": "string" - }, - "CpusetMems": { - "type": "string" - }, - "Memory": { - "type": "integer" - }, - "MemorySwap": { - "type": "integer" - }, - "MemoryReservation": { - "type": "integer" - }, - "KernelMemory": { - "type": "integer" - }, - "RestartPolicy": { - "$ref": "#/definitions/RestartPolicy" - } - } - }, - "ContainerUpdateResult": { - "type": "object", - "properties": { - "Warnings": { - "type": ["array", "null"], - "items": { - "type": "string" - } - } - } - }, - "AuthResult": { - "type": "object", - "properties": { - "Status": { - "type": "string" - }, - "IdentityToken": { - "type": "string" - } - } - }, - "ContainerNode": { - "type": "object", - "properties": { - "Id": { - "type": "string" - }, - "Ip": { - "type": "string" - }, - "Addr": { - "type": "string" - }, - "Name": { - "type": "string" - } - } - }, - "Node": { - "type": "object", - "properties": { - "ID": { - "type": "string" - }, - "Version": { - "$ref": "#/definitions/NodeVersion" - }, - "CreatedAt": { - "type": "string", - "format": "date-time" - }, - "UpdatedAt": { - "type": "string", - "format": "date-time" - }, - "Spec": { - "$ref": "#/definitions/NodeSpec" - }, - "Description": { - "$ref": "#/definitions/NodeDescription" - }, - "Status": { - "$ref": "#/definitions/NodeStatus" - }, - "ManagerStatus": { - "$ref": "#/definitions/NodeManagerStatus" - } - } - }, - "NodeVersion": { - "type": "object", - "properties": { - "Index": { - "type": "string" - } - } - }, - "NodeSpec": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "Role": { - "type": "string" - }, - "Availability": { - "type": "string" - }, - "Labels": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - } - } - }, - "NodeDescription": { - "type": "object", - "properties": { - "Hostname": { - "type": "string" - }, - "Platform": { - "$ref": "#/definitions/NodePlatform" - }, - "Resources": { - "$ref": "#/definitions/NodeResources" - }, - "Engine": { - "$ref": "#/definitions/NodeEngine" - } - } - }, - "NodeStatus": { - "type": "object", - "properties": { - "State": { - "type": "string" - } - } - }, - "NodeManagerStatus": { - "type": "object", - "properties": { - "Leader": { - "type": "boolean" - }, - "Reachability": { - "type": "string" - }, - "Addr": { - "type": "string" - } - } - }, - "NodePlatform": { - "type": "object", - "properties": { - "Architecture": { - "type": "string" - }, - "OS": { - "type": "string" - } - } - }, - "NodeResources": { - "type": "object", - "properties": { - "NanoCPUs": { - "type": "integer" - }, - "MemoryBytes": { - "type": "integer" - } - } - }, - "NodeEngine": { - "type": "object", - "properties": { - "EngineVersion": { - "type": "boolean" - }, - "Labels": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - }, - "Plugins": { - "type": "array", - "items": { - "$ref": "#/definitions/NodePlugin" - } - } - } - }, - "NodePlugin": { - "type": "object", - "properties": { - "Type": { - "type": "string" - }, - "Name": { - "type": "string" - } - } - }, - "SwarmConfig": { - "type": "object", - "properties": { - "ListenAddr": { - "type": "string" - }, - "AdvertiseAddr": { - "type": "string" - }, - "ForceNewCluster": { - "type": "boolean" - }, - "Spec": { - "$ref": "#/definitions/SwarmConfigSpec" - } - } - }, - "SwarmConfigSpec": { - "type": "object", - "properties": { - "Orchestration": { - "$ref": "#/definitions/SwarmConfigSpecOrchestration" - }, - "Raft": { - "$ref": "#/definitions/SwarmConfigSpecRaft" - }, - "Dispatcher": { - "$ref": "#/definitions/SwarmConfigSpecDispatcher" - }, - "CAConfig": { - "$ref": "#/definitions/SwarmConfigSpecCAConfig" - } - } - }, - "SwarmConfigSpecOrchestration": { - "type": "object", - "properties": { - "TaskHistoryRetentionLimit": { - "type": "integer" - } - } - }, - "SwarmConfigSpecRaft": { - "type": "object", - "properties": { - "SnapshotInterval": { - "type": "integer" - }, - "KeepOldSnapshots": { - "type": "integer" - }, - "LogEntriesForSlowFollowers": { - "type": "integer" - }, - "HeartbeatTick": { - "type": "integer" - }, - "ElectionTick": { - "type": "integer" - } - } - }, - "SwarmConfigSpecDispatcher": { - "type": "object", - "properties": { - "HeartbeatPeriod": { - "type": "integer" - } - } - }, - "SwarmConfigSpecCAConfig": { - "type": "object", - "properties": { - "NodeCertExpiry": { - "type": "boolean" - }, - "ExternalCA": { - "$ref": "#/definitions/SwarmConfigSpecCAConfigExternalCA" - } - } - }, - "SwarmConfigSpecCAConfigExternalCA": { - "type": "object", - "properties": { - "Protocol": { - "type": "string" - }, - "URL": { - "type": "string" - }, - "Options": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - } - } - }, - "SwarmJoinConfig": { - "type": "object", - "properties": { - "ListenAddr": { - "type": "string" - }, - "AdvertiseAddr": { - "type": "string" - }, - "RemoteAddrs": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "JoinToken": { - "type": "string" - } - } - }, - "SwarmUpdateConfig": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "Orchestration": { - "$ref": "#/definitions/SwarmConfigSpecOrchestration" - }, - "Raft": { - "$ref": "#/definitions/SwarmConfigSpecRaft" - }, - "Dispatcher": { - "$ref": "#/definitions/SwarmConfigSpecDispatcher" - }, - "CAConfig": { - "$ref": "#/definitions/SwarmConfigSpecCAConfig" - }, - "JoinTokens": { - "$ref": "#/definitions/SwarmJoinTokens" - } - } - }, - "SwarmJoinTokens": { - "type": "object", - "properties": { - "Worker": { - "type": "string" - }, - "Manager": { - "type": "string" - } - } - }, - "Task": { - "type": "object", - "properties": { - "ID": { - "type": "string" - }, - "Version": { - "$ref": "#/definitions/NodeVersion" - }, - "CreatedAt": { - "type": "string", - "format": "date-time" - }, - "UpdatedAt": { - "type": "string", - "format": "date-time" - }, - "Name": { - "type": "string" - }, - "Spec": { - "$ref": "#/definitions/TaskSpec" - }, - "ServiceID": { - "type": "string" - }, - "Instance": { - "type": "integer" - }, - "NodeID": { - "type": "string" - }, - "ServiceAnnotations": { - "$ref": "#/definitions/Annotations" - }, - "Status": { - "$ref": "#/definitions/TaskStatus" - }, - "DesiredState": { - "type": "string" - }, - "NetworksAttachments": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/NetworkAttachment" - } - }, - "Endpoint": { - "$ref": "#/definitions/Endpoint" - } - } - }, - "TaskSpec": { - "type": "object", - "properties": { - "ContainerSpec": { - "$ref": "#/definitions/ContainerSpec" - }, - "Resources": { - "$ref": "#/definitions/TaskSpecResourceRequirements" - }, - "RestartPolicy": { - "$ref": "#/definitions/TaskSpecRestartPolicy" - }, - "Placement": { - "$ref": "#/definitions/TaskSpecPlacement" - } - } - }, - "TaskStatus": { - "type": "object", - "properties": { - "Timestamp": { - "type": "string" - }, - "State": { - "type": "string" - }, - "Message": { - "type": "string" - }, - "Err": { - "type": "string" - }, - "ContainerStatus": { - "$ref": "#/definitions/ContainerStatus" - } - } - }, - "NetworkAttachment": { - "type": "object", - "properties": { - "Network": { - "$ref": "#/definitions/SwarmNetwork" - }, - "Addresses": { - "type": ["array", "null"], - "items": { - "type": "string" - } - } - } - }, - "SwarmNetwork": { - "type": "object", - "properties": { - "ID": { - "type": "string" - }, - "Version": { - "$ref": "#/definitions/NodeVersion" - }, - "CreatedAt": { - "type": "string", - "format": "date-time" - }, - "UpdatedAt": { - "type": "string", - "format": "date-time" - }, - "Spec": { - "$ref": "#/definitions/SwarmNetworkSpec" - }, - "DriverState": { - "$ref": "#/definitions/Driver" - }, - "IPAM": { - "$ref": "#/definitions/SwarmIPAMOptions" - } - } - }, - "SwarmNetworkSpec": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "Labels": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - }, - "DriverConfiguration": { - "$ref": "#/definitions/Driver" - }, - "IPv6Enabled": { - "type": "boolean" - }, - "Internal": { - "type": "boolean" - }, - "IPAM": { - "$ref": "#/definitions/SwarmIPAMOptions" - } - } - }, - "SwarmIPAMOptions": { - "type": "object", - "properties": { - "Driver": { - "$ref": "#/definitions/Driver" - }, - "Configs": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/IPAMConfig" - } - } - } - }, - "TaskSpecResourceRequirements": { - "type": "object", - "properties": { - "Limits": { - "$ref": "#/definitions/NodeResources" - }, - "Reservations": { - "$ref": "#/definitions/NodeResources" - } - } - }, - "TaskSpecRestartPolicy": { - "type": "object", - "properties": { - "Condition": { - "type": "string" - }, - "Delay": { - "type": "integer" - }, - "MaxAttempts": { - "type": "integer" - }, - "Window": { - "type": "integer" - } - } - }, - "TaskSpecPlacement": { - "type": "object", - "properties": { - "Constraints": { - "type": ["array", "null"], - "items": { - "type": "string" - } - } - } - }, - "Annotations": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "Labels": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - } - } - }, - "Endpoint": { - "type": "object", - "properties": { - "Spec": { - "$ref": "#/definitions/EndpointSpec" - }, - "ExposedPorts": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/PortConfig" - } - }, - "VirtualIPs": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/EndpointVirtualIP" - } - } - } - }, - "EndpointSpec": { - "type": "object", - "properties": { - "Mode": { - "type": "string" - }, - "Ports": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/PortConfig" - } - } - } - }, - "PortConfig": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "Protocol": { - "type": "string" - }, - "TargetPort": { - "type": "integer" - }, - "PublishedPort": { - "type": "integer" - } - } - }, - "EndpointVirtualIP": { - "type": "object", - "properties": { - "NetworkID": { - "type": "string" - }, - "Addr": { - "type": "string" - } - } - }, - "ContainerSpec": { - "type": "object", - "properties": { - "Image": { - "type": "string" - }, - "Labels": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - }, - "Command": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "Args": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "Env": { - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "Dir": { - "type": "string" - }, - "User": { - "type": "string" - }, - "Mounts": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/ContainerSpecMount" - } - }, - "StopGracePeriod": { - "type": "integer" - } - } - }, - "ContainerSpecMount": { - "type": "object", - "properties": { - "Type": { - "type": "string" - }, - "Source": { - "type": "string" - }, - "Target": { - "type": "string" - }, - "ReadOnly": { - "type": "boolean" - }, - "BindOptions": { - "$ref": "#/definitions/ContainerSpecMountBindOptions" - }, - "VolumeOptions": { - "$ref": "#/definitions/ContainerSpecMountVolumeOptions" - } - } - }, - "ContainerSpecMountBindOptions": { - "type": "object", - "properties": { - "Propagation": { - "type": "string" - } - } - }, - "ContainerSpecMountVolumeOptions": { - "type": "object", - "properties": { - "NoCopy": { - "type": "boolean" - }, - "Labels": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - }, - "DriverConfig": { - "$ref": "#/definitions/Driver" - } - } - }, - "ContainerStatus": { - "type": "object", - "properties": { - "ContainerID": { - "type": "string" - }, - "PID": { - "type": "integer" - }, - "ExitCode": { - "type": "integer" - } - } - }, - "Driver": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "Options": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - } - } - }, - "Service": { - "type": "object", - "properties": { - "ID": { - "type": "string" - }, - "Version": { - "$ref": "#/definitions/NodeVersion" - }, - "CreatedAt": { - "type": "string", - "format": "date-time" - }, - "UpdatedAt": { - "type": "string", - "format": "date-time" - }, - "Spec": { - "$ref": "#/definitions/ServiceSpec" - }, - "Endpoint": { - "$ref": "#/definitions/Endpoint" - }, - "UpdateStatus": { - "$ref": "#/definitions/UpdateStatus" - } - } - }, - "UpdateStatus": { - "type": "object", - "properties": { - "State": { - "type": "string" - }, - "StartedAt": { - "type": "string", - "format": "date-time" - }, - "CompletedAt": { - "type": "string", - "format": "date-time" - }, - "Message": { - "type": "string" - } - } - }, - "ServiceSpec": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "Labels": { - "type": ["object", "null"], - "additionalProperties": { - "type": "string" - } - }, - "TaskTemplate": { - "$ref": "#/definitions/TaskSpec" - }, - "Mode": { - "$ref": "#/definitions/ServiceSpecMode" - }, - "UpdateConfig": { - "$ref": "#/definitions/UpdateConfig" - }, - "Networks": { - "type": ["array", "null"], - "items": { - "$ref": "#/definitions/NetworkAttachmentConfig" - } - }, - "EndpointSpec": { - "type": "string" - } - } - }, - "UpdateConfig": { - "type": "object", - "properties": { - "Parallelism": { - "type": "integer" - }, - "Delay": { - "type": "integer" - }, - "FailureAction": { - "type": "string" - } - } - }, - "NetworkAttachmentConfig": { - "type": "object", - "properties": { - "Target": { - "type": "string" - }, - "Aliases": { - "type": ["array", "null"], - "items": { - "type": "string" - } - } - } - }, - "ServiceSpecMode": { - "type": "object", - "properties": { - "Replicated": { - "$ref": "#/definitions/ReplicatedService" - }, - "Global": { - "$ref": "#/definitions/GlobalService" - } - } - }, - "ReplicatedService": { - "type": "object", - "properties": { - "Replicas": { - "type": "integer" - } - } - }, - "GlobalService": { - "type": "object", - "properties": {} - }, - "ServiceCreateResponse": { - "type": "object", - "properties": { - "Id": { - "type": "string" - } - } - } - }, - "paths": { - "/containers/json": { - "get": { - "summary": "List containers", - "description": "List containers", - "operationId": "findAll", - "parameters": [{ - "name": "all", - "in": "query", - "description": "Show all containers. Only running containers are shown by default (i.e., this defaults to false)", - "type": "boolean", - "default": false - }, { - "name": "limit", - "in": "query", - "description": "Show last created containers, include non-running ones.", - "type": "integer" - }, { - "name": "since", - "in": "query", - "description": "Show only containers created since Id, include non-running ones.", - "type": "string" - }, { - "name": "before", - "in": "query", - "description": "Show only containers created before Id, include non-running ones.", - "type": "string" - }, { - "name": "size", - "in": "query", - "description": "1/True/true or 0/False/false, Show the containers sizes.", - "type": "boolean" - }, { - "name": "filters", - "in": "query", - "description": "A JSON encoded value of the filters (a map[string][]string) to process on the containers list", - "type": "array", - "items": { - "type": "string" - } - }], - "responses": { - "200": { - "description": "no error", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ContainerInfo" - } - } - }, - "400": { - "description": "bad parameter" - }, - "500": { - "description": "server error" - } - }, - "tags": [ - "Container" - ] - } - }, - "/containers/create": { - "post": { - "summary": "Create a container", - "description": "Create a container", - "operationId": "create", - "parameters": [{ - "name": "name", - "in": "query", - "description": "Assign the specified name to the container. Must match /?[a-zA-Z0-9_-]+.", - "type": "string", - "pattern": "/?[a-zA-Z0-9_-]+" - }, { - "name": "container", - "in": "body", - "description": "Container to create", - "schema": { - "$ref": "#/definitions/ContainerConfig" - } - }, { - "name": "Content-Type", - "required": true, - "in": "header", - "type": "string", - "default": "application/json", - "description": "Content Type of input" - }], - "responses": { - "201": { - "description": "no error", - "schema": { - "$ref": "#/definitions/ContainerCreateResult" - } - }, - "400": { - "description": "bad parameter" - }, - "404": { - "description": "no such container" - }, - "406": { - "description": "impossible to attach" - }, - "500": { - "description": "server error" - } - }, - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/json": { - "get": { - "summary": "Inspect a container", - "description": "Return low-level information on the container id", - "operationId": "find", - "responses": { - "200": { - "description": "no error", - "schema": { - "$ref": "#/definitions/Container" - } - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/top": { - "get": { - "summary": "List processes running inside a container", - "description": "List processes running inside the container id", - "operationId": "listProcesses", - "responses": { - "200": { - "description": "no error", - "schema": { - "$ref": "#/definitions/ContainerTop" - } - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "ps_args", - "in": "query", - "description": "ps arguments to use (e.g., aux)", - "type": "string" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/logs": { - "get": { - "summary": "Get container logs", - "description": "Get stdout and stderr logs from the container id. Note: This endpoint works only for containers with json-file logging driver.", - "operationId": "logs", - "responses": { - "101": { - "description": "no error, hints proxy about hijacking", - "schema": { - "type": "string" - } - }, - "200": { - "description": "no error, no upgrade header found", - "schema": { - "type": "string" - } - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "follow", - "in": "query", - "description": "1/True/true or 0/False/false, return stream. Default false.", - "type": "boolean", - "default": false - }, { - "name": "stdout", - "in": "query", - "description": "1/True/true or 0/False/false, show stdout log. Default false.", - "type": "boolean", - "default": false - }, { - "name": "stderr", - "in": "query", - "description": "1/True/true or 0/False/false, show stderr log. Default false.", - "type": "boolean", - "default": false - }, { - "name": "since", - "in": "query", - "description": "UNIX timestamp (integer) to filter logs. Specifying a timestamp will only output log-entries since that timestamp. Default: 0 (unfiltered)", - "type": "integer", - "default": 0 - }, { - "name": "timestamps", - "in": "query", - "description": "1/True/true or 0/False/false, print timestamps for every log line. ", - "type": "boolean", - "default": false - }, { - "name": "tail", - "in": "query", - "description": "Output specified number of lines at the end of logs: all or . Default all.", - "type": "string" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/changes": { - "get": { - "summary": "Inspect changes on a container’s filesystem", - "description": "Inspect changes on a container’s filesystem", - "operationId": "changes", - "responses": { - "200": { - "description": "no error", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ContainerChange" - } - } - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "kind", - "in": "query", - "description": "Kind of changes", - "type": "integer", - "enum": [0, 1, 2] - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/export": { - "get": { - "summary": "Export a container", - "description": "Export the contents of container id", - "operationId": "export", - "responses": { - "200": { - "description": "no error", - "schema": { - "type": "string" - } - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/stats": { - "get": { - "summary": "Get container stats based on resource usage", - "description": "This endpoint returns a live stream of a container’s resource usage statistics.", - "operationId": "stats", - "responses": { - "200": { - "description": "no error", - "schema": { - "type": "object" - } - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "stream", - "in": "query", - "description": "Stream stats", - "type": "boolean" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/resize": { - "post": { - "summary": "Resize a container TTY", - "description": "Resize the TTY for container with id. The unit is number of characters. You must restart the container for the resize to take effect.", - "operationId": "resize", - "responses": { - "200": { - "description": "no error" - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "cannot resize container" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "h", - "in": "query", - "description": "Height of the tty session", - "type": "integer" - }, { - "name": "w", - "in": "query", - "description": "Width of the tty session", - "type": "integer" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/start": { - "post": { - "summary": "Start a container", - "description": "Start the container id", - "operationId": "start", - "responses": { - "204": { - "description": "no error" - }, - "304": { - "description": "container already started" - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "detachKeys", - "in": "query", - "description": "Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl- where is one of: a-z, @, ^, [, , or _.", - "type": "string" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/stop": { - "post": { - "summary": "Stop a container", - "description": "Stop the container id", - "operationId": "stop", - "responses": { - "204": { - "description": "no error" - }, - "304": { - "description": "container already stopped" - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "t", - "in": "query", - "description": "number of seconds to wait before killing the container", - "type": "integer" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/restart": { - "post": { - "summary": "Restart a container", - "description": "Restart the container id", - "operationId": "restart", - "responses": { - "204": { - "description": "no error" - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "t", - "in": "query", - "description": "number of seconds to wait before killing the container", - "type": "integer" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/kill": { - "post": { - "summary": "Kill a container", - "description": "Send a posix signal to a container", - "operationId": "kill", - "responses": { - "204": { - "description": "no error" - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "signal", - "in": "query", - "description": "Signal to send to the container, integer or string like SIGINT, defaults to SIGKILL", - "type": "string" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/update": { - "post": { - "summary": "Update a container", - "description": "Update resource configs of one or more containers.", - "operationId": "update", - "responses": { - "200": { - "description": "no error", - "schema": { - "$ref": "#/definitions/ContainerUpdateResult" - } - }, - "400": { - "description": "bad parameter" - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "resourceConfig", - "in": "body", - "description": "Resources to update on container", - "schema": { - "$ref": "#/definitions/ResourceUpdate" - } - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/rename": { - "post": { - "summary": "Rename a container", - "description": "Rename the container id to a new_name", - "operationId": "rename", - "responses": { - "204": { - "description": "no error" - }, - "404": { - "description": "no such container" - }, - "409": { - "description": "conflict, name already assigned" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "name", - "in": "query", - "required": true, - "description": "New name for the container", - "type": "string" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/pause": { - "post": { - "summary": "Pause a container", - "description": "Pause the container id", - "operationId": "pause", - "responses": { - "204": { - "description": "no error" - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/unpause": { - "post": { - "summary": "Unpause a container", - "description": "Unpause the container id", - "operationId": "unpause", - "responses": { - "204": { - "description": "no error" - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/attach": { - "post": { - "summary": "Attach to a container", - "description": "Attach to the container id", - "operationId": "attach", - "responses": { - "200": { - "description": "no error" - }, - "400": { - "description": "bad parameter" - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "logs", - "in": "query", - "description": "1/True/true or 0/False/false, return logs. Default false", - "type": "string" - }, { - "name": "stream", - "in": "query", - "description": "1/True/true or 0/False/false, return stream. Default false", - "type": "string" - }, { - "name": "stdin", - "in": "query", - "description": "1/True/true or 0/False/false, if stream=true, attach to stdin. Default false.", - "type": "string" - }, { - "name": "stdout", - "in": "query", - "description": "1/True/true or 0/False/false, if logs=true, return stdout log, if stream=true, attach to stdout. Default false.", - "type": "string" - }, { - "name": "stderr", - "in": "query", - "description": "1/True/true or 0/False/false, if logs=true, return stderr log, if stream=true, attach to stderr. Default false.", - "type": "string" - }, { - "name": "detachKeys", - "in": "query", - "description": "Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl- where is one of: a-z, @, ^, [, , or _.", - "type": "string" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/attach/ws": { - "get": { - "summary": "Attach to a container (websocket)", - "description": "Attach to the container id with a websocket.", - "operationId": "attachWebsocket", - "responses": { - "101": { - "description": "no error, hints proxy about hijacking" - }, - "200": { - "description": "no error, no upgrade header found" - }, - "400": { - "description": "bad parameter" - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "logs", - "in": "query", - "description": "1/True/true or 0/False/false, return logs. Default false", - "type": "string" - }, { - "name": "stream", - "in": "query", - "description": "1/True/true or 0/False/false, return stream. Default false", - "type": "string" - }, { - "name": "stdin", - "in": "query", - "description": "1/True/true or 0/False/false, if stream=true, attach to stdin. Default false.", - "type": "string" - }, { - "name": "stdout", - "in": "query", - "description": "1/True/true or 0/False/false, if logs=true, return stdout log, if stream=true, attach to stdout. Default false.", - "type": "string" - }, { - "name": "stderr", - "in": "query", - "description": "1/True/true or 0/False/false, if logs=true, return stderr log, if stream=true, attach to stderr. Default false.", - "type": "string" - }, { - "name": "detachKeys", - "in": "query", - "description": "Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl- where is one of: a-z, @, ^, [, , or _.", - "type": "string" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/wait": { - "post": { - "summary": "Wait a container", - "description": "Block until container id stops, then returns the exit code", - "operationId": "wait", - "responses": { - "200": { - "description": "no error", - "schema": { - "$ref": "#/definitions/ContainerWait" - } - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}": { - "delete": { - "summary": "Remove a container", - "description": "Remove the container id from the filesystem", - "operationId": "remove", - "responses": { - "204": { - "description": "no error" - }, - "400": { - "description": "bad parameter" - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "v", - "in": "query", - "description": "1/True/true or 0/False/false, Remove the volumes associated to the container. Default false.", - "type": "string" - }, { - "name": "force", - "in": "query", - "description": "1/True/true or 0/False/false, Kill then remove the container. Default false.", - "type": "string" - }], - "tags": [ - "Container" - ] - } - }, - "/containers/{id}/archive": { - "head": { - "summary": "Retrieving information about files and folders in a container", - "description": "Retrieving information about files and folders in a container", - "operationId": "getArchiveInformation", - "responses": { - "204": { - "description": "no error" - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "path", - "in": "query", - "required": true, - "description": "Resource in the container’s filesystem to archive.", - "type": "string" - }], - "tags": [ - "Container" - ] - }, - "get": { - "summary": "Get an archive of a filesystem resource in a container", - "description": "Get an tar archive of a resource in the filesystem of container id.", - "operationId": "getArchive", - "responses": { - "200": { - "description": "no error" - }, - "400": { - "description": "client error, bad parameter, details in JSON response body, one of: must specify path parameter (path cannot be empty) not a directory (path was asserted to be a directory but exists as a file)" - }, - "404": { - "description": "no such container or path does not exist inside the container" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "path", - "in": "query", - "required": true, - "description": "Resource in the container’s filesystem to archive.", - "type": "string" - }], - "tags": [ - "Container" - ] - }, - "put": { - "summary": "Extract an archive of files or folders to a directory in a container", - "description": "Upload a tar archive to be extracted to a path in the filesystem of container id.", - "operationId": "putArchive", - "responses": { - "200": { - "description": "The content was extracted successfully" - }, - "400": { - "description": "Bad parameter" - }, - "403": { - "description": "Permission denied, the volume or container rootfs is marked as read-only." - }, - "404": { - "description": "No such container or path does not exist inside the container" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "required": true, - "description": "The container id or name", - "type": "string" - }, { - "name": "path", - "in": "query", - "required": true, - "description": "Path to a directory in the container to extract the archive’s contents into. ", - "type": "string" - }, { - "name": "noOverwriteDirNonDir", - "in": "query", - "description": "If “1”, “true”, or “True” then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa.", - "type": "string" - }, { - "name": "inputStream", - "in": "body", - "required": true, - "description": "The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz.", - "schema": { - "type": "string" - } - }], - "tags": [ - "Container" - ] - } - }, - "/images/json": { - "get": { - "summary": "List Images", - "description": "List Images", - "operationId": "findAll", - "responses": { - "200": { - "description": "no error", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ImageItem" - } - } - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "all", - "in": "query", - "description": "Show all images. Only images from a final layer (no children) are shown by default.", - "type": "boolean", - "default": false - }, { - "name": "filters", - "in": "query", - "description": "A JSON encoded value of the filters (a map[string][]string) to process on the containers list", - "type": "string" - }, { - "name": "filter", - "in": "query", - "description": "Only return images with the specified name.", - "type": "string" - }, { - "name": "digests", - "in": "query", - "description": "Show digest information, default to false", - "type": "boolean" - }], - "tags": [ - "Image" - ] - } - }, - "/build": { - "post": { - "summary": "Build an image from Dockerfile via stdin", - "description": "Build an image from Dockerfile via stdin", - "operationId": "build", - "parameters": [{ - "name": "inputStream", - "in": "body", - "description": "The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz.", - "schema": { - "type": "string" - } - }, { - "name": "dockerfile", - "in": "query", - "description": "Path within the build context to the Dockerfile. This is ignored if remote is specified and points to an individual filename.", - "type": "string" - }, { - "name": "t", - "in": "query", - "description": "A repository name (and optionally a tag) to apply to the resulting image in case of success.", - "type": "string" - }, { - "name": "remote", - "in": "query", - "description": "A Git repository URI or HTTP/HTTPS URI build source. If the URI specifies a filename, the file’s contents are placed into a file called Dockerfile.", - "type": "string" - }, { - "name": "q", - "in": "query", - "description": "Suppress verbose build output.", - "type": "boolean", - "default": false - }, { - "name": "nocache", - "in": "query", - "description": "Do not use the cache when building the image.", - "type": "boolean", - "default": false - }, { - "name": "pull", - "in": "query", - "description": "Attempt to pull the image even if an older image exists locally", - "type": "string" - }, { - "name": "rm", - "in": "query", - "description": "Remove intermediate containers after a successful build (default behavior).", - "type": "boolean", - "default": true - }, { - "name": "forcerm", - "in": "query", - "description": "always remove intermediate containers (includes rm)", - "type": "boolean", - "default": false - }, { - "name": "memory", - "in": "query", - "description": "Set memory limit for build.", - "type": "integer" - }, { - "name": "memswap", - "in": "query", - "description": "Total memory (memory + swap), -1 to disable swap.", - "type": "integer" - }, { - "name": "cpushares", - "in": "query", - "description": "CPU shares (relative weight).", - "type": "integer" - }, { - "name": "cpusetcpus", - "in": "query", - "description": "CPUs in which to allow execution (e.g., 0-3, 0,1).", - "type": "string" - }, { - "name": "cpuperiod", - "in": "query", - "description": "The length of a CPU period in microseconds.", - "type": "integer" - }, { - "name": "cpuquota", - "in": "query", - "description": "Microseconds of CPU time that the container can get in a CPU period.", - "type": "integer" - }, { - "name": "buildargs", - "in": "query", - "description": "Total memory (memory + swap), -1 to disable swap.", - "type": "integer" - }, { - "name": "Content-type", - "in": "header", - "description": " Set to 'application/tar'.", - "type": "string", - "enum": ["application/tar"], - "default": "application/tar" - }, { - "name": "X-Registry-Config", - "in": "header", - "description": "A base64-url-safe-encoded Registry Auth Config JSON object", - "type": "string" - }], - "responses": { - "200": { - "description": "no error" - }, - "500": { - "description": "server error" - } - }, - "tags": [ - "Image" - ] - } - }, - "/images/create": { - "post": { - "summary": "Create an image", - "description": "Create an image either by pulling it from the registry or by importing it", - "operationId": "create", - "responses": { - "200": { - "description": "no error" - }, - "404": { - "description": "'docker import' flow not implement" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "fromImage", - "in": "query", - "description": "Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image.", - "type": "string" - }, { - "name": "fromSrc", - "in": "query", - "description": "Source to import. The value may be a URL from which the image can be retrieved or - to read the image from the request body. This parameter may only be used when importing an image.", - "type": "string" - }, { - "name": "repo", - "in": "query", - "description": "Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image.", - "type": "string" - }, { - "name": "tag", - "in": "query", - "description": "Tag or digest.", - "type": "string" - }, { - "name": "inputImage", - "in": "body", - "description": "Image content if the value - has been specified in fromSrc query parameter", - "schema": { - "type": "string" - }, - "required": false - }, { - "name": "X-Registry-Auth", - "in": "header", - "description": "A base64-encoded AuthConfig object", - "type": "string" - }], - "tags": [ - "Image" - ] - } - }, - "/images/{name}/json": { - "get": { - "summary": "Inspect an image", - "description": "Return low-level information on the image name", - "operationId": "find", - "responses": { - "200": { - "description": "No error", - "schema": { - "$ref": "#/definitions/Image" - } - }, - "404": { - "description": "No such image" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "name", - "in": "path", - "description": "Image name or id", - "type": "string", - "required": true - }], - "tags": [ - "Image" - ] - } - }, - "/images/{name}/history": { - "get": { - "summary": "Get the history of an image", - "description": "Return the history of the image name", - "operationId": "history", - "responses": { - "200": { - "description": "No error", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ImageHistoryItem" - } - } - }, - "404": { - "description": "No such image" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "name", - "in": "path", - "description": "Image name or id", - "type": "string", - "required": true - }], - "tags": [ - "Image" - ] - } - }, - "/images/{name}/push": { - "post": { - "summary": "Push an image to the registry", - "description": "Push the image name on the registry", - "operationId": "push", - "responses": { - "200": { - "description": "No error" - }, - "404": { - "description": "No such image" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "name", - "in": "path", - "description": "Image name or id", - "type": "string", - "required": true - }, { - "name": "tag", - "in": "query", - "description": "The tag to associate with the image on the registry.", - "type": "string" - }, { - "name": "X-Registry-Auth", - "in": "header", - "description": "A base64-encoded AuthConfig object", - "type": "string", - "required": true - }], - "tags": [ - "Image" - ] - } - }, - "/images/{name}/tag": { - "post": { - "summary": "Tag an image into a repository", - "description": "Tag the image name into a repository", - "operationId": "tag", - "responses": { - "201": { - "description": "No error" - }, - "400": { - "description": "Bad parameter" - }, - "404": { - "description": "No such image" - }, - "409": { - "description": "Conflict" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "name", - "in": "path", - "description": "Image name or id", - "type": "string", - "required": true - }, { - "name": "repo", - "in": "query", - "description": "The repository to tag in.", - "type": "string" - }, { - "name": "tag", - "in": "query", - "description": "The new tag name.", - "type": "string" - }], - "tags": [ - "Image" - ] - } - }, - "/images/{name}": { - "delete": { - "summary": "Remove an image", - "description": "Remove the image name from the filesystem", - "operationId": "remove", - "responses": { - "200": { - "description": "No error" - }, - "404": { - "description": "No such image" - }, - "409": { - "description": "Conflict" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "name", - "in": "path", - "description": "Image name or id", - "type": "string", - "required": true - }, { - "name": "force", - "in": "query", - "description": "1/True/true or 0/False/false, default false", - "type": "string" - }, { - "name": "noprune", - "in": "query", - "description": "1/True/true or 0/False/false, default false.", - "type": "string" - }], - "tags": [ - "Image" - ] - } - }, - "/images/search": { - "get": { - "summary": "Search images", - "description": "Search for an image on Docker Hub.", - "operationId": "search", - "responses": { - "200": { - "description": "No error", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ImageSearchResult" - } - } - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "term", - "in": "query", - "description": "Term to search", - "type": "string" - }, { - "name": "limit", - "in": "query", - "description": "Maximum returned search results", - "type": "integer" - }, { - "name": "filters", - "in": "query", - "description": "A JSON encoded value of the filters (a map[string][]string) to process on the images list.", - "type": "string" - }], - "tags": [ - "Image" - ] - } - }, - "/auth": { - "post": { - "summary": "Check auth configuration", - "description": "Check auth configuration.", - "operationId": "checkAuthentication", - "responses": { - "200": { - "description": "No error", - "schema": { - "$ref": "#/definitions/AuthResult" - } - }, - "204": { - "description": "No error" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "authConfig", - "in": "body", - "description": "Authentication to check", - "schema": { - "$ref": "#/definitions/AuthConfig" - } - }], - "tags": [ - "Misc" - ] - } - }, - "/info": { - "get": { - "summary": "Display system-wide information", - "description": "Display system-wide information.", - "operationId": "getSystemInformation", - "responses": { - "200": { - "description": "No error", - "schema": { - "$ref": "#/definitions/SystemInformation" - } - }, - "500": { - "description": "Server error" - } - }, - "tags": [ - "Misc" - ] - } - }, - "/version": { - "get": { - "summary": "Show the docker version information", - "description": "Show the docker version information", - "operationId": "getVersion", - "responses": { - "200": { - "description": "no error", - "schema": { - "$ref": "#/definitions/Version" - } - }, - "500": { - "description": "server error" - } - }, - "tags": [ - "Misc" - ] - } - }, - "/_ping": { - "get": { - "summary": "Ping the docker server", - "description": "Ping the docker server", - "operationId": "ping", - "responses": { - "200": { - "description": "no error" - }, - "500": { - "description": "server error" - } - }, - "tags": [ - "Misc" - ] - } - }, - "/commit": { - "post": { - "summary": "Create a new image from a container’s changes", - "description": "Create a new image from a container’s changes", - "operationId": "commit", - "responses": { - "201": { - "description": "no error", - "schema": { - "$ref": "#/definitions/CommitResult" - } - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "containerConfig", - "in": "body", - "description": "The container configuration", - "schema": { - "$ref": "#/definitions/ContainerConfig" - } - }, { - "name": "container", - "in": "query", - "description": "Container id or name to commit", - "type": "string" - }, { - "name": "repo", - "in": "query", - "description": "Repository name for the created image", - "type": "string" - }, { - "name": "tag", - "in": "query", - "description": "Tag name for the create image", - "type": "string" - }, { - "name": "comment", - "in": "query", - "description": "Commit message", - "type": "string" - }, { - "name": "author", - "in": "query", - "description": "author (e.g., “John Hannibal Smith “)", - "type": "string" - }, { - "name": "pause", - "in": "query", - "description": "1/True/true or 0/False/false, whether to pause the container before committing", - "type": "string" - }, { - "name": "changes", - "in": "query", - "description": "Dockerfile instructions to apply while committing", - "type": "string" - }, { - "name": "Content-Type", - "required": true, - "in": "header", - "type": "string", - "default": "application/json", - "description": "Content Type of input" - }], - "tags": [ - "Image" - ] - } - }, - "/events": { - "get": { - "summary": "Monitor Docker’s events", - "description": "Get container events from docker, either in real time via streaming, or via polling (using since).", - "operationId": "getEvents", - "responses": { - "200": { - "description": "no error" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "since", - "in": "query", - "description": "Timestamp used for polling", - "type": "integer" - }, { - "name": "until", - "in": "query", - "description": "Timestamp used for polling", - "type": "integer" - }, { - "name": "filters", - "in": "query", - "description": "A json encoded value of the filters (a map[string][]string) to process on the event list.", - "type": "string" - }], - "tags": [ - "Misc" - ] - } - }, - "/images/{name}/get": { - "get": { - "summary": "Get a tarball containing all images in a repository", - "description": "Get a tarball containing all images and metadata for the repository specified by name.", - "operationId": "save", - "responses": { - "200": { - "description": "no error", - "schema": { - "type": "string" - } - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "name", - "in": "path", - "description": "Image name or id", - "type": "string", - "required": true - }], - "tags": [ - "Image" - ] - } - }, - "/images/get": { - "get": { - "summary": "Get a tarball containing all images.", - "description": "Get a tarball containing all images and metadata for one or more repositories.", - "operationId": "saveAll", - "responses": { - "200": { - "description": "no error", - "schema": { - "type": "string" - } - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "names", - "in": "query", - "description": "Image names to filter", - "type": "array", - "items": { - "type": "string" - } - }], - "tags": [ - "Image" - ] - } - }, - "/images/load": { - "post": { - "summary": "Load a tarball with a set of images and tags into docker.", - "description": "Load a set of images and tags into a Docker repository. See the image tarball format for more details.", - "operationId": "load", - "responses": { - "200": { - "description": "no error" - }, - "500": { - "description": "server error" - } - }, - "parameters": [{ - "name": "imagesTarball", - "in": "body", - "description": "Tar archive containing images", - "schema": { - "type": "string" - } - }], - "tags": [ - "Image" - ] - } - }, - "/containers/{id}/exec": { - "post": { - "summary": "Exec Create", - "description": "Sets up an exec instance in a running container id", - "operationId": "create", - "responses": { - "201": { - "description": "no error", - "schema": { - "$ref": "#/definitions/ExecCreateResult" - } - }, - "404": { - "description": "no such container" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "execConfig", - "in": "body", - "description": "Exec configuration", - "schema": { - "$ref": "#/definitions/ExecConfig" - }, - "required": true - }, { - "name": "Content-Type", - "in": "header", - "description": "Content Type Header", - "required": true, - "type": "string", - "default": "application/json" - }, { - "name": "id", - "in": "path", - "description": "Container name or id", - "type": "string", - "required": true - }], - "tags": [ - "Exec" - ] - } - }, - "/exec/{id}/start": { - "post": { - "summary": "Exec Start", - "description": "Starts a previously set up exec instance id. If detach is true, this API returns after starting the exec command. Otherwise, this API sets up an interactive session with the exec command.", - "operationId": "start", - "responses": { - "200": { - "description": "No error" - }, - "404": { - "description": "No such exec instance" - }, - "409": { - "description": "Container is stopped or paused" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "execStartConfig", - "in": "body", - "description": "Exec configuration", - "schema": { - "$ref": "#/definitions/ExecStartConfig" - } - }, { - "name": "Content-Type", - "in": "header", - "description": "Content Type Header", - "required": true, - "type": "string", - "default": "application/json" - }, { - "name": "id", - "in": "path", - "description": "Exec instance id", - "required": true, - "type": "string" - }], - "tags": [ - "Exec" - ] - } - }, - "/exec/{id}/resize": { - "post": { - "summary": "Exec Resize", - "description": "Resize the tty session used by the exec command id.", - "operationId": "resize", - "responses": { - "201": { - "description": "No error" - }, - "404": { - "description": "No such exec instance" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "description": "Exec instance id", - "required": true, - "type": "string" - }, { - "name": "h", - "in": "query", - "description": "Height of the tty session", - "type": "integer", - "format": "int64" - }, { - "name": "w", - "in": "query", - "description": "Width of the tty session", - "type": "integer", - "format": "int64" - }], - "tags": [ - "Exec" - ] - } - }, - "/exec/{id}/json": { - "get": { - "summary": "Exec Inspect", - "description": "Return low-level information about the exec command id.", - "operationId": "find", - "responses": { - "200": { - "description": "No error", - "schema": { - "$ref": "#/definitions/ExecCommand" - } - }, - "404": { - "description": "No such exec instance" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "description": "Exec instance id", - "required": true, - "type": "string" - }], - "tags": [ - "Exec" - ] - } - }, - "/volumes": { - "get": { - "summary": "List volumes", - "description": "List volumes.", - "operationId": "findAll", - "responses": { - "200": { - "description": "No error", - "schema": { - "$ref": "#/definitions/VolumeList" - } - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "filters", - "in": "query", - "description": "JSON encoded value of the filters (a map[string][]string) to process on the volumes list", - "type": "string" - }], - "tags": [ - "Volume" - ] - } - }, - "/volumes/create": { - "post": { - "summary": "Create a volume", - "description": "Create a volume.", - "operationId": "create", - "responses": { - "201": { - "description": "No error", - "schema": { - "$ref": "#/definitions/Volume" - } - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "volumeConfig", - "in": "body", - "required": true, - "description": "Volume configuration", - "schema": { - "$ref": "#/definitions/VolumeConfig" - } - }, { - "name": "Content-Type", - "required": true, - "in": "header", - "type": "string", - "default": "application/json", - "description": "Content Type of input" - }], - "tags": [ - "Volume" - ] - } - }, - "/volumes/{name}": { - "get": { - "summary": "Inspect a volume", - "description": "Inspect a volume.", - "operationId": "find", - "responses": { - "200": { - "description": "No error", - "schema": { - "$ref": "#/definitions/Volume" - } - }, - "404": { - "description": "No such volume" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "name", - "in": "path", - "required": true, - "description": "Volume name or id", - "type": "string" - }], - "tags": [ - "Volume" - ] - }, - "delete": { - "summary": "Remove a volume", - "description": "Instruct the driver to remove the volume.", - "operationId": "remove", - "responses": { - "204": { - "description": "No error" - }, - "404": { - "description": "No such volume or volume driver" - }, - "409": { - "description": "Volume is in use and cannot be removed" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "name", - "in": "path", - "required": true, - "description": "Volume name or id", - "type": "string" - }], - "tags": [ - "Volume" - ] - } - }, - "/networks": { - "get": { - "summary": "List networks", - "description": "List networks.", - "operationId": "findAll", - "responses": { - "200": { - "description": "No error", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Network" - } - } - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "filters", - "in": "query", - "description": "JSON encoded value of the filters (a map[string][]string) to process on the networks list.", - "type": "string" - }], - "tags": [ - "Network" - ] - } - }, - "/networks/{id}": { - "get": { - "summary": "Inspect network", - "description": "Inspect network.", - "operationId": "find", - "responses": { - "200": { - "description": "No error", - "schema": { - "$ref": "#/definitions/Network" - } - }, - "404": { - "description": "Network not found" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "description": "Network id or name", - "required": true, - "type": "string" - }], - "tags": [ - "Network" - ] - }, - "delete": { - "summary": "Remove a network", - "description": "Remove a network", - "operationId": "remove", - "responses": { - "204": { - "description": "No error" - }, - "404": { - "description": "Network not found" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "description": "Network id or name", - "required": true, - "type": "string" - }], - "tags": [ - "Network" - ] - } - }, - "/networks/create": { - "post": { - "summary": "Create network", - "description": "Create network.", - "operationId": "create", - "responses": { - "201": { - "description": "No error", - "schema": { - "$ref": "#/definitions/NetworkCreateResult" - } - }, - "404": { - "description": "Driver not found" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "networkConfig", - "in": "body", - "description": "Network configuration", - "required": true, - "schema": { - "$ref": "#/definitions/NetworkCreateConfig" - }}, - { - "name": "Content-Type", - "required": true, - "in": "header", - "type": "string", - "default": "application/json", - "description": "Content Type of input" - } - ], - "tags": [ - "Network" - ] - } - }, - "/networks/{id}/connect": { - "post": { - "summary": "Connect a container to a network", - "description": "Connect a container to a network.", - "operationId": "connect", - "responses": { - "201": { - "description": "No error" - }, - "403": { - "description": "Operation not supported for swarm scoped networks" - }, - "404": { - "description": "Network or container not found" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "description": "Network id or name", - "required": true, - "type": "string" - }, { - "name": "container", - "in": "body", - "description": "Container", - "required": true, - "schema": { - "$ref": "#/definitions/ContainerConnect" - } - }, { - "name": "Content-Type", - "required": true, - "in": "header", - "type": "string", - "default": "application/json", - "description": "Content Type of input" - }], - "tags": [ - "Network" - ] - } - }, - "/networks/{id}/disconnect": { - "post": { - "summary": "Disconnect a container to a network", - "description": "Disconnect a container to a network.", - "operationId": "disconnect", - "responses": { - "201": { - "description": "No error" - }, - "403": { - "description": "Operation not supported for swarm scoped networks" - }, - "404": { - "description": "Network or container not found" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "description": "Network id or name", - "required": true, - "type": "string" - }, { - "name": "container", - "in": "body", - "description": "Container", - "required": true, - "schema": { - "$ref": "#/definitions/ContainerDisconnect" - } - }, { - "name": "Content-Type", - "required": true, - "in": "header", - "type": "string", - "default": "application/json", - "description": "Content Type of input" - }], - "tags": [ - "Network" - ] - } - }, - "/nodes": { - "get": { - "summary": "List nodes", - "description": "List nodes.", - "operationId": "findAll", - "responses": { - "200": { - "description": "No error", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Node" - } - } - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "filters", - "in": "query", - "description": "A JSON encoded value of the filters (a map[string][]string) to process on the nodes list.", - "type": "array", - "items": { - "type": "string" - } - }], - "tags": [ - "Node" - ] - } - }, - "/nodes/{id}": { - "get": { - "summary": "Inspect a node", - "description": "Return low-level information on the node id.", - "operationId": "find", - "responses": { - "200": { - "description": "No error", - "schema": { - "$ref": "#/definitions/Node" - } - }, - "404": { - "description": "No such node" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "description": "Node id or name", - "required": true, - "type": "string" - }], - "tags": [ - "Node" - ] - } - }, - "/swarm/init": { - "post": { - "summary": "Initialize a new Swarm", - "description": "Initialize a new Swarm", - "operationId": "initialize", - "responses": { - "200": { - "description": "No error" - }, - "400": { - "description": "Bad parameter" - }, - "406": { - "description": "Node is already part of a Swarm" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "swarmConfig", - "in": "body", - "description": "Config for the Swarm", - "schema": { - "$ref": "#/definitions/SwarmConfig" - } - }], - "tags": [ - "Swarm" - ] - } - }, - "/swarm/join": { - "post": { - "summary": "Join an existing new Swarm", - "description": "Join an existing new Swarm", - "operationId": "join", - "responses": { - "200": { - "description": "No error" - }, - "400": { - "description": "Bad parameter" - }, - "406": { - "description": "Node is already part of a Swarm" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "swarmJoinConfig", - "in": "body", - "description": "Config for joining the Swarm", - "schema": { - "$ref": "#/definitions/SwarmJoinConfig" - } - }], - "tags": [ - "Swarm" - ] - } - }, - "/swarm/leave": { - "post": { - "summary": "Leave a Swarm", - "description": "Leave a Swarm", - "operationId": "leave", - "responses": { - "200": { - "description": "No error" - }, - "406": { - "description": "Node is not part of a Swarm" - }, - "500": { - "description": "Server error" - } - }, - "tags": [ - "Swarm" - ] - } - }, - "/swarm/update": { - "post": { - "summary": "Update a Swarm", - "description": "Update a Swarm", - "operationId": "update", - "responses": { - "200": { - "description": "No error" - }, - "406": { - "description": "Node is not part of a Swarm" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "swarmUpdateConfig", - "in": "body", - "description": "Config for updating the Swarm", - "schema": { - "$ref": "#/definitions/SwarmUpdateConfig" - } - }, { - "name": "version", - "in": "query", - "description": "The version number of the swarm object being updated. This is required to avoid conflicting writes.", - "required": true, - "type": "integer" - }, { - "name": "rotateWorkerToken", - "in": "query", - "description": "Set to true (or 1) to rotate the worker join token.", - "type": "boolean" - }, { - "name": "rotateManagerToken", - "in": "query", - "description": "Set to true (or 1) to rotate the manager join token.", - "type": "boolean" - }], - "tags": [ - "Swarm" - ] - } - }, - "/services": { - "get": { - "summary": "List services", - "description": "List services", - "operationId": "findAll", - "responses": { - "200": { - "description": "No error", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Service" - } - } - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "filters", - "in": "query", - "description": "A JSON encoded value of the filters (a map[string][]string) to process on the services list.", - "type": "array", - "items": { - "type": "string" - } - }], - "tags": [ - "Service" - ] - } - }, - "/services/create": { - "post": { - "summary": "Create a service", - "description": "Create a service", - "operationId": "create", - "responses": { - "201": { - "description": "No error", - "schema": { - "$ref": "#/definitions/ServiceCreateResponse" - } - }, - "406": { - "description": "Server error or node is not part of a Swarm" - }, - "409": { - "description": "Name conflicts with an existing object" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "serviceSpec", - "in": "body", - "description": "Service specification to create", - "schema": { - "$ref": "#/definitions/ServiceSpec" - } - }], - "tags": [ - "Service" - ] - } - }, - "/services/{id}": { - "delete": { - "summary": "Remove a service", - "description": "Stop and remove the service id", - "operationId": "remove", - "responses": { - "204": { - "description": "No error" - }, - "404": { - "description": "No such service" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "description": "Service id or name", - "required": true, - "type": "string" - }], - "tags": [ - "Service" - ] - }, - "get": { - "summary": "Inspect a service", - "description": "Get details on a service", - "operationId": "find", - "responses": { - "200": { - "description": "No error", - "schema": { - "$ref": "#/definitions/Service" - } - }, - "404": { - "description": "No such service" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "description": "Service id or name", - "required": true, - "type": "string" - }], - "tags": [ - "Service" - ] - } - }, - "/services/{id}/update": { - "post": { - "summary": "Update a service", - "description": "Update the service id.", - "operationId": "update", - "responses": { - "200": { - "description": "No error" - }, - "404": { - "description": "No such service" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "description": "Service id or name", - "required": true, - "type": "string" - }, { - "name": "version", - "in": "query", - "description": " The version number of the service object being updated. This is required to avoid conflicting writes.", - "required": true, - "type": "integer" - }, { - "name": "serviceSpec", - "in": "body", - "description": "Service specification to update", - "schema": { - "$ref": "#/definitions/ServiceSpec" - } - }], - "tags": [ - "Service" - ] - } - }, - "/tasks": { - "get": { - "summary": "List tasks", - "description": "List tasks", - "operationId": "findAll", - "responses": { - "200": { - "description": "No error", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Task" - } - } - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "filters", - "in": "query", - "description": "A JSON encoded value of the filters (a map[string][]string) to process on the tasks list.", - "type": "array", - "items": { - "type": "string" - } - }], - "tags": [ - "Task" - ] - } - }, - "/tasks/{id}": { - "get": { - "summary": "Inspect a task", - "description": "Get details on a task", - "operationId": "find", - "responses": { - "200": { - "description": "No error", - "schema": { - "$ref": "#/definitions/Task" - } - }, - "404": { - "description": "Unknown task" - }, - "500": { - "description": "Server error" - } - }, - "parameters": [{ - "name": "id", - "in": "path", - "description": "Task id or name", - "required": true, - "type": "string" - }], - "tags": [ - "Task" - ] - } - } - } -} - diff --git a/generate.sh b/generate.sh index 39e6312f2..89935aa03 100755 --- a/generate.sh +++ b/generate.sh @@ -1,3 +1,3 @@ #!/bin/bash -./vendor/bin/jane-openapi generate docker-swagger.json 'Docker\API' generated +./vendor/bin/jane-openapi generate diff --git a/generated/Client.php b/generated/Client.php new file mode 100644 index 000000000..3fa464f84 --- /dev/null +++ b/generated/Client.php @@ -0,0 +1,1845 @@ +` containers with exit code of `` + - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) + - `label=key` or `label="key=value"` of a container label + - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) + - `id=` a container's ID + - `name=` a container's name + - `is-task=`(`true`|`false`) + - `ancestor`=(`[:]`, ``, or ``) + - `before`=(`` or ``) + - `since`=(`` or ``) + - `volume`=(`` or ``) + - `network`=(`` or ``) + - `health`=(`starting`|`healthy`|`unhealthy`|`none`) + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerListBadRequestException + * @throws \Docker\API\Exception\ContainerListInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainerSummaryItem[]|\Psr\Http\Message\ResponseInterface + */ + public function containerList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerList($queryParameters), $fetch); + } + /** + * + * + * @param \Docker\API\Model\ContainersCreatePostBody $body Container to create + * @param array $queryParameters { + * @var string $name Assign the specified name to the container. Must match `/?[a-zA-Z0-9_-]+`. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerCreateBadRequestException + * @throws \Docker\API\Exception\ContainerCreateNotFoundException + * @throws \Docker\API\Exception\ContainerCreateNotAcceptableException + * @throws \Docker\API\Exception\ContainerCreateConflictException + * @throws \Docker\API\Exception\ContainerCreateInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersCreatePostResponse201|\Psr\Http\Message\ResponseInterface + */ + public function containerCreate(\Docker\API\Model\ContainersCreatePostBody $body, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerCreate($body, $queryParameters), $fetch); + } + /** + * Return low-level information about a container. + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var bool $size Return the size of container as fields `SizeRw` and `SizeRootFs` + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerInspectNotFoundException + * @throws \Docker\API\Exception\ContainerInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersIdJsonGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function containerInspect(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerInspect($id, $queryParameters), $fetch); + } + /** + * On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $ps_args The arguments to pass to `ps`. For example, `aux` + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerTopNotFoundException + * @throws \Docker\API\Exception\ContainerTopInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersIdTopGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function containerTop(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerTop($id, $queryParameters), $fetch); + } + /** + * Get `stdout` and `stderr` logs from a container. + + Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. + + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var bool $follow Return the logs as a stream. + + This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). + + * @var bool $stdout Return logs from `stdout` + * @var bool $stderr Return logs from `stderr` + * @var int $since Only return logs since this time, as a UNIX timestamp + * @var bool $timestamps Add timestamps to every log line + * @var string $tail Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerLogsNotFoundException + * @throws \Docker\API\Exception\ContainerLogsInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerLogs(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerLogs($id, $queryParameters), $fetch); + } + /** + * Returns which files in a container's filesystem have been added, deleted, or modified. The `Kind` of modification can be one of: + + - `0`: Modified + - `1`: Added + - `2`: Deleted + + * + * @param string $id ID or name of the container + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerChangesNotFoundException + * @throws \Docker\API\Exception\ContainerChangesInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersIdChangesGetResponse200Item[]|\Psr\Http\Message\ResponseInterface + */ + public function containerChanges(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerChanges($id), $fetch); + } + /** + * Export the contents of a container as a tarball. + * + * @param string $id ID or name of the container + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerExportNotFoundException + * @throws \Docker\API\Exception\ContainerExportInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerExport(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerExport($id), $fetch); + } + /** + * This endpoint returns a live stream of a container’s resource usage statistics. + + The `precpu_stats` is the CPU statistic of last read, which is used for calculating the CPU usage percentage. It is not the same as the `cpu_stats` field. + + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var bool $stream Stream the output. If false, the stats will be output once and then it will disconnect. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerStatsNotFoundException + * @throws \Docker\API\Exception\ContainerStatsInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerStats(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerStats($id, $queryParameters), $fetch); + } + /** + * Resize the TTY for a container. You must restart the container for the resize to take effect. + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var int $h Height of the tty session in characters + * @var int $w Width of the tty session in characters + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerResizeNotFoundException + * @throws \Docker\API\Exception\ContainerResizeInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerResize(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerResize($id, $queryParameters), $fetch); + } + /** + * + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $detachKeys Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerStartNotFoundException + * @throws \Docker\API\Exception\ContainerStartInternalServerErrorException + * + * @return null|\Docker\API\Model\ErrorResponse|\Psr\Http\Message\ResponseInterface + */ + public function containerStart(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerStart($id, $queryParameters), $fetch); + } + /** + * + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var int $t Number of seconds to wait before killing the container + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerStopNotFoundException + * @throws \Docker\API\Exception\ContainerStopInternalServerErrorException + * + * @return null|\Docker\API\Model\ErrorResponse|\Psr\Http\Message\ResponseInterface + */ + public function containerStop(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerStop($id, $queryParameters), $fetch); + } + /** + * + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var int $t Number of seconds to wait before killing the container + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerRestartNotFoundException + * @throws \Docker\API\Exception\ContainerRestartInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerRestart(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerRestart($id, $queryParameters), $fetch); + } + /** + * Send a POSIX signal to a container, defaulting to killing to the container. + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $signal Signal to send to the container as an integer or string (e.g. `SIGINT`) + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerKillNotFoundException + * @throws \Docker\API\Exception\ContainerKillInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerKill(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerKill($id, $queryParameters), $fetch); + } + /** + * Change various configuration options of a container without having to recreate it. + * + * @param string $id ID or name of the container + * @param \Docker\API\Model\ContainersIdUpdatePostBody $update + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerUpdateNotFoundException + * @throws \Docker\API\Exception\ContainerUpdateInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersIdUpdatePostResponse200|\Psr\Http\Message\ResponseInterface + */ + public function containerUpdate(string $id, \Docker\API\Model\ContainersIdUpdatePostBody $update, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerUpdate($id, $update), $fetch); + } + /** + * + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $name New name for the container + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerRenameNotFoundException + * @throws \Docker\API\Exception\ContainerRenameConflictException + * @throws \Docker\API\Exception\ContainerRenameInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerRename(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerRename($id, $queryParameters), $fetch); + } + /** + * Use the cgroups freezer to suspend all processes in a container. + + Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. + + * + * @param string $id ID or name of the container + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerPauseNotFoundException + * @throws \Docker\API\Exception\ContainerPauseInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerPause(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerPause($id), $fetch); + } + /** + * Resume a container which has been paused. + * + * @param string $id ID or name of the container + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerUnpauseNotFoundException + * @throws \Docker\API\Exception\ContainerUnpauseInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerUnpause(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerUnpause($id), $fetch); + } + /** + * Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached. + + Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything. + + See [the documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details. + + ### Hijacking + + This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket. + + This is the response from the daemon for an attach request: + + ``` + HTTP/1.1 200 OK + Content-Type: application/vnd.docker.raw-stream + + [STREAM] + ``` + + After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server. + + To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers. + + For example, the client sends this request to upgrade the connection: + + ``` + POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 + Upgrade: tcp + Connection: Upgrade + ``` + + The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream: + + ``` + HTTP/1.1 101 UPGRADED + Content-Type: application/vnd.docker.raw-stream + Connection: Upgrade + Upgrade: tcp + + [STREAM] + ``` + + ### Stream format + + When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload. + + The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`). + + It is encoded on the first eight bytes like this: + + ```go + header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} + ``` + + `STREAM_TYPE` can be: + + - 0: `stdin` (is written on `stdout`) + - 1: `stdout` + - 2: `stderr` + + `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian. + + Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`. + + The simplest way to implement this protocol is the following: + + 1. Read 8 bytes. + 2. Choose `stdout` or `stderr` depending on the first byte. + 3. Extract the frame size from the last four bytes. + 4. Read the extracted size and output it on the correct output. + 5. Goto 1. + + ### Stream format when using a TTY + + When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`. + + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $detachKeys Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + * @var bool $logs Replay previous logs from the container. + + This is useful for attaching to a container that has started and you want to output everything since the container started. + + If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output. + + * @var bool $stream Stream attached streams from the time the request was made onwards + * @var bool $stdin Attach to `stdin` + * @var bool $stdout Attach to `stdout` + * @var bool $stderr Attach to `stderr` + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerAttachBadRequestException + * @throws \Docker\API\Exception\ContainerAttachNotFoundException + * @throws \Docker\API\Exception\ContainerAttachInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerAttach(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerAttach($id, $queryParameters), $fetch); + } + /** + * + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $detachKeys Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`. + * @var bool $logs Return logs + * @var bool $stream Return stream + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerAttachWebsocketBadRequestException + * @throws \Docker\API\Exception\ContainerAttachWebsocketNotFoundException + * @throws \Docker\API\Exception\ContainerAttachWebsocketInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerAttachWebsocket(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerAttachWebsocket($id, $queryParameters), $fetch); + } + /** + * Block until a container stops, then returns the exit code. + * + * @param string $id ID or name of the container + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerWaitNotFoundException + * @throws \Docker\API\Exception\ContainerWaitInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersIdWaitPostResponse200|\Psr\Http\Message\ResponseInterface + */ + public function containerWait(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerWait($id), $fetch); + } + /** + * + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var bool $v Remove anonymous volumes associated with the container. + * @var bool $force If the container is running, kill it before removing it. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerDeleteBadRequestException + * @throws \Docker\API\Exception\ContainerDeleteNotFoundException + * @throws \Docker\API\Exception\ContainerDeleteInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerDelete(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerDelete($id, $queryParameters), $fetch); + } + /** + * Get an tar archive of a resource in the filesystem of container id. + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $path Resource in the container’s filesystem to archive. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerGetArchiveBadRequestException + * @throws \Docker\API\Exception\ContainerGetArchiveNotFoundException + * @throws \Docker\API\Exception\ContainerGetArchiveInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerGetArchive(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerGetArchive($id, $queryParameters), $fetch); + } + /** + * A response header `X-Docker-Container-Path-Stat` is return containing a base64 - encoded JSON object with some filesystem header information about the path. + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $path Resource in the container’s filesystem to archive. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerArchiveHeadBadRequestException + * @throws \Docker\API\Exception\ContainerArchiveHeadNotFoundException + * @throws \Docker\API\Exception\ContainerArchiveHeadInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerArchiveHead(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerArchiveHead($id, $queryParameters), $fetch); + } + /** + * Upload a tar archive to be extracted to a path in the filesystem of container id. + `path` parameter is asserted to be a directory. If it exists as a file, 400 error + will be returned with message "not a directory". + + * + * @param string $id ID or name of the container + * @param string $inputStream The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz. + * @param array $queryParameters { + * @var string $path Path to a directory in the container to extract the archive’s contents into. + * @var string $noOverwriteDirNonDir If “1”, “true”, or “True” then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerPutArchiveBadRequestException + * @throws \Docker\API\Exception\ContainerPutArchiveForbiddenException + * @throws \Docker\API\Exception\ContainerPutArchiveNotFoundException + * @throws \Docker\API\Exception\ContainerPutArchiveInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerPutArchive(string $id, string $inputStream, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerPutArchive($id, $inputStream, $queryParameters), $fetch); + } + /** + * + * + * @param array $queryParameters { + * @var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerPruneInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersPrunePostResponse200|\Psr\Http\Message\ResponseInterface + */ + public function containerPrune(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerPrune($queryParameters), $fetch); + } + /** + * Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image. + * + * @param array $queryParameters { + * @var bool $all Show all images. Only images from a final layer (no children) are shown by default. + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. + + Available filters: + - `dangling=true` + - `label=key` or `label="key=value"` of an image label + - `before`=(`[:]`, `` or ``) + - `since`=(`[:]`, `` or ``) + - `reference`=(`[:]`) + + * @var bool $digests Show digest information as a `RepoDigests` field on each image. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImageListInternalServerErrorException + * + * @return null|\Docker\API\Model\ImageSummary[]|\Psr\Http\Message\ResponseInterface + */ + public function imageList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ImageList($queryParameters), $fetch); + } + /** + * Build an image from a tar archive with a `Dockerfile` in it. + + The `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/). + + The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output. + + The build is canceled if the client drops the connection by quitting or being killed. + + * + * @param string|resource|\Psr\Http\Message\StreamInterface $inputStream A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz. + * @param array $queryParameters { + * @var string $dockerfile Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`. + * @var string $t A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters. + * @var string $remote A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball. + * @var bool $q Suppress verbose build output. + * @var bool $nocache Do not use the cache when building the image. + * @var string $cachefrom JSON array of images used for build cache resolution. + * @var string $pull Attempt to pull the image even if an older image exists locally. + * @var bool $rm Remove intermediate containers after a successful build. + * @var bool $forcerm Always remove intermediate containers, even upon failure. + * @var int $memory Set memory limit for build. + * @var int $memswap Total memory (memory + swap). Set as `-1` to disable swap. + * @var int $cpushares CPU shares (relative weight). + * @var string $cpusetcpus CPUs in which to allow execution (e.g., `0-3`, `0,1`). + * @var int $cpuperiod The length of a CPU period in microseconds. + * @var int $cpuquota Microseconds of CPU time that the container can get in a CPU period. + * @var int $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) + * @var int $shmsize Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB. + * @var bool $squash Squash the resulting images layers into a single layer. *(Experimental release only.)* + * @var string $labels Arbitrary key/value labels to set on the image, as a JSON map of string pairs. + * @var string $networkmode Sets the networking mode for the run commands during build. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name to which this container should connect to. + * } + * @param array $headerParameters { + * @var string $Content-type + * @var string $X-Registry-Config This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. + + The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: + + ``` + { + "docker.example.com": { + "username": "janedoe", + "password": "hunter2" + }, + "https://index.docker.io/v1/": { + "username": "mobydock", + "password": "conta1n3rize14" + } + } + ``` + + Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImageBuildInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function imageBuild($inputStream, array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ImageBuild($inputStream, $queryParameters, $headerParameters), $fetch); + } + /** + * Create an image by either pulling it from a registry or importing it. + * + * @param string $inputImage Image content if the value `-` has been specified in fromSrc query parameter + * @param array $queryParameters { + * @var string $fromImage Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed. + * @var string $fromSrc Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image. + * @var string $repo Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image. + * @var string $tag Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled. + * } + * @param array $headerParameters { + * @var string $X-Registry-Auth A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication) + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImageCreateNotFoundException + * @throws \Docker\API\Exception\ImageCreateInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function imageCreate(string $inputImage, array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ImageCreate($inputImage, $queryParameters, $headerParameters), $fetch); + } + /** + * Return low-level information about an image. + * + * @param string $name Image name or id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImageInspectNotFoundException + * @throws \Docker\API\Exception\ImageInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Image|\Psr\Http\Message\ResponseInterface + */ + public function imageInspect(string $name, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ImageInspect($name), $fetch); + } + /** + * Return parent layers of an image. + * + * @param string $name Image name or ID + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImageHistoryNotFoundException + * @throws \Docker\API\Exception\ImageHistoryInternalServerErrorException + * + * @return null|\Docker\API\Model\ImagesNameHistoryGetResponse200Item[]|\Psr\Http\Message\ResponseInterface + */ + public function imageHistory(string $name, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ImageHistory($name), $fetch); + } + /** + * Push an image to a registry. + + If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, `registry.example.com/myimage:latest`. + + The push is cancelled if the HTTP connection is closed. + + * + * @param string $name Name of the image to push. For example, `registry.example.com/myimage`. + The image must be present in the local image store with the same name. + + The name should be provided without tag; if a tag is provided, it + is ignored. For example, `registry.example.com/myimage:latest` is + considered equivalent to `registry.example.com/myimage`. + + Use the `tag` parameter to specify the tag to push. + + * @param array $queryParameters { + * @var string $tag Tag of the image to push. For example, `latest`. If no tag is provided, + all tags of the given image that are present in the local image store + are pushed. + + * } + * @param array $headerParameters { + * @var string $X-Registry-Auth A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication) + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImagePushNotFoundException + * @throws \Docker\API\Exception\ImagePushInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function imagePush(string $name, array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ImagePush($name, $queryParameters, $headerParameters), $fetch); + } + /** + * Tag an image so that it becomes part of a repository. + * + * @param string $name Image name or ID to tag. + * @param array $queryParameters { + * @var string $repo The repository to tag in. For example, `someuser/someimage`. + * @var string $tag The name of the new tag. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImageTagBadRequestException + * @throws \Docker\API\Exception\ImageTagNotFoundException + * @throws \Docker\API\Exception\ImageTagConflictException + * @throws \Docker\API\Exception\ImageTagInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function imageTag(string $name, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ImageTag($name, $queryParameters), $fetch); + } + /** + * Remove an image, along with any untagged parent images that were referenced by that image. + + Images can't be removed if they have descendant images, are being used by a running container or are being used by a build. + + * + * @param string $name Image name or ID + * @param array $queryParameters { + * @var bool $force Remove the image even if it is being used by stopped containers or has other tags + * @var bool $noprune Do not delete untagged parent images + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImageDeleteNotFoundException + * @throws \Docker\API\Exception\ImageDeleteConflictException + * @throws \Docker\API\Exception\ImageDeleteInternalServerErrorException + * + * @return null|\Docker\API\Model\ImageDeleteResponse[]|\Psr\Http\Message\ResponseInterface + */ + public function imageDelete(string $name, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ImageDelete($name, $queryParameters), $fetch); + } + /** + * Search for an image on Docker Hub. + * + * @param array $queryParameters { + * @var string $term Term to search + * @var int $limit Maximum number of results to return + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: + + - `stars=` + - `is-automated=(true|false)` + - `is-official=(true|false)` + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImageSearchInternalServerErrorException + * + * @return null|\Docker\API\Model\ImagesSearchGetResponse200Item[]|\Psr\Http\Message\ResponseInterface + */ + public function imageSearch(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ImageSearch($queryParameters), $fetch); + } + /** + * + * + * @param array $queryParameters { + * @var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `dangling=` When set to `true` (or `1`), prune only + unused *and* untagged images. When set to `false` + (or `0`), all unused images are pruned. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImagePruneInternalServerErrorException + * + * @return null|\Docker\API\Model\ImagesPrunePostResponse200|\Psr\Http\Message\ResponseInterface + */ + public function imagePrune(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ImagePrune($queryParameters), $fetch); + } + /** + * Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. + * + * @param \Docker\API\Model\AuthConfig $authConfig Authentication to check + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SystemAuthInternalServerErrorException + * + * @return null|\Docker\API\Model\AuthPostResponse200|\Psr\Http\Message\ResponseInterface + */ + public function systemAuth(\Docker\API\Model\AuthConfig $authConfig, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SystemAuth($authConfig), $fetch); + } + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SystemInfoInternalServerErrorException + * + * @return null|\Docker\API\Model\InfoGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function systemInfo(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SystemInfo(), $fetch); + } + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SystemVersionInternalServerErrorException + * + * @return null|\Docker\API\Model\VersionGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function systemVersion(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SystemVersion(), $fetch); + } + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SystemPingInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function systemPing(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SystemPing(), $fetch); + } + /** + * + * + * @param \Docker\API\Model\Config $containerConfig The container configuration + * @param array $queryParameters { + * @var string $container The ID or name of the container to commit + * @var string $repo Repository name for the created image + * @var string $tag Tag name for the create image + * @var string $comment Commit message + * @var string $author Author of the image (e.g., `John Hannibal Smith `) + * @var bool $pause Whether to pause the container before committing + * @var string $changes `Dockerfile` instructions to apply while committing + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImageCommitNotFoundException + * @throws \Docker\API\Exception\ImageCommitInternalServerErrorException + * + * @return null|\Docker\API\Model\IdResponse|\Psr\Http\Message\ResponseInterface + */ + public function imageCommit(\Docker\API\Model\Config $containerConfig, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ImageCommit($containerConfig, $queryParameters), $fetch); + } + /** + * Stream real-time events from the server. + + Various objects within Docker report events when something happens to them. + + Containers report these events: `attach, commit, copy, create, destroy, detach, die, exec_create, exec_detach, exec_start, export, kill, oom, pause, rename, resize, restart, start, stop, top, unpause, update` + + Images report these events: `delete, import, load, pull, push, save, tag, untag` + + Volumes report these events: `create, mount, unmount, destroy` + + Networks report these events: `create, connect, disconnect, destroy` + + The Docker daemon reports these events: `reload` + + * + * @param array $queryParameters { + * @var string $since Show events created since this timestamp then stream new events. + * @var string $until Show events created until this timestamp then stop streaming. + * @var string $filters A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: + + - `container=` container name or ID + - `event=` event type + - `image=` image name or ID + - `label=` image or container label + - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, or `daemon` + - `volume=` volume name or ID + - `network=` network name or ID + - `daemon=` daemon name or ID + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SystemEventsInternalServerErrorException + * + * @return null|\Docker\API\Model\EventsGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function systemEvents(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SystemEvents($queryParameters), $fetch); + } + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SystemDataUsageInternalServerErrorException + * + * @return null|\Docker\API\Model\SystemDfGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function systemDataUsage(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SystemDataUsage(), $fetch); + } + /** + * Get a tarball containing all images and metadata for a repository. + + If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced. + + ### Image tarball format + + An image tarball contains one directory per image layer (named using its long ID), each containing these files: + + - `VERSION`: currently `1.0` - the file format version + - `json`: detailed layer information, similar to `docker inspect layer_id` + - `layer.tar`: A tarfile containing the filesystem changes in this layer + + The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. + + If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs. + + ```json + { + "hello-world": { + "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" + } + } + ``` + + * + * @param string $name Image name or ID + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImageGetInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function imageGet(string $name, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ImageGet($name), $fetch); + } + /** + * Get a tarball containing all images and metadata for several image repositories. + + For each value of the `names` parameter: if it is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID. + + For details on the format, see [the export image endpoint](#operation/ImageGet). + + * + * @param array $queryParameters { + * @var array $names Image names to filter by + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImageGetAllInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function imageGetAll(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ImageGetAll($queryParameters), $fetch); + } + /** + * Load a set of images and tags into a repository. + + For details on the format, see [the export image endpoint](#operation/ImageGet). + + * + * @param string|resource|\Psr\Http\Message\StreamInterface $imagesTarball Tar archive containing images + * @param array $queryParameters { + * @var bool $quiet Suppress progress details during load. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImageLoadInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function imageLoad($imagesTarball, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ImageLoad($imagesTarball, $queryParameters), $fetch); + } + /** + * Run a command inside a running container. + * + * @param string $id ID or name of container + * @param \Docker\API\Model\ContainersIdExecPostBody $execConfig Exec configuration + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerExecNotFoundException + * @throws \Docker\API\Exception\ContainerExecConflictException + * @throws \Docker\API\Exception\ContainerExecInternalServerErrorException + * + * @return null|\Docker\API\Model\IdResponse|\Psr\Http\Message\ResponseInterface + */ + public function containerExec(string $id, \Docker\API\Model\ContainersIdExecPostBody $execConfig, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerExec($id, $execConfig), $fetch); + } + /** + * Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command. + * + * @param string $id Exec instance ID + * @param \Docker\API\Model\ExecIdStartPostBody $execStartConfig + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ExecStartNotFoundException + * @throws \Docker\API\Exception\ExecStartConflictException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function execStart(string $id, \Docker\API\Model\ExecIdStartPostBody $execStartConfig, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ExecStart($id, $execStartConfig), $fetch); + } + /** + * Resize the TTY session used by an exec instance. This endpoint only works if `tty` was specified as part of creating and starting the exec instance. + * + * @param string $id Exec instance ID + * @param array $queryParameters { + * @var int $h Height of the TTY session in characters + * @var int $w Width of the TTY session in characters + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ExecResizeBadRequestException + * @throws \Docker\API\Exception\ExecResizeNotFoundException + * @throws \Docker\API\Exception\ExecResizeInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function execResize(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ExecResize($id, $queryParameters), $fetch); + } + /** + * Return low-level information about an exec instance. + * + * @param string $id Exec instance ID + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ExecInspectNotFoundException + * @throws \Docker\API\Exception\ExecInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\ExecIdJsonGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function execInspect(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ExecInspect($id), $fetch); + } + /** + * + * + * @param array $queryParameters { + * @var string $filters JSON encoded value of the filters (a `map[string][]string`) to + process on the volumes list. Available filters: + + - `name=` Matches all or part of a volume name. + - `dangling=` When set to `true` (or `1`), returns all + volumes that are not in use by a container. When set to `false` + (or `0`), only volumes that are in use by one or more + containers are returned. + - `driver=` Matches all or part of a volume + driver name. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\VolumeListInternalServerErrorException + * + * @return null|\Docker\API\Model\VolumesGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function volumeList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\VolumeList($queryParameters), $fetch); + } + /** + * + * + * @param \Docker\API\Model\VolumesCreatePostBody $volumeConfig Volume configuration + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\VolumeCreateInternalServerErrorException + * + * @return null|\Docker\API\Model\Volume|\Psr\Http\Message\ResponseInterface + */ + public function volumeCreate(\Docker\API\Model\VolumesCreatePostBody $volumeConfig, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\VolumeCreate($volumeConfig), $fetch); + } + /** + * Instruct the driver to remove the volume. + * + * @param string $name Volume name or ID + * @param array $queryParameters { + * @var bool $force Force the removal of the volume + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\VolumeDeleteNotFoundException + * @throws \Docker\API\Exception\VolumeDeleteConflictException + * @throws \Docker\API\Exception\VolumeDeleteInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function volumeDelete(string $name, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\VolumeDelete($name, $queryParameters), $fetch); + } + /** + * + * + * @param string $name Volume name or ID + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\VolumeInspectNotFoundException + * @throws \Docker\API\Exception\VolumeInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Volume|\Psr\Http\Message\ResponseInterface + */ + public function volumeInspect(string $name, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\VolumeInspect($name), $fetch); + } + /** + * + * + * @param array $queryParameters { + * @var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\VolumePruneInternalServerErrorException + * + * @return null|\Docker\API\Model\VolumesPrunePostResponse200|\Psr\Http\Message\ResponseInterface + */ + public function volumePrune(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\VolumePrune($queryParameters), $fetch); + } + /** + * + * + * @param array $queryParameters { + * @var string $filters JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters: + + - `driver=` Matches a network's driver. + - `id=` Matches all or part of a network ID. + - `label=` or `label==` of a network label. + - `name=` Matches all or part of a network name. + - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\NetworkListInternalServerErrorException + * + * @return null|\Docker\API\Model\Network[]|\Psr\Http\Message\ResponseInterface + */ + public function networkList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\NetworkList($queryParameters), $fetch); + } + /** + * + * + * @param string $id Network ID or name + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\NetworkDeleteNotFoundException + * @throws \Docker\API\Exception\NetworkDeleteInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function networkDelete(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\NetworkDelete($id), $fetch); + } + /** + * + * + * @param string $id Network ID or name + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\NetworkInspectNotFoundException + * + * @return null|\Docker\API\Model\Network|\Psr\Http\Message\ResponseInterface + */ + public function networkInspect(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\NetworkInspect($id), $fetch); + } + /** + * + * + * @param \Docker\API\Model\NetworksCreatePostBody $networkConfig Network configuration + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\NetworkCreateBadRequestException + * @throws \Docker\API\Exception\NetworkCreateForbiddenException + * @throws \Docker\API\Exception\NetworkCreateNotFoundException + * @throws \Docker\API\Exception\NetworkCreateInternalServerErrorException + * + * @return null|\Docker\API\Model\NetworksCreatePostResponse201|\Psr\Http\Message\ResponseInterface + */ + public function networkCreate(\Docker\API\Model\NetworksCreatePostBody $networkConfig, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\NetworkCreate($networkConfig), $fetch); + } + /** + * + * + * @param string $id Network ID or name + * @param \Docker\API\Model\NetworksIdConnectPostBody $container + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\NetworkConnectForbiddenException + * @throws \Docker\API\Exception\NetworkConnectNotFoundException + * @throws \Docker\API\Exception\NetworkConnectInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function networkConnect(string $id, \Docker\API\Model\NetworksIdConnectPostBody $container, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\NetworkConnect($id, $container), $fetch); + } + /** + * + * + * @param string $id Network ID or name + * @param \Docker\API\Model\NetworksIdDisconnectPostBody $container + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\NetworkDisconnectForbiddenException + * @throws \Docker\API\Exception\NetworkDisconnectNotFoundException + * @throws \Docker\API\Exception\NetworkDisconnectInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function networkDisconnect(string $id, \Docker\API\Model\NetworksIdDisconnectPostBody $container, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\NetworkDisconnect($id, $container), $fetch); + } + /** + * + * + * @param array $queryParameters { + * @var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\NetworkPruneInternalServerErrorException + * + * @return null|\Docker\API\Model\NetworksPrunePostResponse200|\Psr\Http\Message\ResponseInterface + */ + public function networkPrune(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\NetworkPrune($queryParameters), $fetch); + } + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginListInternalServerErrorException + * + * @return null|\Docker\API\Model\Plugin[]|\Psr\Http\Message\ResponseInterface + */ + public function pluginList(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\PluginList(), $fetch); + } + /** + * + * + * @param array $queryParameters { + * @var string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\GetPluginPrivilegesInternalServerErrorException + * + * @return null|\Docker\API\Model\PluginsPrivilegesGetResponse200Item[]|\Psr\Http\Message\ResponseInterface + */ + public function getPluginPrivileges(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\GetPluginPrivileges($queryParameters), $fetch); + } + /** + * Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). + + * + * @param array $body + * @param array $queryParameters { + * @var string $remote Remote reference for plugin to install. + + The `:latest` tag is optional, and is used as the default if omitted. + + * @var string $name Local name for the pulled plugin. + + The `:latest` tag is optional, and is used as the default if omitted. + + * } + * @param array $headerParameters { + * @var string $X-Registry-Auth A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication) + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginPullInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function pluginPull(array $body, array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\PluginPull($body, $queryParameters, $headerParameters), $fetch); + } + /** + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginInspectNotFoundException + * @throws \Docker\API\Exception\PluginInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Plugin|\Psr\Http\Message\ResponseInterface + */ + public function pluginInspect(string $name, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\PluginInspect($name), $fetch); + } + /** + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + * @param array $queryParameters { + * @var bool $force Disable the plugin before removing. This may result in issues if the plugin is in use by a container. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginDeleteNotFoundException + * @throws \Docker\API\Exception\PluginDeleteInternalServerErrorException + * + * @return null|\Docker\API\Model\Plugin|\Psr\Http\Message\ResponseInterface + */ + public function pluginDelete(string $name, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\PluginDelete($name, $queryParameters), $fetch); + } + /** + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + * @param array $queryParameters { + * @var int $timeout Set the HTTP client timeout (in seconds) + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginEnableInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function pluginEnable(string $name, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\PluginEnable($name, $queryParameters), $fetch); + } + /** + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginDisableInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function pluginDisable(string $name, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\PluginDisable($name), $fetch); + } + /** + * + * + * @param string|resource|\Psr\Http\Message\StreamInterface $tarContext Path to tar containing plugin rootfs and manifest + * @param array $queryParameters { + * @var string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginCreateInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function pluginCreate($tarContext, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\PluginCreate($tarContext, $queryParameters), $fetch); + } + /** + * Push a plugin to the registry. + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginPushNotFoundException + * @throws \Docker\API\Exception\PluginPushInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function pluginPush(string $name, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\PluginPush($name), $fetch); + } + /** + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + * @param array $body + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginSetNotFoundException + * @throws \Docker\API\Exception\PluginSetInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function pluginSet(string $name, array $body, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\PluginSet($name, $body), $fetch); + } + /** + * + * + * @param array $queryParameters { + * @var string $filters Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `id=` + - `label=` + - `membership=`(`accepted`|`pending`)` + - `name=` + - `role=`(`manager`|`worker`)` + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\NodeListInternalServerErrorException + * + * @return null|\Docker\API\Model\Node[]|\Psr\Http\Message\ResponseInterface + */ + public function nodeList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\NodeList($queryParameters), $fetch); + } + /** + * + * + * @param string $id The ID or name of the node + * @param array $queryParameters { + * @var bool $force Force remove a node from the swarm + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\NodeDeleteNotFoundException + * @throws \Docker\API\Exception\NodeDeleteInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function nodeDelete(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\NodeDelete($id, $queryParameters), $fetch); + } + /** + * + * + * @param string $id The ID or name of the node + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\NodeInspectNotFoundException + * @throws \Docker\API\Exception\NodeInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Node|\Psr\Http\Message\ResponseInterface + */ + public function nodeInspect(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\NodeInspect($id), $fetch); + } + /** + * + * + * @param string $id The ID of the node + * @param \Docker\API\Model\NodeSpec $body + * @param array $queryParameters { + * @var int $version The version number of the node object being updated. This is required to avoid conflicting writes. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\NodeUpdateNotFoundException + * @throws \Docker\API\Exception\NodeUpdateInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function nodeUpdate(string $id, \Docker\API\Model\NodeSpec $body, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\NodeUpdate($id, $body, $queryParameters), $fetch); + } + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SwarmInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\SwarmGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function swarmInspect(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SwarmInspect(), $fetch); + } + /** + * + * + * @param \Docker\API\Model\SwarmInitPostBody $body + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SwarmInitBadRequestException + * @throws \Docker\API\Exception\SwarmInitNotAcceptableException + * @throws \Docker\API\Exception\SwarmInitInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function swarmInit(\Docker\API\Model\SwarmInitPostBody $body, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SwarmInit($body), $fetch); + } + /** + * + * + * @param \Docker\API\Model\SwarmJoinPostBody $body + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SwarmJoinBadRequestException + * @throws \Docker\API\Exception\SwarmJoinInternalServerErrorException + * @throws \Docker\API\Exception\SwarmJoinServiceUnavailableException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function swarmJoin(\Docker\API\Model\SwarmJoinPostBody $body, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SwarmJoin($body), $fetch); + } + /** + * + * + * @param array $queryParameters { + * @var bool $force Force leave swarm, even if this is the last manager or that it will break the cluster. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SwarmLeaveInternalServerErrorException + * @throws \Docker\API\Exception\SwarmLeaveServiceUnavailableException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function swarmLeave(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SwarmLeave($queryParameters), $fetch); + } + /** + * + * + * @param \Docker\API\Model\SwarmSpec $body + * @param array $queryParameters { + * @var int $version The version number of the swarm object being updated. This is required to avoid conflicting writes. + * @var bool $rotateWorkerToken Rotate the worker join token. + * @var bool $rotateManagerToken Rotate the manager join token. + * @var bool $rotateManagerUnlockKey Rotate the manager unlock key. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SwarmUpdateBadRequestException + * @throws \Docker\API\Exception\SwarmUpdateInternalServerErrorException + * @throws \Docker\API\Exception\SwarmUpdateServiceUnavailableException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function swarmUpdate(\Docker\API\Model\SwarmSpec $body, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SwarmUpdate($body, $queryParameters), $fetch); + } + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SwarmUnlockkeyInternalServerErrorException + * + * @return null|\Docker\API\Model\SwarmUnlockkeyGetResponse200|\Psr\Http\Message\ResponseInterface + */ + public function swarmUnlockkey(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SwarmUnlockkey(), $fetch); + } + /** + * + * + * @param \Docker\API\Model\SwarmUnlockPostBody $body + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SwarmUnlockInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function swarmUnlock(\Docker\API\Model\SwarmUnlockPostBody $body, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SwarmUnlock($body), $fetch); + } + /** + * + * + * @param array $queryParameters { + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters: + + - `id=` + - `name=` + - `label=` + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ServiceListInternalServerErrorException + * + * @return null|\Docker\API\Model\Service[]|\Psr\Http\Message\ResponseInterface + */ + public function serviceList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ServiceList($queryParameters), $fetch); + } + /** + * + * + * @param \Docker\API\Model\ServicesCreatePostBody $body + * @param array $headerParameters { + * @var string $X-Registry-Auth A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication) + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ServiceCreateForbiddenException + * @throws \Docker\API\Exception\ServiceCreateConflictException + * @throws \Docker\API\Exception\ServiceCreateInternalServerErrorException + * @throws \Docker\API\Exception\ServiceCreateServiceUnavailableException + * + * @return null|\Docker\API\Model\ServicesCreatePostResponse201|\Psr\Http\Message\ResponseInterface + */ + public function serviceCreate(\Docker\API\Model\ServicesCreatePostBody $body, array $headerParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ServiceCreate($body, $headerParameters), $fetch); + } + /** + * + * + * @param string $id ID or name of service. + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ServiceDeleteNotFoundException + * @throws \Docker\API\Exception\ServiceDeleteInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function serviceDelete(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ServiceDelete($id), $fetch); + } + /** + * + * + * @param string $id ID or name of service. + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ServiceInspectNotFoundException + * @throws \Docker\API\Exception\ServiceInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Service|\Psr\Http\Message\ResponseInterface + */ + public function serviceInspect(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ServiceInspect($id), $fetch); + } + /** + * + * + * @param string $id ID or name of service. + * @param \Docker\API\Model\ServicesIdUpdatePostBody $body + * @param array $queryParameters { + * @var int $version The version number of the service object being updated. This is required to avoid conflicting writes. + * @var string $registryAuthFrom If the X-Registry-Auth header is not specified, this parameter indicates where to find registry authorization credentials. The valid values are `spec` and `previous-spec`. + * } + * @param array $headerParameters { + * @var string $X-Registry-Auth A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication) + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ServiceUpdateNotFoundException + * @throws \Docker\API\Exception\ServiceUpdateInternalServerErrorException + * + * @return null|\Docker\API\Model\ImageDeleteResponse|\Psr\Http\Message\ResponseInterface + */ + public function serviceUpdate(string $id, \Docker\API\Model\ServicesIdUpdatePostBody $body, array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ServiceUpdate($id, $body, $queryParameters, $headerParameters), $fetch); + } + /** + * Get `stdout` and `stderr` logs from a service. + + **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers. + + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var bool $details Show extra details provided to logs. + * @var bool $follow Return the logs as a stream. + + This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). + + * @var bool $stdout Return logs from `stdout` + * @var bool $stderr Return logs from `stderr` + * @var int $since Only return logs since this time, as a UNIX timestamp + * @var bool $timestamps Add timestamps to every log line + * @var string $tail Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ServiceLogsNotFoundException + * @throws \Docker\API\Exception\ServiceLogsInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function serviceLogs(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ServiceLogs($id, $queryParameters), $fetch); + } + /** + * + * + * @param array $queryParameters { + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters: + + - `id=` + - `name=` + - `service=` + - `node=` + - `label=key` or `label="key=value"` + - `desired-state=(running | shutdown | accepted)` + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\TaskListInternalServerErrorException + * + * @return null|\Docker\API\Model\Task[]|\Psr\Http\Message\ResponseInterface + */ + public function taskList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\TaskList($queryParameters), $fetch); + } + /** + * + * + * @param string $id ID of the task + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\TaskInspectNotFoundException + * @throws \Docker\API\Exception\TaskInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Task|\Psr\Http\Message\ResponseInterface + */ + public function taskInspect(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\TaskInspect($id), $fetch); + } + /** + * + * + * @param array $queryParameters { + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Available filters: + + - `names=` + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SecretListInternalServerErrorException + * + * @return null|\Docker\API\Model\Secret[]|\Psr\Http\Message\ResponseInterface + */ + public function secretList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SecretList($queryParameters), $fetch); + } + /** + * + * + * @param \Docker\API\Model\SecretsCreatePostBody $body + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SecretCreateNotAcceptableException + * @throws \Docker\API\Exception\SecretCreateConflictException + * @throws \Docker\API\Exception\SecretCreateInternalServerErrorException + * + * @return null|\Docker\API\Model\SecretsCreatePostResponse201|\Psr\Http\Message\ResponseInterface + */ + public function secretCreate(\Docker\API\Model\SecretsCreatePostBody $body, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SecretCreate($body), $fetch); + } + /** + * + * + * @param string $id ID of the secret + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SecretDeleteNotFoundException + * @throws \Docker\API\Exception\SecretDeleteInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function secretDelete(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SecretDelete($id), $fetch); + } + /** + * + * + * @param string $id ID of the secret + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SecretInspectNotFoundException + * @throws \Docker\API\Exception\SecretInspectNotAcceptableException + * @throws \Docker\API\Exception\SecretInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Secret|\Psr\Http\Message\ResponseInterface + */ + public function secretInspect(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SecretInspect($id), $fetch); + } + public static function create($httpClient = null, array $additionalPlugins = [], array $additionalNormalizers = []) + { + if (null === $httpClient) { + $httpClient = \Http\Discovery\Psr18ClientDiscovery::find(); + $plugins = []; + if (count($additionalPlugins) > 0) { + $plugins = array_merge($plugins, $additionalPlugins); + } + $httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins); + } + $requestFactory = \Http\Discovery\Psr17FactoryDiscovery::findRequestFactory(); + $streamFactory = \Http\Discovery\Psr17FactoryDiscovery::findStreamFactory(); + $normalizers = [new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), new \Docker\API\Normalizer\JaneObjectNormalizer()]; + if (count($additionalNormalizers) > 0) { + $normalizers = array_merge($normalizers, $additionalNormalizers); + } + $serializer = new \Symfony\Component\Serializer\Serializer($normalizers, [new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode(['json_decode_associative' => true]))]); + return new static($httpClient, $requestFactory, $serializer, $streamFactory); + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerArchiveHead.php b/generated/Endpoint/ContainerArchiveHead.php new file mode 100644 index 000000000..e4493ef35 --- /dev/null +++ b/generated/Endpoint/ContainerArchiveHead.php @@ -0,0 +1,77 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'HEAD'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/archive'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['path']); + $optionsResolver->setRequired(['path']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('path', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerArchiveHeadBadRequestException + * @throws \Docker\API\Exception\ContainerArchiveHeadNotFoundException + * @throws \Docker\API\Exception\ContainerArchiveHeadInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (400 === $status) { + throw new \Docker\API\Exception\ContainerArchiveHeadBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerArchiveHeadNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerArchiveHeadInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerAttach.php b/generated/Endpoint/ContainerAttach.php new file mode 100644 index 000000000..173695de8 --- /dev/null +++ b/generated/Endpoint/ContainerAttach.php @@ -0,0 +1,170 @@ +` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + * @var bool $logs Replay previous logs from the container. + + This is useful for attaching to a container that has started and you want to output everything since the container started. + + If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output. + + * @var bool $stream Stream attached streams from the time the request was made onwards + * @var bool $stdin Attach to `stdin` + * @var bool $stdout Attach to `stdout` + * @var bool $stderr Attach to `stderr` + * } + */ + public function __construct(string $id, array $queryParameters = []) + { + $this->id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/attach'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['detachKeys', 'logs', 'stream', 'stdin', 'stdout', 'stderr']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['logs' => false, 'stream' => false, 'stdin' => false, 'stdout' => false, 'stderr' => false]); + $optionsResolver->addAllowedTypes('detachKeys', ['string']); + $optionsResolver->addAllowedTypes('logs', ['bool']); + $optionsResolver->addAllowedTypes('stream', ['bool']); + $optionsResolver->addAllowedTypes('stdin', ['bool']); + $optionsResolver->addAllowedTypes('stdout', ['bool']); + $optionsResolver->addAllowedTypes('stderr', ['bool']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerAttachBadRequestException + * @throws \Docker\API\Exception\ContainerAttachNotFoundException + * @throws \Docker\API\Exception\ContainerAttachInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (101 === $status) { + return null; + } + if (200 === $status) { + return null; + } + if (400 === $status) { + throw new \Docker\API\Exception\ContainerAttachBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerAttachNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerAttachInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerAttachWebsocket.php b/generated/Endpoint/ContainerAttachWebsocket.php new file mode 100644 index 000000000..e733ed6bb --- /dev/null +++ b/generated/Endpoint/ContainerAttachWebsocket.php @@ -0,0 +1,84 @@ +` where `` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`. + * @var bool $logs Return logs + * @var bool $stream Return stream + * } + */ + public function __construct(string $id, array $queryParameters = []) + { + $this->id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/attach/ws'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['detachKeys', 'logs', 'stream']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['logs' => false, 'stream' => false]); + $optionsResolver->addAllowedTypes('detachKeys', ['string']); + $optionsResolver->addAllowedTypes('logs', ['bool']); + $optionsResolver->addAllowedTypes('stream', ['bool']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerAttachWebsocketBadRequestException + * @throws \Docker\API\Exception\ContainerAttachWebsocketNotFoundException + * @throws \Docker\API\Exception\ContainerAttachWebsocketInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (101 === $status) { + return null; + } + if (200 === $status) { + return null; + } + if (400 === $status) { + throw new \Docker\API\Exception\ContainerAttachWebsocketBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerAttachWebsocketNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerAttachWebsocketInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerChanges.php b/generated/Endpoint/ContainerChanges.php new file mode 100644 index 000000000..02f116dd7 --- /dev/null +++ b/generated/Endpoint/ContainerChanges.php @@ -0,0 +1,65 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/changes'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerChangesNotFoundException + * @throws \Docker\API\Exception\ContainerChangesInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersIdChangesGetResponse200Item[] + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ContainersIdChangesGetResponse200Item[]', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerChangesNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerChangesInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerCreate.php b/generated/Endpoint/ContainerCreate.php new file mode 100644 index 000000000..bb8bf668a --- /dev/null +++ b/generated/Endpoint/ContainerCreate.php @@ -0,0 +1,84 @@ +body = $body; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/containers/create'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['name']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('name', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerCreateBadRequestException + * @throws \Docker\API\Exception\ContainerCreateNotFoundException + * @throws \Docker\API\Exception\ContainerCreateNotAcceptableException + * @throws \Docker\API\Exception\ContainerCreateConflictException + * @throws \Docker\API\Exception\ContainerCreateInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersCreatePostResponse201 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (201 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ContainersCreatePostResponse201', 'json'); + } + if (400 === $status) { + throw new \Docker\API\Exception\ContainerCreateBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerCreateNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (406 === $status) { + throw new \Docker\API\Exception\ContainerCreateNotAcceptableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (409 === $status) { + throw new \Docker\API\Exception\ContainerCreateConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerCreateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerDelete.php b/generated/Endpoint/ContainerDelete.php new file mode 100644 index 000000000..d1cdd07f2 --- /dev/null +++ b/generated/Endpoint/ContainerDelete.php @@ -0,0 +1,79 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'DELETE'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['v', 'force']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['v' => false, 'force' => false]); + $optionsResolver->addAllowedTypes('v', ['bool']); + $optionsResolver->addAllowedTypes('force', ['bool']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerDeleteBadRequestException + * @throws \Docker\API\Exception\ContainerDeleteNotFoundException + * @throws \Docker\API\Exception\ContainerDeleteInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (400 === $status) { + throw new \Docker\API\Exception\ContainerDeleteBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerDeleteNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerExec.php b/generated/Endpoint/ContainerExec.php new file mode 100644 index 000000000..3f7a42b28 --- /dev/null +++ b/generated/Endpoint/ContainerExec.php @@ -0,0 +1,66 @@ +id = $id; + $this->body = $execConfig; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/exec'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerExecNotFoundException + * @throws \Docker\API\Exception\ContainerExecConflictException + * @throws \Docker\API\Exception\ContainerExecInternalServerErrorException + * + * @return null|\Docker\API\Model\IdResponse + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (201 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\IdResponse', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerExecNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (409 === $status) { + throw new \Docker\API\Exception\ContainerExecConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerExecInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerExport.php b/generated/Endpoint/ContainerExport.php new file mode 100644 index 000000000..31d99093e --- /dev/null +++ b/generated/Endpoint/ContainerExport.php @@ -0,0 +1,60 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/export'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerExportNotFoundException + * @throws \Docker\API\Exception\ContainerExportInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerExportNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerExportInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerGetArchive.php b/generated/Endpoint/ContainerGetArchive.php new file mode 100644 index 000000000..be0d9afb2 --- /dev/null +++ b/generated/Endpoint/ContainerGetArchive.php @@ -0,0 +1,77 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/archive'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['path']); + $optionsResolver->setRequired(['path']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('path', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerGetArchiveBadRequestException + * @throws \Docker\API\Exception\ContainerGetArchiveNotFoundException + * @throws \Docker\API\Exception\ContainerGetArchiveInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (400 === $status) { + throw new \Docker\API\Exception\ContainerGetArchiveBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerGetArchiveNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerGetArchiveInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerInspect.php b/generated/Endpoint/ContainerInspect.php new file mode 100644 index 000000000..24c4b596d --- /dev/null +++ b/generated/Endpoint/ContainerInspect.php @@ -0,0 +1,73 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/json'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['size']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['size' => false]); + $optionsResolver->addAllowedTypes('size', ['bool']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerInspectNotFoundException + * @throws \Docker\API\Exception\ContainerInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersIdJsonGetResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ContainersIdJsonGetResponse200', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerKill.php b/generated/Endpoint/ContainerKill.php new file mode 100644 index 000000000..4a9f2e313 --- /dev/null +++ b/generated/Endpoint/ContainerKill.php @@ -0,0 +1,73 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/kill'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['signal']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['signal' => 'SIGKILL']); + $optionsResolver->addAllowedTypes('signal', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerKillNotFoundException + * @throws \Docker\API\Exception\ContainerKillInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerKillNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerKillInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerList.php b/generated/Endpoint/ContainerList.php new file mode 100644 index 000000000..5bf793db1 --- /dev/null +++ b/generated/Endpoint/ContainerList.php @@ -0,0 +1,92 @@ +` containers with exit code of `` + - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) + - `label=key` or `label="key=value"` of a container label + - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) + - `id=` a container's ID + - `name=` a container's name + - `is-task=`(`true`|`false`) + - `ancestor`=(`[:]`, ``, or ``) + - `before`=(`` or ``) + - `since`=(`` or ``) + - `volume`=(`` or ``) + - `network`=(`` or ``) + - `health`=(`starting`|`healthy`|`unhealthy`|`none`) + + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return '/containers/json'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['all', 'limit', 'size', 'filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['all' => false, 'size' => false]); + $optionsResolver->addAllowedTypes('all', ['bool']); + $optionsResolver->addAllowedTypes('limit', ['int']); + $optionsResolver->addAllowedTypes('size', ['bool']); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerListBadRequestException + * @throws \Docker\API\Exception\ContainerListInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainerSummaryItem[] + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ContainerSummaryItem[]', 'json'); + } + if (400 === $status) { + throw new \Docker\API\Exception\ContainerListBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerLogs.php b/generated/Endpoint/ContainerLogs.php new file mode 100644 index 000000000..921d7df4f --- /dev/null +++ b/generated/Endpoint/ContainerLogs.php @@ -0,0 +1,92 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/logs'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['follow', 'stdout', 'stderr', 'since', 'timestamps', 'tail']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['follow' => false, 'stdout' => false, 'stderr' => false, 'since' => 0, 'timestamps' => false, 'tail' => 'all']); + $optionsResolver->addAllowedTypes('follow', ['bool']); + $optionsResolver->addAllowedTypes('stdout', ['bool']); + $optionsResolver->addAllowedTypes('stderr', ['bool']); + $optionsResolver->addAllowedTypes('since', ['int']); + $optionsResolver->addAllowedTypes('timestamps', ['bool']); + $optionsResolver->addAllowedTypes('tail', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerLogsNotFoundException + * @throws \Docker\API\Exception\ContainerLogsInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (101 === $status) { + return json_decode($body); + } + if (200 === $status) { + return json_decode($body); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerLogsNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerLogsInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerPause.php b/generated/Endpoint/ContainerPause.php new file mode 100644 index 000000000..7b94433f5 --- /dev/null +++ b/generated/Endpoint/ContainerPause.php @@ -0,0 +1,63 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/pause'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerPauseNotFoundException + * @throws \Docker\API\Exception\ContainerPauseInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerPauseNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerPauseInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerPrune.php b/generated/Endpoint/ContainerPrune.php new file mode 100644 index 000000000..0fb79aa6f --- /dev/null +++ b/generated/Endpoint/ContainerPrune.php @@ -0,0 +1,69 @@ +queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/containers/prune'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerPruneInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersPrunePostResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ContainersPrunePostResponse200', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerPruneInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerPutArchive.php b/generated/Endpoint/ContainerPutArchive.php new file mode 100644 index 000000000..ad4e94ff8 --- /dev/null +++ b/generated/Endpoint/ContainerPutArchive.php @@ -0,0 +1,88 @@ +id = $id; + $this->body = $inputStream; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'PUT'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/archive'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], $this->body]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['path', 'noOverwriteDirNonDir']); + $optionsResolver->setRequired(['path']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('path', ['string']); + $optionsResolver->addAllowedTypes('noOverwriteDirNonDir', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerPutArchiveBadRequestException + * @throws \Docker\API\Exception\ContainerPutArchiveForbiddenException + * @throws \Docker\API\Exception\ContainerPutArchiveNotFoundException + * @throws \Docker\API\Exception\ContainerPutArchiveInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (400 === $status) { + throw new \Docker\API\Exception\ContainerPutArchiveBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (403 === $status) { + throw new \Docker\API\Exception\ContainerPutArchiveForbiddenException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerPutArchiveNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerPutArchiveInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerRename.php b/generated/Endpoint/ContainerRename.php new file mode 100644 index 000000000..04a9c17f7 --- /dev/null +++ b/generated/Endpoint/ContainerRename.php @@ -0,0 +1,77 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/rename'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['name']); + $optionsResolver->setRequired(['name']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('name', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerRenameNotFoundException + * @throws \Docker\API\Exception\ContainerRenameConflictException + * @throws \Docker\API\Exception\ContainerRenameInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerRenameNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (409 === $status) { + throw new \Docker\API\Exception\ContainerRenameConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerRenameInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerResize.php b/generated/Endpoint/ContainerResize.php new file mode 100644 index 000000000..6eee10023 --- /dev/null +++ b/generated/Endpoint/ContainerResize.php @@ -0,0 +1,75 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/resize'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['h', 'w']); + $optionsResolver->setRequired(['h', 'w']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('h', ['int']); + $optionsResolver->addAllowedTypes('w', ['int']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerResizeNotFoundException + * @throws \Docker\API\Exception\ContainerResizeInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerResizeNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerResizeInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerRestart.php b/generated/Endpoint/ContainerRestart.php new file mode 100644 index 000000000..d58b7b8e4 --- /dev/null +++ b/generated/Endpoint/ContainerRestart.php @@ -0,0 +1,73 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/restart'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['t']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('t', ['int']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerRestartNotFoundException + * @throws \Docker\API\Exception\ContainerRestartInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerRestartNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerRestartInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerStart.php b/generated/Endpoint/ContainerStart.php new file mode 100644 index 000000000..23d2db884 --- /dev/null +++ b/generated/Endpoint/ContainerStart.php @@ -0,0 +1,76 @@ +` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + * } + */ + public function __construct(string $id, array $queryParameters = []) + { + $this->id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/start'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['detachKeys']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('detachKeys', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerStartNotFoundException + * @throws \Docker\API\Exception\ContainerStartInternalServerErrorException + * + * @return null|\Docker\API\Model\ErrorResponse + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (304 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerStartNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerStartInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerStats.php b/generated/Endpoint/ContainerStats.php new file mode 100644 index 000000000..2f59f6628 --- /dev/null +++ b/generated/Endpoint/ContainerStats.php @@ -0,0 +1,76 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/stats'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['stream']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['stream' => true]); + $optionsResolver->addAllowedTypes('stream', ['bool']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerStatsNotFoundException + * @throws \Docker\API\Exception\ContainerStatsInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return json_decode($body); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerStatsNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerStatsInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerStop.php b/generated/Endpoint/ContainerStop.php new file mode 100644 index 000000000..b75f5bbe6 --- /dev/null +++ b/generated/Endpoint/ContainerStop.php @@ -0,0 +1,76 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/stop'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['t']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('t', ['int']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerStopNotFoundException + * @throws \Docker\API\Exception\ContainerStopInternalServerErrorException + * + * @return null|\Docker\API\Model\ErrorResponse + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (304 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerStopNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerStopInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerTop.php b/generated/Endpoint/ContainerTop.php new file mode 100644 index 000000000..0c1e48dae --- /dev/null +++ b/generated/Endpoint/ContainerTop.php @@ -0,0 +1,73 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/top'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['ps_args']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['ps_args' => '-ef']); + $optionsResolver->addAllowedTypes('ps_args', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerTopNotFoundException + * @throws \Docker\API\Exception\ContainerTopInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersIdTopGetResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ContainersIdTopGetResponse200', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerTopNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerTopInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerUnpause.php b/generated/Endpoint/ContainerUnpause.php new file mode 100644 index 000000000..7babaad7a --- /dev/null +++ b/generated/Endpoint/ContainerUnpause.php @@ -0,0 +1,60 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/unpause'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerUnpauseNotFoundException + * @throws \Docker\API\Exception\ContainerUnpauseInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerUnpauseNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerUnpauseInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerUpdate.php b/generated/Endpoint/ContainerUpdate.php new file mode 100644 index 000000000..dacbf92ae --- /dev/null +++ b/generated/Endpoint/ContainerUpdate.php @@ -0,0 +1,62 @@ +id = $id; + $this->body = $update; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/update'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerUpdateNotFoundException + * @throws \Docker\API\Exception\ContainerUpdateInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersIdUpdatePostResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ContainersIdUpdatePostResponse200', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerUpdateNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerUpdateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerWait.php b/generated/Endpoint/ContainerWait.php new file mode 100644 index 000000000..4c038c475 --- /dev/null +++ b/generated/Endpoint/ContainerWait.php @@ -0,0 +1,60 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/containers/{id}/wait'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ContainerWaitNotFoundException + * @throws \Docker\API\Exception\ContainerWaitInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersIdWaitPostResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ContainersIdWaitPostResponse200', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ContainerWaitNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ContainerWaitInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ExecInspect.php b/generated/Endpoint/ExecInspect.php new file mode 100644 index 000000000..d3a0af349 --- /dev/null +++ b/generated/Endpoint/ExecInspect.php @@ -0,0 +1,60 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/exec/{id}/json'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ExecInspectNotFoundException + * @throws \Docker\API\Exception\ExecInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\ExecIdJsonGetResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ExecIdJsonGetResponse200', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ExecInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ExecInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ExecResize.php b/generated/Endpoint/ExecResize.php new file mode 100644 index 000000000..2f516fb41 --- /dev/null +++ b/generated/Endpoint/ExecResize.php @@ -0,0 +1,79 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/exec/{id}/resize'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['h', 'w']); + $optionsResolver->setRequired(['h', 'w']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('h', ['int']); + $optionsResolver->addAllowedTypes('w', ['int']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ExecResizeBadRequestException + * @throws \Docker\API\Exception\ExecResizeNotFoundException + * @throws \Docker\API\Exception\ExecResizeInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (400 === $status) { + throw new \Docker\API\Exception\ExecResizeBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\ExecResizeNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ExecResizeInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ExecStart.php b/generated/Endpoint/ExecStart.php new file mode 100644 index 000000000..3e78194a0 --- /dev/null +++ b/generated/Endpoint/ExecStart.php @@ -0,0 +1,62 @@ +id = $id; + $this->body = $execStartConfig; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/exec/{id}/start'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ExecStartNotFoundException + * @throws \Docker\API\Exception\ExecStartConflictException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\ExecStartNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (409 === $status) { + throw new \Docker\API\Exception\ExecStartConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/GetPluginPrivileges.php b/generated/Endpoint/GetPluginPrivileges.php new file mode 100644 index 000000000..48f76976f --- /dev/null +++ b/generated/Endpoint/GetPluginPrivileges.php @@ -0,0 +1,66 @@ +queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return '/plugins/privileges'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['name']); + $optionsResolver->setRequired(['name']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('name', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\GetPluginPrivilegesInternalServerErrorException + * + * @return null|\Docker\API\Model\PluginsPrivilegesGetResponse200Item[] + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\PluginsPrivilegesGetResponse200Item[]', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\GetPluginPrivilegesInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ImageBuild.php b/generated/Endpoint/ImageBuild.php new file mode 100644 index 000000000..4ccdb8ffb --- /dev/null +++ b/generated/Endpoint/ImageBuild.php @@ -0,0 +1,146 @@ +`. Any other value is taken as a custom network's name to which this container should connect to. + * } + * @param array $headerParameters { + * @var string $Content-type + * @var string $X-Registry-Config This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. + + The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: + + ``` + { + "docker.example.com": { + "username": "janedoe", + "password": "hunter2" + }, + "https://index.docker.io/v1/": { + "username": "mobydock", + "password": "conta1n3rize14" + } + } + ``` + + Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API. + + * } + */ + public function __construct($inputStream, array $queryParameters = [], array $headerParameters = []) + { + $this->body = $inputStream; + $this->queryParameters = $queryParameters; + $this->headerParameters = $headerParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/build'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], $this->body]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['dockerfile', 't', 'remote', 'q', 'nocache', 'cachefrom', 'pull', 'rm', 'forcerm', 'memory', 'memswap', 'cpushares', 'cpusetcpus', 'cpuperiod', 'cpuquota', 'buildargs', 'shmsize', 'squash', 'labels', 'networkmode']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['dockerfile' => 'Dockerfile', 'q' => false, 'nocache' => false, 'rm' => true, 'forcerm' => false]); + $optionsResolver->addAllowedTypes('dockerfile', ['string']); + $optionsResolver->addAllowedTypes('t', ['string']); + $optionsResolver->addAllowedTypes('remote', ['string']); + $optionsResolver->addAllowedTypes('q', ['bool']); + $optionsResolver->addAllowedTypes('nocache', ['bool']); + $optionsResolver->addAllowedTypes('cachefrom', ['string']); + $optionsResolver->addAllowedTypes('pull', ['string']); + $optionsResolver->addAllowedTypes('rm', ['bool']); + $optionsResolver->addAllowedTypes('forcerm', ['bool']); + $optionsResolver->addAllowedTypes('memory', ['int']); + $optionsResolver->addAllowedTypes('memswap', ['int']); + $optionsResolver->addAllowedTypes('cpushares', ['int']); + $optionsResolver->addAllowedTypes('cpusetcpus', ['string']); + $optionsResolver->addAllowedTypes('cpuperiod', ['int']); + $optionsResolver->addAllowedTypes('cpuquota', ['int']); + $optionsResolver->addAllowedTypes('buildargs', ['int']); + $optionsResolver->addAllowedTypes('shmsize', ['int']); + $optionsResolver->addAllowedTypes('squash', ['bool']); + $optionsResolver->addAllowedTypes('labels', ['string']); + $optionsResolver->addAllowedTypes('networkmode', ['string']); + return $optionsResolver; + } + protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getHeadersOptionsResolver(); + $optionsResolver->setDefined(['Content-type', 'X-Registry-Config']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['Content-type' => 'application/tar']); + $optionsResolver->addAllowedTypes('Content-type', ['string']); + $optionsResolver->addAllowedTypes('X-Registry-Config', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ImageBuildInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (500 === $status) { + throw new \Docker\API\Exception\ImageBuildInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ImageCommit.php b/generated/Endpoint/ImageCommit.php new file mode 100644 index 000000000..0febd0e83 --- /dev/null +++ b/generated/Endpoint/ImageCommit.php @@ -0,0 +1,84 @@ +`) + * @var bool $pause Whether to pause the container before committing + * @var string $changes `Dockerfile` instructions to apply while committing + * } + */ + public function __construct(\Docker\API\Model\Config $containerConfig, array $queryParameters = []) + { + $this->body = $containerConfig; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/commit'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['container', 'repo', 'tag', 'comment', 'author', 'pause', 'changes']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['pause' => true]); + $optionsResolver->addAllowedTypes('container', ['string']); + $optionsResolver->addAllowedTypes('repo', ['string']); + $optionsResolver->addAllowedTypes('tag', ['string']); + $optionsResolver->addAllowedTypes('comment', ['string']); + $optionsResolver->addAllowedTypes('author', ['string']); + $optionsResolver->addAllowedTypes('pause', ['bool']); + $optionsResolver->addAllowedTypes('changes', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ImageCommitNotFoundException + * @throws \Docker\API\Exception\ImageCommitInternalServerErrorException + * + * @return null|\Docker\API\Model\IdResponse + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (201 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\IdResponse', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ImageCommitNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ImageCommitInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ImageCreate.php b/generated/Endpoint/ImageCreate.php new file mode 100644 index 000000000..766202ada --- /dev/null +++ b/generated/Endpoint/ImageCreate.php @@ -0,0 +1,91 @@ +body = $inputImage; + $this->queryParameters = $queryParameters; + $this->headerParameters = $headerParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/images/create'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], $this->body]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['fromImage', 'fromSrc', 'repo', 'tag']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('fromImage', ['string']); + $optionsResolver->addAllowedTypes('fromSrc', ['string']); + $optionsResolver->addAllowedTypes('repo', ['string']); + $optionsResolver->addAllowedTypes('tag', ['string']); + return $optionsResolver; + } + protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getHeadersOptionsResolver(); + $optionsResolver->setDefined(['X-Registry-Auth']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('X-Registry-Auth', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ImageCreateNotFoundException + * @throws \Docker\API\Exception\ImageCreateInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\ImageCreateNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ImageCreateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ImageDelete.php b/generated/Endpoint/ImageDelete.php new file mode 100644 index 000000000..60b6a5e67 --- /dev/null +++ b/generated/Endpoint/ImageDelete.php @@ -0,0 +1,82 @@ +name = $name; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'DELETE'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/images/{name}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['force', 'noprune']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['force' => false, 'noprune' => false]); + $optionsResolver->addAllowedTypes('force', ['bool']); + $optionsResolver->addAllowedTypes('noprune', ['bool']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ImageDeleteNotFoundException + * @throws \Docker\API\Exception\ImageDeleteConflictException + * @throws \Docker\API\Exception\ImageDeleteInternalServerErrorException + * + * @return null|\Docker\API\Model\ImageDeleteResponse[] + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ImageDeleteResponse[]', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ImageDeleteNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (409 === $status) { + throw new \Docker\API\Exception\ImageDeleteConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ImageDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ImageGet.php b/generated/Endpoint/ImageGet.php new file mode 100644 index 000000000..4ef66cada --- /dev/null +++ b/generated/Endpoint/ImageGet.php @@ -0,0 +1,79 @@ +name = $name; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/images/{name}/get'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ImageGetInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return json_decode($body); + } + if (500 === $status) { + throw new \Docker\API\Exception\ImageGetInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ImageGetAll.php b/generated/Endpoint/ImageGetAll.php new file mode 100644 index 000000000..5e6e4bc3a --- /dev/null +++ b/generated/Endpoint/ImageGetAll.php @@ -0,0 +1,71 @@ +queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return '/images/get'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['names']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('names', ['array']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ImageGetAllInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return json_decode($body); + } + if (500 === $status) { + throw new \Docker\API\Exception\ImageGetAllInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ImageHistory.php b/generated/Endpoint/ImageHistory.php new file mode 100644 index 000000000..f36f42085 --- /dev/null +++ b/generated/Endpoint/ImageHistory.php @@ -0,0 +1,60 @@ +name = $name; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/images/{name}/history'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ImageHistoryNotFoundException + * @throws \Docker\API\Exception\ImageHistoryInternalServerErrorException + * + * @return null|\Docker\API\Model\ImagesNameHistoryGetResponse200Item[] + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ImagesNameHistoryGetResponse200Item[]', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ImageHistoryNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ImageHistoryInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ImageInspect.php b/generated/Endpoint/ImageInspect.php new file mode 100644 index 000000000..b03947489 --- /dev/null +++ b/generated/Endpoint/ImageInspect.php @@ -0,0 +1,60 @@ +name = $name; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/images/{name}/json'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ImageInspectNotFoundException + * @throws \Docker\API\Exception\ImageInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Image + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Image', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ImageInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ImageInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ImageList.php b/generated/Endpoint/ImageList.php new file mode 100644 index 000000000..58f0a341f --- /dev/null +++ b/generated/Endpoint/ImageList.php @@ -0,0 +1,78 @@ +[:]`, `` or ``) + - `since`=(`[:]`, `` or ``) + - `reference`=(`[:]`) + + * @var bool $digests Show digest information as a `RepoDigests` field on each image. + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return '/images/json'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['all', 'filters', 'digests']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['all' => false, 'digests' => false]); + $optionsResolver->addAllowedTypes('all', ['bool']); + $optionsResolver->addAllowedTypes('filters', ['string']); + $optionsResolver->addAllowedTypes('digests', ['bool']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ImageListInternalServerErrorException + * + * @return null|\Docker\API\Model\ImageSummary[] + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ImageSummary[]', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\ImageListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ImageLoad.php b/generated/Endpoint/ImageLoad.php new file mode 100644 index 000000000..cdd288c9d --- /dev/null +++ b/generated/Endpoint/ImageLoad.php @@ -0,0 +1,71 @@ +body = $imagesTarball; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/images/load'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], $this->body]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['quiet']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['quiet' => false]); + $optionsResolver->addAllowedTypes('quiet', ['bool']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ImageLoadInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (500 === $status) { + throw new \Docker\API\Exception\ImageLoadInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ImagePrune.php b/generated/Endpoint/ImagePrune.php new file mode 100644 index 000000000..10eab0852 --- /dev/null +++ b/generated/Endpoint/ImagePrune.php @@ -0,0 +1,72 @@ +` When set to `true` (or `1`), prune only + unused *and* untagged images. When set to `false` + (or `0`), all unused images are pruned. + + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/images/prune'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ImagePruneInternalServerErrorException + * + * @return null|\Docker\API\Model\ImagesPrunePostResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ImagesPrunePostResponse200', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\ImagePruneInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ImagePush.php b/generated/Endpoint/ImagePush.php new file mode 100644 index 000000000..6a57fbc7d --- /dev/null +++ b/generated/Endpoint/ImagePush.php @@ -0,0 +1,102 @@ +name = $name; + $this->queryParameters = $queryParameters; + $this->headerParameters = $headerParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/images/{name}/push'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['tag']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('tag', ['string']); + return $optionsResolver; + } + protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getHeadersOptionsResolver(); + $optionsResolver->setDefined(['X-Registry-Auth']); + $optionsResolver->setRequired(['X-Registry-Auth']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('X-Registry-Auth', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ImagePushNotFoundException + * @throws \Docker\API\Exception\ImagePushInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\ImagePushNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ImagePushInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ImageSearch.php b/generated/Endpoint/ImageSearch.php new file mode 100644 index 000000000..a35bcfc36 --- /dev/null +++ b/generated/Endpoint/ImageSearch.php @@ -0,0 +1,75 @@ +` + - `is-automated=(true|false)` + - `is-official=(true|false)` + + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return '/images/search'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['term', 'limit', 'filters']); + $optionsResolver->setRequired(['term']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('term', ['string']); + $optionsResolver->addAllowedTypes('limit', ['int']); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ImageSearchInternalServerErrorException + * + * @return null|\Docker\API\Model\ImagesSearchGetResponse200Item[] + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ImagesSearchGetResponse200Item[]', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\ImageSearchInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ImageTag.php b/generated/Endpoint/ImageTag.php new file mode 100644 index 000000000..ccc5f5b5c --- /dev/null +++ b/generated/Endpoint/ImageTag.php @@ -0,0 +1,83 @@ +name = $name; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/images/{name}/tag'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['repo', 'tag']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('repo', ['string']); + $optionsResolver->addAllowedTypes('tag', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ImageTagBadRequestException + * @throws \Docker\API\Exception\ImageTagNotFoundException + * @throws \Docker\API\Exception\ImageTagConflictException + * @throws \Docker\API\Exception\ImageTagInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (201 === $status) { + return null; + } + if (400 === $status) { + throw new \Docker\API\Exception\ImageTagBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\ImageTagNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (409 === $status) { + throw new \Docker\API\Exception\ImageTagConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ImageTagInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/NetworkConnect.php b/generated/Endpoint/NetworkConnect.php new file mode 100644 index 000000000..df8042847 --- /dev/null +++ b/generated/Endpoint/NetworkConnect.php @@ -0,0 +1,66 @@ +id = $id; + $this->body = $container; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/networks/{id}/connect'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\NetworkConnectForbiddenException + * @throws \Docker\API\Exception\NetworkConnectNotFoundException + * @throws \Docker\API\Exception\NetworkConnectInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (403 === $status) { + throw new \Docker\API\Exception\NetworkConnectForbiddenException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\NetworkConnectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\NetworkConnectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/NetworkCreate.php b/generated/Endpoint/NetworkCreate.php new file mode 100644 index 000000000..055a984da --- /dev/null +++ b/generated/Endpoint/NetworkCreate.php @@ -0,0 +1,67 @@ +body = $networkConfig; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/networks/create'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\NetworkCreateBadRequestException + * @throws \Docker\API\Exception\NetworkCreateForbiddenException + * @throws \Docker\API\Exception\NetworkCreateNotFoundException + * @throws \Docker\API\Exception\NetworkCreateInternalServerErrorException + * + * @return null|\Docker\API\Model\NetworksCreatePostResponse201 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (201 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\NetworksCreatePostResponse201', 'json'); + } + if (400 === $status) { + throw new \Docker\API\Exception\NetworkCreateBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (403 === $status) { + throw new \Docker\API\Exception\NetworkCreateForbiddenException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\NetworkCreateNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\NetworkCreateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/NetworkDelete.php b/generated/Endpoint/NetworkDelete.php new file mode 100644 index 000000000..4f09f283b --- /dev/null +++ b/generated/Endpoint/NetworkDelete.php @@ -0,0 +1,60 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'DELETE'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/networks/{id}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\NetworkDeleteNotFoundException + * @throws \Docker\API\Exception\NetworkDeleteInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\NetworkDeleteNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\NetworkDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/NetworkDisconnect.php b/generated/Endpoint/NetworkDisconnect.php new file mode 100644 index 000000000..089c7d35e --- /dev/null +++ b/generated/Endpoint/NetworkDisconnect.php @@ -0,0 +1,66 @@ +id = $id; + $this->body = $container; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/networks/{id}/disconnect'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\NetworkDisconnectForbiddenException + * @throws \Docker\API\Exception\NetworkDisconnectNotFoundException + * @throws \Docker\API\Exception\NetworkDisconnectInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (403 === $status) { + throw new \Docker\API\Exception\NetworkDisconnectForbiddenException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\NetworkDisconnectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\NetworkDisconnectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/NetworkInspect.php b/generated/Endpoint/NetworkInspect.php new file mode 100644 index 000000000..8f8607764 --- /dev/null +++ b/generated/Endpoint/NetworkInspect.php @@ -0,0 +1,56 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/networks/{id}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\NetworkInspectNotFoundException + * + * @return null|\Docker\API\Model\Network + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Network', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\NetworkInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/NetworkList.php b/generated/Endpoint/NetworkList.php new file mode 100644 index 000000000..5602dc239 --- /dev/null +++ b/generated/Endpoint/NetworkList.php @@ -0,0 +1,73 @@ +` Matches a network's driver. + - `id=` Matches all or part of a network ID. + - `label=` or `label==` of a network label. + - `name=` Matches all or part of a network name. + - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. + + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return '/networks'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\NetworkListInternalServerErrorException + * + * @return null|\Docker\API\Model\Network[] + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Network[]', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\NetworkListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/NetworkPrune.php b/generated/Endpoint/NetworkPrune.php new file mode 100644 index 000000000..5de480189 --- /dev/null +++ b/generated/Endpoint/NetworkPrune.php @@ -0,0 +1,69 @@ +queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/networks/prune'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\NetworkPruneInternalServerErrorException + * + * @return null|\Docker\API\Model\NetworksPrunePostResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\NetworksPrunePostResponse200', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\NetworkPruneInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/NodeDelete.php b/generated/Endpoint/NodeDelete.php new file mode 100644 index 000000000..f5354547e --- /dev/null +++ b/generated/Endpoint/NodeDelete.php @@ -0,0 +1,73 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'DELETE'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/nodes/{id}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['force']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['force' => false]); + $optionsResolver->addAllowedTypes('force', ['bool']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\NodeDeleteNotFoundException + * @throws \Docker\API\Exception\NodeDeleteInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\NodeDeleteNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\NodeDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/NodeInspect.php b/generated/Endpoint/NodeInspect.php new file mode 100644 index 000000000..ab49418a5 --- /dev/null +++ b/generated/Endpoint/NodeInspect.php @@ -0,0 +1,60 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/nodes/{id}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\NodeInspectNotFoundException + * @throws \Docker\API\Exception\NodeInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Node + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Node', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\NodeInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\NodeInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/NodeList.php b/generated/Endpoint/NodeList.php new file mode 100644 index 000000000..3042ebf0a --- /dev/null +++ b/generated/Endpoint/NodeList.php @@ -0,0 +1,74 @@ +` + - `label=` + - `membership=`(`accepted`|`pending`)` + - `name=` + - `role=`(`manager`|`worker`)` + + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return '/nodes'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\NodeListInternalServerErrorException + * + * @return null|\Docker\API\Model\Node[] + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Node[]', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\NodeListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/NodeUpdate.php b/generated/Endpoint/NodeUpdate.php new file mode 100644 index 000000000..bd573dcd2 --- /dev/null +++ b/generated/Endpoint/NodeUpdate.php @@ -0,0 +1,75 @@ +id = $id; + $this->body = $body; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/nodes/{id}/update'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['version']); + $optionsResolver->setRequired(['version']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('version', ['int']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\NodeUpdateNotFoundException + * @throws \Docker\API\Exception\NodeUpdateInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\NodeUpdateNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\NodeUpdateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/PluginCreate.php b/generated/Endpoint/PluginCreate.php new file mode 100644 index 000000000..ad875df43 --- /dev/null +++ b/generated/Endpoint/PluginCreate.php @@ -0,0 +1,68 @@ +body = $tarContext; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/plugins/create'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], $this->body]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['name']); + $optionsResolver->setRequired(['name']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('name', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\PluginCreateInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (500 === $status) { + throw new \Docker\API\Exception\PluginCreateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/PluginDelete.php b/generated/Endpoint/PluginDelete.php new file mode 100644 index 000000000..2e69246ca --- /dev/null +++ b/generated/Endpoint/PluginDelete.php @@ -0,0 +1,73 @@ +name = $name; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'DELETE'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/plugins/{name}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['force']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['force' => false]); + $optionsResolver->addAllowedTypes('force', ['bool']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\PluginDeleteNotFoundException + * @throws \Docker\API\Exception\PluginDeleteInternalServerErrorException + * + * @return null|\Docker\API\Model\Plugin + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Plugin', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\PluginDeleteNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\PluginDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/PluginDisable.php b/generated/Endpoint/PluginDisable.php new file mode 100644 index 000000000..c48741bbd --- /dev/null +++ b/generated/Endpoint/PluginDisable.php @@ -0,0 +1,56 @@ +name = $name; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/plugins/{name}/disable'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\PluginDisableInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (500 === $status) { + throw new \Docker\API\Exception\PluginDisableInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/PluginEnable.php b/generated/Endpoint/PluginEnable.php new file mode 100644 index 000000000..ebf5153c0 --- /dev/null +++ b/generated/Endpoint/PluginEnable.php @@ -0,0 +1,69 @@ +name = $name; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/plugins/{name}/enable'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['timeout']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['timeout' => 0]); + $optionsResolver->addAllowedTypes('timeout', ['int']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\PluginEnableInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (500 === $status) { + throw new \Docker\API\Exception\PluginEnableInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/PluginInspect.php b/generated/Endpoint/PluginInspect.php new file mode 100644 index 000000000..a8fce5e8e --- /dev/null +++ b/generated/Endpoint/PluginInspect.php @@ -0,0 +1,60 @@ +name = $name; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/plugins/{name}/json'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\PluginInspectNotFoundException + * @throws \Docker\API\Exception\PluginInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Plugin + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Plugin', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\PluginInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\PluginInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/PluginList.php b/generated/Endpoint/PluginList.php new file mode 100644 index 000000000..53883a08b --- /dev/null +++ b/generated/Endpoint/PluginList.php @@ -0,0 +1,46 @@ + ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\PluginListInternalServerErrorException + * + * @return null|\Docker\API\Model\Plugin[] + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Plugin[]', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\PluginListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/PluginPull.php b/generated/Endpoint/PluginPull.php new file mode 100644 index 000000000..0c7c6bebc --- /dev/null +++ b/generated/Endpoint/PluginPull.php @@ -0,0 +1,90 @@ +body = $body; + $this->queryParameters = $queryParameters; + $this->headerParameters = $headerParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/plugins/pull'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['remote', 'name']); + $optionsResolver->setRequired(['remote']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('remote', ['string']); + $optionsResolver->addAllowedTypes('name', ['string']); + return $optionsResolver; + } + protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getHeadersOptionsResolver(); + $optionsResolver->setDefined(['X-Registry-Auth']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('X-Registry-Auth', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\PluginPullInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (500 === $status) { + throw new \Docker\API\Exception\PluginPullInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/PluginPush.php b/generated/Endpoint/PluginPush.php new file mode 100644 index 000000000..4dd1499a8 --- /dev/null +++ b/generated/Endpoint/PluginPush.php @@ -0,0 +1,60 @@ +name = $name; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/plugins/{name}/push'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\PluginPushNotFoundException + * @throws \Docker\API\Exception\PluginPushInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\PluginPushNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\PluginPushInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/PluginSet.php b/generated/Endpoint/PluginSet.php new file mode 100644 index 000000000..d13e3ca91 --- /dev/null +++ b/generated/Endpoint/PluginSet.php @@ -0,0 +1,62 @@ +name = $name; + $this->body = $body; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/plugins/{name}/set'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\PluginSetNotFoundException + * @throws \Docker\API\Exception\PluginSetInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\PluginSetNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\PluginSetInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SecretCreate.php b/generated/Endpoint/SecretCreate.php new file mode 100644 index 000000000..14d4b9c0d --- /dev/null +++ b/generated/Endpoint/SecretCreate.php @@ -0,0 +1,63 @@ +body = $body; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/secrets/create'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SecretCreateNotAcceptableException + * @throws \Docker\API\Exception\SecretCreateConflictException + * @throws \Docker\API\Exception\SecretCreateInternalServerErrorException + * + * @return null|\Docker\API\Model\SecretsCreatePostResponse201 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (201 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\SecretsCreatePostResponse201', 'json'); + } + if (406 === $status) { + throw new \Docker\API\Exception\SecretCreateNotAcceptableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (409 === $status) { + throw new \Docker\API\Exception\SecretCreateConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\SecretCreateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SecretDelete.php b/generated/Endpoint/SecretDelete.php new file mode 100644 index 000000000..8a7da4c06 --- /dev/null +++ b/generated/Endpoint/SecretDelete.php @@ -0,0 +1,60 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'DELETE'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/secrets/{id}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SecretDeleteNotFoundException + * @throws \Docker\API\Exception\SecretDeleteInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\SecretDeleteNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\SecretDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SecretInspect.php b/generated/Endpoint/SecretInspect.php new file mode 100644 index 000000000..298ca03a5 --- /dev/null +++ b/generated/Endpoint/SecretInspect.php @@ -0,0 +1,64 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/secrets/{id}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SecretInspectNotFoundException + * @throws \Docker\API\Exception\SecretInspectNotAcceptableException + * @throws \Docker\API\Exception\SecretInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Secret + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Secret', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\SecretInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (406 === $status) { + throw new \Docker\API\Exception\SecretInspectNotAcceptableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\SecretInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SecretList.php b/generated/Endpoint/SecretList.php new file mode 100644 index 000000000..d64da5258 --- /dev/null +++ b/generated/Endpoint/SecretList.php @@ -0,0 +1,69 @@ +` + + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return '/secrets'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SecretListInternalServerErrorException + * + * @return null|\Docker\API\Model\Secret[] + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Secret[]', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\SecretListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ServiceCreate.php b/generated/Endpoint/ServiceCreate.php new file mode 100644 index 000000000..454b8c11b --- /dev/null +++ b/generated/Endpoint/ServiceCreate.php @@ -0,0 +1,80 @@ +body = $body; + $this->headerParameters = $headerParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/services/create'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getHeadersOptionsResolver(); + $optionsResolver->setDefined(['X-Registry-Auth']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('X-Registry-Auth', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ServiceCreateForbiddenException + * @throws \Docker\API\Exception\ServiceCreateConflictException + * @throws \Docker\API\Exception\ServiceCreateInternalServerErrorException + * @throws \Docker\API\Exception\ServiceCreateServiceUnavailableException + * + * @return null|\Docker\API\Model\ServicesCreatePostResponse201 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (201 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ServicesCreatePostResponse201', 'json'); + } + if (403 === $status) { + throw new \Docker\API\Exception\ServiceCreateForbiddenException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (409 === $status) { + throw new \Docker\API\Exception\ServiceCreateConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ServiceCreateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (503 === $status) { + throw new \Docker\API\Exception\ServiceCreateServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ServiceDelete.php b/generated/Endpoint/ServiceDelete.php new file mode 100644 index 000000000..b998826a6 --- /dev/null +++ b/generated/Endpoint/ServiceDelete.php @@ -0,0 +1,60 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'DELETE'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/services/{id}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ServiceDeleteNotFoundException + * @throws \Docker\API\Exception\ServiceDeleteInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\ServiceDeleteNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ServiceDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ServiceInspect.php b/generated/Endpoint/ServiceInspect.php new file mode 100644 index 000000000..4827b7299 --- /dev/null +++ b/generated/Endpoint/ServiceInspect.php @@ -0,0 +1,60 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/services/{id}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ServiceInspectNotFoundException + * @throws \Docker\API\Exception\ServiceInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Service + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Service', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ServiceInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ServiceInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ServiceList.php b/generated/Endpoint/ServiceList.php new file mode 100644 index 000000000..ff1dc898f --- /dev/null +++ b/generated/Endpoint/ServiceList.php @@ -0,0 +1,71 @@ +` + - `name=` + - `label=` + + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return '/services'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ServiceListInternalServerErrorException + * + * @return null|\Docker\API\Model\Service[] + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Service[]', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\ServiceListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ServiceLogs.php b/generated/Endpoint/ServiceLogs.php new file mode 100644 index 000000000..cb4591599 --- /dev/null +++ b/generated/Endpoint/ServiceLogs.php @@ -0,0 +1,94 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/services/{id}/logs'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['details', 'follow', 'stdout', 'stderr', 'since', 'timestamps', 'tail']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['details' => false, 'follow' => false, 'stdout' => false, 'stderr' => false, 'since' => 0, 'timestamps' => false, 'tail' => 'all']); + $optionsResolver->addAllowedTypes('details', ['bool']); + $optionsResolver->addAllowedTypes('follow', ['bool']); + $optionsResolver->addAllowedTypes('stdout', ['bool']); + $optionsResolver->addAllowedTypes('stderr', ['bool']); + $optionsResolver->addAllowedTypes('since', ['int']); + $optionsResolver->addAllowedTypes('timestamps', ['bool']); + $optionsResolver->addAllowedTypes('tail', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ServiceLogsNotFoundException + * @throws \Docker\API\Exception\ServiceLogsInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (101 === $status) { + return json_decode($body); + } + if (200 === $status) { + return json_decode($body); + } + if (404 === $status) { + throw new \Docker\API\Exception\ServiceLogsNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ServiceLogsInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ServiceUpdate.php b/generated/Endpoint/ServiceUpdate.php new file mode 100644 index 000000000..6e4e04109 --- /dev/null +++ b/generated/Endpoint/ServiceUpdate.php @@ -0,0 +1,90 @@ +id = $id; + $this->body = $body; + $this->queryParameters = $queryParameters; + $this->headerParameters = $headerParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/services/{id}/update'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['version', 'registryAuthFrom']); + $optionsResolver->setRequired(['version']); + $optionsResolver->setDefaults(['registryAuthFrom' => 'spec']); + $optionsResolver->addAllowedTypes('version', ['int']); + $optionsResolver->addAllowedTypes('registryAuthFrom', ['string']); + return $optionsResolver; + } + protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getHeadersOptionsResolver(); + $optionsResolver->setDefined(['X-Registry-Auth']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('X-Registry-Auth', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ServiceUpdateNotFoundException + * @throws \Docker\API\Exception\ServiceUpdateInternalServerErrorException + * + * @return null|\Docker\API\Model\ImageDeleteResponse + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\ImageDeleteResponse', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ServiceUpdateNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ServiceUpdateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SwarmInit.php b/generated/Endpoint/SwarmInit.php new file mode 100644 index 000000000..602b27efd --- /dev/null +++ b/generated/Endpoint/SwarmInit.php @@ -0,0 +1,63 @@ +body = $body; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/swarm/init'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SwarmInitBadRequestException + * @throws \Docker\API\Exception\SwarmInitNotAcceptableException + * @throws \Docker\API\Exception\SwarmInitInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return json_decode($body); + } + if (400 === $status) { + throw new \Docker\API\Exception\SwarmInitBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (406 === $status) { + throw new \Docker\API\Exception\SwarmInitNotAcceptableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\SwarmInitInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SwarmInspect.php b/generated/Endpoint/SwarmInspect.php new file mode 100644 index 000000000..f781a8128 --- /dev/null +++ b/generated/Endpoint/SwarmInspect.php @@ -0,0 +1,46 @@ + ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SwarmInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\SwarmGetResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\SwarmGetResponse200', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\SwarmInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SwarmJoin.php b/generated/Endpoint/SwarmJoin.php new file mode 100644 index 000000000..dcfe6b80f --- /dev/null +++ b/generated/Endpoint/SwarmJoin.php @@ -0,0 +1,63 @@ +body = $body; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/swarm/join'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SwarmJoinBadRequestException + * @throws \Docker\API\Exception\SwarmJoinInternalServerErrorException + * @throws \Docker\API\Exception\SwarmJoinServiceUnavailableException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (400 === $status) { + throw new \Docker\API\Exception\SwarmJoinBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\SwarmJoinInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (503 === $status) { + throw new \Docker\API\Exception\SwarmJoinServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SwarmLeave.php b/generated/Endpoint/SwarmLeave.php new file mode 100644 index 000000000..780386a6f --- /dev/null +++ b/generated/Endpoint/SwarmLeave.php @@ -0,0 +1,70 @@ +queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/swarm/leave'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['force']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['force' => false]); + $optionsResolver->addAllowedTypes('force', ['bool']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SwarmLeaveInternalServerErrorException + * @throws \Docker\API\Exception\SwarmLeaveServiceUnavailableException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (500 === $status) { + throw new \Docker\API\Exception\SwarmLeaveInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (503 === $status) { + throw new \Docker\API\Exception\SwarmLeaveServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SwarmUnlock.php b/generated/Endpoint/SwarmUnlock.php new file mode 100644 index 000000000..cb0c1ca2d --- /dev/null +++ b/generated/Endpoint/SwarmUnlock.php @@ -0,0 +1,55 @@ +body = $body; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/swarm/unlock'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SwarmUnlockInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (500 === $status) { + throw new \Docker\API\Exception\SwarmUnlockInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SwarmUnlockkey.php b/generated/Endpoint/SwarmUnlockkey.php new file mode 100644 index 000000000..f6af3bb59 --- /dev/null +++ b/generated/Endpoint/SwarmUnlockkey.php @@ -0,0 +1,46 @@ + ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SwarmUnlockkeyInternalServerErrorException + * + * @return null|\Docker\API\Model\SwarmUnlockkeyGetResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\SwarmUnlockkeyGetResponse200', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\SwarmUnlockkeyInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SwarmUpdate.php b/generated/Endpoint/SwarmUpdate.php new file mode 100644 index 000000000..d639268e9 --- /dev/null +++ b/generated/Endpoint/SwarmUpdate.php @@ -0,0 +1,82 @@ +body = $body; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/swarm/update'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['version', 'rotateWorkerToken', 'rotateManagerToken', 'rotateManagerUnlockKey']); + $optionsResolver->setRequired(['version']); + $optionsResolver->setDefaults(['rotateWorkerToken' => false, 'rotateManagerToken' => false, 'rotateManagerUnlockKey' => false]); + $optionsResolver->addAllowedTypes('version', ['int']); + $optionsResolver->addAllowedTypes('rotateWorkerToken', ['bool']); + $optionsResolver->addAllowedTypes('rotateManagerToken', ['bool']); + $optionsResolver->addAllowedTypes('rotateManagerUnlockKey', ['bool']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SwarmUpdateBadRequestException + * @throws \Docker\API\Exception\SwarmUpdateInternalServerErrorException + * @throws \Docker\API\Exception\SwarmUpdateServiceUnavailableException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (400 === $status) { + throw new \Docker\API\Exception\SwarmUpdateBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\SwarmUpdateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (503 === $status) { + throw new \Docker\API\Exception\SwarmUpdateServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SystemAuth.php b/generated/Endpoint/SystemAuth.php new file mode 100644 index 000000000..b137a9cb5 --- /dev/null +++ b/generated/Endpoint/SystemAuth.php @@ -0,0 +1,58 @@ +body = $authConfig; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/auth'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SystemAuthInternalServerErrorException + * + * @return null|\Docker\API\Model\AuthPostResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\AuthPostResponse200', 'json'); + } + if (204 === $status) { + return null; + } + if (500 === $status) { + throw new \Docker\API\Exception\SystemAuthInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SystemDataUsage.php b/generated/Endpoint/SystemDataUsage.php new file mode 100644 index 000000000..a50ff8324 --- /dev/null +++ b/generated/Endpoint/SystemDataUsage.php @@ -0,0 +1,46 @@ + ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SystemDataUsageInternalServerErrorException + * + * @return null|\Docker\API\Model\SystemDfGetResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\SystemDfGetResponse200', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\SystemDataUsageInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SystemEvents.php b/generated/Endpoint/SystemEvents.php new file mode 100644 index 000000000..4cc112436 --- /dev/null +++ b/generated/Endpoint/SystemEvents.php @@ -0,0 +1,93 @@ +` container name or ID + - `event=` event type + - `image=` image name or ID + - `label=` image or container label + - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, or `daemon` + - `volume=` volume name or ID + - `network=` network name or ID + - `daemon=` daemon name or ID + + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return '/events'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['since', 'until', 'filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('since', ['string']); + $optionsResolver->addAllowedTypes('until', ['string']); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SystemEventsInternalServerErrorException + * + * @return null|\Docker\API\Model\EventsGetResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\EventsGetResponse200', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\SystemEventsInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SystemInfo.php b/generated/Endpoint/SystemInfo.php new file mode 100644 index 000000000..347729828 --- /dev/null +++ b/generated/Endpoint/SystemInfo.php @@ -0,0 +1,46 @@ + ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SystemInfoInternalServerErrorException + * + * @return null|\Docker\API\Model\InfoGetResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\InfoGetResponse200', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\SystemInfoInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SystemPing.php b/generated/Endpoint/SystemPing.php new file mode 100644 index 000000000..9554df608 --- /dev/null +++ b/generated/Endpoint/SystemPing.php @@ -0,0 +1,46 @@ + ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SystemPingInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return json_decode($body); + } + if (500 === $status) { + throw new \Docker\API\Exception\SystemPingInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SystemVersion.php b/generated/Endpoint/SystemVersion.php new file mode 100644 index 000000000..0f047e91e --- /dev/null +++ b/generated/Endpoint/SystemVersion.php @@ -0,0 +1,46 @@ + ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SystemVersionInternalServerErrorException + * + * @return null|\Docker\API\Model\VersionGetResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\VersionGetResponse200', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\SystemVersionInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/TaskInspect.php b/generated/Endpoint/TaskInspect.php new file mode 100644 index 000000000..3cda3620e --- /dev/null +++ b/generated/Endpoint/TaskInspect.php @@ -0,0 +1,60 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/tasks/{id}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\TaskInspectNotFoundException + * @throws \Docker\API\Exception\TaskInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Task + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Task', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\TaskInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\TaskInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/TaskList.php b/generated/Endpoint/TaskList.php new file mode 100644 index 000000000..c5dcff98d --- /dev/null +++ b/generated/Endpoint/TaskList.php @@ -0,0 +1,74 @@ +` + - `name=` + - `service=` + - `node=` + - `label=key` or `label="key=value"` + - `desired-state=(running | shutdown | accepted)` + + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return '/tasks'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\TaskListInternalServerErrorException + * + * @return null|\Docker\API\Model\Task[] + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Task[]', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\TaskListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/VolumeCreate.php b/generated/Endpoint/VolumeCreate.php new file mode 100644 index 000000000..3395b46a0 --- /dev/null +++ b/generated/Endpoint/VolumeCreate.php @@ -0,0 +1,55 @@ +body = $volumeConfig; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/volumes/create'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\VolumeCreateInternalServerErrorException + * + * @return null|\Docker\API\Model\Volume + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (201 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Volume', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\VolumeCreateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/VolumeDelete.php b/generated/Endpoint/VolumeDelete.php new file mode 100644 index 000000000..9f3455462 --- /dev/null +++ b/generated/Endpoint/VolumeDelete.php @@ -0,0 +1,77 @@ +name = $name; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'DELETE'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/volumes/{name}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['force']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['force' => false]); + $optionsResolver->addAllowedTypes('force', ['bool']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\VolumeDeleteNotFoundException + * @throws \Docker\API\Exception\VolumeDeleteConflictException + * @throws \Docker\API\Exception\VolumeDeleteInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\VolumeDeleteNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (409 === $status) { + throw new \Docker\API\Exception\VolumeDeleteConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\VolumeDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/VolumeInspect.php b/generated/Endpoint/VolumeInspect.php new file mode 100644 index 000000000..ef5bdba2d --- /dev/null +++ b/generated/Endpoint/VolumeInspect.php @@ -0,0 +1,60 @@ +name = $name; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/volumes/{name}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\VolumeInspectNotFoundException + * @throws \Docker\API\Exception\VolumeInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Volume + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Volume', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\VolumeInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\VolumeInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/VolumeList.php b/generated/Endpoint/VolumeList.php new file mode 100644 index 000000000..4d9b66d25 --- /dev/null +++ b/generated/Endpoint/VolumeList.php @@ -0,0 +1,76 @@ +` Matches all or part of a volume name. + - `dangling=` When set to `true` (or `1`), returns all + volumes that are not in use by a container. When set to `false` + (or `0`), only volumes that are in use by one or more + containers are returned. + - `driver=` Matches all or part of a volume + driver name. + + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return '/volumes'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\VolumeListInternalServerErrorException + * + * @return null|\Docker\API\Model\VolumesGetResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\VolumesGetResponse200', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\VolumeListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/VolumePrune.php b/generated/Endpoint/VolumePrune.php new file mode 100644 index 000000000..1a5596f66 --- /dev/null +++ b/generated/Endpoint/VolumePrune.php @@ -0,0 +1,69 @@ +queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/volumes/prune'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\VolumePruneInternalServerErrorException + * + * @return null|\Docker\API\Model\VolumesPrunePostResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\VolumesPrunePostResponse200', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\VolumePruneInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Exception/ApiException.php b/generated/Exception/ApiException.php new file mode 100644 index 000000000..78d25f803 --- /dev/null +++ b/generated/Exception/ApiException.php @@ -0,0 +1,7 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerArchiveHeadInternalServerErrorException.php b/generated/Exception/ContainerArchiveHeadInternalServerErrorException.php new file mode 100644 index 000000000..cf2be7cd4 --- /dev/null +++ b/generated/Exception/ContainerArchiveHeadInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerArchiveHeadNotFoundException.php b/generated/Exception/ContainerArchiveHeadNotFoundException.php new file mode 100644 index 000000000..40a9ab3eb --- /dev/null +++ b/generated/Exception/ContainerArchiveHeadNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerAttachBadRequestException.php b/generated/Exception/ContainerAttachBadRequestException.php new file mode 100644 index 000000000..5dfc63960 --- /dev/null +++ b/generated/Exception/ContainerAttachBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerAttachInternalServerErrorException.php b/generated/Exception/ContainerAttachInternalServerErrorException.php new file mode 100644 index 000000000..2a11acd28 --- /dev/null +++ b/generated/Exception/ContainerAttachInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerAttachNotFoundException.php b/generated/Exception/ContainerAttachNotFoundException.php new file mode 100644 index 000000000..1d02192c3 --- /dev/null +++ b/generated/Exception/ContainerAttachNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerAttachWebsocketBadRequestException.php b/generated/Exception/ContainerAttachWebsocketBadRequestException.php new file mode 100644 index 000000000..e3cfcc8a8 --- /dev/null +++ b/generated/Exception/ContainerAttachWebsocketBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerAttachWebsocketInternalServerErrorException.php b/generated/Exception/ContainerAttachWebsocketInternalServerErrorException.php new file mode 100644 index 000000000..b0a1fd507 --- /dev/null +++ b/generated/Exception/ContainerAttachWebsocketInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerAttachWebsocketNotFoundException.php b/generated/Exception/ContainerAttachWebsocketNotFoundException.php new file mode 100644 index 000000000..df56e3007 --- /dev/null +++ b/generated/Exception/ContainerAttachWebsocketNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerChangesInternalServerErrorException.php b/generated/Exception/ContainerChangesInternalServerErrorException.php new file mode 100644 index 000000000..c70319791 --- /dev/null +++ b/generated/Exception/ContainerChangesInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerChangesNotFoundException.php b/generated/Exception/ContainerChangesNotFoundException.php new file mode 100644 index 000000000..f436b9378 --- /dev/null +++ b/generated/Exception/ContainerChangesNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerCreateBadRequestException.php b/generated/Exception/ContainerCreateBadRequestException.php new file mode 100644 index 000000000..318432540 --- /dev/null +++ b/generated/Exception/ContainerCreateBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerCreateConflictException.php b/generated/Exception/ContainerCreateConflictException.php new file mode 100644 index 000000000..13c869405 --- /dev/null +++ b/generated/Exception/ContainerCreateConflictException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerCreateInternalServerErrorException.php b/generated/Exception/ContainerCreateInternalServerErrorException.php new file mode 100644 index 000000000..fef993e67 --- /dev/null +++ b/generated/Exception/ContainerCreateInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerCreateNotAcceptableException.php b/generated/Exception/ContainerCreateNotAcceptableException.php new file mode 100644 index 000000000..537c01e87 --- /dev/null +++ b/generated/Exception/ContainerCreateNotAcceptableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerCreateNotFoundException.php b/generated/Exception/ContainerCreateNotFoundException.php new file mode 100644 index 000000000..fde87b3a0 --- /dev/null +++ b/generated/Exception/ContainerCreateNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerDeleteBadRequestException.php b/generated/Exception/ContainerDeleteBadRequestException.php new file mode 100644 index 000000000..70c6cae9f --- /dev/null +++ b/generated/Exception/ContainerDeleteBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerDeleteInternalServerErrorException.php b/generated/Exception/ContainerDeleteInternalServerErrorException.php new file mode 100644 index 000000000..f2b4ede3e --- /dev/null +++ b/generated/Exception/ContainerDeleteInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerDeleteNotFoundException.php b/generated/Exception/ContainerDeleteNotFoundException.php new file mode 100644 index 000000000..ec3ab52a6 --- /dev/null +++ b/generated/Exception/ContainerDeleteNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerExecConflictException.php b/generated/Exception/ContainerExecConflictException.php new file mode 100644 index 000000000..09aa1b976 --- /dev/null +++ b/generated/Exception/ContainerExecConflictException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerExecInternalServerErrorException.php b/generated/Exception/ContainerExecInternalServerErrorException.php new file mode 100644 index 000000000..bf7fa182c --- /dev/null +++ b/generated/Exception/ContainerExecInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerExecNotFoundException.php b/generated/Exception/ContainerExecNotFoundException.php new file mode 100644 index 000000000..8cf228a6e --- /dev/null +++ b/generated/Exception/ContainerExecNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerExportInternalServerErrorException.php b/generated/Exception/ContainerExportInternalServerErrorException.php new file mode 100644 index 000000000..b0831fb63 --- /dev/null +++ b/generated/Exception/ContainerExportInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerExportNotFoundException.php b/generated/Exception/ContainerExportNotFoundException.php new file mode 100644 index 000000000..4be0c7fbd --- /dev/null +++ b/generated/Exception/ContainerExportNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerGetArchiveBadRequestException.php b/generated/Exception/ContainerGetArchiveBadRequestException.php new file mode 100644 index 000000000..3643afb6f --- /dev/null +++ b/generated/Exception/ContainerGetArchiveBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerGetArchiveInternalServerErrorException.php b/generated/Exception/ContainerGetArchiveInternalServerErrorException.php new file mode 100644 index 000000000..a982a9b2b --- /dev/null +++ b/generated/Exception/ContainerGetArchiveInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerGetArchiveNotFoundException.php b/generated/Exception/ContainerGetArchiveNotFoundException.php new file mode 100644 index 000000000..76dafe975 --- /dev/null +++ b/generated/Exception/ContainerGetArchiveNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerInspectInternalServerErrorException.php b/generated/Exception/ContainerInspectInternalServerErrorException.php new file mode 100644 index 000000000..cf9abddd0 --- /dev/null +++ b/generated/Exception/ContainerInspectInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerInspectNotFoundException.php b/generated/Exception/ContainerInspectNotFoundException.php new file mode 100644 index 000000000..be34fb0bc --- /dev/null +++ b/generated/Exception/ContainerInspectNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerKillInternalServerErrorException.php b/generated/Exception/ContainerKillInternalServerErrorException.php new file mode 100644 index 000000000..42043a9e9 --- /dev/null +++ b/generated/Exception/ContainerKillInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerKillNotFoundException.php b/generated/Exception/ContainerKillNotFoundException.php new file mode 100644 index 000000000..a89016064 --- /dev/null +++ b/generated/Exception/ContainerKillNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerListBadRequestException.php b/generated/Exception/ContainerListBadRequestException.php new file mode 100644 index 000000000..16c7679ac --- /dev/null +++ b/generated/Exception/ContainerListBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerListInternalServerErrorException.php b/generated/Exception/ContainerListInternalServerErrorException.php new file mode 100644 index 000000000..2758196b2 --- /dev/null +++ b/generated/Exception/ContainerListInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerLogsInternalServerErrorException.php b/generated/Exception/ContainerLogsInternalServerErrorException.php new file mode 100644 index 000000000..c05611fe7 --- /dev/null +++ b/generated/Exception/ContainerLogsInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerLogsNotFoundException.php b/generated/Exception/ContainerLogsNotFoundException.php new file mode 100644 index 000000000..5f7fdeabb --- /dev/null +++ b/generated/Exception/ContainerLogsNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerPauseInternalServerErrorException.php b/generated/Exception/ContainerPauseInternalServerErrorException.php new file mode 100644 index 000000000..205b49698 --- /dev/null +++ b/generated/Exception/ContainerPauseInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerPauseNotFoundException.php b/generated/Exception/ContainerPauseNotFoundException.php new file mode 100644 index 000000000..955e7ad1c --- /dev/null +++ b/generated/Exception/ContainerPauseNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerPruneInternalServerErrorException.php b/generated/Exception/ContainerPruneInternalServerErrorException.php new file mode 100644 index 000000000..ba68d2621 --- /dev/null +++ b/generated/Exception/ContainerPruneInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerPutArchiveBadRequestException.php b/generated/Exception/ContainerPutArchiveBadRequestException.php new file mode 100644 index 000000000..f1a0d6c71 --- /dev/null +++ b/generated/Exception/ContainerPutArchiveBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerPutArchiveForbiddenException.php b/generated/Exception/ContainerPutArchiveForbiddenException.php new file mode 100644 index 000000000..19847fbd8 --- /dev/null +++ b/generated/Exception/ContainerPutArchiveForbiddenException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerPutArchiveInternalServerErrorException.php b/generated/Exception/ContainerPutArchiveInternalServerErrorException.php new file mode 100644 index 000000000..c19bc41f1 --- /dev/null +++ b/generated/Exception/ContainerPutArchiveInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerPutArchiveNotFoundException.php b/generated/Exception/ContainerPutArchiveNotFoundException.php new file mode 100644 index 000000000..e23300f65 --- /dev/null +++ b/generated/Exception/ContainerPutArchiveNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerRenameConflictException.php b/generated/Exception/ContainerRenameConflictException.php new file mode 100644 index 000000000..72e2cd77e --- /dev/null +++ b/generated/Exception/ContainerRenameConflictException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerRenameInternalServerErrorException.php b/generated/Exception/ContainerRenameInternalServerErrorException.php new file mode 100644 index 000000000..0a418d787 --- /dev/null +++ b/generated/Exception/ContainerRenameInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerRenameNotFoundException.php b/generated/Exception/ContainerRenameNotFoundException.php new file mode 100644 index 000000000..59005e254 --- /dev/null +++ b/generated/Exception/ContainerRenameNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerResizeInternalServerErrorException.php b/generated/Exception/ContainerResizeInternalServerErrorException.php new file mode 100644 index 000000000..2df2f568e --- /dev/null +++ b/generated/Exception/ContainerResizeInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerResizeNotFoundException.php b/generated/Exception/ContainerResizeNotFoundException.php new file mode 100644 index 000000000..4980721b8 --- /dev/null +++ b/generated/Exception/ContainerResizeNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerRestartInternalServerErrorException.php b/generated/Exception/ContainerRestartInternalServerErrorException.php new file mode 100644 index 000000000..e279045e1 --- /dev/null +++ b/generated/Exception/ContainerRestartInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerRestartNotFoundException.php b/generated/Exception/ContainerRestartNotFoundException.php new file mode 100644 index 000000000..ab2244c22 --- /dev/null +++ b/generated/Exception/ContainerRestartNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerStartInternalServerErrorException.php b/generated/Exception/ContainerStartInternalServerErrorException.php new file mode 100644 index 000000000..ff13b6755 --- /dev/null +++ b/generated/Exception/ContainerStartInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerStartNotFoundException.php b/generated/Exception/ContainerStartNotFoundException.php new file mode 100644 index 000000000..31bac04f3 --- /dev/null +++ b/generated/Exception/ContainerStartNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerStatsInternalServerErrorException.php b/generated/Exception/ContainerStatsInternalServerErrorException.php new file mode 100644 index 000000000..9f48dbbfd --- /dev/null +++ b/generated/Exception/ContainerStatsInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerStatsNotFoundException.php b/generated/Exception/ContainerStatsNotFoundException.php new file mode 100644 index 000000000..ab9f81a2f --- /dev/null +++ b/generated/Exception/ContainerStatsNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerStopInternalServerErrorException.php b/generated/Exception/ContainerStopInternalServerErrorException.php new file mode 100644 index 000000000..32ce9a330 --- /dev/null +++ b/generated/Exception/ContainerStopInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerStopNotFoundException.php b/generated/Exception/ContainerStopNotFoundException.php new file mode 100644 index 000000000..3a6ef9bee --- /dev/null +++ b/generated/Exception/ContainerStopNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerTopInternalServerErrorException.php b/generated/Exception/ContainerTopInternalServerErrorException.php new file mode 100644 index 000000000..c9e7d835f --- /dev/null +++ b/generated/Exception/ContainerTopInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerTopNotFoundException.php b/generated/Exception/ContainerTopNotFoundException.php new file mode 100644 index 000000000..effffe317 --- /dev/null +++ b/generated/Exception/ContainerTopNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerUnpauseInternalServerErrorException.php b/generated/Exception/ContainerUnpauseInternalServerErrorException.php new file mode 100644 index 000000000..267e08622 --- /dev/null +++ b/generated/Exception/ContainerUnpauseInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerUnpauseNotFoundException.php b/generated/Exception/ContainerUnpauseNotFoundException.php new file mode 100644 index 000000000..355a26861 --- /dev/null +++ b/generated/Exception/ContainerUnpauseNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerUpdateInternalServerErrorException.php b/generated/Exception/ContainerUpdateInternalServerErrorException.php new file mode 100644 index 000000000..ff37c87c1 --- /dev/null +++ b/generated/Exception/ContainerUpdateInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerUpdateNotFoundException.php b/generated/Exception/ContainerUpdateNotFoundException.php new file mode 100644 index 000000000..e6e61d5f3 --- /dev/null +++ b/generated/Exception/ContainerUpdateNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerWaitInternalServerErrorException.php b/generated/Exception/ContainerWaitInternalServerErrorException.php new file mode 100644 index 000000000..c22a45554 --- /dev/null +++ b/generated/Exception/ContainerWaitInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerWaitNotFoundException.php b/generated/Exception/ContainerWaitNotFoundException.php new file mode 100644 index 000000000..495bc9f25 --- /dev/null +++ b/generated/Exception/ContainerWaitNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ExecInspectInternalServerErrorException.php b/generated/Exception/ExecInspectInternalServerErrorException.php new file mode 100644 index 000000000..c0317a697 --- /dev/null +++ b/generated/Exception/ExecInspectInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ExecInspectNotFoundException.php b/generated/Exception/ExecInspectNotFoundException.php new file mode 100644 index 000000000..dfafe4d5b --- /dev/null +++ b/generated/Exception/ExecInspectNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ExecResizeBadRequestException.php b/generated/Exception/ExecResizeBadRequestException.php new file mode 100644 index 000000000..d5d67469a --- /dev/null +++ b/generated/Exception/ExecResizeBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ExecResizeInternalServerErrorException.php b/generated/Exception/ExecResizeInternalServerErrorException.php new file mode 100644 index 000000000..4deac1bd9 --- /dev/null +++ b/generated/Exception/ExecResizeInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ExecResizeNotFoundException.php b/generated/Exception/ExecResizeNotFoundException.php new file mode 100644 index 000000000..06403089f --- /dev/null +++ b/generated/Exception/ExecResizeNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ExecStartConflictException.php b/generated/Exception/ExecStartConflictException.php new file mode 100644 index 000000000..98bb8bfa6 --- /dev/null +++ b/generated/Exception/ExecStartConflictException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ExecStartNotFoundException.php b/generated/Exception/ExecStartNotFoundException.php new file mode 100644 index 000000000..94c0e3f8b --- /dev/null +++ b/generated/Exception/ExecStartNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ForbiddenException.php b/generated/Exception/ForbiddenException.php new file mode 100644 index 000000000..988311b31 --- /dev/null +++ b/generated/Exception/ForbiddenException.php @@ -0,0 +1,11 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageBuildInternalServerErrorException.php b/generated/Exception/ImageBuildInternalServerErrorException.php new file mode 100644 index 000000000..d099cfbad --- /dev/null +++ b/generated/Exception/ImageBuildInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageCommitInternalServerErrorException.php b/generated/Exception/ImageCommitInternalServerErrorException.php new file mode 100644 index 000000000..04a2b4c2a --- /dev/null +++ b/generated/Exception/ImageCommitInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageCommitNotFoundException.php b/generated/Exception/ImageCommitNotFoundException.php new file mode 100644 index 000000000..5e41c1f97 --- /dev/null +++ b/generated/Exception/ImageCommitNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageCreateInternalServerErrorException.php b/generated/Exception/ImageCreateInternalServerErrorException.php new file mode 100644 index 000000000..377253cf4 --- /dev/null +++ b/generated/Exception/ImageCreateInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageCreateNotFoundException.php b/generated/Exception/ImageCreateNotFoundException.php new file mode 100644 index 000000000..7248a40ce --- /dev/null +++ b/generated/Exception/ImageCreateNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageDeleteConflictException.php b/generated/Exception/ImageDeleteConflictException.php new file mode 100644 index 000000000..1e8fe9428 --- /dev/null +++ b/generated/Exception/ImageDeleteConflictException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageDeleteInternalServerErrorException.php b/generated/Exception/ImageDeleteInternalServerErrorException.php new file mode 100644 index 000000000..2b468c09e --- /dev/null +++ b/generated/Exception/ImageDeleteInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageDeleteNotFoundException.php b/generated/Exception/ImageDeleteNotFoundException.php new file mode 100644 index 000000000..cc1130e3f --- /dev/null +++ b/generated/Exception/ImageDeleteNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageGetAllInternalServerErrorException.php b/generated/Exception/ImageGetAllInternalServerErrorException.php new file mode 100644 index 000000000..390eb4a9d --- /dev/null +++ b/generated/Exception/ImageGetAllInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageGetInternalServerErrorException.php b/generated/Exception/ImageGetInternalServerErrorException.php new file mode 100644 index 000000000..87ab71bdf --- /dev/null +++ b/generated/Exception/ImageGetInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageHistoryInternalServerErrorException.php b/generated/Exception/ImageHistoryInternalServerErrorException.php new file mode 100644 index 000000000..16a496fc5 --- /dev/null +++ b/generated/Exception/ImageHistoryInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageHistoryNotFoundException.php b/generated/Exception/ImageHistoryNotFoundException.php new file mode 100644 index 000000000..73b3d9d28 --- /dev/null +++ b/generated/Exception/ImageHistoryNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageInspectInternalServerErrorException.php b/generated/Exception/ImageInspectInternalServerErrorException.php new file mode 100644 index 000000000..ba9ddf36d --- /dev/null +++ b/generated/Exception/ImageInspectInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageInspectNotFoundException.php b/generated/Exception/ImageInspectNotFoundException.php new file mode 100644 index 000000000..e4899cb01 --- /dev/null +++ b/generated/Exception/ImageInspectNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageListInternalServerErrorException.php b/generated/Exception/ImageListInternalServerErrorException.php new file mode 100644 index 000000000..7ff140fff --- /dev/null +++ b/generated/Exception/ImageListInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageLoadInternalServerErrorException.php b/generated/Exception/ImageLoadInternalServerErrorException.php new file mode 100644 index 000000000..161fed4d7 --- /dev/null +++ b/generated/Exception/ImageLoadInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImagePruneInternalServerErrorException.php b/generated/Exception/ImagePruneInternalServerErrorException.php new file mode 100644 index 000000000..beeecb0d4 --- /dev/null +++ b/generated/Exception/ImagePruneInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImagePushInternalServerErrorException.php b/generated/Exception/ImagePushInternalServerErrorException.php new file mode 100644 index 000000000..21ca11330 --- /dev/null +++ b/generated/Exception/ImagePushInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImagePushNotFoundException.php b/generated/Exception/ImagePushNotFoundException.php new file mode 100644 index 000000000..0c5bfbd9a --- /dev/null +++ b/generated/Exception/ImagePushNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageSearchInternalServerErrorException.php b/generated/Exception/ImageSearchInternalServerErrorException.php new file mode 100644 index 000000000..7286ec973 --- /dev/null +++ b/generated/Exception/ImageSearchInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageTagBadRequestException.php b/generated/Exception/ImageTagBadRequestException.php new file mode 100644 index 000000000..84e8d36f7 --- /dev/null +++ b/generated/Exception/ImageTagBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageTagConflictException.php b/generated/Exception/ImageTagConflictException.php new file mode 100644 index 000000000..f5150e63d --- /dev/null +++ b/generated/Exception/ImageTagConflictException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageTagInternalServerErrorException.php b/generated/Exception/ImageTagInternalServerErrorException.php new file mode 100644 index 000000000..88d7eb0d4 --- /dev/null +++ b/generated/Exception/ImageTagInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageTagNotFoundException.php b/generated/Exception/ImageTagNotFoundException.php new file mode 100644 index 000000000..41804e383 --- /dev/null +++ b/generated/Exception/ImageTagNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/InternalServerErrorException.php b/generated/Exception/InternalServerErrorException.php new file mode 100644 index 000000000..5a5a47ef7 --- /dev/null +++ b/generated/Exception/InternalServerErrorException.php @@ -0,0 +1,11 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkConnectInternalServerErrorException.php b/generated/Exception/NetworkConnectInternalServerErrorException.php new file mode 100644 index 000000000..56e7db1b3 --- /dev/null +++ b/generated/Exception/NetworkConnectInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkConnectNotFoundException.php b/generated/Exception/NetworkConnectNotFoundException.php new file mode 100644 index 000000000..c2d42e615 --- /dev/null +++ b/generated/Exception/NetworkConnectNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkCreateBadRequestException.php b/generated/Exception/NetworkCreateBadRequestException.php new file mode 100644 index 000000000..5412090d2 --- /dev/null +++ b/generated/Exception/NetworkCreateBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkCreateForbiddenException.php b/generated/Exception/NetworkCreateForbiddenException.php new file mode 100644 index 000000000..b5b1778f5 --- /dev/null +++ b/generated/Exception/NetworkCreateForbiddenException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkCreateInternalServerErrorException.php b/generated/Exception/NetworkCreateInternalServerErrorException.php new file mode 100644 index 000000000..a065ef2fd --- /dev/null +++ b/generated/Exception/NetworkCreateInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkCreateNotFoundException.php b/generated/Exception/NetworkCreateNotFoundException.php new file mode 100644 index 000000000..d90f7f4f9 --- /dev/null +++ b/generated/Exception/NetworkCreateNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkDeleteInternalServerErrorException.php b/generated/Exception/NetworkDeleteInternalServerErrorException.php new file mode 100644 index 000000000..f4c6c74bb --- /dev/null +++ b/generated/Exception/NetworkDeleteInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkDeleteNotFoundException.php b/generated/Exception/NetworkDeleteNotFoundException.php new file mode 100644 index 000000000..37be2d237 --- /dev/null +++ b/generated/Exception/NetworkDeleteNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkDisconnectForbiddenException.php b/generated/Exception/NetworkDisconnectForbiddenException.php new file mode 100644 index 000000000..5799ca2a0 --- /dev/null +++ b/generated/Exception/NetworkDisconnectForbiddenException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkDisconnectInternalServerErrorException.php b/generated/Exception/NetworkDisconnectInternalServerErrorException.php new file mode 100644 index 000000000..c1e13e263 --- /dev/null +++ b/generated/Exception/NetworkDisconnectInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkDisconnectNotFoundException.php b/generated/Exception/NetworkDisconnectNotFoundException.php new file mode 100644 index 000000000..eaac3a478 --- /dev/null +++ b/generated/Exception/NetworkDisconnectNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkInspectNotFoundException.php b/generated/Exception/NetworkInspectNotFoundException.php new file mode 100644 index 000000000..ae586eb62 --- /dev/null +++ b/generated/Exception/NetworkInspectNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkListInternalServerErrorException.php b/generated/Exception/NetworkListInternalServerErrorException.php new file mode 100644 index 000000000..02554bb23 --- /dev/null +++ b/generated/Exception/NetworkListInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkPruneInternalServerErrorException.php b/generated/Exception/NetworkPruneInternalServerErrorException.php new file mode 100644 index 000000000..18c0fe932 --- /dev/null +++ b/generated/Exception/NetworkPruneInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NodeDeleteInternalServerErrorException.php b/generated/Exception/NodeDeleteInternalServerErrorException.php new file mode 100644 index 000000000..3d1988ff1 --- /dev/null +++ b/generated/Exception/NodeDeleteInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NodeDeleteNotFoundException.php b/generated/Exception/NodeDeleteNotFoundException.php new file mode 100644 index 000000000..90a57e6ca --- /dev/null +++ b/generated/Exception/NodeDeleteNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NodeInspectInternalServerErrorException.php b/generated/Exception/NodeInspectInternalServerErrorException.php new file mode 100644 index 000000000..bacff3cc9 --- /dev/null +++ b/generated/Exception/NodeInspectInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NodeInspectNotFoundException.php b/generated/Exception/NodeInspectNotFoundException.php new file mode 100644 index 000000000..8923f3c71 --- /dev/null +++ b/generated/Exception/NodeInspectNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NodeListInternalServerErrorException.php b/generated/Exception/NodeListInternalServerErrorException.php new file mode 100644 index 000000000..e967eb768 --- /dev/null +++ b/generated/Exception/NodeListInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NodeUpdateInternalServerErrorException.php b/generated/Exception/NodeUpdateInternalServerErrorException.php new file mode 100644 index 000000000..cca381073 --- /dev/null +++ b/generated/Exception/NodeUpdateInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NodeUpdateNotFoundException.php b/generated/Exception/NodeUpdateNotFoundException.php new file mode 100644 index 000000000..c78b8344c --- /dev/null +++ b/generated/Exception/NodeUpdateNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NotAcceptableException.php b/generated/Exception/NotAcceptableException.php new file mode 100644 index 000000000..eb2b4717b --- /dev/null +++ b/generated/Exception/NotAcceptableException.php @@ -0,0 +1,11 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginDeleteInternalServerErrorException.php b/generated/Exception/PluginDeleteInternalServerErrorException.php new file mode 100644 index 000000000..75d760142 --- /dev/null +++ b/generated/Exception/PluginDeleteInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginDeleteNotFoundException.php b/generated/Exception/PluginDeleteNotFoundException.php new file mode 100644 index 000000000..a4fcf4a82 --- /dev/null +++ b/generated/Exception/PluginDeleteNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginDisableInternalServerErrorException.php b/generated/Exception/PluginDisableInternalServerErrorException.php new file mode 100644 index 000000000..f83c0cc37 --- /dev/null +++ b/generated/Exception/PluginDisableInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginEnableInternalServerErrorException.php b/generated/Exception/PluginEnableInternalServerErrorException.php new file mode 100644 index 000000000..a52fe832d --- /dev/null +++ b/generated/Exception/PluginEnableInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginInspectInternalServerErrorException.php b/generated/Exception/PluginInspectInternalServerErrorException.php new file mode 100644 index 000000000..293a39148 --- /dev/null +++ b/generated/Exception/PluginInspectInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginInspectNotFoundException.php b/generated/Exception/PluginInspectNotFoundException.php new file mode 100644 index 000000000..b811acdb8 --- /dev/null +++ b/generated/Exception/PluginInspectNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginListInternalServerErrorException.php b/generated/Exception/PluginListInternalServerErrorException.php new file mode 100644 index 000000000..a67ecd63a --- /dev/null +++ b/generated/Exception/PluginListInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginPullInternalServerErrorException.php b/generated/Exception/PluginPullInternalServerErrorException.php new file mode 100644 index 000000000..3414a66ee --- /dev/null +++ b/generated/Exception/PluginPullInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginPushInternalServerErrorException.php b/generated/Exception/PluginPushInternalServerErrorException.php new file mode 100644 index 000000000..82daed007 --- /dev/null +++ b/generated/Exception/PluginPushInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginPushNotFoundException.php b/generated/Exception/PluginPushNotFoundException.php new file mode 100644 index 000000000..0d3424817 --- /dev/null +++ b/generated/Exception/PluginPushNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginSetInternalServerErrorException.php b/generated/Exception/PluginSetInternalServerErrorException.php new file mode 100644 index 000000000..d2b59afd2 --- /dev/null +++ b/generated/Exception/PluginSetInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginSetNotFoundException.php b/generated/Exception/PluginSetNotFoundException.php new file mode 100644 index 000000000..77c8e79fd --- /dev/null +++ b/generated/Exception/PluginSetNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretCreateConflictException.php b/generated/Exception/SecretCreateConflictException.php new file mode 100644 index 000000000..21ff57ee9 --- /dev/null +++ b/generated/Exception/SecretCreateConflictException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretCreateInternalServerErrorException.php b/generated/Exception/SecretCreateInternalServerErrorException.php new file mode 100644 index 000000000..8ceeed854 --- /dev/null +++ b/generated/Exception/SecretCreateInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretCreateNotAcceptableException.php b/generated/Exception/SecretCreateNotAcceptableException.php new file mode 100644 index 000000000..2a10539cb --- /dev/null +++ b/generated/Exception/SecretCreateNotAcceptableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretDeleteInternalServerErrorException.php b/generated/Exception/SecretDeleteInternalServerErrorException.php new file mode 100644 index 000000000..77812f1ff --- /dev/null +++ b/generated/Exception/SecretDeleteInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretDeleteNotFoundException.php b/generated/Exception/SecretDeleteNotFoundException.php new file mode 100644 index 000000000..2979b97ae --- /dev/null +++ b/generated/Exception/SecretDeleteNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretInspectInternalServerErrorException.php b/generated/Exception/SecretInspectInternalServerErrorException.php new file mode 100644 index 000000000..cd343fc2c --- /dev/null +++ b/generated/Exception/SecretInspectInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretInspectNotAcceptableException.php b/generated/Exception/SecretInspectNotAcceptableException.php new file mode 100644 index 000000000..b29baa1a6 --- /dev/null +++ b/generated/Exception/SecretInspectNotAcceptableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretInspectNotFoundException.php b/generated/Exception/SecretInspectNotFoundException.php new file mode 100644 index 000000000..c0b9876a1 --- /dev/null +++ b/generated/Exception/SecretInspectNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretListInternalServerErrorException.php b/generated/Exception/SecretListInternalServerErrorException.php new file mode 100644 index 000000000..efc1f4c64 --- /dev/null +++ b/generated/Exception/SecretListInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServerException.php b/generated/Exception/ServerException.php new file mode 100644 index 000000000..6c2c3fff0 --- /dev/null +++ b/generated/Exception/ServerException.php @@ -0,0 +1,7 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceCreateForbiddenException.php b/generated/Exception/ServiceCreateForbiddenException.php new file mode 100644 index 000000000..c2c48f6e6 --- /dev/null +++ b/generated/Exception/ServiceCreateForbiddenException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceCreateInternalServerErrorException.php b/generated/Exception/ServiceCreateInternalServerErrorException.php new file mode 100644 index 000000000..a55d221a1 --- /dev/null +++ b/generated/Exception/ServiceCreateInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceCreateServiceUnavailableException.php b/generated/Exception/ServiceCreateServiceUnavailableException.php new file mode 100644 index 000000000..21f572b13 --- /dev/null +++ b/generated/Exception/ServiceCreateServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceDeleteInternalServerErrorException.php b/generated/Exception/ServiceDeleteInternalServerErrorException.php new file mode 100644 index 000000000..ce42a0479 --- /dev/null +++ b/generated/Exception/ServiceDeleteInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceDeleteNotFoundException.php b/generated/Exception/ServiceDeleteNotFoundException.php new file mode 100644 index 000000000..864294e8b --- /dev/null +++ b/generated/Exception/ServiceDeleteNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceInspectInternalServerErrorException.php b/generated/Exception/ServiceInspectInternalServerErrorException.php new file mode 100644 index 000000000..341387fb6 --- /dev/null +++ b/generated/Exception/ServiceInspectInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceInspectNotFoundException.php b/generated/Exception/ServiceInspectNotFoundException.php new file mode 100644 index 000000000..e291185a1 --- /dev/null +++ b/generated/Exception/ServiceInspectNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceListInternalServerErrorException.php b/generated/Exception/ServiceListInternalServerErrorException.php new file mode 100644 index 000000000..abde03c8c --- /dev/null +++ b/generated/Exception/ServiceListInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceLogsInternalServerErrorException.php b/generated/Exception/ServiceLogsInternalServerErrorException.php new file mode 100644 index 000000000..63cdbf61e --- /dev/null +++ b/generated/Exception/ServiceLogsInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceLogsNotFoundException.php b/generated/Exception/ServiceLogsNotFoundException.php new file mode 100644 index 000000000..9326a07c6 --- /dev/null +++ b/generated/Exception/ServiceLogsNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceUnavailableException.php b/generated/Exception/ServiceUnavailableException.php new file mode 100644 index 000000000..2d036d1db --- /dev/null +++ b/generated/Exception/ServiceUnavailableException.php @@ -0,0 +1,11 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceUpdateNotFoundException.php b/generated/Exception/ServiceUpdateNotFoundException.php new file mode 100644 index 000000000..a1337f4d7 --- /dev/null +++ b/generated/Exception/ServiceUpdateNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmInitBadRequestException.php b/generated/Exception/SwarmInitBadRequestException.php new file mode 100644 index 000000000..9979b094f --- /dev/null +++ b/generated/Exception/SwarmInitBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmInitInternalServerErrorException.php b/generated/Exception/SwarmInitInternalServerErrorException.php new file mode 100644 index 000000000..287fdd803 --- /dev/null +++ b/generated/Exception/SwarmInitInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmInitNotAcceptableException.php b/generated/Exception/SwarmInitNotAcceptableException.php new file mode 100644 index 000000000..b38e1c6fc --- /dev/null +++ b/generated/Exception/SwarmInitNotAcceptableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmInspectInternalServerErrorException.php b/generated/Exception/SwarmInspectInternalServerErrorException.php new file mode 100644 index 000000000..123420701 --- /dev/null +++ b/generated/Exception/SwarmInspectInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmJoinBadRequestException.php b/generated/Exception/SwarmJoinBadRequestException.php new file mode 100644 index 000000000..2d917081f --- /dev/null +++ b/generated/Exception/SwarmJoinBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmJoinInternalServerErrorException.php b/generated/Exception/SwarmJoinInternalServerErrorException.php new file mode 100644 index 000000000..35335c2a3 --- /dev/null +++ b/generated/Exception/SwarmJoinInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmJoinServiceUnavailableException.php b/generated/Exception/SwarmJoinServiceUnavailableException.php new file mode 100644 index 000000000..c56500da5 --- /dev/null +++ b/generated/Exception/SwarmJoinServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmLeaveInternalServerErrorException.php b/generated/Exception/SwarmLeaveInternalServerErrorException.php new file mode 100644 index 000000000..90fc41668 --- /dev/null +++ b/generated/Exception/SwarmLeaveInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmLeaveServiceUnavailableException.php b/generated/Exception/SwarmLeaveServiceUnavailableException.php new file mode 100644 index 000000000..4373d92ce --- /dev/null +++ b/generated/Exception/SwarmLeaveServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmUnlockInternalServerErrorException.php b/generated/Exception/SwarmUnlockInternalServerErrorException.php new file mode 100644 index 000000000..aa7e85a3a --- /dev/null +++ b/generated/Exception/SwarmUnlockInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmUnlockkeyInternalServerErrorException.php b/generated/Exception/SwarmUnlockkeyInternalServerErrorException.php new file mode 100644 index 000000000..26bf0c070 --- /dev/null +++ b/generated/Exception/SwarmUnlockkeyInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmUpdateBadRequestException.php b/generated/Exception/SwarmUpdateBadRequestException.php new file mode 100644 index 000000000..ea0997150 --- /dev/null +++ b/generated/Exception/SwarmUpdateBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmUpdateInternalServerErrorException.php b/generated/Exception/SwarmUpdateInternalServerErrorException.php new file mode 100644 index 000000000..a747f2219 --- /dev/null +++ b/generated/Exception/SwarmUpdateInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmUpdateServiceUnavailableException.php b/generated/Exception/SwarmUpdateServiceUnavailableException.php new file mode 100644 index 000000000..1af9c9a7d --- /dev/null +++ b/generated/Exception/SwarmUpdateServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SystemAuthInternalServerErrorException.php b/generated/Exception/SystemAuthInternalServerErrorException.php new file mode 100644 index 000000000..ad2bc9817 --- /dev/null +++ b/generated/Exception/SystemAuthInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SystemDataUsageInternalServerErrorException.php b/generated/Exception/SystemDataUsageInternalServerErrorException.php new file mode 100644 index 000000000..fb34466b6 --- /dev/null +++ b/generated/Exception/SystemDataUsageInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SystemEventsInternalServerErrorException.php b/generated/Exception/SystemEventsInternalServerErrorException.php new file mode 100644 index 000000000..9f14bf46d --- /dev/null +++ b/generated/Exception/SystemEventsInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SystemInfoInternalServerErrorException.php b/generated/Exception/SystemInfoInternalServerErrorException.php new file mode 100644 index 000000000..831167ee5 --- /dev/null +++ b/generated/Exception/SystemInfoInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SystemPingInternalServerErrorException.php b/generated/Exception/SystemPingInternalServerErrorException.php new file mode 100644 index 000000000..be6bebad5 --- /dev/null +++ b/generated/Exception/SystemPingInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SystemVersionInternalServerErrorException.php b/generated/Exception/SystemVersionInternalServerErrorException.php new file mode 100644 index 000000000..9096e9299 --- /dev/null +++ b/generated/Exception/SystemVersionInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/TaskInspectInternalServerErrorException.php b/generated/Exception/TaskInspectInternalServerErrorException.php new file mode 100644 index 000000000..fd93a3dd3 --- /dev/null +++ b/generated/Exception/TaskInspectInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/TaskInspectNotFoundException.php b/generated/Exception/TaskInspectNotFoundException.php new file mode 100644 index 000000000..a8fa50066 --- /dev/null +++ b/generated/Exception/TaskInspectNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/TaskListInternalServerErrorException.php b/generated/Exception/TaskListInternalServerErrorException.php new file mode 100644 index 000000000..9308f9d89 --- /dev/null +++ b/generated/Exception/TaskListInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/VolumeCreateInternalServerErrorException.php b/generated/Exception/VolumeCreateInternalServerErrorException.php new file mode 100644 index 000000000..9bd75ddba --- /dev/null +++ b/generated/Exception/VolumeCreateInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/VolumeDeleteConflictException.php b/generated/Exception/VolumeDeleteConflictException.php new file mode 100644 index 000000000..35197ca32 --- /dev/null +++ b/generated/Exception/VolumeDeleteConflictException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/VolumeDeleteInternalServerErrorException.php b/generated/Exception/VolumeDeleteInternalServerErrorException.php new file mode 100644 index 000000000..3de169ad0 --- /dev/null +++ b/generated/Exception/VolumeDeleteInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/VolumeDeleteNotFoundException.php b/generated/Exception/VolumeDeleteNotFoundException.php new file mode 100644 index 000000000..8d8f021e3 --- /dev/null +++ b/generated/Exception/VolumeDeleteNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/VolumeInspectInternalServerErrorException.php b/generated/Exception/VolumeInspectInternalServerErrorException.php new file mode 100644 index 000000000..5551e6284 --- /dev/null +++ b/generated/Exception/VolumeInspectInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/VolumeInspectNotFoundException.php b/generated/Exception/VolumeInspectNotFoundException.php new file mode 100644 index 000000000..ed280dd74 --- /dev/null +++ b/generated/Exception/VolumeInspectNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/VolumeListInternalServerErrorException.php b/generated/Exception/VolumeListInternalServerErrorException.php new file mode 100644 index 000000000..a177c7ef3 --- /dev/null +++ b/generated/Exception/VolumeListInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/VolumePruneInternalServerErrorException.php b/generated/Exception/VolumePruneInternalServerErrorException.php new file mode 100644 index 000000000..50862ac0c --- /dev/null +++ b/generated/Exception/VolumePruneInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Model/Annotations.php b/generated/Model/Annotations.php deleted file mode 100644 index 2073eddb0..000000000 --- a/generated/Model/Annotations.php +++ /dev/null @@ -1,55 +0,0 @@ -name; - } - - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } - - /** - * @return string[]|null - */ - public function getLabels() - { - return $this->labels; - } - - /** - * @param string[]|null $labels - * - * @return self - */ - public function setLabels($labels = null) - { - $this->labels = $labels; - - return $this; - } -} diff --git a/generated/Model/AuthConfig.php b/generated/Model/AuthConfig.php index 447488203..6f8c23593 100644 --- a/generated/Model/AuthConfig.php +++ b/generated/Model/AuthConfig.php @@ -5,123 +5,123 @@ class AuthConfig { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var string|null */ protected $username; /** - * @var string + * + * + * @var string|null */ protected $password; /** - * @var string + * + * + * @var string|null */ protected $email; /** - * @var string + * + * + * @var string|null */ protected $serveraddress; /** - * @var string - */ - protected $registrytoken; - - /** - * @return string + * + * + * @return string|null */ - public function getUsername() + public function getUsername(): ?string { return $this->username; } - /** - * @param string $username + * + * + * @param string|null $username * * @return self */ - public function setUsername($username = null) + public function setUsername(?string $username): self { + $this->initialized['username'] = true; $this->username = $username; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getPassword() + public function getPassword(): ?string { return $this->password; } - /** - * @param string $password + * + * + * @param string|null $password * * @return self */ - public function setPassword($password = null) + public function setPassword(?string $password): self { + $this->initialized['password'] = true; $this->password = $password; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getEmail() + public function getEmail(): ?string { return $this->email; } - /** - * @param string $email + * + * + * @param string|null $email * * @return self */ - public function setEmail($email = null) + public function setEmail(?string $email): self { + $this->initialized['email'] = true; $this->email = $email; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getServeraddress() + public function getServeraddress(): ?string { return $this->serveraddress; } - /** - * @param string $serveraddress + * * - * @return self - */ - public function setServeraddress($serveraddress = null) - { - $this->serveraddress = $serveraddress; - - return $this; - } - - /** - * @return string - */ - public function getRegistrytoken() - { - return $this->registrytoken; - } - - /** - * @param string $registrytoken + * @param string|null $serveraddress * * @return self */ - public function setRegistrytoken($registrytoken = null) + public function setServeraddress(?string $serveraddress): self { - $this->registrytoken = $registrytoken; - + $this->initialized['serveraddress'] = true; + $this->serveraddress = $serveraddress; return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/AuthPostResponse200.php b/generated/Model/AuthPostResponse200.php new file mode 100644 index 000000000..9e89aa553 --- /dev/null +++ b/generated/Model/AuthPostResponse200.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The status of the authentication + * + * @var string|null + */ + protected $status; + /** + * An opaque token used to authenticate a user after a successful login + * + * @var string|null + */ + protected $identityToken; + /** + * The status of the authentication + * + * @return string|null + */ + public function getStatus(): ?string + { + return $this->status; + } + /** + * The status of the authentication + * + * @param string|null $status + * + * @return self + */ + public function setStatus(?string $status): self + { + $this->initialized['status'] = true; + $this->status = $status; + return $this; + } + /** + * An opaque token used to authenticate a user after a successful login + * + * @return string|null + */ + public function getIdentityToken(): ?string + { + return $this->identityToken; + } + /** + * An opaque token used to authenticate a user after a successful login + * + * @param string|null $identityToken + * + * @return self + */ + public function setIdentityToken(?string $identityToken): self + { + $this->initialized['identityToken'] = true; + $this->identityToken = $identityToken; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/AuthResult.php b/generated/Model/AuthResult.php deleted file mode 100644 index 128f03da2..000000000 --- a/generated/Model/AuthResult.php +++ /dev/null @@ -1,55 +0,0 @@ -status; - } - - /** - * @param string $status - * - * @return self - */ - public function setStatus($status = null) - { - $this->status = $status; - - return $this; - } - - /** - * @return string - */ - public function getIdentityToken() - { - return $this->identityToken; - } - - /** - * @param string $identityToken - * - * @return self - */ - public function setIdentityToken($identityToken = null) - { - $this->identityToken = $identityToken; - - return $this; - } -} diff --git a/generated/Model/BuildInfo.php b/generated/Model/BuildInfo.php index b14f66400..373c04d0c 100644 --- a/generated/Model/BuildInfo.php +++ b/generated/Model/BuildInfo.php @@ -5,171 +5,207 @@ class BuildInfo { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var string|null */ protected $id; /** - * @var string + * + * + * @var string|null */ protected $stream; /** - * @var string + * + * + * @var string|null */ protected $error; /** - * @var ErrorDetail + * + * + * @var ErrorDetail|null */ protected $errorDetail; /** - * @var string + * + * + * @var string|null */ protected $status; /** - * @var string + * + * + * @var string|null */ protected $progress; /** - * @var ProgressDetail + * + * + * @var ProgressDetail|null */ protected $progressDetail; - /** - * @return string + * + * + * @return string|null */ - public function getId() + public function getId(): ?string { return $this->id; } - /** - * @param string $id + * + * + * @param string|null $id * * @return self */ - public function setId($id = null) + public function setId(?string $id): self { + $this->initialized['id'] = true; $this->id = $id; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getStream() + public function getStream(): ?string { return $this->stream; } - /** - * @param string $stream + * + * + * @param string|null $stream * * @return self */ - public function setStream($stream = null) + public function setStream(?string $stream): self { + $this->initialized['stream'] = true; $this->stream = $stream; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getError() + public function getError(): ?string { return $this->error; } - /** - * @param string $error + * + * + * @param string|null $error * * @return self */ - public function setError($error = null) + public function setError(?string $error): self { + $this->initialized['error'] = true; $this->error = $error; - return $this; } - /** - * @return ErrorDetail + * + * + * @return ErrorDetail|null */ - public function getErrorDetail() + public function getErrorDetail(): ?ErrorDetail { return $this->errorDetail; } - /** - * @param ErrorDetail $errorDetail + * + * + * @param ErrorDetail|null $errorDetail * * @return self */ - public function setErrorDetail(?ErrorDetail $errorDetail = null) + public function setErrorDetail(?ErrorDetail $errorDetail): self { + $this->initialized['errorDetail'] = true; $this->errorDetail = $errorDetail; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getStatus() + public function getStatus(): ?string { return $this->status; } - /** - * @param string $status + * + * + * @param string|null $status * * @return self */ - public function setStatus($status = null) + public function setStatus(?string $status): self { + $this->initialized['status'] = true; $this->status = $status; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getProgress() + public function getProgress(): ?string { return $this->progress; } - /** - * @param string $progress + * + * + * @param string|null $progress * * @return self */ - public function setProgress($progress = null) + public function setProgress(?string $progress): self { + $this->initialized['progress'] = true; $this->progress = $progress; - return $this; } - /** - * @return ProgressDetail + * + * + * @return ProgressDetail|null */ - public function getProgressDetail() + public function getProgressDetail(): ?ProgressDetail { return $this->progressDetail; } - /** - * @param ProgressDetail $progressDetail + * + * + * @param ProgressDetail|null $progressDetail * * @return self */ - public function setProgressDetail(?ProgressDetail $progressDetail = null) + public function setProgressDetail(?ProgressDetail $progressDetail): self { + $this->initialized['progressDetail'] = true; $this->progressDetail = $progressDetail; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/ClusterInfo.php b/generated/Model/ClusterInfo.php new file mode 100644 index 000000000..499be9e61 --- /dev/null +++ b/generated/Model/ClusterInfo.php @@ -0,0 +1,155 @@ +initialized); + } + /** + * The ID of the swarm. + * + * @var string|null + */ + protected $iD; + /** + * + * + * @var ClusterInfoVersion|null + */ + protected $version; + /** + * + * + * @var string|null + */ + protected $createdAt; + /** + * + * + * @var string|null + */ + protected $updatedAt; + /** + * User modifiable swarm configuration. + * + * @var SwarmSpec|null + */ + protected $spec; + /** + * The ID of the swarm. + * + * @return string|null + */ + public function getID(): ?string + { + return $this->iD; + } + /** + * The ID of the swarm. + * + * @param string|null $iD + * + * @return self + */ + public function setID(?string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + return $this; + } + /** + * + * + * @return ClusterInfoVersion|null + */ + public function getVersion(): ?ClusterInfoVersion + { + return $this->version; + } + /** + * + * + * @param ClusterInfoVersion|null $version + * + * @return self + */ + public function setVersion(?ClusterInfoVersion $version): self + { + $this->initialized['version'] = true; + $this->version = $version; + return $this; + } + /** + * + * + * @return string|null + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + /** + * + * + * @param string|null $createdAt + * + * @return self + */ + public function setCreatedAt(?string $createdAt): self + { + $this->initialized['createdAt'] = true; + $this->createdAt = $createdAt; + return $this; + } + /** + * + * + * @return string|null + */ + public function getUpdatedAt(): ?string + { + return $this->updatedAt; + } + /** + * + * + * @param string|null $updatedAt + * + * @return self + */ + public function setUpdatedAt(?string $updatedAt): self + { + $this->initialized['updatedAt'] = true; + $this->updatedAt = $updatedAt; + return $this; + } + /** + * User modifiable swarm configuration. + * + * @return SwarmSpec|null + */ + public function getSpec(): ?SwarmSpec + { + return $this->spec; + } + /** + * User modifiable swarm configuration. + * + * @param SwarmSpec|null $spec + * + * @return self + */ + public function setSpec(?SwarmSpec $spec): self + { + $this->initialized['spec'] = true; + $this->spec = $spec; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ClusterInfoVersion.php b/generated/Model/ClusterInfoVersion.php new file mode 100644 index 000000000..0805f7310 --- /dev/null +++ b/generated/Model/ClusterInfoVersion.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * + * + * @var int|null + */ + protected $index; + /** + * + * + * @return int|null + */ + public function getIndex(): ?int + { + return $this->index; + } + /** + * + * + * @param int|null $index + * + * @return self + */ + public function setIndex(?int $index): self + { + $this->initialized['index'] = true; + $this->index = $index; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/CommitResult.php b/generated/Model/CommitResult.php deleted file mode 100644 index fa6999373..000000000 --- a/generated/Model/CommitResult.php +++ /dev/null @@ -1,31 +0,0 @@ -id; - } - - /** - * @param string $id - * - * @return self - */ - public function setId($id = null) - { - $this->id = $id; - - return $this; - } -} diff --git a/generated/Model/Config.php b/generated/Model/Config.php new file mode 100644 index 000000000..996201214 --- /dev/null +++ b/generated/Model/Config.php @@ -0,0 +1,733 @@ +initialized); + } + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + * @var string|null + */ + protected $hostname; + /** + * The domain name to use for the container. + * + * @var string|null + */ + protected $domainname; + /** + * The user that commands are run as inside the container. + * + * @var string|null + */ + protected $user; + /** + * Whether to attach to `stdin`. + * + * @var bool|null + */ + protected $attachStdin = false; + /** + * Whether to attach to `stdout`. + * + * @var bool|null + */ + protected $attachStdout = true; + /** + * Whether to attach to `stderr`. + * + * @var bool|null + */ + protected $attachStderr = true; + /** + * An object mapping ports to an empty object in the form: + + `{"/": {}}` + + * + * @var array|null + */ + protected $exposedPorts; + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + * @var bool|null + */ + protected $tty = false; + /** + * Open `stdin` + * + * @var bool|null + */ + protected $openStdin = false; + /** + * Close `stdin` after one attached client disconnects + * + * @var bool|null + */ + protected $stdinOnce = false; + /** + * A list of environment variables to set inside the container in the form `["VAR=value", ...]` + * + * @var list|null + */ + protected $env; + /** + * Command to run specified as a string or an array of strings. + * + * @var list|string|null + */ + protected $cmd; + /** + * A test to perform to check that the container is healthy. + * + * @var ConfigHealthcheck|null + */ + protected $healthcheck; + /** + * Command is already escaped (Windows only) + * + * @var bool|null + */ + protected $argsEscaped; + /** + * The name of the image to use when creating the container + * + * @var string|null + */ + protected $image; + /** + * An object mapping mount point paths inside the container to empty objects. + * + * @var ConfigVolumes|null + */ + protected $volumes; + /** + * The working directory for commands to run in. + * + * @var string|null + */ + protected $workingDir; + /** + * The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + + * + * @var list|string|null + */ + protected $entrypoint; + /** + * Disable networking for the container. + * + * @var bool|null + */ + protected $networkDisabled; + /** + * MAC address of the container. + * + * @var string|null + */ + protected $macAddress; + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @var list|null + */ + protected $onBuild; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * Signal to stop a container as a string or unsigned integer. + * + * @var string|null + */ + protected $stopSignal = 'SIGTERM'; + /** + * Timeout to stop a container in seconds. + * + * @var int|null + */ + protected $stopTimeout = 10; + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @var list|null + */ + protected $shell; + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + * @return string|null + */ + public function getHostname(): ?string + { + return $this->hostname; + } + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + * @param string|null $hostname + * + * @return self + */ + public function setHostname(?string $hostname): self + { + $this->initialized['hostname'] = true; + $this->hostname = $hostname; + return $this; + } + /** + * The domain name to use for the container. + * + * @return string|null + */ + public function getDomainname(): ?string + { + return $this->domainname; + } + /** + * The domain name to use for the container. + * + * @param string|null $domainname + * + * @return self + */ + public function setDomainname(?string $domainname): self + { + $this->initialized['domainname'] = true; + $this->domainname = $domainname; + return $this; + } + /** + * The user that commands are run as inside the container. + * + * @return string|null + */ + public function getUser(): ?string + { + return $this->user; + } + /** + * The user that commands are run as inside the container. + * + * @param string|null $user + * + * @return self + */ + public function setUser(?string $user): self + { + $this->initialized['user'] = true; + $this->user = $user; + return $this; + } + /** + * Whether to attach to `stdin`. + * + * @return bool|null + */ + public function getAttachStdin(): ?bool + { + return $this->attachStdin; + } + /** + * Whether to attach to `stdin`. + * + * @param bool|null $attachStdin + * + * @return self + */ + public function setAttachStdin(?bool $attachStdin): self + { + $this->initialized['attachStdin'] = true; + $this->attachStdin = $attachStdin; + return $this; + } + /** + * Whether to attach to `stdout`. + * + * @return bool|null + */ + public function getAttachStdout(): ?bool + { + return $this->attachStdout; + } + /** + * Whether to attach to `stdout`. + * + * @param bool|null $attachStdout + * + * @return self + */ + public function setAttachStdout(?bool $attachStdout): self + { + $this->initialized['attachStdout'] = true; + $this->attachStdout = $attachStdout; + return $this; + } + /** + * Whether to attach to `stderr`. + * + * @return bool|null + */ + public function getAttachStderr(): ?bool + { + return $this->attachStderr; + } + /** + * Whether to attach to `stderr`. + * + * @param bool|null $attachStderr + * + * @return self + */ + public function setAttachStderr(?bool $attachStderr): self + { + $this->initialized['attachStderr'] = true; + $this->attachStderr = $attachStderr; + return $this; + } + /** + * An object mapping ports to an empty object in the form: + + `{"/": {}}` + + * + * @return array|null + */ + public function getExposedPorts(): ?iterable + { + return $this->exposedPorts; + } + /** + * An object mapping ports to an empty object in the form: + + `{"/": {}}` + + * + * @param array|null $exposedPorts + * + * @return self + */ + public function setExposedPorts(?iterable $exposedPorts): self + { + $this->initialized['exposedPorts'] = true; + $this->exposedPorts = $exposedPorts; + return $this; + } + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + * @return bool|null + */ + public function getTty(): ?bool + { + return $this->tty; + } + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + * @param bool|null $tty + * + * @return self + */ + public function setTty(?bool $tty): self + { + $this->initialized['tty'] = true; + $this->tty = $tty; + return $this; + } + /** + * Open `stdin` + * + * @return bool|null + */ + public function getOpenStdin(): ?bool + { + return $this->openStdin; + } + /** + * Open `stdin` + * + * @param bool|null $openStdin + * + * @return self + */ + public function setOpenStdin(?bool $openStdin): self + { + $this->initialized['openStdin'] = true; + $this->openStdin = $openStdin; + return $this; + } + /** + * Close `stdin` after one attached client disconnects + * + * @return bool|null + */ + public function getStdinOnce(): ?bool + { + return $this->stdinOnce; + } + /** + * Close `stdin` after one attached client disconnects + * + * @param bool|null $stdinOnce + * + * @return self + */ + public function setStdinOnce(?bool $stdinOnce): self + { + $this->initialized['stdinOnce'] = true; + $this->stdinOnce = $stdinOnce; + return $this; + } + /** + * A list of environment variables to set inside the container in the form `["VAR=value", ...]` + * + * @return list|null + */ + public function getEnv(): ?array + { + return $this->env; + } + /** + * A list of environment variables to set inside the container in the form `["VAR=value", ...]` + * + * @param list|null $env + * + * @return self + */ + public function setEnv(?array $env): self + { + $this->initialized['env'] = true; + $this->env = $env; + return $this; + } + /** + * Command to run specified as a string or an array of strings. + * + * @return list|string|null + */ + public function getCmd() + { + return $this->cmd; + } + /** + * Command to run specified as a string or an array of strings. + * + * @param list|string|null $cmd + * + * @return self + */ + public function setCmd($cmd): self + { + $this->initialized['cmd'] = true; + $this->cmd = $cmd; + return $this; + } + /** + * A test to perform to check that the container is healthy. + * + * @return ConfigHealthcheck|null + */ + public function getHealthcheck(): ?ConfigHealthcheck + { + return $this->healthcheck; + } + /** + * A test to perform to check that the container is healthy. + * + * @param ConfigHealthcheck|null $healthcheck + * + * @return self + */ + public function setHealthcheck(?ConfigHealthcheck $healthcheck): self + { + $this->initialized['healthcheck'] = true; + $this->healthcheck = $healthcheck; + return $this; + } + /** + * Command is already escaped (Windows only) + * + * @return bool|null + */ + public function getArgsEscaped(): ?bool + { + return $this->argsEscaped; + } + /** + * Command is already escaped (Windows only) + * + * @param bool|null $argsEscaped + * + * @return self + */ + public function setArgsEscaped(?bool $argsEscaped): self + { + $this->initialized['argsEscaped'] = true; + $this->argsEscaped = $argsEscaped; + return $this; + } + /** + * The name of the image to use when creating the container + * + * @return string|null + */ + public function getImage(): ?string + { + return $this->image; + } + /** + * The name of the image to use when creating the container + * + * @param string|null $image + * + * @return self + */ + public function setImage(?string $image): self + { + $this->initialized['image'] = true; + $this->image = $image; + return $this; + } + /** + * An object mapping mount point paths inside the container to empty objects. + * + * @return ConfigVolumes|null + */ + public function getVolumes(): ?ConfigVolumes + { + return $this->volumes; + } + /** + * An object mapping mount point paths inside the container to empty objects. + * + * @param ConfigVolumes|null $volumes + * + * @return self + */ + public function setVolumes(?ConfigVolumes $volumes): self + { + $this->initialized['volumes'] = true; + $this->volumes = $volumes; + return $this; + } + /** + * The working directory for commands to run in. + * + * @return string|null + */ + public function getWorkingDir(): ?string + { + return $this->workingDir; + } + /** + * The working directory for commands to run in. + * + * @param string|null $workingDir + * + * @return self + */ + public function setWorkingDir(?string $workingDir): self + { + $this->initialized['workingDir'] = true; + $this->workingDir = $workingDir; + return $this; + } + /** + * The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + + * + * @return list|string|null + */ + public function getEntrypoint() + { + return $this->entrypoint; + } + /** + * The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + + * + * @param list|string|null $entrypoint + * + * @return self + */ + public function setEntrypoint($entrypoint): self + { + $this->initialized['entrypoint'] = true; + $this->entrypoint = $entrypoint; + return $this; + } + /** + * Disable networking for the container. + * + * @return bool|null + */ + public function getNetworkDisabled(): ?bool + { + return $this->networkDisabled; + } + /** + * Disable networking for the container. + * + * @param bool|null $networkDisabled + * + * @return self + */ + public function setNetworkDisabled(?bool $networkDisabled): self + { + $this->initialized['networkDisabled'] = true; + $this->networkDisabled = $networkDisabled; + return $this; + } + /** + * MAC address of the container. + * + * @return string|null + */ + public function getMacAddress(): ?string + { + return $this->macAddress; + } + /** + * MAC address of the container. + * + * @param string|null $macAddress + * + * @return self + */ + public function setMacAddress(?string $macAddress): self + { + $this->initialized['macAddress'] = true; + $this->macAddress = $macAddress; + return $this; + } + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @return list|null + */ + public function getOnBuild(): ?array + { + return $this->onBuild; + } + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @param list|null $onBuild + * + * @return self + */ + public function setOnBuild(?array $onBuild): self + { + $this->initialized['onBuild'] = true; + $this->onBuild = $onBuild; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * Signal to stop a container as a string or unsigned integer. + * + * @return string|null + */ + public function getStopSignal(): ?string + { + return $this->stopSignal; + } + /** + * Signal to stop a container as a string or unsigned integer. + * + * @param string|null $stopSignal + * + * @return self + */ + public function setStopSignal(?string $stopSignal): self + { + $this->initialized['stopSignal'] = true; + $this->stopSignal = $stopSignal; + return $this; + } + /** + * Timeout to stop a container in seconds. + * + * @return int|null + */ + public function getStopTimeout(): ?int + { + return $this->stopTimeout; + } + /** + * Timeout to stop a container in seconds. + * + * @param int|null $stopTimeout + * + * @return self + */ + public function setStopTimeout(?int $stopTimeout): self + { + $this->initialized['stopTimeout'] = true; + $this->stopTimeout = $stopTimeout; + return $this; + } + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @return list|null + */ + public function getShell(): ?array + { + return $this->shell; + } + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @param list|null $shell + * + * @return self + */ + public function setShell(?array $shell): self + { + $this->initialized['shell'] = true; + $this->shell = $shell; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ConfigHealthcheck.php b/generated/Model/ConfigHealthcheck.php new file mode 100644 index 000000000..5bd183efb --- /dev/null +++ b/generated/Model/ConfigHealthcheck.php @@ -0,0 +1,145 @@ +initialized); + } + /** + * The test to perform. Possible values are: + + - `{}` inherit healthcheck from image or parent image + - `{"NONE"}` disable healthcheck + - `{"CMD", args...}` exec arguments directly + - `{"CMD-SHELL", command}` run command with system's default shell + + * + * @var list|null + */ + protected $test; + /** + * The time to wait between checks in nanoseconds. 0 means inherit. + * + * @var int|null + */ + protected $interval; + /** + * The time to wait before considering the check to have hung. 0 means inherit. + * + * @var int|null + */ + protected $timeout; + /** + * The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit. + * + * @var int|null + */ + protected $retries; + /** + * The test to perform. Possible values are: + + - `{}` inherit healthcheck from image or parent image + - `{"NONE"}` disable healthcheck + - `{"CMD", args...}` exec arguments directly + - `{"CMD-SHELL", command}` run command with system's default shell + + * + * @return list|null + */ + public function getTest(): ?array + { + return $this->test; + } + /** + * The test to perform. Possible values are: + + - `{}` inherit healthcheck from image or parent image + - `{"NONE"}` disable healthcheck + - `{"CMD", args...}` exec arguments directly + - `{"CMD-SHELL", command}` run command with system's default shell + + * + * @param list|null $test + * + * @return self + */ + public function setTest(?array $test): self + { + $this->initialized['test'] = true; + $this->test = $test; + return $this; + } + /** + * The time to wait between checks in nanoseconds. 0 means inherit. + * + * @return int|null + */ + public function getInterval(): ?int + { + return $this->interval; + } + /** + * The time to wait between checks in nanoseconds. 0 means inherit. + * + * @param int|null $interval + * + * @return self + */ + public function setInterval(?int $interval): self + { + $this->initialized['interval'] = true; + $this->interval = $interval; + return $this; + } + /** + * The time to wait before considering the check to have hung. 0 means inherit. + * + * @return int|null + */ + public function getTimeout(): ?int + { + return $this->timeout; + } + /** + * The time to wait before considering the check to have hung. 0 means inherit. + * + * @param int|null $timeout + * + * @return self + */ + public function setTimeout(?int $timeout): self + { + $this->initialized['timeout'] = true; + $this->timeout = $timeout; + return $this; + } + /** + * The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit. + * + * @return int|null + */ + public function getRetries(): ?int + { + return $this->retries; + } + /** + * The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit. + * + * @param int|null $retries + * + * @return self + */ + public function setRetries(?int $retries): self + { + $this->initialized['retries'] = true; + $this->retries = $retries; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ConfigVolumes.php b/generated/Model/ConfigVolumes.php new file mode 100644 index 000000000..b7b64e511 --- /dev/null +++ b/generated/Model/ConfigVolumes.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * + * + * @var mixed|null + */ + protected $additionalProperties; + /** + * + * + * @return mixed + */ + public function getAdditionalProperties() + { + return $this->additionalProperties; + } + /** + * + * + * @param mixed $additionalProperties + * + * @return self + */ + public function setAdditionalProperties($additionalProperties): self + { + $this->initialized['additionalProperties'] = true; + $this->additionalProperties = $additionalProperties; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Container.php b/generated/Model/Container.php deleted file mode 100644 index aeb6a67e9..000000000 --- a/generated/Model/Container.php +++ /dev/null @@ -1,535 +0,0 @@ -appArmorProfile; - } - - /** - * @param string $appArmorProfile - * - * @return self - */ - public function setAppArmorProfile($appArmorProfile = null) - { - $this->appArmorProfile = $appArmorProfile; - - return $this; - } - - /** - * @return string[]|null - */ - public function getArgs() - { - return $this->args; - } - - /** - * @param string[]|null $args - * - * @return self - */ - public function setArgs($args = null) - { - $this->args = $args; - - return $this; - } - - /** - * @return ContainerConfig - */ - public function getConfig() - { - return $this->config; - } - - /** - * @param ContainerConfig $config - * - * @return self - */ - public function setConfig(?ContainerConfig $config = null) - { - $this->config = $config; - - return $this; - } - - /** - * @return string - */ - public function getCreated() - { - return $this->created; - } - - /** - * @param string $created - * - * @return self - */ - public function setCreated($created = null) - { - $this->created = $created; - - return $this; - } - - /** - * @return string - */ - public function getDriver() - { - return $this->driver; - } - - /** - * @param string $driver - * - * @return self - */ - public function setDriver($driver = null) - { - $this->driver = $driver; - - return $this; - } - - /** - * @return string - */ - public function getExecDriver() - { - return $this->execDriver; - } - - /** - * @param string $execDriver - * - * @return self - */ - public function setExecDriver($execDriver = null) - { - $this->execDriver = $execDriver; - - return $this; - } - - /** - * @return string - */ - public function getExecIDs() - { - return $this->execIDs; - } - - /** - * @param string $execIDs - * - * @return self - */ - public function setExecIDs($execIDs = null) - { - $this->execIDs = $execIDs; - - return $this; - } - - /** - * @return HostConfig - */ - public function getHostConfig() - { - return $this->hostConfig; - } - - /** - * @param HostConfig $hostConfig - * - * @return self - */ - public function setHostConfig(?HostConfig $hostConfig = null) - { - $this->hostConfig = $hostConfig; - - return $this; - } - - /** - * @return string - */ - public function getHostnamePath() - { - return $this->hostnamePath; - } - - /** - * @param string $hostnamePath - * - * @return self - */ - public function setHostnamePath($hostnamePath = null) - { - $this->hostnamePath = $hostnamePath; - - return $this; - } - - /** - * @return string - */ - public function getHostsPath() - { - return $this->hostsPath; - } - - /** - * @param string $hostsPath - * - * @return self - */ - public function setHostsPath($hostsPath = null) - { - $this->hostsPath = $hostsPath; - - return $this; - } - - /** - * @return string - */ - public function getLogPath() - { - return $this->logPath; - } - - /** - * @param string $logPath - * - * @return self - */ - public function setLogPath($logPath = null) - { - $this->logPath = $logPath; - - return $this; - } - - /** - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * @param string $id - * - * @return self - */ - public function setId($id = null) - { - $this->id = $id; - - return $this; - } - - /** - * @return string - */ - public function getImage() - { - return $this->image; - } - - /** - * @param string $image - * - * @return self - */ - public function setImage($image = null) - { - $this->image = $image; - - return $this; - } - - /** - * @return string - */ - public function getMountLabel() - { - return $this->mountLabel; - } - - /** - * @param string $mountLabel - * - * @return self - */ - public function setMountLabel($mountLabel = null) - { - $this->mountLabel = $mountLabel; - - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } - - /** - * @return NetworkConfig - */ - public function getNetworkSettings() - { - return $this->networkSettings; - } - - /** - * @param NetworkConfig $networkSettings - * - * @return self - */ - public function setNetworkSettings(?NetworkConfig $networkSettings = null) - { - $this->networkSettings = $networkSettings; - - return $this; - } - - /** - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * @param string $path - * - * @return self - */ - public function setPath($path = null) - { - $this->path = $path; - - return $this; - } - - /** - * @return string - */ - public function getProcessLabel() - { - return $this->processLabel; - } - - /** - * @param string $processLabel - * - * @return self - */ - public function setProcessLabel($processLabel = null) - { - $this->processLabel = $processLabel; - - return $this; - } - - /** - * @return string - */ - public function getResolvConfPath() - { - return $this->resolvConfPath; - } - - /** - * @param string $resolvConfPath - * - * @return self - */ - public function setResolvConfPath($resolvConfPath = null) - { - $this->resolvConfPath = $resolvConfPath; - - return $this; - } - - /** - * @return int - */ - public function getRestartCount() - { - return $this->restartCount; - } - - /** - * @param int $restartCount - * - * @return self - */ - public function setRestartCount($restartCount = null) - { - $this->restartCount = $restartCount; - - return $this; - } - - /** - * @return ContainerState - */ - public function getState() - { - return $this->state; - } - - /** - * @param ContainerState $state - * - * @return self - */ - public function setState(?ContainerState $state = null) - { - $this->state = $state; - - return $this; - } - - /** - * @return Mount[]|null - */ - public function getMounts() - { - return $this->mounts; - } - - /** - * @param Mount[]|null $mounts - * - * @return self - */ - public function setMounts($mounts = null) - { - $this->mounts = $mounts; - - return $this; - } -} diff --git a/generated/Model/ContainerChange.php b/generated/Model/ContainerChange.php deleted file mode 100644 index 0756004bb..000000000 --- a/generated/Model/ContainerChange.php +++ /dev/null @@ -1,55 +0,0 @@ -path; - } - - /** - * @param string $path - * - * @return self - */ - public function setPath($path = null) - { - $this->path = $path; - - return $this; - } - - /** - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * @param int $kind - * - * @return self - */ - public function setKind($kind = null) - { - $this->kind = $kind; - - return $this; - } -} diff --git a/generated/Model/ContainerConfig.php b/generated/Model/ContainerConfig.php deleted file mode 100644 index f8710408c..000000000 --- a/generated/Model/ContainerConfig.php +++ /dev/null @@ -1,535 +0,0 @@ -hostname; - } - - /** - * @param string $hostname - * - * @return self - */ - public function setHostname($hostname = null) - { - $this->hostname = $hostname; - - return $this; - } - - /** - * @return string - */ - public function getDomainname() - { - return $this->domainname; - } - - /** - * @param string $domainname - * - * @return self - */ - public function setDomainname($domainname = null) - { - $this->domainname = $domainname; - - return $this; - } - - /** - * @return string - */ - public function getUser() - { - return $this->user; - } - - /** - * @param string $user - * - * @return self - */ - public function setUser($user = null) - { - $this->user = $user; - - return $this; - } - - /** - * @return bool - */ - public function getAttachStdin() - { - return $this->attachStdin; - } - - /** - * @param bool $attachStdin - * - * @return self - */ - public function setAttachStdin($attachStdin = null) - { - $this->attachStdin = $attachStdin; - - return $this; - } - - /** - * @return bool - */ - public function getAttachStdout() - { - return $this->attachStdout; - } - - /** - * @param bool $attachStdout - * - * @return self - */ - public function setAttachStdout($attachStdout = null) - { - $this->attachStdout = $attachStdout; - - return $this; - } - - /** - * @return bool - */ - public function getAttachStderr() - { - return $this->attachStderr; - } - - /** - * @param bool $attachStderr - * - * @return self - */ - public function setAttachStderr($attachStderr = null) - { - $this->attachStderr = $attachStderr; - - return $this; - } - - /** - * @return bool - */ - public function getTty() - { - return $this->tty; - } - - /** - * @param bool $tty - * - * @return self - */ - public function setTty($tty = null) - { - $this->tty = $tty; - - return $this; - } - - /** - * @return bool - */ - public function getOpenStdin() - { - return $this->openStdin; - } - - /** - * @param bool $openStdin - * - * @return self - */ - public function setOpenStdin($openStdin = null) - { - $this->openStdin = $openStdin; - - return $this; - } - - /** - * @return bool - */ - public function getStdinOnce() - { - return $this->stdinOnce; - } - - /** - * @param bool $stdinOnce - * - * @return self - */ - public function setStdinOnce($stdinOnce = null) - { - $this->stdinOnce = $stdinOnce; - - return $this; - } - - /** - * @return string[]|null - */ - public function getEnv() - { - return $this->env; - } - - /** - * @param string[]|null $env - * - * @return self - */ - public function setEnv($env = null) - { - $this->env = $env; - - return $this; - } - - /** - * @return string[]|string - */ - public function getCmd() - { - return $this->cmd; - } - - /** - * @param string[]|string $cmd - * - * @return self - */ - public function setCmd($cmd = null) - { - $this->cmd = $cmd; - - return $this; - } - - /** - * @return string[]|string - */ - public function getEntrypoint() - { - return $this->entrypoint; - } - - /** - * @param string[]|string $entrypoint - * - * @return self - */ - public function setEntrypoint($entrypoint = null) - { - $this->entrypoint = $entrypoint; - - return $this; - } - - /** - * @return string - */ - public function getImage() - { - return $this->image; - } - - /** - * @param string $image - * - * @return self - */ - public function setImage($image = null) - { - $this->image = $image; - - return $this; - } - - /** - * @return string[]|null - */ - public function getLabels() - { - return $this->labels; - } - - /** - * @param string[]|null $labels - * - * @return self - */ - public function setLabels($labels = null) - { - $this->labels = $labels; - - return $this; - } - - /** - * @return mixed[]|null - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * @param mixed[]|null $volumes - * - * @return self - */ - public function setVolumes($volumes = null) - { - $this->volumes = $volumes; - - return $this; - } - - /** - * @return string - */ - public function getWorkingDir() - { - return $this->workingDir; - } - - /** - * @param string $workingDir - * - * @return self - */ - public function setWorkingDir($workingDir = null) - { - $this->workingDir = $workingDir; - - return $this; - } - - /** - * @return bool - */ - public function getNetworkDisabled() - { - return $this->networkDisabled; - } - - /** - * @param bool $networkDisabled - * - * @return self - */ - public function setNetworkDisabled($networkDisabled = null) - { - $this->networkDisabled = $networkDisabled; - - return $this; - } - - /** - * @return string - */ - public function getMacAddress() - { - return $this->macAddress; - } - - /** - * @param string $macAddress - * - * @return self - */ - public function setMacAddress($macAddress = null) - { - $this->macAddress = $macAddress; - - return $this; - } - - /** - * @return mixed[]|null - */ - public function getExposedPorts() - { - return $this->exposedPorts; - } - - /** - * @param mixed[]|null $exposedPorts - * - * @return self - */ - public function setExposedPorts($exposedPorts = null) - { - $this->exposedPorts = $exposedPorts; - - return $this; - } - - /** - * @return string - */ - public function getStopSignal() - { - return $this->stopSignal; - } - - /** - * @param string $stopSignal - * - * @return self - */ - public function setStopSignal($stopSignal = null) - { - $this->stopSignal = $stopSignal; - - return $this; - } - - /** - * @return HostConfig - */ - public function getHostConfig() - { - return $this->hostConfig; - } - - /** - * @param HostConfig $hostConfig - * - * @return self - */ - public function setHostConfig(?HostConfig $hostConfig = null) - { - $this->hostConfig = $hostConfig; - - return $this; - } - - /** - * @return NetworkingConfig - */ - public function getNetworkingConfig() - { - return $this->networkingConfig; - } - - /** - * @param NetworkingConfig $networkingConfig - * - * @return self - */ - public function setNetworkingConfig(?NetworkingConfig $networkingConfig = null) - { - $this->networkingConfig = $networkingConfig; - - return $this; - } -} diff --git a/generated/Model/ContainerConnect.php b/generated/Model/ContainerConnect.php deleted file mode 100644 index aee79143c..000000000 --- a/generated/Model/ContainerConnect.php +++ /dev/null @@ -1,55 +0,0 @@ -container; - } - - /** - * @param string $container - * - * @return self - */ - public function setContainer($container = null) - { - $this->container = $container; - - return $this; - } - - /** - * @return EndpointConfig[] - */ - public function getEndpointConfig() - { - return $this->endpointConfig; - } - - /** - * @param EndpointConfig[] $endpointConfig - * - * @return self - */ - public function setEndpointConfig(?\ArrayObject $endpointConfig = null) - { - $this->endpointConfig = $endpointConfig; - - return $this; - } -} diff --git a/generated/Model/ContainerCreateResult.php b/generated/Model/ContainerCreateResult.php deleted file mode 100644 index c3fb9a050..000000000 --- a/generated/Model/ContainerCreateResult.php +++ /dev/null @@ -1,55 +0,0 @@ -id; - } - - /** - * @param string $id - * - * @return self - */ - public function setId($id = null) - { - $this->id = $id; - - return $this; - } - - /** - * @return string[]|null - */ - public function getWarnings() - { - return $this->warnings; - } - - /** - * @param string[]|null $warnings - * - * @return self - */ - public function setWarnings($warnings = null) - { - $this->warnings = $warnings; - - return $this; - } -} diff --git a/generated/Model/ContainerDisconnect.php b/generated/Model/ContainerDisconnect.php deleted file mode 100644 index 3a857e28d..000000000 --- a/generated/Model/ContainerDisconnect.php +++ /dev/null @@ -1,55 +0,0 @@ -container; - } - - /** - * @param string $container - * - * @return self - */ - public function setContainer($container = null) - { - $this->container = $container; - - return $this; - } - - /** - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * @param bool $force - * - * @return self - */ - public function setForce($force = null) - { - $this->force = $force; - - return $this; - } -} diff --git a/generated/Model/ContainerInfo.php b/generated/Model/ContainerInfo.php deleted file mode 100644 index 001eac176..000000000 --- a/generated/Model/ContainerInfo.php +++ /dev/null @@ -1,391 +0,0 @@ -id; - } - - /** - * @param string $id - * - * @return self - */ - public function setId($id = null) - { - $this->id = $id; - - return $this; - } - - /** - * @return string[]|null - */ - public function getNames() - { - return $this->names; - } - - /** - * @param string[]|null $names - * - * @return self - */ - public function setNames($names = null) - { - $this->names = $names; - - return $this; - } - - /** - * @return string - */ - public function getImage() - { - return $this->image; - } - - /** - * @param string $image - * - * @return self - */ - public function setImage($image = null) - { - $this->image = $image; - - return $this; - } - - /** - * @return string - */ - public function getImageID() - { - return $this->imageID; - } - - /** - * @param string $imageID - * - * @return self - */ - public function setImageID($imageID = null) - { - $this->imageID = $imageID; - - return $this; - } - - /** - * @return string - */ - public function getCommand() - { - return $this->command; - } - - /** - * @param string $command - * - * @return self - */ - public function setCommand($command = null) - { - $this->command = $command; - - return $this; - } - - /** - * @return int - */ - public function getCreated() - { - return $this->created; - } - - /** - * @param int $created - * - * @return self - */ - public function setCreated($created = null) - { - $this->created = $created; - - return $this; - } - - /** - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * @param string $state - * - * @return self - */ - public function setState($state = null) - { - $this->state = $state; - - return $this; - } - - /** - * @return string - */ - public function getStatus() - { - return $this->status; - } - - /** - * @param string $status - * - * @return self - */ - public function setStatus($status = null) - { - $this->status = $status; - - return $this; - } - - /** - * @return Port[]|null - */ - public function getPorts() - { - return $this->ports; - } - - /** - * @param Port[]|null $ports - * - * @return self - */ - public function setPorts($ports = null) - { - $this->ports = $ports; - - return $this; - } - - /** - * @return string[]|null - */ - public function getLabels() - { - return $this->labels; - } - - /** - * @param string[]|null $labels - * - * @return self - */ - public function setLabels($labels = null) - { - $this->labels = $labels; - - return $this; - } - - /** - * @return int - */ - public function getSizeRw() - { - return $this->sizeRw; - } - - /** - * @param int $sizeRw - * - * @return self - */ - public function setSizeRw($sizeRw = null) - { - $this->sizeRw = $sizeRw; - - return $this; - } - - /** - * @return int - */ - public function getSizeRootFs() - { - return $this->sizeRootFs; - } - - /** - * @param int $sizeRootFs - * - * @return self - */ - public function setSizeRootFs($sizeRootFs = null) - { - $this->sizeRootFs = $sizeRootFs; - - return $this; - } - - /** - * @return HostConfig - */ - public function getHostConfig() - { - return $this->hostConfig; - } - - /** - * @param HostConfig $hostConfig - * - * @return self - */ - public function setHostConfig(?HostConfig $hostConfig = null) - { - $this->hostConfig = $hostConfig; - - return $this; - } - - /** - * @return NetworkConfig - */ - public function getNetworkSettings() - { - return $this->networkSettings; - } - - /** - * @param NetworkConfig $networkSettings - * - * @return self - */ - public function setNetworkSettings(?NetworkConfig $networkSettings = null) - { - $this->networkSettings = $networkSettings; - - return $this; - } - - /** - * @return Mount[]|null - */ - public function getMounts() - { - return $this->mounts; - } - - /** - * @param Mount[]|null $mounts - * - * @return self - */ - public function setMounts($mounts = null) - { - $this->mounts = $mounts; - - return $this; - } - - /** - * @return ContainerNode - */ - public function getNode() - { - return $this->node; - } - - /** - * @param ContainerNode $node - * - * @return self - */ - public function setNode(?ContainerNode $node = null) - { - $this->node = $node; - - return $this; - } -} diff --git a/generated/Model/ContainerNetwork.php b/generated/Model/ContainerNetwork.php deleted file mode 100644 index 905c95c53..000000000 --- a/generated/Model/ContainerNetwork.php +++ /dev/null @@ -1,223 +0,0 @@ -networkID; - } - - /** - * @param string $networkID - * - * @return self - */ - public function setNetworkID($networkID = null) - { - $this->networkID = $networkID; - - return $this; - } - - /** - * @return string - */ - public function getEndpointID() - { - return $this->endpointID; - } - - /** - * @param string $endpointID - * - * @return self - */ - public function setEndpointID($endpointID = null) - { - $this->endpointID = $endpointID; - - return $this; - } - - /** - * @return string - */ - public function getGateway() - { - return $this->gateway; - } - - /** - * @param string $gateway - * - * @return self - */ - public function setGateway($gateway = null) - { - $this->gateway = $gateway; - - return $this; - } - - /** - * @return string - */ - public function getIPAddress() - { - return $this->iPAddress; - } - - /** - * @param string $iPAddress - * - * @return self - */ - public function setIPAddress($iPAddress = null) - { - $this->iPAddress = $iPAddress; - - return $this; - } - - /** - * @return int - */ - public function getIPPrefixLen() - { - return $this->iPPrefixLen; - } - - /** - * @param int $iPPrefixLen - * - * @return self - */ - public function setIPPrefixLen($iPPrefixLen = null) - { - $this->iPPrefixLen = $iPPrefixLen; - - return $this; - } - - /** - * @return string - */ - public function getIPv6Gateway() - { - return $this->iPv6Gateway; - } - - /** - * @param string $iPv6Gateway - * - * @return self - */ - public function setIPv6Gateway($iPv6Gateway = null) - { - $this->iPv6Gateway = $iPv6Gateway; - - return $this; - } - - /** - * @return string - */ - public function getGlobalIPv6Address() - { - return $this->globalIPv6Address; - } - - /** - * @param string $globalIPv6Address - * - * @return self - */ - public function setGlobalIPv6Address($globalIPv6Address = null) - { - $this->globalIPv6Address = $globalIPv6Address; - - return $this; - } - - /** - * @return int - */ - public function getGlobalIPv6PrefixLen() - { - return $this->globalIPv6PrefixLen; - } - - /** - * @param int $globalIPv6PrefixLen - * - * @return self - */ - public function setGlobalIPv6PrefixLen($globalIPv6PrefixLen = null) - { - $this->globalIPv6PrefixLen = $globalIPv6PrefixLen; - - return $this; - } - - /** - * @return string - */ - public function getMacAddress() - { - return $this->macAddress; - } - - /** - * @param string $macAddress - * - * @return self - */ - public function setMacAddress($macAddress = null) - { - $this->macAddress = $macAddress; - - return $this; - } -} diff --git a/generated/Model/ContainerNode.php b/generated/Model/ContainerNode.php deleted file mode 100644 index ce9398d7b..000000000 --- a/generated/Model/ContainerNode.php +++ /dev/null @@ -1,103 +0,0 @@ -id; - } - - /** - * @param string $id - * - * @return self - */ - public function setId($id = null) - { - $this->id = $id; - - return $this; - } - - /** - * @return string - */ - public function getIp() - { - return $this->ip; - } - - /** - * @param string $ip - * - * @return self - */ - public function setIp($ip = null) - { - $this->ip = $ip; - - return $this; - } - - /** - * @return string - */ - public function getAddr() - { - return $this->addr; - } - - /** - * @param string $addr - * - * @return self - */ - public function setAddr($addr = null) - { - $this->addr = $addr; - - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } -} diff --git a/generated/Model/ContainerSpec.php b/generated/Model/ContainerSpec.php deleted file mode 100644 index b9fe015e0..000000000 --- a/generated/Model/ContainerSpec.php +++ /dev/null @@ -1,223 +0,0 @@ -image; - } - - /** - * @param string $image - * - * @return self - */ - public function setImage($image = null) - { - $this->image = $image; - - return $this; - } - - /** - * @return string[]|null - */ - public function getLabels() - { - return $this->labels; - } - - /** - * @param string[]|null $labels - * - * @return self - */ - public function setLabels($labels = null) - { - $this->labels = $labels; - - return $this; - } - - /** - * @return string[]|null - */ - public function getCommand() - { - return $this->command; - } - - /** - * @param string[]|null $command - * - * @return self - */ - public function setCommand($command = null) - { - $this->command = $command; - - return $this; - } - - /** - * @return string[]|null - */ - public function getArgs() - { - return $this->args; - } - - /** - * @param string[]|null $args - * - * @return self - */ - public function setArgs($args = null) - { - $this->args = $args; - - return $this; - } - - /** - * @return string[]|null - */ - public function getEnv() - { - return $this->env; - } - - /** - * @param string[]|null $env - * - * @return self - */ - public function setEnv($env = null) - { - $this->env = $env; - - return $this; - } - - /** - * @return string - */ - public function getDir() - { - return $this->dir; - } - - /** - * @param string $dir - * - * @return self - */ - public function setDir($dir = null) - { - $this->dir = $dir; - - return $this; - } - - /** - * @return string - */ - public function getUser() - { - return $this->user; - } - - /** - * @param string $user - * - * @return self - */ - public function setUser($user = null) - { - $this->user = $user; - - return $this; - } - - /** - * @return ContainerSpecMount[]|null - */ - public function getMounts() - { - return $this->mounts; - } - - /** - * @param ContainerSpecMount[]|null $mounts - * - * @return self - */ - public function setMounts($mounts = null) - { - $this->mounts = $mounts; - - return $this; - } - - /** - * @return int - */ - public function getStopGracePeriod() - { - return $this->stopGracePeriod; - } - - /** - * @param int $stopGracePeriod - * - * @return self - */ - public function setStopGracePeriod($stopGracePeriod = null) - { - $this->stopGracePeriod = $stopGracePeriod; - - return $this; - } -} diff --git a/generated/Model/ContainerSpecMount.php b/generated/Model/ContainerSpecMount.php deleted file mode 100644 index 24568eb98..000000000 --- a/generated/Model/ContainerSpecMount.php +++ /dev/null @@ -1,151 +0,0 @@ -type; - } - - /** - * @param string $type - * - * @return self - */ - public function setType($type = null) - { - $this->type = $type; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * @param string $source - * - * @return self - */ - public function setSource($source = null) - { - $this->source = $source; - - return $this; - } - - /** - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * @param string $target - * - * @return self - */ - public function setTarget($target = null) - { - $this->target = $target; - - return $this; - } - - /** - * @return bool - */ - public function getReadOnly() - { - return $this->readOnly; - } - - /** - * @param bool $readOnly - * - * @return self - */ - public function setReadOnly($readOnly = null) - { - $this->readOnly = $readOnly; - - return $this; - } - - /** - * @return ContainerSpecMountBindOptions - */ - public function getBindOptions() - { - return $this->bindOptions; - } - - /** - * @param ContainerSpecMountBindOptions $bindOptions - * - * @return self - */ - public function setBindOptions(?ContainerSpecMountBindOptions $bindOptions = null) - { - $this->bindOptions = $bindOptions; - - return $this; - } - - /** - * @return ContainerSpecMountVolumeOptions - */ - public function getVolumeOptions() - { - return $this->volumeOptions; - } - - /** - * @param ContainerSpecMountVolumeOptions $volumeOptions - * - * @return self - */ - public function setVolumeOptions(?ContainerSpecMountVolumeOptions $volumeOptions = null) - { - $this->volumeOptions = $volumeOptions; - - return $this; - } -} diff --git a/generated/Model/ContainerSpecMountBindOptions.php b/generated/Model/ContainerSpecMountBindOptions.php deleted file mode 100644 index 4256dddb1..000000000 --- a/generated/Model/ContainerSpecMountBindOptions.php +++ /dev/null @@ -1,31 +0,0 @@ -propagation; - } - - /** - * @param string $propagation - * - * @return self - */ - public function setPropagation($propagation = null) - { - $this->propagation = $propagation; - - return $this; - } -} diff --git a/generated/Model/ContainerSpecMountVolumeOptions.php b/generated/Model/ContainerSpecMountVolumeOptions.php deleted file mode 100644 index 72e7f0d32..000000000 --- a/generated/Model/ContainerSpecMountVolumeOptions.php +++ /dev/null @@ -1,79 +0,0 @@ -noCopy; - } - - /** - * @param bool $noCopy - * - * @return self - */ - public function setNoCopy($noCopy = null) - { - $this->noCopy = $noCopy; - - return $this; - } - - /** - * @return string[]|null - */ - public function getLabels() - { - return $this->labels; - } - - /** - * @param string[]|null $labels - * - * @return self - */ - public function setLabels($labels = null) - { - $this->labels = $labels; - - return $this; - } - - /** - * @return Driver - */ - public function getDriverConfig() - { - return $this->driverConfig; - } - - /** - * @param Driver $driverConfig - * - * @return self - */ - public function setDriverConfig(?Driver $driverConfig = null) - { - $this->driverConfig = $driverConfig; - - return $this; - } -} diff --git a/generated/Model/ContainerState.php b/generated/Model/ContainerState.php deleted file mode 100644 index e52315913..000000000 --- a/generated/Model/ContainerState.php +++ /dev/null @@ -1,223 +0,0 @@ -error; - } - - /** - * @param string $error - * - * @return self - */ - public function setError($error = null) - { - $this->error = $error; - - return $this; - } - - /** - * @return int - */ - public function getExitCode() - { - return $this->exitCode; - } - - /** - * @param int $exitCode - * - * @return self - */ - public function setExitCode($exitCode = null) - { - $this->exitCode = $exitCode; - - return $this; - } - - /** - * @return string - */ - public function getFinishedAt() - { - return $this->finishedAt; - } - - /** - * @param string $finishedAt - * - * @return self - */ - public function setFinishedAt($finishedAt = null) - { - $this->finishedAt = $finishedAt; - - return $this; - } - - /** - * @return bool - */ - public function getOOMKilled() - { - return $this->oOMKilled; - } - - /** - * @param bool $oOMKilled - * - * @return self - */ - public function setOOMKilled($oOMKilled = null) - { - $this->oOMKilled = $oOMKilled; - - return $this; - } - - /** - * @return bool - */ - public function getPaused() - { - return $this->paused; - } - - /** - * @param bool $paused - * - * @return self - */ - public function setPaused($paused = null) - { - $this->paused = $paused; - - return $this; - } - - /** - * @return int - */ - public function getPid() - { - return $this->pid; - } - - /** - * @param int $pid - * - * @return self - */ - public function setPid($pid = null) - { - $this->pid = $pid; - - return $this; - } - - /** - * @return bool - */ - public function getRestarting() - { - return $this->restarting; - } - - /** - * @param bool $restarting - * - * @return self - */ - public function setRestarting($restarting = null) - { - $this->restarting = $restarting; - - return $this; - } - - /** - * @return bool - */ - public function getRunning() - { - return $this->running; - } - - /** - * @param bool $running - * - * @return self - */ - public function setRunning($running = null) - { - $this->running = $running; - - return $this; - } - - /** - * @return string - */ - public function getStartedAt() - { - return $this->startedAt; - } - - /** - * @param string $startedAt - * - * @return self - */ - public function setStartedAt($startedAt = null) - { - $this->startedAt = $startedAt; - - return $this; - } -} diff --git a/generated/Model/ContainerStatus.php b/generated/Model/ContainerStatus.php deleted file mode 100644 index 05c529f12..000000000 --- a/generated/Model/ContainerStatus.php +++ /dev/null @@ -1,79 +0,0 @@ -containerID; - } - - /** - * @param string $containerID - * - * @return self - */ - public function setContainerID($containerID = null) - { - $this->containerID = $containerID; - - return $this; - } - - /** - * @return int - */ - public function getPID() - { - return $this->pID; - } - - /** - * @param int $pID - * - * @return self - */ - public function setPID($pID = null) - { - $this->pID = $pID; - - return $this; - } - - /** - * @return int - */ - public function getExitCode() - { - return $this->exitCode; - } - - /** - * @param int $exitCode - * - * @return self - */ - public function setExitCode($exitCode = null) - { - $this->exitCode = $exitCode; - - return $this; - } -} diff --git a/generated/Model/ContainerSummaryItem.php b/generated/Model/ContainerSummaryItem.php new file mode 100644 index 000000000..54d886f25 --- /dev/null +++ b/generated/Model/ContainerSummaryItem.php @@ -0,0 +1,435 @@ +initialized); + } + /** + * The ID of this container + * + * @var string|null + */ + protected $id; + /** + * The names that this container has been given + * + * @var list|null + */ + protected $names; + /** + * The name of the image used when creating this container + * + * @var string|null + */ + protected $image; + /** + * The ID of the image that this container was created from + * + * @var string|null + */ + protected $imageID; + /** + * Command to run when starting the container + * + * @var string|null + */ + protected $command; + /** + * When the container was created + * + * @var int|null + */ + protected $created; + /** + * The ports exposed by this container + * + * @var list|null + */ + protected $ports; + /** + * The size of files that have been created or changed by this container + * + * @var int|null + */ + protected $sizeRw; + /** + * The total size of all the files in this container + * + * @var int|null + */ + protected $sizeRootFs; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * The state of this container (e.g. `Exited`) + * + * @var string|null + */ + protected $state; + /** + * Additional human-readable status of this container (e.g. `Exit 0`) + * + * @var string|null + */ + protected $status; + /** + * + * + * @var ContainerSummaryItemHostConfig|null + */ + protected $hostConfig; + /** + * A summary of the container's network settings + * + * @var ContainerSummaryItemNetworkSettings|null + */ + protected $networkSettings; + /** + * + * + * @var list|null + */ + protected $mounts; + /** + * The ID of this container + * + * @return string|null + */ + public function getId(): ?string + { + return $this->id; + } + /** + * The ID of this container + * + * @param string|null $id + * + * @return self + */ + public function setId(?string $id): self + { + $this->initialized['id'] = true; + $this->id = $id; + return $this; + } + /** + * The names that this container has been given + * + * @return list|null + */ + public function getNames(): ?array + { + return $this->names; + } + /** + * The names that this container has been given + * + * @param list|null $names + * + * @return self + */ + public function setNames(?array $names): self + { + $this->initialized['names'] = true; + $this->names = $names; + return $this; + } + /** + * The name of the image used when creating this container + * + * @return string|null + */ + public function getImage(): ?string + { + return $this->image; + } + /** + * The name of the image used when creating this container + * + * @param string|null $image + * + * @return self + */ + public function setImage(?string $image): self + { + $this->initialized['image'] = true; + $this->image = $image; + return $this; + } + /** + * The ID of the image that this container was created from + * + * @return string|null + */ + public function getImageID(): ?string + { + return $this->imageID; + } + /** + * The ID of the image that this container was created from + * + * @param string|null $imageID + * + * @return self + */ + public function setImageID(?string $imageID): self + { + $this->initialized['imageID'] = true; + $this->imageID = $imageID; + return $this; + } + /** + * Command to run when starting the container + * + * @return string|null + */ + public function getCommand(): ?string + { + return $this->command; + } + /** + * Command to run when starting the container + * + * @param string|null $command + * + * @return self + */ + public function setCommand(?string $command): self + { + $this->initialized['command'] = true; + $this->command = $command; + return $this; + } + /** + * When the container was created + * + * @return int|null + */ + public function getCreated(): ?int + { + return $this->created; + } + /** + * When the container was created + * + * @param int|null $created + * + * @return self + */ + public function setCreated(?int $created): self + { + $this->initialized['created'] = true; + $this->created = $created; + return $this; + } + /** + * The ports exposed by this container + * + * @return list|null + */ + public function getPorts(): ?array + { + return $this->ports; + } + /** + * The ports exposed by this container + * + * @param list|null $ports + * + * @return self + */ + public function setPorts(?array $ports): self + { + $this->initialized['ports'] = true; + $this->ports = $ports; + return $this; + } + /** + * The size of files that have been created or changed by this container + * + * @return int|null + */ + public function getSizeRw(): ?int + { + return $this->sizeRw; + } + /** + * The size of files that have been created or changed by this container + * + * @param int|null $sizeRw + * + * @return self + */ + public function setSizeRw(?int $sizeRw): self + { + $this->initialized['sizeRw'] = true; + $this->sizeRw = $sizeRw; + return $this; + } + /** + * The total size of all the files in this container + * + * @return int|null + */ + public function getSizeRootFs(): ?int + { + return $this->sizeRootFs; + } + /** + * The total size of all the files in this container + * + * @param int|null $sizeRootFs + * + * @return self + */ + public function setSizeRootFs(?int $sizeRootFs): self + { + $this->initialized['sizeRootFs'] = true; + $this->sizeRootFs = $sizeRootFs; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * The state of this container (e.g. `Exited`) + * + * @return string|null + */ + public function getState(): ?string + { + return $this->state; + } + /** + * The state of this container (e.g. `Exited`) + * + * @param string|null $state + * + * @return self + */ + public function setState(?string $state): self + { + $this->initialized['state'] = true; + $this->state = $state; + return $this; + } + /** + * Additional human-readable status of this container (e.g. `Exit 0`) + * + * @return string|null + */ + public function getStatus(): ?string + { + return $this->status; + } + /** + * Additional human-readable status of this container (e.g. `Exit 0`) + * + * @param string|null $status + * + * @return self + */ + public function setStatus(?string $status): self + { + $this->initialized['status'] = true; + $this->status = $status; + return $this; + } + /** + * + * + * @return ContainerSummaryItemHostConfig|null + */ + public function getHostConfig(): ?ContainerSummaryItemHostConfig + { + return $this->hostConfig; + } + /** + * + * + * @param ContainerSummaryItemHostConfig|null $hostConfig + * + * @return self + */ + public function setHostConfig(?ContainerSummaryItemHostConfig $hostConfig): self + { + $this->initialized['hostConfig'] = true; + $this->hostConfig = $hostConfig; + return $this; + } + /** + * A summary of the container's network settings + * + * @return ContainerSummaryItemNetworkSettings|null + */ + public function getNetworkSettings(): ?ContainerSummaryItemNetworkSettings + { + return $this->networkSettings; + } + /** + * A summary of the container's network settings + * + * @param ContainerSummaryItemNetworkSettings|null $networkSettings + * + * @return self + */ + public function setNetworkSettings(?ContainerSummaryItemNetworkSettings $networkSettings): self + { + $this->initialized['networkSettings'] = true; + $this->networkSettings = $networkSettings; + return $this; + } + /** + * + * + * @return list|null + */ + public function getMounts(): ?array + { + return $this->mounts; + } + /** + * + * + * @param list|null $mounts + * + * @return self + */ + public function setMounts(?array $mounts): self + { + $this->initialized['mounts'] = true; + $this->mounts = $mounts; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainerSummaryItemHostConfig.php b/generated/Model/ContainerSummaryItemHostConfig.php new file mode 100644 index 000000000..d50dbb9e2 --- /dev/null +++ b/generated/Model/ContainerSummaryItemHostConfig.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $networkMode; + /** + * + * + * @return string|null + */ + public function getNetworkMode(): ?string + { + return $this->networkMode; + } + /** + * + * + * @param string|null $networkMode + * + * @return self + */ + public function setNetworkMode(?string $networkMode): self + { + $this->initialized['networkMode'] = true; + $this->networkMode = $networkMode; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainerSummaryItemNetworkSettings.php b/generated/Model/ContainerSummaryItemNetworkSettings.php new file mode 100644 index 000000000..b6938c55a --- /dev/null +++ b/generated/Model/ContainerSummaryItemNetworkSettings.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * + * + * @var array|null + */ + protected $networks; + /** + * + * + * @return array|null + */ + public function getNetworks(): ?iterable + { + return $this->networks; + } + /** + * + * + * @param array|null $networks + * + * @return self + */ + public function setNetworks(?iterable $networks): self + { + $this->initialized['networks'] = true; + $this->networks = $networks; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainerTop.php b/generated/Model/ContainerTop.php deleted file mode 100644 index 2f3482f4f..000000000 --- a/generated/Model/ContainerTop.php +++ /dev/null @@ -1,55 +0,0 @@ -titles; - } - - /** - * @param string[]|null $titles - * - * @return self - */ - public function setTitles($titles = null) - { - $this->titles = $titles; - - return $this; - } - - /** - * @return string[][]|null[]|null - */ - public function getProcesses() - { - return $this->processes; - } - - /** - * @param string[][]|null[]|null $processes - * - * @return self - */ - public function setProcesses($processes = null) - { - $this->processes = $processes; - - return $this; - } -} diff --git a/generated/Model/ContainerUpdateResult.php b/generated/Model/ContainerUpdateResult.php deleted file mode 100644 index f95bc308b..000000000 --- a/generated/Model/ContainerUpdateResult.php +++ /dev/null @@ -1,31 +0,0 @@ -warnings; - } - - /** - * @param string[]|null $warnings - * - * @return self - */ - public function setWarnings($warnings = null) - { - $this->warnings = $warnings; - - return $this; - } -} diff --git a/generated/Model/ContainerWait.php b/generated/Model/ContainerWait.php deleted file mode 100644 index aa9a19b1a..000000000 --- a/generated/Model/ContainerWait.php +++ /dev/null @@ -1,31 +0,0 @@ -statusCode; - } - - /** - * @param int $statusCode - * - * @return self - */ - public function setStatusCode($statusCode = null) - { - $this->statusCode = $statusCode; - - return $this; - } -} diff --git a/generated/Model/ContainersCreatePostBody.php b/generated/Model/ContainersCreatePostBody.php new file mode 100644 index 000000000..e924f5c3a --- /dev/null +++ b/generated/Model/ContainersCreatePostBody.php @@ -0,0 +1,789 @@ +initialized); + } + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + * @var string|null + */ + protected $hostname; + /** + * The domain name to use for the container. + * + * @var string|null + */ + protected $domainname; + /** + * The user that commands are run as inside the container. + * + * @var string|null + */ + protected $user; + /** + * Whether to attach to `stdin`. + * + * @var bool|null + */ + protected $attachStdin = false; + /** + * Whether to attach to `stdout`. + * + * @var bool|null + */ + protected $attachStdout = true; + /** + * Whether to attach to `stderr`. + * + * @var bool|null + */ + protected $attachStderr = true; + /** + * An object mapping ports to an empty object in the form: + + `{"/": {}}` + + * + * @var array|null + */ + protected $exposedPorts; + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + * @var bool|null + */ + protected $tty = false; + /** + * Open `stdin` + * + * @var bool|null + */ + protected $openStdin = false; + /** + * Close `stdin` after one attached client disconnects + * + * @var bool|null + */ + protected $stdinOnce = false; + /** + * A list of environment variables to set inside the container in the form `["VAR=value", ...]` + * + * @var list|null + */ + protected $env; + /** + * Command to run specified as a string or an array of strings. + * + * @var list|string|null + */ + protected $cmd; + /** + * A test to perform to check that the container is healthy. + * + * @var ConfigHealthcheck|null + */ + protected $healthcheck; + /** + * Command is already escaped (Windows only) + * + * @var bool|null + */ + protected $argsEscaped; + /** + * The name of the image to use when creating the container + * + * @var string|null + */ + protected $image; + /** + * An object mapping mount point paths inside the container to empty objects. + * + * @var ConfigVolumes|null + */ + protected $volumes; + /** + * The working directory for commands to run in. + * + * @var string|null + */ + protected $workingDir; + /** + * The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + + * + * @var list|string|null + */ + protected $entrypoint; + /** + * Disable networking for the container. + * + * @var bool|null + */ + protected $networkDisabled; + /** + * MAC address of the container. + * + * @var string|null + */ + protected $macAddress; + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @var list|null + */ + protected $onBuild; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * Signal to stop a container as a string or unsigned integer. + * + * @var string|null + */ + protected $stopSignal = 'SIGTERM'; + /** + * Timeout to stop a container in seconds. + * + * @var int|null + */ + protected $stopTimeout = 10; + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @var list|null + */ + protected $shell; + /** + * Container configuration that depends on the host we are running on + * + * @var HostConfig|null + */ + protected $hostConfig; + /** + * This container's networking configuration. + * + * @var ContainersCreatePostBodyNetworkingConfig|null + */ + protected $networkingConfig; + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + * @return string|null + */ + public function getHostname(): ?string + { + return $this->hostname; + } + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + * @param string|null $hostname + * + * @return self + */ + public function setHostname(?string $hostname): self + { + $this->initialized['hostname'] = true; + $this->hostname = $hostname; + return $this; + } + /** + * The domain name to use for the container. + * + * @return string|null + */ + public function getDomainname(): ?string + { + return $this->domainname; + } + /** + * The domain name to use for the container. + * + * @param string|null $domainname + * + * @return self + */ + public function setDomainname(?string $domainname): self + { + $this->initialized['domainname'] = true; + $this->domainname = $domainname; + return $this; + } + /** + * The user that commands are run as inside the container. + * + * @return string|null + */ + public function getUser(): ?string + { + return $this->user; + } + /** + * The user that commands are run as inside the container. + * + * @param string|null $user + * + * @return self + */ + public function setUser(?string $user): self + { + $this->initialized['user'] = true; + $this->user = $user; + return $this; + } + /** + * Whether to attach to `stdin`. + * + * @return bool|null + */ + public function getAttachStdin(): ?bool + { + return $this->attachStdin; + } + /** + * Whether to attach to `stdin`. + * + * @param bool|null $attachStdin + * + * @return self + */ + public function setAttachStdin(?bool $attachStdin): self + { + $this->initialized['attachStdin'] = true; + $this->attachStdin = $attachStdin; + return $this; + } + /** + * Whether to attach to `stdout`. + * + * @return bool|null + */ + public function getAttachStdout(): ?bool + { + return $this->attachStdout; + } + /** + * Whether to attach to `stdout`. + * + * @param bool|null $attachStdout + * + * @return self + */ + public function setAttachStdout(?bool $attachStdout): self + { + $this->initialized['attachStdout'] = true; + $this->attachStdout = $attachStdout; + return $this; + } + /** + * Whether to attach to `stderr`. + * + * @return bool|null + */ + public function getAttachStderr(): ?bool + { + return $this->attachStderr; + } + /** + * Whether to attach to `stderr`. + * + * @param bool|null $attachStderr + * + * @return self + */ + public function setAttachStderr(?bool $attachStderr): self + { + $this->initialized['attachStderr'] = true; + $this->attachStderr = $attachStderr; + return $this; + } + /** + * An object mapping ports to an empty object in the form: + + `{"/": {}}` + + * + * @return array|null + */ + public function getExposedPorts(): ?iterable + { + return $this->exposedPorts; + } + /** + * An object mapping ports to an empty object in the form: + + `{"/": {}}` + + * + * @param array|null $exposedPorts + * + * @return self + */ + public function setExposedPorts(?iterable $exposedPorts): self + { + $this->initialized['exposedPorts'] = true; + $this->exposedPorts = $exposedPorts; + return $this; + } + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + * @return bool|null + */ + public function getTty(): ?bool + { + return $this->tty; + } + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + * @param bool|null $tty + * + * @return self + */ + public function setTty(?bool $tty): self + { + $this->initialized['tty'] = true; + $this->tty = $tty; + return $this; + } + /** + * Open `stdin` + * + * @return bool|null + */ + public function getOpenStdin(): ?bool + { + return $this->openStdin; + } + /** + * Open `stdin` + * + * @param bool|null $openStdin + * + * @return self + */ + public function setOpenStdin(?bool $openStdin): self + { + $this->initialized['openStdin'] = true; + $this->openStdin = $openStdin; + return $this; + } + /** + * Close `stdin` after one attached client disconnects + * + * @return bool|null + */ + public function getStdinOnce(): ?bool + { + return $this->stdinOnce; + } + /** + * Close `stdin` after one attached client disconnects + * + * @param bool|null $stdinOnce + * + * @return self + */ + public function setStdinOnce(?bool $stdinOnce): self + { + $this->initialized['stdinOnce'] = true; + $this->stdinOnce = $stdinOnce; + return $this; + } + /** + * A list of environment variables to set inside the container in the form `["VAR=value", ...]` + * + * @return list|null + */ + public function getEnv(): ?array + { + return $this->env; + } + /** + * A list of environment variables to set inside the container in the form `["VAR=value", ...]` + * + * @param list|null $env + * + * @return self + */ + public function setEnv(?array $env): self + { + $this->initialized['env'] = true; + $this->env = $env; + return $this; + } + /** + * Command to run specified as a string or an array of strings. + * + * @return list|string|null + */ + public function getCmd() + { + return $this->cmd; + } + /** + * Command to run specified as a string or an array of strings. + * + * @param list|string|null $cmd + * + * @return self + */ + public function setCmd($cmd): self + { + $this->initialized['cmd'] = true; + $this->cmd = $cmd; + return $this; + } + /** + * A test to perform to check that the container is healthy. + * + * @return ConfigHealthcheck|null + */ + public function getHealthcheck(): ?ConfigHealthcheck + { + return $this->healthcheck; + } + /** + * A test to perform to check that the container is healthy. + * + * @param ConfigHealthcheck|null $healthcheck + * + * @return self + */ + public function setHealthcheck(?ConfigHealthcheck $healthcheck): self + { + $this->initialized['healthcheck'] = true; + $this->healthcheck = $healthcheck; + return $this; + } + /** + * Command is already escaped (Windows only) + * + * @return bool|null + */ + public function getArgsEscaped(): ?bool + { + return $this->argsEscaped; + } + /** + * Command is already escaped (Windows only) + * + * @param bool|null $argsEscaped + * + * @return self + */ + public function setArgsEscaped(?bool $argsEscaped): self + { + $this->initialized['argsEscaped'] = true; + $this->argsEscaped = $argsEscaped; + return $this; + } + /** + * The name of the image to use when creating the container + * + * @return string|null + */ + public function getImage(): ?string + { + return $this->image; + } + /** + * The name of the image to use when creating the container + * + * @param string|null $image + * + * @return self + */ + public function setImage(?string $image): self + { + $this->initialized['image'] = true; + $this->image = $image; + return $this; + } + /** + * An object mapping mount point paths inside the container to empty objects. + * + * @return ConfigVolumes|null + */ + public function getVolumes(): ?ConfigVolumes + { + return $this->volumes; + } + /** + * An object mapping mount point paths inside the container to empty objects. + * + * @param ConfigVolumes|null $volumes + * + * @return self + */ + public function setVolumes(?ConfigVolumes $volumes): self + { + $this->initialized['volumes'] = true; + $this->volumes = $volumes; + return $this; + } + /** + * The working directory for commands to run in. + * + * @return string|null + */ + public function getWorkingDir(): ?string + { + return $this->workingDir; + } + /** + * The working directory for commands to run in. + * + * @param string|null $workingDir + * + * @return self + */ + public function setWorkingDir(?string $workingDir): self + { + $this->initialized['workingDir'] = true; + $this->workingDir = $workingDir; + return $this; + } + /** + * The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + + * + * @return list|string|null + */ + public function getEntrypoint() + { + return $this->entrypoint; + } + /** + * The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + + * + * @param list|string|null $entrypoint + * + * @return self + */ + public function setEntrypoint($entrypoint): self + { + $this->initialized['entrypoint'] = true; + $this->entrypoint = $entrypoint; + return $this; + } + /** + * Disable networking for the container. + * + * @return bool|null + */ + public function getNetworkDisabled(): ?bool + { + return $this->networkDisabled; + } + /** + * Disable networking for the container. + * + * @param bool|null $networkDisabled + * + * @return self + */ + public function setNetworkDisabled(?bool $networkDisabled): self + { + $this->initialized['networkDisabled'] = true; + $this->networkDisabled = $networkDisabled; + return $this; + } + /** + * MAC address of the container. + * + * @return string|null + */ + public function getMacAddress(): ?string + { + return $this->macAddress; + } + /** + * MAC address of the container. + * + * @param string|null $macAddress + * + * @return self + */ + public function setMacAddress(?string $macAddress): self + { + $this->initialized['macAddress'] = true; + $this->macAddress = $macAddress; + return $this; + } + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @return list|null + */ + public function getOnBuild(): ?array + { + return $this->onBuild; + } + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @param list|null $onBuild + * + * @return self + */ + public function setOnBuild(?array $onBuild): self + { + $this->initialized['onBuild'] = true; + $this->onBuild = $onBuild; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * Signal to stop a container as a string or unsigned integer. + * + * @return string|null + */ + public function getStopSignal(): ?string + { + return $this->stopSignal; + } + /** + * Signal to stop a container as a string or unsigned integer. + * + * @param string|null $stopSignal + * + * @return self + */ + public function setStopSignal(?string $stopSignal): self + { + $this->initialized['stopSignal'] = true; + $this->stopSignal = $stopSignal; + return $this; + } + /** + * Timeout to stop a container in seconds. + * + * @return int|null + */ + public function getStopTimeout(): ?int + { + return $this->stopTimeout; + } + /** + * Timeout to stop a container in seconds. + * + * @param int|null $stopTimeout + * + * @return self + */ + public function setStopTimeout(?int $stopTimeout): self + { + $this->initialized['stopTimeout'] = true; + $this->stopTimeout = $stopTimeout; + return $this; + } + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @return list|null + */ + public function getShell(): ?array + { + return $this->shell; + } + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @param list|null $shell + * + * @return self + */ + public function setShell(?array $shell): self + { + $this->initialized['shell'] = true; + $this->shell = $shell; + return $this; + } + /** + * Container configuration that depends on the host we are running on + * + * @return HostConfig|null + */ + public function getHostConfig(): ?HostConfig + { + return $this->hostConfig; + } + /** + * Container configuration that depends on the host we are running on + * + * @param HostConfig|null $hostConfig + * + * @return self + */ + public function setHostConfig(?HostConfig $hostConfig): self + { + $this->initialized['hostConfig'] = true; + $this->hostConfig = $hostConfig; + return $this; + } + /** + * This container's networking configuration. + * + * @return ContainersCreatePostBodyNetworkingConfig|null + */ + public function getNetworkingConfig(): ?ContainersCreatePostBodyNetworkingConfig + { + return $this->networkingConfig; + } + /** + * This container's networking configuration. + * + * @param ContainersCreatePostBodyNetworkingConfig|null $networkingConfig + * + * @return self + */ + public function setNetworkingConfig(?ContainersCreatePostBodyNetworkingConfig $networkingConfig): self + { + $this->initialized['networkingConfig'] = true; + $this->networkingConfig = $networkingConfig; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainersCreatePostBodyNetworkingConfig.php b/generated/Model/ContainersCreatePostBodyNetworkingConfig.php new file mode 100644 index 000000000..49187c656 --- /dev/null +++ b/generated/Model/ContainersCreatePostBodyNetworkingConfig.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * A mapping of network name to endpoint configuration for that network. + * + * @var array|null + */ + protected $endpointsConfig; + /** + * A mapping of network name to endpoint configuration for that network. + * + * @return array|null + */ + public function getEndpointsConfig(): ?iterable + { + return $this->endpointsConfig; + } + /** + * A mapping of network name to endpoint configuration for that network. + * + * @param array|null $endpointsConfig + * + * @return self + */ + public function setEndpointsConfig(?iterable $endpointsConfig): self + { + $this->initialized['endpointsConfig'] = true; + $this->endpointsConfig = $endpointsConfig; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainersCreatePostResponse201.php b/generated/Model/ContainersCreatePostResponse201.php new file mode 100644 index 000000000..9f8794eb3 --- /dev/null +++ b/generated/Model/ContainersCreatePostResponse201.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The ID of the created container + * + * @var string|null + */ + protected $id; + /** + * Warnings encountered when creating the container + * + * @var list|null + */ + protected $warnings; + /** + * The ID of the created container + * + * @return string|null + */ + public function getId(): ?string + { + return $this->id; + } + /** + * The ID of the created container + * + * @param string|null $id + * + * @return self + */ + public function setId(?string $id): self + { + $this->initialized['id'] = true; + $this->id = $id; + return $this; + } + /** + * Warnings encountered when creating the container + * + * @return list|null + */ + public function getWarnings(): ?array + { + return $this->warnings; + } + /** + * Warnings encountered when creating the container + * + * @param list|null $warnings + * + * @return self + */ + public function setWarnings(?array $warnings): self + { + $this->initialized['warnings'] = true; + $this->warnings = $warnings; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainersIdChangesGetResponse200Item.php b/generated/Model/ContainersIdChangesGetResponse200Item.php new file mode 100644 index 000000000..0c18fc487 --- /dev/null +++ b/generated/Model/ContainersIdChangesGetResponse200Item.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * Path to file that has changed + * + * @var string|null + */ + protected $path; + /** + * Kind of change + * + * @var int|null + */ + protected $kind; + /** + * Path to file that has changed + * + * @return string|null + */ + public function getPath(): ?string + { + return $this->path; + } + /** + * Path to file that has changed + * + * @param string|null $path + * + * @return self + */ + public function setPath(?string $path): self + { + $this->initialized['path'] = true; + $this->path = $path; + return $this; + } + /** + * Kind of change + * + * @return int|null + */ + public function getKind(): ?int + { + return $this->kind; + } + /** + * Kind of change + * + * @param int|null $kind + * + * @return self + */ + public function setKind(?int $kind): self + { + $this->initialized['kind'] = true; + $this->kind = $kind; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainersIdExecPostBody.php b/generated/Model/ContainersIdExecPostBody.php new file mode 100644 index 000000000..29bee969f --- /dev/null +++ b/generated/Model/ContainersIdExecPostBody.php @@ -0,0 +1,267 @@ +initialized); + } + /** + * Attach to `stdin` of the exec command. + * + * @var bool|null + */ + protected $attachStdin; + /** + * Attach to `stdout` of the exec command. + * + * @var bool|null + */ + protected $attachStdout; + /** + * Attach to `stderr` of the exec command. + * + * @var bool|null + */ + protected $attachStderr; + /** + * Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + * + * @var string|null + */ + protected $detachKeys; + /** + * Allocate a pseudo-TTY. + * + * @var bool|null + */ + protected $tty; + /** + * A list of environment variables in the form `["VAR=value", ...]`. + * + * @var list|null + */ + protected $env; + /** + * Command to run, as a string or array of strings. + * + * @var list|null + */ + protected $cmd; + /** + * Runs the exec process with extended privileges. + * + * @var bool|null + */ + protected $privileged = false; + /** + * The user, and optionally, group to run the exec process inside the container. Format is one of: `user`, `user:group`, `uid`, or `uid:gid`. + * + * @var string|null + */ + protected $user; + /** + * Attach to `stdin` of the exec command. + * + * @return bool|null + */ + public function getAttachStdin(): ?bool + { + return $this->attachStdin; + } + /** + * Attach to `stdin` of the exec command. + * + * @param bool|null $attachStdin + * + * @return self + */ + public function setAttachStdin(?bool $attachStdin): self + { + $this->initialized['attachStdin'] = true; + $this->attachStdin = $attachStdin; + return $this; + } + /** + * Attach to `stdout` of the exec command. + * + * @return bool|null + */ + public function getAttachStdout(): ?bool + { + return $this->attachStdout; + } + /** + * Attach to `stdout` of the exec command. + * + * @param bool|null $attachStdout + * + * @return self + */ + public function setAttachStdout(?bool $attachStdout): self + { + $this->initialized['attachStdout'] = true; + $this->attachStdout = $attachStdout; + return $this; + } + /** + * Attach to `stderr` of the exec command. + * + * @return bool|null + */ + public function getAttachStderr(): ?bool + { + return $this->attachStderr; + } + /** + * Attach to `stderr` of the exec command. + * + * @param bool|null $attachStderr + * + * @return self + */ + public function setAttachStderr(?bool $attachStderr): self + { + $this->initialized['attachStderr'] = true; + $this->attachStderr = $attachStderr; + return $this; + } + /** + * Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + * + * @return string|null + */ + public function getDetachKeys(): ?string + { + return $this->detachKeys; + } + /** + * Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + * + * @param string|null $detachKeys + * + * @return self + */ + public function setDetachKeys(?string $detachKeys): self + { + $this->initialized['detachKeys'] = true; + $this->detachKeys = $detachKeys; + return $this; + } + /** + * Allocate a pseudo-TTY. + * + * @return bool|null + */ + public function getTty(): ?bool + { + return $this->tty; + } + /** + * Allocate a pseudo-TTY. + * + * @param bool|null $tty + * + * @return self + */ + public function setTty(?bool $tty): self + { + $this->initialized['tty'] = true; + $this->tty = $tty; + return $this; + } + /** + * A list of environment variables in the form `["VAR=value", ...]`. + * + * @return list|null + */ + public function getEnv(): ?array + { + return $this->env; + } + /** + * A list of environment variables in the form `["VAR=value", ...]`. + * + * @param list|null $env + * + * @return self + */ + public function setEnv(?array $env): self + { + $this->initialized['env'] = true; + $this->env = $env; + return $this; + } + /** + * Command to run, as a string or array of strings. + * + * @return list|null + */ + public function getCmd(): ?array + { + return $this->cmd; + } + /** + * Command to run, as a string or array of strings. + * + * @param list|null $cmd + * + * @return self + */ + public function setCmd(?array $cmd): self + { + $this->initialized['cmd'] = true; + $this->cmd = $cmd; + return $this; + } + /** + * Runs the exec process with extended privileges. + * + * @return bool|null + */ + public function getPrivileged(): ?bool + { + return $this->privileged; + } + /** + * Runs the exec process with extended privileges. + * + * @param bool|null $privileged + * + * @return self + */ + public function setPrivileged(?bool $privileged): self + { + $this->initialized['privileged'] = true; + $this->privileged = $privileged; + return $this; + } + /** + * The user, and optionally, group to run the exec process inside the container. Format is one of: `user`, `user:group`, `uid`, or `uid:gid`. + * + * @return string|null + */ + public function getUser(): ?string + { + return $this->user; + } + /** + * The user, and optionally, group to run the exec process inside the container. Format is one of: `user`, `user:group`, `uid`, or `uid:gid`. + * + * @param string|null $user + * + * @return self + */ + public function setUser(?string $user): self + { + $this->initialized['user'] = true; + $this->user = $user; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainersIdJsonGetResponse200.php b/generated/Model/ContainersIdJsonGetResponse200.php new file mode 100644 index 000000000..39ebd42ef --- /dev/null +++ b/generated/Model/ContainersIdJsonGetResponse200.php @@ -0,0 +1,715 @@ +initialized); + } + /** + * The ID of the container + * + * @var string|null + */ + protected $id; + /** + * The time the container was created + * + * @var string|null + */ + protected $created; + /** + * The path to the command being run + * + * @var string|null + */ + protected $path; + /** + * The arguments to the command being run + * + * @var list|null + */ + protected $args; + /** + * The state of the container. + * + * @var ContainersIdJsonGetResponse200State|null + */ + protected $state; + /** + * The container's image + * + * @var string|null + */ + protected $image; + /** + * + * + * @var string|null + */ + protected $resolvConfPath; + /** + * + * + * @var string|null + */ + protected $hostnamePath; + /** + * + * + * @var string|null + */ + protected $hostsPath; + /** + * + * + * @var string|null + */ + protected $logPath; + /** + * TODO + * + * @var mixed|null + */ + protected $node; + /** + * + * + * @var string|null + */ + protected $name; + /** + * + * + * @var int|null + */ + protected $restartCount; + /** + * + * + * @var string|null + */ + protected $driver; + /** + * + * + * @var string|null + */ + protected $mountLabel; + /** + * + * + * @var string|null + */ + protected $processLabel; + /** + * + * + * @var string|null + */ + protected $appArmorProfile; + /** + * + * + * @var string|null + */ + protected $execIDs; + /** + * Container configuration that depends on the host we are running on + * + * @var HostConfig|null + */ + protected $hostConfig; + /** + * Information about this container's graph driver. + * + * @var GraphDriver|null + */ + protected $graphDriver; + /** + * The size of files that have been created or changed by this container. + * + * @var int|null + */ + protected $sizeRw; + /** + * The total size of all the files in this container. + * + * @var int|null + */ + protected $sizeRootFs; + /** + * + * + * @var list|null + */ + protected $mounts; + /** + * Configuration for a container that is portable between hosts + * + * @var Config|null + */ + protected $config; + /** + * TODO: check is correct + * + * @var NetworkConfig|null + */ + protected $networkSettings; + /** + * The ID of the container + * + * @return string|null + */ + public function getId(): ?string + { + return $this->id; + } + /** + * The ID of the container + * + * @param string|null $id + * + * @return self + */ + public function setId(?string $id): self + { + $this->initialized['id'] = true; + $this->id = $id; + return $this; + } + /** + * The time the container was created + * + * @return string|null + */ + public function getCreated(): ?string + { + return $this->created; + } + /** + * The time the container was created + * + * @param string|null $created + * + * @return self + */ + public function setCreated(?string $created): self + { + $this->initialized['created'] = true; + $this->created = $created; + return $this; + } + /** + * The path to the command being run + * + * @return string|null + */ + public function getPath(): ?string + { + return $this->path; + } + /** + * The path to the command being run + * + * @param string|null $path + * + * @return self + */ + public function setPath(?string $path): self + { + $this->initialized['path'] = true; + $this->path = $path; + return $this; + } + /** + * The arguments to the command being run + * + * @return list|null + */ + public function getArgs(): ?array + { + return $this->args; + } + /** + * The arguments to the command being run + * + * @param list|null $args + * + * @return self + */ + public function setArgs(?array $args): self + { + $this->initialized['args'] = true; + $this->args = $args; + return $this; + } + /** + * The state of the container. + * + * @return ContainersIdJsonGetResponse200State|null + */ + public function getState(): ?ContainersIdJsonGetResponse200State + { + return $this->state; + } + /** + * The state of the container. + * + * @param ContainersIdJsonGetResponse200State|null $state + * + * @return self + */ + public function setState(?ContainersIdJsonGetResponse200State $state): self + { + $this->initialized['state'] = true; + $this->state = $state; + return $this; + } + /** + * The container's image + * + * @return string|null + */ + public function getImage(): ?string + { + return $this->image; + } + /** + * The container's image + * + * @param string|null $image + * + * @return self + */ + public function setImage(?string $image): self + { + $this->initialized['image'] = true; + $this->image = $image; + return $this; + } + /** + * + * + * @return string|null + */ + public function getResolvConfPath(): ?string + { + return $this->resolvConfPath; + } + /** + * + * + * @param string|null $resolvConfPath + * + * @return self + */ + public function setResolvConfPath(?string $resolvConfPath): self + { + $this->initialized['resolvConfPath'] = true; + $this->resolvConfPath = $resolvConfPath; + return $this; + } + /** + * + * + * @return string|null + */ + public function getHostnamePath(): ?string + { + return $this->hostnamePath; + } + /** + * + * + * @param string|null $hostnamePath + * + * @return self + */ + public function setHostnamePath(?string $hostnamePath): self + { + $this->initialized['hostnamePath'] = true; + $this->hostnamePath = $hostnamePath; + return $this; + } + /** + * + * + * @return string|null + */ + public function getHostsPath(): ?string + { + return $this->hostsPath; + } + /** + * + * + * @param string|null $hostsPath + * + * @return self + */ + public function setHostsPath(?string $hostsPath): self + { + $this->initialized['hostsPath'] = true; + $this->hostsPath = $hostsPath; + return $this; + } + /** + * + * + * @return string|null + */ + public function getLogPath(): ?string + { + return $this->logPath; + } + /** + * + * + * @param string|null $logPath + * + * @return self + */ + public function setLogPath(?string $logPath): self + { + $this->initialized['logPath'] = true; + $this->logPath = $logPath; + return $this; + } + /** + * TODO + * + * @return mixed + */ + public function getNode() + { + return $this->node; + } + /** + * TODO + * + * @param mixed $node + * + * @return self + */ + public function setNode($node): self + { + $this->initialized['node'] = true; + $this->node = $node; + return $this; + } + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * + * + * @return int|null + */ + public function getRestartCount(): ?int + { + return $this->restartCount; + } + /** + * + * + * @param int|null $restartCount + * + * @return self + */ + public function setRestartCount(?int $restartCount): self + { + $this->initialized['restartCount'] = true; + $this->restartCount = $restartCount; + return $this; + } + /** + * + * + * @return string|null + */ + public function getDriver(): ?string + { + return $this->driver; + } + /** + * + * + * @param string|null $driver + * + * @return self + */ + public function setDriver(?string $driver): self + { + $this->initialized['driver'] = true; + $this->driver = $driver; + return $this; + } + /** + * + * + * @return string|null + */ + public function getMountLabel(): ?string + { + return $this->mountLabel; + } + /** + * + * + * @param string|null $mountLabel + * + * @return self + */ + public function setMountLabel(?string $mountLabel): self + { + $this->initialized['mountLabel'] = true; + $this->mountLabel = $mountLabel; + return $this; + } + /** + * + * + * @return string|null + */ + public function getProcessLabel(): ?string + { + return $this->processLabel; + } + /** + * + * + * @param string|null $processLabel + * + * @return self + */ + public function setProcessLabel(?string $processLabel): self + { + $this->initialized['processLabel'] = true; + $this->processLabel = $processLabel; + return $this; + } + /** + * + * + * @return string|null + */ + public function getAppArmorProfile(): ?string + { + return $this->appArmorProfile; + } + /** + * + * + * @param string|null $appArmorProfile + * + * @return self + */ + public function setAppArmorProfile(?string $appArmorProfile): self + { + $this->initialized['appArmorProfile'] = true; + $this->appArmorProfile = $appArmorProfile; + return $this; + } + /** + * + * + * @return string|null + */ + public function getExecIDs(): ?string + { + return $this->execIDs; + } + /** + * + * + * @param string|null $execIDs + * + * @return self + */ + public function setExecIDs(?string $execIDs): self + { + $this->initialized['execIDs'] = true; + $this->execIDs = $execIDs; + return $this; + } + /** + * Container configuration that depends on the host we are running on + * + * @return HostConfig|null + */ + public function getHostConfig(): ?HostConfig + { + return $this->hostConfig; + } + /** + * Container configuration that depends on the host we are running on + * + * @param HostConfig|null $hostConfig + * + * @return self + */ + public function setHostConfig(?HostConfig $hostConfig): self + { + $this->initialized['hostConfig'] = true; + $this->hostConfig = $hostConfig; + return $this; + } + /** + * Information about this container's graph driver. + * + * @return GraphDriver|null + */ + public function getGraphDriver(): ?GraphDriver + { + return $this->graphDriver; + } + /** + * Information about this container's graph driver. + * + * @param GraphDriver|null $graphDriver + * + * @return self + */ + public function setGraphDriver(?GraphDriver $graphDriver): self + { + $this->initialized['graphDriver'] = true; + $this->graphDriver = $graphDriver; + return $this; + } + /** + * The size of files that have been created or changed by this container. + * + * @return int|null + */ + public function getSizeRw(): ?int + { + return $this->sizeRw; + } + /** + * The size of files that have been created or changed by this container. + * + * @param int|null $sizeRw + * + * @return self + */ + public function setSizeRw(?int $sizeRw): self + { + $this->initialized['sizeRw'] = true; + $this->sizeRw = $sizeRw; + return $this; + } + /** + * The total size of all the files in this container. + * + * @return int|null + */ + public function getSizeRootFs(): ?int + { + return $this->sizeRootFs; + } + /** + * The total size of all the files in this container. + * + * @param int|null $sizeRootFs + * + * @return self + */ + public function setSizeRootFs(?int $sizeRootFs): self + { + $this->initialized['sizeRootFs'] = true; + $this->sizeRootFs = $sizeRootFs; + return $this; + } + /** + * + * + * @return list|null + */ + public function getMounts(): ?array + { + return $this->mounts; + } + /** + * + * + * @param list|null $mounts + * + * @return self + */ + public function setMounts(?array $mounts): self + { + $this->initialized['mounts'] = true; + $this->mounts = $mounts; + return $this; + } + /** + * Configuration for a container that is portable between hosts + * + * @return Config|null + */ + public function getConfig(): ?Config + { + return $this->config; + } + /** + * Configuration for a container that is portable between hosts + * + * @param Config|null $config + * + * @return self + */ + public function setConfig(?Config $config): self + { + $this->initialized['config'] = true; + $this->config = $config; + return $this; + } + /** + * TODO: check is correct + * + * @return NetworkConfig|null + */ + public function getNetworkSettings(): ?NetworkConfig + { + return $this->networkSettings; + } + /** + * TODO: check is correct + * + * @param NetworkConfig|null $networkSettings + * + * @return self + */ + public function setNetworkSettings(?NetworkConfig $networkSettings): self + { + $this->initialized['networkSettings'] = true; + $this->networkSettings = $networkSettings; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainersIdJsonGetResponse200State.php b/generated/Model/ContainersIdJsonGetResponse200State.php new file mode 100644 index 000000000..f681f2bb7 --- /dev/null +++ b/generated/Model/ContainersIdJsonGetResponse200State.php @@ -0,0 +1,323 @@ +initialized); + } + /** + * The status of the container. For example, `running` or `exited`. + * + * @var string|null + */ + protected $status; + /** + * Whether this container is running. + * + * @var bool|null + */ + protected $running; + /** + * Whether this container is paused. + * + * @var bool|null + */ + protected $paused; + /** + * Whether this container is restarting. + * + * @var bool|null + */ + protected $restarting; + /** + * Whether this container has been killed because it ran out of memory. + * + * @var bool|null + */ + protected $oOMKilled; + /** + * + * + * @var bool|null + */ + protected $dead; + /** + * The process ID of this container + * + * @var int|null + */ + protected $pid; + /** + * The last exit code of this container + * + * @var int|null + */ + protected $exitCode; + /** + * + * + * @var string|null + */ + protected $error; + /** + * The time when this container was last started. + * + * @var string|null + */ + protected $startedAt; + /** + * The time when this container last exited. + * + * @var string|null + */ + protected $finishedAt; + /** + * The status of the container. For example, `running` or `exited`. + * + * @return string|null + */ + public function getStatus(): ?string + { + return $this->status; + } + /** + * The status of the container. For example, `running` or `exited`. + * + * @param string|null $status + * + * @return self + */ + public function setStatus(?string $status): self + { + $this->initialized['status'] = true; + $this->status = $status; + return $this; + } + /** + * Whether this container is running. + * + * @return bool|null + */ + public function getRunning(): ?bool + { + return $this->running; + } + /** + * Whether this container is running. + * + * @param bool|null $running + * + * @return self + */ + public function setRunning(?bool $running): self + { + $this->initialized['running'] = true; + $this->running = $running; + return $this; + } + /** + * Whether this container is paused. + * + * @return bool|null + */ + public function getPaused(): ?bool + { + return $this->paused; + } + /** + * Whether this container is paused. + * + * @param bool|null $paused + * + * @return self + */ + public function setPaused(?bool $paused): self + { + $this->initialized['paused'] = true; + $this->paused = $paused; + return $this; + } + /** + * Whether this container is restarting. + * + * @return bool|null + */ + public function getRestarting(): ?bool + { + return $this->restarting; + } + /** + * Whether this container is restarting. + * + * @param bool|null $restarting + * + * @return self + */ + public function setRestarting(?bool $restarting): self + { + $this->initialized['restarting'] = true; + $this->restarting = $restarting; + return $this; + } + /** + * Whether this container has been killed because it ran out of memory. + * + * @return bool|null + */ + public function getOOMKilled(): ?bool + { + return $this->oOMKilled; + } + /** + * Whether this container has been killed because it ran out of memory. + * + * @param bool|null $oOMKilled + * + * @return self + */ + public function setOOMKilled(?bool $oOMKilled): self + { + $this->initialized['oOMKilled'] = true; + $this->oOMKilled = $oOMKilled; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getDead(): ?bool + { + return $this->dead; + } + /** + * + * + * @param bool|null $dead + * + * @return self + */ + public function setDead(?bool $dead): self + { + $this->initialized['dead'] = true; + $this->dead = $dead; + return $this; + } + /** + * The process ID of this container + * + * @return int|null + */ + public function getPid(): ?int + { + return $this->pid; + } + /** + * The process ID of this container + * + * @param int|null $pid + * + * @return self + */ + public function setPid(?int $pid): self + { + $this->initialized['pid'] = true; + $this->pid = $pid; + return $this; + } + /** + * The last exit code of this container + * + * @return int|null + */ + public function getExitCode(): ?int + { + return $this->exitCode; + } + /** + * The last exit code of this container + * + * @param int|null $exitCode + * + * @return self + */ + public function setExitCode(?int $exitCode): self + { + $this->initialized['exitCode'] = true; + $this->exitCode = $exitCode; + return $this; + } + /** + * + * + * @return string|null + */ + public function getError(): ?string + { + return $this->error; + } + /** + * + * + * @param string|null $error + * + * @return self + */ + public function setError(?string $error): self + { + $this->initialized['error'] = true; + $this->error = $error; + return $this; + } + /** + * The time when this container was last started. + * + * @return string|null + */ + public function getStartedAt(): ?string + { + return $this->startedAt; + } + /** + * The time when this container was last started. + * + * @param string|null $startedAt + * + * @return self + */ + public function setStartedAt(?string $startedAt): self + { + $this->initialized['startedAt'] = true; + $this->startedAt = $startedAt; + return $this; + } + /** + * The time when this container last exited. + * + * @return string|null + */ + public function getFinishedAt(): ?string + { + return $this->finishedAt; + } + /** + * The time when this container last exited. + * + * @param string|null $finishedAt + * + * @return self + */ + public function setFinishedAt(?string $finishedAt): self + { + $this->initialized['finishedAt'] = true; + $this->finishedAt = $finishedAt; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainersIdTopGetResponse200.php b/generated/Model/ContainersIdTopGetResponse200.php new file mode 100644 index 000000000..4ec0caafd --- /dev/null +++ b/generated/Model/ContainersIdTopGetResponse200.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The ps column titles + * + * @var list|null + */ + protected $titles; + /** + * Each process running in the container, where each is process is an array of values corresponding to the titles + * + * @var list>|null + */ + protected $processes; + /** + * The ps column titles + * + * @return list|null + */ + public function getTitles(): ?array + { + return $this->titles; + } + /** + * The ps column titles + * + * @param list|null $titles + * + * @return self + */ + public function setTitles(?array $titles): self + { + $this->initialized['titles'] = true; + $this->titles = $titles; + return $this; + } + /** + * Each process running in the container, where each is process is an array of values corresponding to the titles + * + * @return list>|null + */ + public function getProcesses(): ?array + { + return $this->processes; + } + /** + * Each process running in the container, where each is process is an array of values corresponding to the titles + * + * @param list>|null $processes + * + * @return self + */ + public function setProcesses(?array $processes): self + { + $this->initialized['processes'] = true; + $this->processes = $processes; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainersIdUpdatePostBody.php b/generated/Model/ContainersIdUpdatePostBody.php new file mode 100644 index 000000000..af8b55bc0 --- /dev/null +++ b/generated/Model/ContainersIdUpdatePostBody.php @@ -0,0 +1,882 @@ +initialized); + } + /** + * An integer value representing this container's relative CPU weight versus other containers. + * + * @var int|null + */ + protected $cpuShares; + /** + * Memory limit in bytes. + * + * @var int|null + */ + protected $memory = 0; + /** + * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + * + * @var string|null + */ + protected $cgroupParent; + /** + * Block IO weight (relative weight). + * + * @var int|null + */ + protected $blkioWeight; + /** + * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. + * + * @var list|null + */ + protected $blkioWeightDevice; + /** + * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @var list|null + */ + protected $blkioDeviceReadBps; + /** + * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @var list|null + */ + protected $blkioDeviceWriteBps; + /** + * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @var list|null + */ + protected $blkioDeviceReadIOps; + /** + * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @var list|null + */ + protected $blkioDeviceWriteIOps; + /** + * The length of a CPU period in microseconds. + * + * @var int|null + */ + protected $cpuPeriod; + /** + * Microseconds of CPU time that the container can get in a CPU period. + * + * @var int|null + */ + protected $cpuQuota; + /** + * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @var int|null + */ + protected $cpuRealtimePeriod; + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @var int|null + */ + protected $cpuRealtimeRuntime; + /** + * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * + * @var string|null + */ + protected $cpusetCpus; + /** + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + * + * @var string|null + */ + protected $cpusetMems; + /** + * A list of devices to add to the container. + * + * @var list|null + */ + protected $devices; + /** + * Disk limit (in bytes). + * + * @var int|null + */ + protected $diskQuota; + /** + * Kernel memory limit in bytes. + * + * @var int|null + */ + protected $kernelMemory; + /** + * Memory soft limit in bytes. + * + * @var int|null + */ + protected $memoryReservation; + /** + * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + * + * @var int|null + */ + protected $memorySwap; + /** + * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + * + * @var int|null + */ + protected $memorySwappiness; + /** + * CPU quota in units of 10-9 CPUs. + * + * @var int|null + */ + protected $nanoCpus; + /** + * Disable OOM Killer for the container. + * + * @var bool|null + */ + protected $oomKillDisable; + /** + * Tune a container's pids limit. Set -1 for unlimited. + * + * @var int|null + */ + protected $pidsLimit; + /** + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + * + * @var list|null + */ + protected $ulimits; + /** + * The number of usable CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @var int|null + */ + protected $cpuCount; + /** + * The usable percentage of the available CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @var int|null + */ + protected $cpuPercent; + /** + * Maximum IOps for the container system drive (Windows only) + * + * @var int|null + */ + protected $iOMaximumIOps; + /** + * Maximum IO in bytes per second for the container system drive (Windows only) + * + * @var int|null + */ + protected $iOMaximumBandwidth; + /** + * The behavior to apply when the container exits. The default is not to restart. + + An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + + * + * @var RestartPolicy|null + */ + protected $restartPolicy; + /** + * An integer value representing this container's relative CPU weight versus other containers. + * + * @return int|null + */ + public function getCpuShares(): ?int + { + return $this->cpuShares; + } + /** + * An integer value representing this container's relative CPU weight versus other containers. + * + * @param int|null $cpuShares + * + * @return self + */ + public function setCpuShares(?int $cpuShares): self + { + $this->initialized['cpuShares'] = true; + $this->cpuShares = $cpuShares; + return $this; + } + /** + * Memory limit in bytes. + * + * @return int|null + */ + public function getMemory(): ?int + { + return $this->memory; + } + /** + * Memory limit in bytes. + * + * @param int|null $memory + * + * @return self + */ + public function setMemory(?int $memory): self + { + $this->initialized['memory'] = true; + $this->memory = $memory; + return $this; + } + /** + * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + * + * @return string|null + */ + public function getCgroupParent(): ?string + { + return $this->cgroupParent; + } + /** + * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + * + * @param string|null $cgroupParent + * + * @return self + */ + public function setCgroupParent(?string $cgroupParent): self + { + $this->initialized['cgroupParent'] = true; + $this->cgroupParent = $cgroupParent; + return $this; + } + /** + * Block IO weight (relative weight). + * + * @return int|null + */ + public function getBlkioWeight(): ?int + { + return $this->blkioWeight; + } + /** + * Block IO weight (relative weight). + * + * @param int|null $blkioWeight + * + * @return self + */ + public function setBlkioWeight(?int $blkioWeight): self + { + $this->initialized['blkioWeight'] = true; + $this->blkioWeight = $blkioWeight; + return $this; + } + /** + * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. + * + * @return list|null + */ + public function getBlkioWeightDevice(): ?array + { + return $this->blkioWeightDevice; + } + /** + * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. + * + * @param list|null $blkioWeightDevice + * + * @return self + */ + public function setBlkioWeightDevice(?array $blkioWeightDevice): self + { + $this->initialized['blkioWeightDevice'] = true; + $this->blkioWeightDevice = $blkioWeightDevice; + return $this; + } + /** + * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @return list|null + */ + public function getBlkioDeviceReadBps(): ?array + { + return $this->blkioDeviceReadBps; + } + /** + * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @param list|null $blkioDeviceReadBps + * + * @return self + */ + public function setBlkioDeviceReadBps(?array $blkioDeviceReadBps): self + { + $this->initialized['blkioDeviceReadBps'] = true; + $this->blkioDeviceReadBps = $blkioDeviceReadBps; + return $this; + } + /** + * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @return list|null + */ + public function getBlkioDeviceWriteBps(): ?array + { + return $this->blkioDeviceWriteBps; + } + /** + * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @param list|null $blkioDeviceWriteBps + * + * @return self + */ + public function setBlkioDeviceWriteBps(?array $blkioDeviceWriteBps): self + { + $this->initialized['blkioDeviceWriteBps'] = true; + $this->blkioDeviceWriteBps = $blkioDeviceWriteBps; + return $this; + } + /** + * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @return list|null + */ + public function getBlkioDeviceReadIOps(): ?array + { + return $this->blkioDeviceReadIOps; + } + /** + * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @param list|null $blkioDeviceReadIOps + * + * @return self + */ + public function setBlkioDeviceReadIOps(?array $blkioDeviceReadIOps): self + { + $this->initialized['blkioDeviceReadIOps'] = true; + $this->blkioDeviceReadIOps = $blkioDeviceReadIOps; + return $this; + } + /** + * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @return list|null + */ + public function getBlkioDeviceWriteIOps(): ?array + { + return $this->blkioDeviceWriteIOps; + } + /** + * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @param list|null $blkioDeviceWriteIOps + * + * @return self + */ + public function setBlkioDeviceWriteIOps(?array $blkioDeviceWriteIOps): self + { + $this->initialized['blkioDeviceWriteIOps'] = true; + $this->blkioDeviceWriteIOps = $blkioDeviceWriteIOps; + return $this; + } + /** + * The length of a CPU period in microseconds. + * + * @return int|null + */ + public function getCpuPeriod(): ?int + { + return $this->cpuPeriod; + } + /** + * The length of a CPU period in microseconds. + * + * @param int|null $cpuPeriod + * + * @return self + */ + public function setCpuPeriod(?int $cpuPeriod): self + { + $this->initialized['cpuPeriod'] = true; + $this->cpuPeriod = $cpuPeriod; + return $this; + } + /** + * Microseconds of CPU time that the container can get in a CPU period. + * + * @return int|null + */ + public function getCpuQuota(): ?int + { + return $this->cpuQuota; + } + /** + * Microseconds of CPU time that the container can get in a CPU period. + * + * @param int|null $cpuQuota + * + * @return self + */ + public function setCpuQuota(?int $cpuQuota): self + { + $this->initialized['cpuQuota'] = true; + $this->cpuQuota = $cpuQuota; + return $this; + } + /** + * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @return int|null + */ + public function getCpuRealtimePeriod(): ?int + { + return $this->cpuRealtimePeriod; + } + /** + * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @param int|null $cpuRealtimePeriod + * + * @return self + */ + public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self + { + $this->initialized['cpuRealtimePeriod'] = true; + $this->cpuRealtimePeriod = $cpuRealtimePeriod; + return $this; + } + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @return int|null + */ + public function getCpuRealtimeRuntime(): ?int + { + return $this->cpuRealtimeRuntime; + } + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @param int|null $cpuRealtimeRuntime + * + * @return self + */ + public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self + { + $this->initialized['cpuRealtimeRuntime'] = true; + $this->cpuRealtimeRuntime = $cpuRealtimeRuntime; + return $this; + } + /** + * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * + * @return string|null + */ + public function getCpusetCpus(): ?string + { + return $this->cpusetCpus; + } + /** + * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * + * @param string|null $cpusetCpus + * + * @return self + */ + public function setCpusetCpus(?string $cpusetCpus): self + { + $this->initialized['cpusetCpus'] = true; + $this->cpusetCpus = $cpusetCpus; + return $this; + } + /** + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + * + * @return string|null + */ + public function getCpusetMems(): ?string + { + return $this->cpusetMems; + } + /** + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + * + * @param string|null $cpusetMems + * + * @return self + */ + public function setCpusetMems(?string $cpusetMems): self + { + $this->initialized['cpusetMems'] = true; + $this->cpusetMems = $cpusetMems; + return $this; + } + /** + * A list of devices to add to the container. + * + * @return list|null + */ + public function getDevices(): ?array + { + return $this->devices; + } + /** + * A list of devices to add to the container. + * + * @param list|null $devices + * + * @return self + */ + public function setDevices(?array $devices): self + { + $this->initialized['devices'] = true; + $this->devices = $devices; + return $this; + } + /** + * Disk limit (in bytes). + * + * @return int|null + */ + public function getDiskQuota(): ?int + { + return $this->diskQuota; + } + /** + * Disk limit (in bytes). + * + * @param int|null $diskQuota + * + * @return self + */ + public function setDiskQuota(?int $diskQuota): self + { + $this->initialized['diskQuota'] = true; + $this->diskQuota = $diskQuota; + return $this; + } + /** + * Kernel memory limit in bytes. + * + * @return int|null + */ + public function getKernelMemory(): ?int + { + return $this->kernelMemory; + } + /** + * Kernel memory limit in bytes. + * + * @param int|null $kernelMemory + * + * @return self + */ + public function setKernelMemory(?int $kernelMemory): self + { + $this->initialized['kernelMemory'] = true; + $this->kernelMemory = $kernelMemory; + return $this; + } + /** + * Memory soft limit in bytes. + * + * @return int|null + */ + public function getMemoryReservation(): ?int + { + return $this->memoryReservation; + } + /** + * Memory soft limit in bytes. + * + * @param int|null $memoryReservation + * + * @return self + */ + public function setMemoryReservation(?int $memoryReservation): self + { + $this->initialized['memoryReservation'] = true; + $this->memoryReservation = $memoryReservation; + return $this; + } + /** + * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + * + * @return int|null + */ + public function getMemorySwap(): ?int + { + return $this->memorySwap; + } + /** + * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + * + * @param int|null $memorySwap + * + * @return self + */ + public function setMemorySwap(?int $memorySwap): self + { + $this->initialized['memorySwap'] = true; + $this->memorySwap = $memorySwap; + return $this; + } + /** + * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + * + * @return int|null + */ + public function getMemorySwappiness(): ?int + { + return $this->memorySwappiness; + } + /** + * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + * + * @param int|null $memorySwappiness + * + * @return self + */ + public function setMemorySwappiness(?int $memorySwappiness): self + { + $this->initialized['memorySwappiness'] = true; + $this->memorySwappiness = $memorySwappiness; + return $this; + } + /** + * CPU quota in units of 10-9 CPUs. + * + * @return int|null + */ + public function getNanoCpus(): ?int + { + return $this->nanoCpus; + } + /** + * CPU quota in units of 10-9 CPUs. + * + * @param int|null $nanoCpus + * + * @return self + */ + public function setNanoCpus(?int $nanoCpus): self + { + $this->initialized['nanoCpus'] = true; + $this->nanoCpus = $nanoCpus; + return $this; + } + /** + * Disable OOM Killer for the container. + * + * @return bool|null + */ + public function getOomKillDisable(): ?bool + { + return $this->oomKillDisable; + } + /** + * Disable OOM Killer for the container. + * + * @param bool|null $oomKillDisable + * + * @return self + */ + public function setOomKillDisable(?bool $oomKillDisable): self + { + $this->initialized['oomKillDisable'] = true; + $this->oomKillDisable = $oomKillDisable; + return $this; + } + /** + * Tune a container's pids limit. Set -1 for unlimited. + * + * @return int|null + */ + public function getPidsLimit(): ?int + { + return $this->pidsLimit; + } + /** + * Tune a container's pids limit. Set -1 for unlimited. + * + * @param int|null $pidsLimit + * + * @return self + */ + public function setPidsLimit(?int $pidsLimit): self + { + $this->initialized['pidsLimit'] = true; + $this->pidsLimit = $pidsLimit; + return $this; + } + /** + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + * + * @return list|null + */ + public function getUlimits(): ?array + { + return $this->ulimits; + } + /** + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + * + * @param list|null $ulimits + * + * @return self + */ + public function setUlimits(?array $ulimits): self + { + $this->initialized['ulimits'] = true; + $this->ulimits = $ulimits; + return $this; + } + /** + * The number of usable CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @return int|null + */ + public function getCpuCount(): ?int + { + return $this->cpuCount; + } + /** + * The number of usable CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @param int|null $cpuCount + * + * @return self + */ + public function setCpuCount(?int $cpuCount): self + { + $this->initialized['cpuCount'] = true; + $this->cpuCount = $cpuCount; + return $this; + } + /** + * The usable percentage of the available CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @return int|null + */ + public function getCpuPercent(): ?int + { + return $this->cpuPercent; + } + /** + * The usable percentage of the available CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @param int|null $cpuPercent + * + * @return self + */ + public function setCpuPercent(?int $cpuPercent): self + { + $this->initialized['cpuPercent'] = true; + $this->cpuPercent = $cpuPercent; + return $this; + } + /** + * Maximum IOps for the container system drive (Windows only) + * + * @return int|null + */ + public function getIOMaximumIOps(): ?int + { + return $this->iOMaximumIOps; + } + /** + * Maximum IOps for the container system drive (Windows only) + * + * @param int|null $iOMaximumIOps + * + * @return self + */ + public function setIOMaximumIOps(?int $iOMaximumIOps): self + { + $this->initialized['iOMaximumIOps'] = true; + $this->iOMaximumIOps = $iOMaximumIOps; + return $this; + } + /** + * Maximum IO in bytes per second for the container system drive (Windows only) + * + * @return int|null + */ + public function getIOMaximumBandwidth(): ?int + { + return $this->iOMaximumBandwidth; + } + /** + * Maximum IO in bytes per second for the container system drive (Windows only) + * + * @param int|null $iOMaximumBandwidth + * + * @return self + */ + public function setIOMaximumBandwidth(?int $iOMaximumBandwidth): self + { + $this->initialized['iOMaximumBandwidth'] = true; + $this->iOMaximumBandwidth = $iOMaximumBandwidth; + return $this; + } + /** + * The behavior to apply when the container exits. The default is not to restart. + + An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + + * + * @return RestartPolicy|null + */ + public function getRestartPolicy(): ?RestartPolicy + { + return $this->restartPolicy; + } + /** + * The behavior to apply when the container exits. The default is not to restart. + + An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + + * + * @param RestartPolicy|null $restartPolicy + * + * @return self + */ + public function setRestartPolicy(?RestartPolicy $restartPolicy): self + { + $this->initialized['restartPolicy'] = true; + $this->restartPolicy = $restartPolicy; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainersIdUpdatePostResponse200.php b/generated/Model/ContainersIdUpdatePostResponse200.php new file mode 100644 index 000000000..b5b64fa0b --- /dev/null +++ b/generated/Model/ContainersIdUpdatePostResponse200.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * + * + * @var list|null + */ + protected $warnings; + /** + * + * + * @return list|null + */ + public function getWarnings(): ?array + { + return $this->warnings; + } + /** + * + * + * @param list|null $warnings + * + * @return self + */ + public function setWarnings(?array $warnings): self + { + $this->initialized['warnings'] = true; + $this->warnings = $warnings; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainersIdWaitPostResponse200.php b/generated/Model/ContainersIdWaitPostResponse200.php new file mode 100644 index 000000000..80f296ce7 --- /dev/null +++ b/generated/Model/ContainersIdWaitPostResponse200.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * Exit code of the container + * + * @var int|null + */ + protected $statusCode; + /** + * Exit code of the container + * + * @return int|null + */ + public function getStatusCode(): ?int + { + return $this->statusCode; + } + /** + * Exit code of the container + * + * @param int|null $statusCode + * + * @return self + */ + public function setStatusCode(?int $statusCode): self + { + $this->initialized['statusCode'] = true; + $this->statusCode = $statusCode; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainersPrunePostResponse200.php b/generated/Model/ContainersPrunePostResponse200.php new file mode 100644 index 000000000..9967836ae --- /dev/null +++ b/generated/Model/ContainersPrunePostResponse200.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * Container IDs that were deleted + * + * @var list|null + */ + protected $containersDeleted; + /** + * Disk space reclaimed in bytes + * + * @var int|null + */ + protected $spaceReclaimed; + /** + * Container IDs that were deleted + * + * @return list|null + */ + public function getContainersDeleted(): ?array + { + return $this->containersDeleted; + } + /** + * Container IDs that were deleted + * + * @param list|null $containersDeleted + * + * @return self + */ + public function setContainersDeleted(?array $containersDeleted): self + { + $this->initialized['containersDeleted'] = true; + $this->containersDeleted = $containersDeleted; + return $this; + } + /** + * Disk space reclaimed in bytes + * + * @return int|null + */ + public function getSpaceReclaimed(): ?int + { + return $this->spaceReclaimed; + } + /** + * Disk space reclaimed in bytes + * + * @param int|null $spaceReclaimed + * + * @return self + */ + public function setSpaceReclaimed(?int $spaceReclaimed): self + { + $this->initialized['spaceReclaimed'] = true; + $this->spaceReclaimed = $spaceReclaimed; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/CreateImageInfo.php b/generated/Model/CreateImageInfo.php index 413e14686..d7847e449 100644 --- a/generated/Model/CreateImageInfo.php +++ b/generated/Model/CreateImageInfo.php @@ -5,123 +5,123 @@ class CreateImageInfo { /** - * @var string + * @var array */ - protected $id; + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } /** - * @var string + * + * + * @var string|null */ protected $error; /** - * @var string + * + * + * @var string|null */ protected $status; /** - * @var string + * + * + * @var string|null */ protected $progress; /** - * @var ProgressDetail + * + * + * @var ProgressDetail|null */ protected $progressDetail; - /** - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * @param string $id + * * - * @return self - */ - public function setId($id = null) - { - $this->id = $id; - - return $this; - } - - /** - * @return string + * @return string|null */ - public function getError() + public function getError(): ?string { return $this->error; } - /** - * @param string $error + * + * + * @param string|null $error * * @return self */ - public function setError($error = null) + public function setError(?string $error): self { + $this->initialized['error'] = true; $this->error = $error; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getStatus() + public function getStatus(): ?string { return $this->status; } - /** - * @param string $status + * + * + * @param string|null $status * * @return self */ - public function setStatus($status = null) + public function setStatus(?string $status): self { + $this->initialized['status'] = true; $this->status = $status; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getProgress() + public function getProgress(): ?string { return $this->progress; } - /** - * @param string $progress + * + * + * @param string|null $progress * * @return self */ - public function setProgress($progress = null) + public function setProgress(?string $progress): self { + $this->initialized['progress'] = true; $this->progress = $progress; - return $this; } - /** - * @return ProgressDetail + * + * + * @return ProgressDetail|null */ - public function getProgressDetail() + public function getProgressDetail(): ?ProgressDetail { return $this->progressDetail; } - /** - * @param ProgressDetail $progressDetail + * + * + * @param ProgressDetail|null $progressDetail * * @return self */ - public function setProgressDetail(?ProgressDetail $progressDetail = null) + public function setProgressDetail(?ProgressDetail $progressDetail): self { + $this->initialized['progressDetail'] = true; $this->progressDetail = $progressDetail; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/Device.php b/generated/Model/Device.php deleted file mode 100644 index db35ac42c..000000000 --- a/generated/Model/Device.php +++ /dev/null @@ -1,79 +0,0 @@ -pathOnHost; - } - - /** - * @param string $pathOnHost - * - * @return self - */ - public function setPathOnHost($pathOnHost = null) - { - $this->pathOnHost = $pathOnHost; - - return $this; - } - - /** - * @return string - */ - public function getPathInContainer() - { - return $this->pathInContainer; - } - - /** - * @param string $pathInContainer - * - * @return self - */ - public function setPathInContainer($pathInContainer = null) - { - $this->pathInContainer = $pathInContainer; - - return $this; - } - - /** - * @return string - */ - public function getCgroupPermissions() - { - return $this->cgroupPermissions; - } - - /** - * @param string $cgroupPermissions - * - * @return self - */ - public function setCgroupPermissions($cgroupPermissions = null) - { - $this->cgroupPermissions = $cgroupPermissions; - - return $this; - } -} diff --git a/generated/Model/DeviceMapping.php b/generated/Model/DeviceMapping.php new file mode 100644 index 000000000..169986cfc --- /dev/null +++ b/generated/Model/DeviceMapping.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $pathOnHost; + /** + * + * + * @var string|null + */ + protected $pathInContainer; + /** + * + * + * @var string|null + */ + protected $cgroupPermissions; + /** + * + * + * @return string|null + */ + public function getPathOnHost(): ?string + { + return $this->pathOnHost; + } + /** + * + * + * @param string|null $pathOnHost + * + * @return self + */ + public function setPathOnHost(?string $pathOnHost): self + { + $this->initialized['pathOnHost'] = true; + $this->pathOnHost = $pathOnHost; + return $this; + } + /** + * + * + * @return string|null + */ + public function getPathInContainer(): ?string + { + return $this->pathInContainer; + } + /** + * + * + * @param string|null $pathInContainer + * + * @return self + */ + public function setPathInContainer(?string $pathInContainer): self + { + $this->initialized['pathInContainer'] = true; + $this->pathInContainer = $pathInContainer; + return $this; + } + /** + * + * + * @return string|null + */ + public function getCgroupPermissions(): ?string + { + return $this->cgroupPermissions; + } + /** + * + * + * @param string|null $cgroupPermissions + * + * @return self + */ + public function setCgroupPermissions(?string $cgroupPermissions): self + { + $this->initialized['cgroupPermissions'] = true; + $this->cgroupPermissions = $cgroupPermissions; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/DeviceRate.php b/generated/Model/DeviceRate.php deleted file mode 100644 index 2c174e7bc..000000000 --- a/generated/Model/DeviceRate.php +++ /dev/null @@ -1,55 +0,0 @@ -path; - } - - /** - * @param string $path - * - * @return self - */ - public function setPath($path = null) - { - $this->path = $path; - - return $this; - } - - /** - * @return int|string - */ - public function getRate() - { - return $this->rate; - } - - /** - * @param int|string $rate - * - * @return self - */ - public function setRate($rate = null) - { - $this->rate = $rate; - - return $this; - } -} diff --git a/generated/Model/DeviceWeight.php b/generated/Model/DeviceWeight.php deleted file mode 100644 index a6d5c7d46..000000000 --- a/generated/Model/DeviceWeight.php +++ /dev/null @@ -1,55 +0,0 @@ -path; - } - - /** - * @param string $path - * - * @return self - */ - public function setPath($path = null) - { - $this->path = $path; - - return $this; - } - - /** - * @return int - */ - public function getWeight() - { - return $this->weight; - } - - /** - * @param int $weight - * - * @return self - */ - public function setWeight($weight = null) - { - $this->weight = $weight; - - return $this; - } -} diff --git a/generated/Model/Driver.php b/generated/Model/Driver.php deleted file mode 100644 index cba4ea5b1..000000000 --- a/generated/Model/Driver.php +++ /dev/null @@ -1,55 +0,0 @@ -name; - } - - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } - - /** - * @return string[]|null - */ - public function getOptions() - { - return $this->options; - } - - /** - * @param string[]|null $options - * - * @return self - */ - public function setOptions($options = null) - { - $this->options = $options; - - return $this; - } -} diff --git a/generated/Model/Endpoint.php b/generated/Model/Endpoint.php deleted file mode 100644 index 6e772a700..000000000 --- a/generated/Model/Endpoint.php +++ /dev/null @@ -1,79 +0,0 @@ -spec; - } - - /** - * @param EndpointSpec $spec - * - * @return self - */ - public function setSpec(?EndpointSpec $spec = null) - { - $this->spec = $spec; - - return $this; - } - - /** - * @return PortConfig[]|null - */ - public function getExposedPorts() - { - return $this->exposedPorts; - } - - /** - * @param PortConfig[]|null $exposedPorts - * - * @return self - */ - public function setExposedPorts($exposedPorts = null) - { - $this->exposedPorts = $exposedPorts; - - return $this; - } - - /** - * @return EndpointVirtualIP[]|null - */ - public function getVirtualIPs() - { - return $this->virtualIPs; - } - - /** - * @param EndpointVirtualIP[]|null $virtualIPs - * - * @return self - */ - public function setVirtualIPs($virtualIPs = null) - { - $this->virtualIPs = $virtualIPs; - - return $this; - } -} diff --git a/generated/Model/EndpointConfig.php b/generated/Model/EndpointConfig.php deleted file mode 100644 index 34b9f1f17..000000000 --- a/generated/Model/EndpointConfig.php +++ /dev/null @@ -1,55 +0,0 @@ -iPv4Address; - } - - /** - * @param string $iPv4Address - * - * @return self - */ - public function setIPv4Address($iPv4Address = null) - { - $this->iPv4Address = $iPv4Address; - - return $this; - } - - /** - * @return string - */ - public function getIPv6Address() - { - return $this->iPv6Address; - } - - /** - * @param string $iPv6Address - * - * @return self - */ - public function setIPv6Address($iPv6Address = null) - { - $this->iPv6Address = $iPv6Address; - - return $this; - } -} diff --git a/generated/Model/EndpointIPAMConfig.php b/generated/Model/EndpointIPAMConfig.php deleted file mode 100644 index 693a136e2..000000000 --- a/generated/Model/EndpointIPAMConfig.php +++ /dev/null @@ -1,79 +0,0 @@ -iPv4Address; - } - - /** - * @param string $iPv4Address - * - * @return self - */ - public function setIPv4Address($iPv4Address = null) - { - $this->iPv4Address = $iPv4Address; - - return $this; - } - - /** - * @return string - */ - public function getIPv6Address() - { - return $this->iPv6Address; - } - - /** - * @param string $iPv6Address - * - * @return self - */ - public function setIPv6Address($iPv6Address = null) - { - $this->iPv6Address = $iPv6Address; - - return $this; - } - - /** - * @return string[] - */ - public function getLinkLocalIPs() - { - return $this->linkLocalIPs; - } - - /** - * @param string[] $linkLocalIPs - * - * @return self - */ - public function setLinkLocalIPs(?array $linkLocalIPs = null) - { - $this->linkLocalIPs = $linkLocalIPs; - - return $this; - } -} diff --git a/generated/Model/EndpointPortConfig.php b/generated/Model/EndpointPortConfig.php new file mode 100644 index 000000000..bfcb452d5 --- /dev/null +++ b/generated/Model/EndpointPortConfig.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $name; + /** + * + * + * @var string|null + */ + protected $protocol; + /** + * The port inside the container. + * + * @var int|null + */ + protected $targetPort; + /** + * The port on the swarm hosts. + * + * @var int|null + */ + protected $publishedPort; + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * + * + * @return string|null + */ + public function getProtocol(): ?string + { + return $this->protocol; + } + /** + * + * + * @param string|null $protocol + * + * @return self + */ + public function setProtocol(?string $protocol): self + { + $this->initialized['protocol'] = true; + $this->protocol = $protocol; + return $this; + } + /** + * The port inside the container. + * + * @return int|null + */ + public function getTargetPort(): ?int + { + return $this->targetPort; + } + /** + * The port inside the container. + * + * @param int|null $targetPort + * + * @return self + */ + public function setTargetPort(?int $targetPort): self + { + $this->initialized['targetPort'] = true; + $this->targetPort = $targetPort; + return $this; + } + /** + * The port on the swarm hosts. + * + * @return int|null + */ + public function getPublishedPort(): ?int + { + return $this->publishedPort; + } + /** + * The port on the swarm hosts. + * + * @param int|null $publishedPort + * + * @return self + */ + public function setPublishedPort(?int $publishedPort): self + { + $this->initialized['publishedPort'] = true; + $this->publishedPort = $publishedPort; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/EndpointSettings.php b/generated/Model/EndpointSettings.php index 5add44948..b35880612 100644 --- a/generated/Model/EndpointSettings.php +++ b/generated/Model/EndpointSettings.php @@ -5,291 +5,347 @@ class EndpointSettings { /** - * @var EndpointIPAMConfig + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * IPAM configurations for the endpoint + * + * @var EndpointSettingsIPAMConfig|null */ protected $iPAMConfig; /** - * @var string[] + * + * + * @var list|null */ protected $links; /** - * @var string[] + * + * + * @var list|null */ protected $aliases; /** - * @var string + * + * + * @var string|null */ protected $networkID; /** - * @var string + * + * + * @var string|null */ protected $endpointID; /** - * @var string + * + * + * @var string|null */ protected $gateway; /** - * @var string + * + * + * @var string|null */ protected $iPAddress; /** - * @var int + * + * + * @var int|null */ protected $iPPrefixLen; /** - * @var string + * + * + * @var string|null */ protected $iPv6Gateway; /** - * @var string + * + * + * @var string|null */ protected $globalIPv6Address; /** - * @var int + * + * + * @var int|null */ protected $globalIPv6PrefixLen; /** - * @var string + * + * + * @var string|null */ protected $macAddress; - /** - * @return EndpointIPAMConfig + * IPAM configurations for the endpoint + * + * @return EndpointSettingsIPAMConfig|null */ - public function getIPAMConfig() + public function getIPAMConfig(): ?EndpointSettingsIPAMConfig { return $this->iPAMConfig; } - /** - * @param EndpointIPAMConfig $iPAMConfig + * IPAM configurations for the endpoint + * + * @param EndpointSettingsIPAMConfig|null $iPAMConfig * * @return self */ - public function setIPAMConfig(?EndpointIPAMConfig $iPAMConfig = null) + public function setIPAMConfig(?EndpointSettingsIPAMConfig $iPAMConfig): self { + $this->initialized['iPAMConfig'] = true; $this->iPAMConfig = $iPAMConfig; - return $this; } - /** - * @return string[] + * + * + * @return list|null */ - public function getLinks() + public function getLinks(): ?array { return $this->links; } - /** - * @param string[] $links + * + * + * @param list|null $links * * @return self */ - public function setLinks(?array $links = null) + public function setLinks(?array $links): self { + $this->initialized['links'] = true; $this->links = $links; - return $this; } - /** - * @return string[] + * + * + * @return list|null */ - public function getAliases() + public function getAliases(): ?array { return $this->aliases; } - /** - * @param string[] $aliases + * + * + * @param list|null $aliases * * @return self */ - public function setAliases(?array $aliases = null) + public function setAliases(?array $aliases): self { + $this->initialized['aliases'] = true; $this->aliases = $aliases; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getNetworkID() + public function getNetworkID(): ?string { return $this->networkID; } - /** - * @param string $networkID + * + * + * @param string|null $networkID * * @return self */ - public function setNetworkID($networkID = null) + public function setNetworkID(?string $networkID): self { + $this->initialized['networkID'] = true; $this->networkID = $networkID; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getEndpointID() + public function getEndpointID(): ?string { return $this->endpointID; } - /** - * @param string $endpointID + * + * + * @param string|null $endpointID * * @return self */ - public function setEndpointID($endpointID = null) + public function setEndpointID(?string $endpointID): self { + $this->initialized['endpointID'] = true; $this->endpointID = $endpointID; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getGateway() + public function getGateway(): ?string { return $this->gateway; } - /** - * @param string $gateway + * + * + * @param string|null $gateway * * @return self */ - public function setGateway($gateway = null) + public function setGateway(?string $gateway): self { + $this->initialized['gateway'] = true; $this->gateway = $gateway; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getIPAddress() + public function getIPAddress(): ?string { return $this->iPAddress; } - /** - * @param string $iPAddress + * + * + * @param string|null $iPAddress * * @return self */ - public function setIPAddress($iPAddress = null) + public function setIPAddress(?string $iPAddress): self { + $this->initialized['iPAddress'] = true; $this->iPAddress = $iPAddress; - return $this; } - /** - * @return int + * + * + * @return int|null */ - public function getIPPrefixLen() + public function getIPPrefixLen(): ?int { return $this->iPPrefixLen; } - /** - * @param int $iPPrefixLen + * + * + * @param int|null $iPPrefixLen * * @return self */ - public function setIPPrefixLen($iPPrefixLen = null) + public function setIPPrefixLen(?int $iPPrefixLen): self { + $this->initialized['iPPrefixLen'] = true; $this->iPPrefixLen = $iPPrefixLen; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getIPv6Gateway() + public function getIPv6Gateway(): ?string { return $this->iPv6Gateway; } - /** - * @param string $iPv6Gateway + * + * + * @param string|null $iPv6Gateway * * @return self */ - public function setIPv6Gateway($iPv6Gateway = null) + public function setIPv6Gateway(?string $iPv6Gateway): self { + $this->initialized['iPv6Gateway'] = true; $this->iPv6Gateway = $iPv6Gateway; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getGlobalIPv6Address() + public function getGlobalIPv6Address(): ?string { return $this->globalIPv6Address; } - /** - * @param string $globalIPv6Address + * + * + * @param string|null $globalIPv6Address * * @return self */ - public function setGlobalIPv6Address($globalIPv6Address = null) + public function setGlobalIPv6Address(?string $globalIPv6Address): self { + $this->initialized['globalIPv6Address'] = true; $this->globalIPv6Address = $globalIPv6Address; - return $this; } - /** - * @return int + * + * + * @return int|null */ - public function getGlobalIPv6PrefixLen() + public function getGlobalIPv6PrefixLen(): ?int { return $this->globalIPv6PrefixLen; } - /** - * @param int $globalIPv6PrefixLen + * + * + * @param int|null $globalIPv6PrefixLen * * @return self */ - public function setGlobalIPv6PrefixLen($globalIPv6PrefixLen = null) + public function setGlobalIPv6PrefixLen(?int $globalIPv6PrefixLen): self { + $this->initialized['globalIPv6PrefixLen'] = true; $this->globalIPv6PrefixLen = $globalIPv6PrefixLen; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getMacAddress() + public function getMacAddress(): ?string { return $this->macAddress; } - /** - * @param string $macAddress + * + * + * @param string|null $macAddress * * @return self */ - public function setMacAddress($macAddress = null) + public function setMacAddress(?string $macAddress): self { + $this->initialized['macAddress'] = true; $this->macAddress = $macAddress; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/EndpointSettingsIPAMConfig.php b/generated/Model/EndpointSettingsIPAMConfig.php new file mode 100644 index 000000000..e3eb31d5e --- /dev/null +++ b/generated/Model/EndpointSettingsIPAMConfig.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $iPv4Address; + /** + * + * + * @var string|null + */ + protected $iPv6Address; + /** + * + * + * @var list|null + */ + protected $linkLocalIPs; + /** + * + * + * @return string|null + */ + public function getIPv4Address(): ?string + { + return $this->iPv4Address; + } + /** + * + * + * @param string|null $iPv4Address + * + * @return self + */ + public function setIPv4Address(?string $iPv4Address): self + { + $this->initialized['iPv4Address'] = true; + $this->iPv4Address = $iPv4Address; + return $this; + } + /** + * + * + * @return string|null + */ + public function getIPv6Address(): ?string + { + return $this->iPv6Address; + } + /** + * + * + * @param string|null $iPv6Address + * + * @return self + */ + public function setIPv6Address(?string $iPv6Address): self + { + $this->initialized['iPv6Address'] = true; + $this->iPv6Address = $iPv6Address; + return $this; + } + /** + * + * + * @return list|null + */ + public function getLinkLocalIPs(): ?array + { + return $this->linkLocalIPs; + } + /** + * + * + * @param list|null $linkLocalIPs + * + * @return self + */ + public function setLinkLocalIPs(?array $linkLocalIPs): self + { + $this->initialized['linkLocalIPs'] = true; + $this->linkLocalIPs = $linkLocalIPs; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/EndpointSpec.php b/generated/Model/EndpointSpec.php index 2f8b3f136..9a44fc443 100644 --- a/generated/Model/EndpointSpec.php +++ b/generated/Model/EndpointSpec.php @@ -5,51 +5,67 @@ class EndpointSpec { /** - * @var string + * @var array */ - protected $mode; + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * The mode of resolution to use for internal load balancing between tasks. + * + * @var string|null + */ + protected $mode = 'vip'; /** - * @var PortConfig[]|null + * List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used. + * + * @var list|null */ protected $ports; - /** - * @return string + * The mode of resolution to use for internal load balancing between tasks. + * + * @return string|null */ - public function getMode() + public function getMode(): ?string { return $this->mode; } - /** - * @param string $mode + * The mode of resolution to use for internal load balancing between tasks. + * + * @param string|null $mode * * @return self */ - public function setMode($mode = null) + public function setMode(?string $mode): self { + $this->initialized['mode'] = true; $this->mode = $mode; - return $this; } - /** - * @return PortConfig[]|null + * List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used. + * + * @return list|null */ - public function getPorts() + public function getPorts(): ?array { return $this->ports; } - /** - * @param PortConfig[]|null $ports + * List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used. + * + * @param list|null $ports * * @return self */ - public function setPorts($ports = null) + public function setPorts(?array $ports): self { + $this->initialized['ports'] = true; $this->ports = $ports; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/EndpointVirtualIP.php b/generated/Model/EndpointVirtualIP.php deleted file mode 100644 index 7880d9da1..000000000 --- a/generated/Model/EndpointVirtualIP.php +++ /dev/null @@ -1,55 +0,0 @@ -networkID; - } - - /** - * @param string $networkID - * - * @return self - */ - public function setNetworkID($networkID = null) - { - $this->networkID = $networkID; - - return $this; - } - - /** - * @return string - */ - public function getAddr() - { - return $this->addr; - } - - /** - * @param string $addr - * - * @return self - */ - public function setAddr($addr = null) - { - $this->addr = $addr; - - return $this; - } -} diff --git a/generated/Model/ErrorDetail.php b/generated/Model/ErrorDetail.php index ca9079898..0505364f3 100644 --- a/generated/Model/ErrorDetail.php +++ b/generated/Model/ErrorDetail.php @@ -5,51 +5,67 @@ class ErrorDetail { /** - * @var int + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var int|null */ protected $code; /** - * @var string + * + * + * @var string|null */ protected $message; - /** - * @return int + * + * + * @return int|null */ - public function getCode() + public function getCode(): ?int { return $this->code; } - /** - * @param int $code + * + * + * @param int|null $code * * @return self */ - public function setCode($code = null) + public function setCode(?int $code): self { + $this->initialized['code'] = true; $this->code = $code; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getMessage() + public function getMessage(): ?string { return $this->message; } - /** - * @param string $message + * + * + * @param string|null $message * * @return self */ - public function setMessage($message = null) + public function setMessage(?string $message): self { + $this->initialized['message'] = true; $this->message = $message; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/ErrorResponse.php b/generated/Model/ErrorResponse.php new file mode 100644 index 000000000..409c2f1e0 --- /dev/null +++ b/generated/Model/ErrorResponse.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * The error message. + * + * @var string|null + */ + protected $message; + /** + * The error message. + * + * @return string|null + */ + public function getMessage(): ?string + { + return $this->message; + } + /** + * The error message. + * + * @param string|null $message + * + * @return self + */ + public function setMessage(?string $message): self + { + $this->initialized['message'] = true; + $this->message = $message; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Event.php b/generated/Model/Event.php deleted file mode 100644 index 19c246d0d..000000000 --- a/generated/Model/Event.php +++ /dev/null @@ -1,127 +0,0 @@ -status; - } - - /** - * @param string $status - * - * @return self - */ - public function setStatus($status = null) - { - $this->status = $status; - - return $this; - } - - /** - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * @param string $id - * - * @return self - */ - public function setId($id = null) - { - $this->id = $id; - - return $this; - } - - /** - * @return string - */ - public function getFrom() - { - return $this->from; - } - - /** - * @param string $from - * - * @return self - */ - public function setFrom($from = null) - { - $this->from = $from; - - return $this; - } - - /** - * @return int - */ - public function getTime() - { - return $this->time; - } - - /** - * @param int $time - * - * @return self - */ - public function setTime($time = null) - { - $this->time = $time; - - return $this; - } - - /** - * @return int - */ - public function getTimeNano() - { - return $this->timeNano; - } - - /** - * @param int $timeNano - * - * @return self - */ - public function setTimeNano($timeNano = null) - { - $this->timeNano = $timeNano; - - return $this; - } -} diff --git a/generated/Model/EventsGetResponse200.php b/generated/Model/EventsGetResponse200.php new file mode 100644 index 000000000..6af18eb79 --- /dev/null +++ b/generated/Model/EventsGetResponse200.php @@ -0,0 +1,155 @@ +initialized); + } + /** + * The type of object emitting the event + * + * @var string|null + */ + protected $type; + /** + * The type of event + * + * @var string|null + */ + protected $action; + /** + * + * + * @var EventsGetResponse200Actor|null + */ + protected $actor; + /** + * Timestamp of event + * + * @var int|null + */ + protected $time; + /** + * Timestamp of event, with nanosecond accuracy + * + * @var int|null + */ + protected $timeNano; + /** + * The type of object emitting the event + * + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + /** + * The type of object emitting the event + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self + { + $this->initialized['type'] = true; + $this->type = $type; + return $this; + } + /** + * The type of event + * + * @return string|null + */ + public function getAction(): ?string + { + return $this->action; + } + /** + * The type of event + * + * @param string|null $action + * + * @return self + */ + public function setAction(?string $action): self + { + $this->initialized['action'] = true; + $this->action = $action; + return $this; + } + /** + * + * + * @return EventsGetResponse200Actor|null + */ + public function getActor(): ?EventsGetResponse200Actor + { + return $this->actor; + } + /** + * + * + * @param EventsGetResponse200Actor|null $actor + * + * @return self + */ + public function setActor(?EventsGetResponse200Actor $actor): self + { + $this->initialized['actor'] = true; + $this->actor = $actor; + return $this; + } + /** + * Timestamp of event + * + * @return int|null + */ + public function getTime(): ?int + { + return $this->time; + } + /** + * Timestamp of event + * + * @param int|null $time + * + * @return self + */ + public function setTime(?int $time): self + { + $this->initialized['time'] = true; + $this->time = $time; + return $this; + } + /** + * Timestamp of event, with nanosecond accuracy + * + * @return int|null + */ + public function getTimeNano(): ?int + { + return $this->timeNano; + } + /** + * Timestamp of event, with nanosecond accuracy + * + * @param int|null $timeNano + * + * @return self + */ + public function setTimeNano(?int $timeNano): self + { + $this->initialized['timeNano'] = true; + $this->timeNano = $timeNano; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/EventsGetResponse200Actor.php b/generated/Model/EventsGetResponse200Actor.php new file mode 100644 index 000000000..f4260221f --- /dev/null +++ b/generated/Model/EventsGetResponse200Actor.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The ID of the object emitting the event + * + * @var string|null + */ + protected $iD; + /** + * Various key/value attributes of the object, depending on its type + * + * @var array|null + */ + protected $attributes; + /** + * The ID of the object emitting the event + * + * @return string|null + */ + public function getID(): ?string + { + return $this->iD; + } + /** + * The ID of the object emitting the event + * + * @param string|null $iD + * + * @return self + */ + public function setID(?string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + return $this; + } + /** + * Various key/value attributes of the object, depending on its type + * + * @return array|null + */ + public function getAttributes(): ?iterable + { + return $this->attributes; + } + /** + * Various key/value attributes of the object, depending on its type + * + * @param array|null $attributes + * + * @return self + */ + public function setAttributes(?iterable $attributes): self + { + $this->initialized['attributes'] = true; + $this->attributes = $attributes; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ExecCommand.php b/generated/Model/ExecCommand.php deleted file mode 100644 index 8ec51546b..000000000 --- a/generated/Model/ExecCommand.php +++ /dev/null @@ -1,223 +0,0 @@ -iD; - } - - /** - * @param string $iD - * - * @return self - */ - public function setID($iD = null) - { - $this->iD = $iD; - - return $this; - } - - /** - * @return bool - */ - public function getRunning() - { - return $this->running; - } - - /** - * @param bool $running - * - * @return self - */ - public function setRunning($running = null) - { - $this->running = $running; - - return $this; - } - - /** - * @return int - */ - public function getExitCode() - { - return $this->exitCode; - } - - /** - * @param int $exitCode - * - * @return self - */ - public function setExitCode($exitCode = null) - { - $this->exitCode = $exitCode; - - return $this; - } - - /** - * @return ProcessConfig - */ - public function getProcessConfig() - { - return $this->processConfig; - } - - /** - * @param ProcessConfig $processConfig - * - * @return self - */ - public function setProcessConfig(?ProcessConfig $processConfig = null) - { - $this->processConfig = $processConfig; - - return $this; - } - - /** - * @return bool - */ - public function getOpenStdin() - { - return $this->openStdin; - } - - /** - * @param bool $openStdin - * - * @return self - */ - public function setOpenStdin($openStdin = null) - { - $this->openStdin = $openStdin; - - return $this; - } - - /** - * @return bool - */ - public function getOpenStderr() - { - return $this->openStderr; - } - - /** - * @param bool $openStderr - * - * @return self - */ - public function setOpenStderr($openStderr = null) - { - $this->openStderr = $openStderr; - - return $this; - } - - /** - * @return bool - */ - public function getOpenStdout() - { - return $this->openStdout; - } - - /** - * @param bool $openStdout - * - * @return self - */ - public function setOpenStdout($openStdout = null) - { - $this->openStdout = $openStdout; - - return $this; - } - - /** - * @return Container - */ - public function getContainer() - { - return $this->container; - } - - /** - * @param Container $container - * - * @return self - */ - public function setContainer(?Container $container = null) - { - $this->container = $container; - - return $this; - } - - /** - * @return string - */ - public function getDetachKeys() - { - return $this->detachKeys; - } - - /** - * @param string $detachKeys - * - * @return self - */ - public function setDetachKeys($detachKeys = null) - { - $this->detachKeys = $detachKeys; - - return $this; - } -} diff --git a/generated/Model/ExecConfig.php b/generated/Model/ExecConfig.php deleted file mode 100644 index 828862cf7..000000000 --- a/generated/Model/ExecConfig.php +++ /dev/null @@ -1,151 +0,0 @@ -attachStdin; - } - - /** - * @param bool $attachStdin - * - * @return self - */ - public function setAttachStdin($attachStdin = null) - { - $this->attachStdin = $attachStdin; - - return $this; - } - - /** - * @return bool - */ - public function getAttachStdout() - { - return $this->attachStdout; - } - - /** - * @param bool $attachStdout - * - * @return self - */ - public function setAttachStdout($attachStdout = null) - { - $this->attachStdout = $attachStdout; - - return $this; - } - - /** - * @return bool - */ - public function getAttachStderr() - { - return $this->attachStderr; - } - - /** - * @param bool $attachStderr - * - * @return self - */ - public function setAttachStderr($attachStderr = null) - { - $this->attachStderr = $attachStderr; - - return $this; - } - - /** - * @return bool - */ - public function getTty() - { - return $this->tty; - } - - /** - * @param bool $tty - * - * @return self - */ - public function setTty($tty = null) - { - $this->tty = $tty; - - return $this; - } - - /** - * @return string[]|null - */ - public function getCmd() - { - return $this->cmd; - } - - /** - * @param string[]|null $cmd - * - * @return self - */ - public function setCmd($cmd = null) - { - $this->cmd = $cmd; - - return $this; - } - - /** - * @return string - */ - public function getDetachKeys() - { - return $this->detachKeys; - } - - /** - * @param string $detachKeys - * - * @return self - */ - public function setDetachKeys($detachKeys = null) - { - $this->detachKeys = $detachKeys; - - return $this; - } -} diff --git a/generated/Model/ExecCreateResult.php b/generated/Model/ExecCreateResult.php deleted file mode 100644 index 52e798c0d..000000000 --- a/generated/Model/ExecCreateResult.php +++ /dev/null @@ -1,55 +0,0 @@ -id; - } - - /** - * @param string $id - * - * @return self - */ - public function setId($id = null) - { - $this->id = $id; - - return $this; - } - - /** - * @return string[]|null - */ - public function getWarnings() - { - return $this->warnings; - } - - /** - * @param string[]|null $warnings - * - * @return self - */ - public function setWarnings($warnings = null) - { - $this->warnings = $warnings; - - return $this; - } -} diff --git a/generated/Model/ExecIdJsonGetResponse200.php b/generated/Model/ExecIdJsonGetResponse200.php new file mode 100644 index 000000000..85d33a8b6 --- /dev/null +++ b/generated/Model/ExecIdJsonGetResponse200.php @@ -0,0 +1,267 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $iD; + /** + * + * + * @var bool|null + */ + protected $running; + /** + * + * + * @var int|null + */ + protected $exitCode; + /** + * + * + * @var ProcessConfig|null + */ + protected $processConfig; + /** + * + * + * @var bool|null + */ + protected $openStdin; + /** + * + * + * @var bool|null + */ + protected $openStderr; + /** + * + * + * @var bool|null + */ + protected $openStdout; + /** + * + * + * @var string|null + */ + protected $containerID; + /** + * The system process ID for the exec process. + * + * @var int|null + */ + protected $pid; + /** + * + * + * @return string|null + */ + public function getID(): ?string + { + return $this->iD; + } + /** + * + * + * @param string|null $iD + * + * @return self + */ + public function setID(?string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getRunning(): ?bool + { + return $this->running; + } + /** + * + * + * @param bool|null $running + * + * @return self + */ + public function setRunning(?bool $running): self + { + $this->initialized['running'] = true; + $this->running = $running; + return $this; + } + /** + * + * + * @return int|null + */ + public function getExitCode(): ?int + { + return $this->exitCode; + } + /** + * + * + * @param int|null $exitCode + * + * @return self + */ + public function setExitCode(?int $exitCode): self + { + $this->initialized['exitCode'] = true; + $this->exitCode = $exitCode; + return $this; + } + /** + * + * + * @return ProcessConfig|null + */ + public function getProcessConfig(): ?ProcessConfig + { + return $this->processConfig; + } + /** + * + * + * @param ProcessConfig|null $processConfig + * + * @return self + */ + public function setProcessConfig(?ProcessConfig $processConfig): self + { + $this->initialized['processConfig'] = true; + $this->processConfig = $processConfig; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getOpenStdin(): ?bool + { + return $this->openStdin; + } + /** + * + * + * @param bool|null $openStdin + * + * @return self + */ + public function setOpenStdin(?bool $openStdin): self + { + $this->initialized['openStdin'] = true; + $this->openStdin = $openStdin; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getOpenStderr(): ?bool + { + return $this->openStderr; + } + /** + * + * + * @param bool|null $openStderr + * + * @return self + */ + public function setOpenStderr(?bool $openStderr): self + { + $this->initialized['openStderr'] = true; + $this->openStderr = $openStderr; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getOpenStdout(): ?bool + { + return $this->openStdout; + } + /** + * + * + * @param bool|null $openStdout + * + * @return self + */ + public function setOpenStdout(?bool $openStdout): self + { + $this->initialized['openStdout'] = true; + $this->openStdout = $openStdout; + return $this; + } + /** + * + * + * @return string|null + */ + public function getContainerID(): ?string + { + return $this->containerID; + } + /** + * + * + * @param string|null $containerID + * + * @return self + */ + public function setContainerID(?string $containerID): self + { + $this->initialized['containerID'] = true; + $this->containerID = $containerID; + return $this; + } + /** + * The system process ID for the exec process. + * + * @return int|null + */ + public function getPid(): ?int + { + return $this->pid; + } + /** + * The system process ID for the exec process. + * + * @param int|null $pid + * + * @return self + */ + public function setPid(?int $pid): self + { + $this->initialized['pid'] = true; + $this->pid = $pid; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ExecIdStartPostBody.php b/generated/Model/ExecIdStartPostBody.php new file mode 100644 index 000000000..ac6cf8baa --- /dev/null +++ b/generated/Model/ExecIdStartPostBody.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * Detach from the command. + * + * @var bool|null + */ + protected $detach; + /** + * Allocate a pseudo-TTY. + * + * @var bool|null + */ + protected $tty; + /** + * Detach from the command. + * + * @return bool|null + */ + public function getDetach(): ?bool + { + return $this->detach; + } + /** + * Detach from the command. + * + * @param bool|null $detach + * + * @return self + */ + public function setDetach(?bool $detach): self + { + $this->initialized['detach'] = true; + $this->detach = $detach; + return $this; + } + /** + * Allocate a pseudo-TTY. + * + * @return bool|null + */ + public function getTty(): ?bool + { + return $this->tty; + } + /** + * Allocate a pseudo-TTY. + * + * @param bool|null $tty + * + * @return self + */ + public function setTty(?bool $tty): self + { + $this->initialized['tty'] = true; + $this->tty = $tty; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ExecStartConfig.php b/generated/Model/ExecStartConfig.php deleted file mode 100644 index 2daf1fbcf..000000000 --- a/generated/Model/ExecStartConfig.php +++ /dev/null @@ -1,55 +0,0 @@ -detach; - } - - /** - * @param bool $detach - * - * @return self - */ - public function setDetach($detach = null) - { - $this->detach = $detach; - - return $this; - } - - /** - * @return bool - */ - public function getTty() - { - return $this->tty; - } - - /** - * @param bool $tty - * - * @return self - */ - public function setTty($tty = null) - { - $this->tty = $tty; - - return $this; - } -} diff --git a/generated/Model/GlobalService.php b/generated/Model/GlobalService.php deleted file mode 100644 index 118e55356..000000000 --- a/generated/Model/GlobalService.php +++ /dev/null @@ -1,7 +0,0 @@ -initialized); + } + /** + * + * + * @var string|null */ protected $name; /** - * @var mixed + * + * + * @var array|null */ protected $data; - /** - * @return string + * + * + * @return string|null */ - public function getName() + public function getName(): ?string { return $this->name; } - /** - * @param string $name + * + * + * @param string|null $name * * @return self */ - public function setName($name = null) + public function setName(?string $name): self { + $this->initialized['name'] = true; $this->name = $name; - return $this; } - /** - * @return mixed + * + * + * @return array|null */ - public function getData() + public function getData(): ?iterable { return $this->data; } - /** - * @param mixed $data + * + * + * @param array|null $data * * @return self */ - public function setData($data = null) + public function setData(?iterable $data): self { + $this->initialized['data'] = true; $this->data = $data; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/HostConfig.php b/generated/Model/HostConfig.php index 34376e6b6..a157de352 100644 --- a/generated/Model/HostConfig.php +++ b/generated/Model/HostConfig.php @@ -5,1179 +5,1860 @@ class HostConfig { /** - * @var string[]|null + * @var array */ - protected $binds; + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } /** - * @var string[]|null + * An integer value representing this container's relative CPU weight versus other containers. + * + * @var int|null */ - protected $tmpfs; + protected $cpuShares; /** - * @var string[]|null + * Memory limit in bytes. + * + * @var int|null */ - protected $links; + protected $memory = 0; /** - * @var string[]|null + * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + * + * @var string|null */ - protected $lxcConf; + protected $cgroupParent; /** - * @var int + * Block IO weight (relative weight). + * + * @var int|null */ - protected $memory; + protected $blkioWeight; /** - * @var int + * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. + * + * @var list|null */ - protected $memorySwap; + protected $blkioWeightDevice; /** - * @var int + * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @var list|null */ - protected $memoryReservation; + protected $blkioDeviceReadBps; /** - * @var int + * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @var list|null */ - protected $kernelMemory; + protected $blkioDeviceWriteBps; /** - * @var int + * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @var list|null */ - protected $cpuShares; + protected $blkioDeviceReadIOps; /** - * @var int + * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @var list|null + */ + protected $blkioDeviceWriteIOps; + /** + * The length of a CPU period in microseconds. + * + * @var int|null */ protected $cpuPeriod; /** - * @var int + * Microseconds of CPU time that the container can get in a CPU period. + * + * @var int|null */ protected $cpuQuota; /** - * @var string + * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @var int|null + */ + protected $cpuRealtimePeriod; + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @var int|null + */ + protected $cpuRealtimeRuntime; + /** + * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * + * @var string|null */ protected $cpusetCpus; /** - * @var string + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + * + * @var string|null */ protected $cpusetMems; /** - * @var int + * A list of devices to add to the container. + * + * @var list|null */ - protected $maximumIOps; + protected $devices; /** - * @var int + * Disk limit (in bytes). + * + * @var int|null */ - protected $maximumIOBps; + protected $diskQuota; /** - * @var int + * Kernel memory limit in bytes. + * + * @var int|null */ - protected $blkioWeight; + protected $kernelMemory; /** - * @var DeviceWeight[]|null + * Memory soft limit in bytes. + * + * @var int|null */ - protected $blkioWeightDevice; + protected $memoryReservation; /** - * @var DeviceRate[]|null + * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + * + * @var int|null */ - protected $blkioDeviceReadBps; + protected $memorySwap; /** - * @var DeviceRate[]|null + * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + * + * @var int|null */ - protected $blkioDeviceReadIOps; + protected $memorySwappiness; /** - * @var DeviceRate[]|null + * CPU quota in units of 10-9 CPUs. + * + * @var int|null */ - protected $blkioDeviceWriteBps; + protected $nanoCpus; /** - * @var DeviceRate[]|null + * Disable OOM Killer for the container. + * + * @var bool|null */ - protected $blkioDeviceWriteIOps; + protected $oomKillDisable; /** - * @var int + * Tune a container's pids limit. Set -1 for unlimited. + * + * @var int|null */ - protected $memorySwappiness; + protected $pidsLimit; /** - * @var bool + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + * + * @var list|null */ - protected $oomKillDisable; + protected $ulimits; /** - * @var int + * The number of usable CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @var int|null + */ + protected $cpuCount; + /** + * The usable percentage of the available CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @var int|null + */ + protected $cpuPercent; + /** + * Maximum IOps for the container system drive (Windows only) + * + * @var int|null */ - protected $oomScoreAdj; + protected $iOMaximumIOps; /** - * @var int + * Maximum IO in bytes per second for the container system drive (Windows only) + * + * @var int|null + */ + protected $iOMaximumBandwidth; + /** + * A list of volume bindings for this container. Each volume binding is a string in one of these forms: + + - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + - `host-src:container-dest:ro` to make the bind-mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. + - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path. + + * + * @var list|null + */ + protected $binds; + /** + * Path to a file where the container ID is written + * + * @var string|null */ - protected $pidsLimit; + protected $containerIDFile; + /** + * The logging configuration for this container + * + * @var HostConfigLogConfig|null + */ + protected $logConfig; /** - * @var PortBinding[][]|null[]|null + * Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name to which this container should connect to. + * + * @var string|null + */ + protected $networkMode; + /** + * A map of exposed container ports and the host port they should map to. + * + * @var array|null */ protected $portBindings; /** - * @var bool + * The behavior to apply when the container exits. The default is not to restart. + + An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + + * + * @var RestartPolicy|null + */ + protected $restartPolicy; + /** + * Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set. + * + * @var bool|null */ - protected $publishAllPorts; + protected $autoRemove; /** - * @var bool + * Driver that this container uses to mount volumes. + * + * @var string|null */ - protected $privileged; + protected $volumeDriver; /** - * @var bool + * A list of volumes to inherit from another container, specified in the form `[:]`. + * + * @var list|null */ - protected $readonlyRootfs; + protected $volumesFrom; /** - * @var string[]|null + * Specification for mounts to be added to the container. + * + * @var list|null */ - protected $sysctls; + protected $mounts; /** - * @var string[]|null + * A list of kernel capabilities to add to the container. + * + * @var list|null */ - protected $storageOpt; + protected $capAdd; /** - * @var string[]|null + * A list of kernel capabilities to drop from the container. + * + * @var list|null + */ + protected $capDrop; + /** + * A list of DNS servers for the container to use. + * + * @var list|null */ protected $dns; /** - * @var string[]|null + * A list of DNS options. + * + * @var list|null */ protected $dnsOptions; /** - * @var string[]|null + * A list of DNS search domains. + * + * @var list|null */ protected $dnsSearch; /** - * @var string[]|null + * A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`. + * + * @var list|null */ protected $extraHosts; /** - * @var string[]|null + * A list of additional groups that the container process will run as. + * + * @var list|null */ - protected $volumesFrom; + protected $groupAdd; /** - * @var string[]|null + * IPC namespace to use for the container. + * + * @var string|null */ - protected $capAdd; + protected $ipcMode; /** - * @var string[]|null + * Cgroup to use for the container. + * + * @var string|null */ - protected $capDrop; + protected $cgroup; /** - * @var string[]|null + * A list of links for the container in the form `container_name:alias`. + * + * @var list|null */ - protected $groupAdd; + protected $links; /** - * @var RestartPolicy + * An integer value containing the score given to the container in order to tune OOM killer preferences. + * + * @var int|null */ - protected $restartPolicy; + protected $oomScoreAdj; /** - * @var string + * Set the PID (Process) Namespace mode for the container. It can be either: + + - `"container:"`: joins another container's PID namespace + - `"host"`: use the host's PID namespace inside the container + + * + * @var string|null + */ + protected $pidMode; + /** + * Gives the container full access to the host. + * + * @var bool|null */ - protected $usernsMode; + protected $privileged; /** - * @var string + * Allocates a random host port for all of a container's exposed ports. + * + * @var bool|null */ - protected $networkMode; + protected $publishAllPorts; /** - * @var Device[]|null + * Mount the container's root filesystem as read only. + * + * @var bool|null */ - protected $devices; + protected $readonlyRootfs; /** - * @var Ulimit[]|null + * A list of string values to customize labels for MLS systems, such as SELinux. + * + * @var list|null */ - protected $ulimits; + protected $securityOpt; /** - * @var string[]|null + * Storage driver options for this container, in the form `{"size": "120G"}`. + * + * @var array|null */ - protected $securityOpt; + protected $storageOpt; /** - * @var LogConfig + * A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ "/run": "rw,noexec,nosuid,size=65536k" }`. + * + * @var array|null */ - protected $logConfig; + protected $tmpfs; /** - * @var string + * UTS namespace to use for the container. + * + * @var string|null */ - protected $cgroupParent; + protected $uTSMode; /** - * @var string + * Sets the usernamespace mode for the container when usernamespace remapping option is enabled. + * + * @var string|null */ - protected $volumeDriver; + protected $usernsMode; /** - * @var int + * Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. + * + * @var int|null */ protected $shmSize; - /** - * @return string[]|null + * A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}` + * + * @var array|null + */ + protected $sysctls; + /** + * Runtime to use with this container. + * + * @var string|null + */ + protected $runtime; + /** + * Initial console size, as an `[height, width]` array. (Windows only) + * + * @var list|null + */ + protected $consoleSize; + /** + * Isolation technology of the container. (Windows only) + * + * @var string|null + */ + protected $isolation; + /** + * An integer value representing this container's relative CPU weight versus other containers. + * + * @return int|null */ - public function getBinds() + public function getCpuShares(): ?int { - return $this->binds; + return $this->cpuShares; } - /** - * @param string[]|null $binds + * An integer value representing this container's relative CPU weight versus other containers. + * + * @param int|null $cpuShares * * @return self */ - public function setBinds($binds = null) + public function setCpuShares(?int $cpuShares): self { - $this->binds = $binds; - + $this->initialized['cpuShares'] = true; + $this->cpuShares = $cpuShares; return $this; } - /** - * @return string[]|null + * Memory limit in bytes. + * + * @return int|null */ - public function getTmpfs() + public function getMemory(): ?int { - return $this->tmpfs; + return $this->memory; } - /** - * @param string[]|null $tmpfs + * Memory limit in bytes. + * + * @param int|null $memory * * @return self */ - public function setTmpfs($tmpfs = null) + public function setMemory(?int $memory): self { - $this->tmpfs = $tmpfs; - + $this->initialized['memory'] = true; + $this->memory = $memory; return $this; } - /** - * @return string[]|null + * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + * + * @return string|null */ - public function getLinks() + public function getCgroupParent(): ?string { - return $this->links; + return $this->cgroupParent; } - /** - * @param string[]|null $links + * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + * + * @param string|null $cgroupParent * * @return self */ - public function setLinks($links = null) + public function setCgroupParent(?string $cgroupParent): self { - $this->links = $links; - + $this->initialized['cgroupParent'] = true; + $this->cgroupParent = $cgroupParent; return $this; } - /** - * @return string[]|null + * Block IO weight (relative weight). + * + * @return int|null */ - public function getLxcConf() + public function getBlkioWeight(): ?int { - return $this->lxcConf; + return $this->blkioWeight; } - /** - * @param string[]|null $lxcConf + * Block IO weight (relative weight). + * + * @param int|null $blkioWeight * * @return self */ - public function setLxcConf($lxcConf = null) + public function setBlkioWeight(?int $blkioWeight): self { - $this->lxcConf = $lxcConf; - + $this->initialized['blkioWeight'] = true; + $this->blkioWeight = $blkioWeight; return $this; } - /** - * @return int + * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. + * + * @return list|null */ - public function getMemory() + public function getBlkioWeightDevice(): ?array { - return $this->memory; + return $this->blkioWeightDevice; } - /** - * @param int $memory + * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. + * + * @param list|null $blkioWeightDevice * * @return self */ - public function setMemory($memory = null) + public function setBlkioWeightDevice(?array $blkioWeightDevice): self { - $this->memory = $memory; - + $this->initialized['blkioWeightDevice'] = true; + $this->blkioWeightDevice = $blkioWeightDevice; return $this; } - /** - * @return int + * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @return list|null */ - public function getMemorySwap() + public function getBlkioDeviceReadBps(): ?array { - return $this->memorySwap; + return $this->blkioDeviceReadBps; } - /** - * @param int $memorySwap + * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @param list|null $blkioDeviceReadBps * * @return self */ - public function setMemorySwap($memorySwap = null) + public function setBlkioDeviceReadBps(?array $blkioDeviceReadBps): self { - $this->memorySwap = $memorySwap; - + $this->initialized['blkioDeviceReadBps'] = true; + $this->blkioDeviceReadBps = $blkioDeviceReadBps; return $this; } - /** - * @return int + * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @return list|null */ - public function getMemoryReservation() + public function getBlkioDeviceWriteBps(): ?array { - return $this->memoryReservation; + return $this->blkioDeviceWriteBps; } - /** - * @param int $memoryReservation + * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @param list|null $blkioDeviceWriteBps * * @return self */ - public function setMemoryReservation($memoryReservation = null) + public function setBlkioDeviceWriteBps(?array $blkioDeviceWriteBps): self { - $this->memoryReservation = $memoryReservation; - + $this->initialized['blkioDeviceWriteBps'] = true; + $this->blkioDeviceWriteBps = $blkioDeviceWriteBps; return $this; } - /** - * @return int + * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @return list|null */ - public function getKernelMemory() + public function getBlkioDeviceReadIOps(): ?array { - return $this->kernelMemory; + return $this->blkioDeviceReadIOps; } - /** - * @param int $kernelMemory + * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @param list|null $blkioDeviceReadIOps * * @return self */ - public function setKernelMemory($kernelMemory = null) + public function setBlkioDeviceReadIOps(?array $blkioDeviceReadIOps): self { - $this->kernelMemory = $kernelMemory; - + $this->initialized['blkioDeviceReadIOps'] = true; + $this->blkioDeviceReadIOps = $blkioDeviceReadIOps; return $this; } - /** - * @return int + * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @return list|null */ - public function getCpuShares() + public function getBlkioDeviceWriteIOps(): ?array { - return $this->cpuShares; + return $this->blkioDeviceWriteIOps; } - /** - * @param int $cpuShares + * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @param list|null $blkioDeviceWriteIOps * * @return self */ - public function setCpuShares($cpuShares = null) + public function setBlkioDeviceWriteIOps(?array $blkioDeviceWriteIOps): self { - $this->cpuShares = $cpuShares; - + $this->initialized['blkioDeviceWriteIOps'] = true; + $this->blkioDeviceWriteIOps = $blkioDeviceWriteIOps; return $this; } - /** - * @return int + * The length of a CPU period in microseconds. + * + * @return int|null */ - public function getCpuPeriod() + public function getCpuPeriod(): ?int { return $this->cpuPeriod; } - /** - * @param int $cpuPeriod + * The length of a CPU period in microseconds. + * + * @param int|null $cpuPeriod * * @return self */ - public function setCpuPeriod($cpuPeriod = null) + public function setCpuPeriod(?int $cpuPeriod): self { + $this->initialized['cpuPeriod'] = true; $this->cpuPeriod = $cpuPeriod; - return $this; } - /** - * @return int + * Microseconds of CPU time that the container can get in a CPU period. + * + * @return int|null */ - public function getCpuQuota() + public function getCpuQuota(): ?int { return $this->cpuQuota; } - /** - * @param int $cpuQuota + * Microseconds of CPU time that the container can get in a CPU period. + * + * @param int|null $cpuQuota * * @return self */ - public function setCpuQuota($cpuQuota = null) + public function setCpuQuota(?int $cpuQuota): self { + $this->initialized['cpuQuota'] = true; $this->cpuQuota = $cpuQuota; - return $this; } - /** - * @return string + * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @return int|null + */ + public function getCpuRealtimePeriod(): ?int + { + return $this->cpuRealtimePeriod; + } + /** + * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @param int|null $cpuRealtimePeriod + * + * @return self + */ + public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self + { + $this->initialized['cpuRealtimePeriod'] = true; + $this->cpuRealtimePeriod = $cpuRealtimePeriod; + return $this; + } + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @return int|null + */ + public function getCpuRealtimeRuntime(): ?int + { + return $this->cpuRealtimeRuntime; + } + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @param int|null $cpuRealtimeRuntime + * + * @return self + */ + public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self + { + $this->initialized['cpuRealtimeRuntime'] = true; + $this->cpuRealtimeRuntime = $cpuRealtimeRuntime; + return $this; + } + /** + * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * + * @return string|null */ - public function getCpusetCpus() + public function getCpusetCpus(): ?string { return $this->cpusetCpus; } - /** - * @param string $cpusetCpus + * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * + * @param string|null $cpusetCpus * * @return self */ - public function setCpusetCpus($cpusetCpus = null) + public function setCpusetCpus(?string $cpusetCpus): self { + $this->initialized['cpusetCpus'] = true; $this->cpusetCpus = $cpusetCpus; - return $this; } - /** - * @return string + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + * + * @return string|null */ - public function getCpusetMems() + public function getCpusetMems(): ?string { return $this->cpusetMems; } - /** - * @param string $cpusetMems + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + * + * @param string|null $cpusetMems * * @return self */ - public function setCpusetMems($cpusetMems = null) + public function setCpusetMems(?string $cpusetMems): self { + $this->initialized['cpusetMems'] = true; $this->cpusetMems = $cpusetMems; - return $this; } - /** - * @return int + * A list of devices to add to the container. + * + * @return list|null */ - public function getMaximumIOps() + public function getDevices(): ?array { - return $this->maximumIOps; + return $this->devices; } - /** - * @param int $maximumIOps + * A list of devices to add to the container. + * + * @param list|null $devices * * @return self */ - public function setMaximumIOps($maximumIOps = null) + public function setDevices(?array $devices): self { - $this->maximumIOps = $maximumIOps; - + $this->initialized['devices'] = true; + $this->devices = $devices; return $this; } - /** - * @return int + * Disk limit (in bytes). + * + * @return int|null */ - public function getMaximumIOBps() + public function getDiskQuota(): ?int { - return $this->maximumIOBps; + return $this->diskQuota; } - /** - * @param int $maximumIOBps + * Disk limit (in bytes). + * + * @param int|null $diskQuota * * @return self */ - public function setMaximumIOBps($maximumIOBps = null) + public function setDiskQuota(?int $diskQuota): self { - $this->maximumIOBps = $maximumIOBps; - + $this->initialized['diskQuota'] = true; + $this->diskQuota = $diskQuota; return $this; } - /** - * @return int + * Kernel memory limit in bytes. + * + * @return int|null */ - public function getBlkioWeight() + public function getKernelMemory(): ?int { - return $this->blkioWeight; + return $this->kernelMemory; } - /** - * @param int $blkioWeight + * Kernel memory limit in bytes. + * + * @param int|null $kernelMemory * * @return self */ - public function setBlkioWeight($blkioWeight = null) + public function setKernelMemory(?int $kernelMemory): self { - $this->blkioWeight = $blkioWeight; - + $this->initialized['kernelMemory'] = true; + $this->kernelMemory = $kernelMemory; return $this; } - /** - * @return DeviceWeight[]|null + * Memory soft limit in bytes. + * + * @return int|null */ - public function getBlkioWeightDevice() + public function getMemoryReservation(): ?int { - return $this->blkioWeightDevice; + return $this->memoryReservation; } - /** - * @param DeviceWeight[]|null $blkioWeightDevice + * Memory soft limit in bytes. + * + * @param int|null $memoryReservation * * @return self */ - public function setBlkioWeightDevice($blkioWeightDevice = null) + public function setMemoryReservation(?int $memoryReservation): self { - $this->blkioWeightDevice = $blkioWeightDevice; - + $this->initialized['memoryReservation'] = true; + $this->memoryReservation = $memoryReservation; return $this; } - /** - * @return DeviceRate[]|null + * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + * + * @return int|null */ - public function getBlkioDeviceReadBps() + public function getMemorySwap(): ?int { - return $this->blkioDeviceReadBps; + return $this->memorySwap; } - /** - * @param DeviceRate[]|null $blkioDeviceReadBps + * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + * + * @param int|null $memorySwap * * @return self */ - public function setBlkioDeviceReadBps($blkioDeviceReadBps = null) + public function setMemorySwap(?int $memorySwap): self { - $this->blkioDeviceReadBps = $blkioDeviceReadBps; - + $this->initialized['memorySwap'] = true; + $this->memorySwap = $memorySwap; return $this; } - /** - * @return DeviceRate[]|null + * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + * + * @return int|null */ - public function getBlkioDeviceReadIOps() + public function getMemorySwappiness(): ?int { - return $this->blkioDeviceReadIOps; + return $this->memorySwappiness; } - /** - * @param DeviceRate[]|null $blkioDeviceReadIOps + * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + * + * @param int|null $memorySwappiness * * @return self */ - public function setBlkioDeviceReadIOps($blkioDeviceReadIOps = null) + public function setMemorySwappiness(?int $memorySwappiness): self { - $this->blkioDeviceReadIOps = $blkioDeviceReadIOps; - + $this->initialized['memorySwappiness'] = true; + $this->memorySwappiness = $memorySwappiness; return $this; } - /** - * @return DeviceRate[]|null + * CPU quota in units of 10-9 CPUs. + * + * @return int|null */ - public function getBlkioDeviceWriteBps() + public function getNanoCpus(): ?int { - return $this->blkioDeviceWriteBps; + return $this->nanoCpus; + } + /** + * CPU quota in units of 10-9 CPUs. + * + * @param int|null $nanoCpus + * + * @return self + */ + public function setNanoCpus(?int $nanoCpus): self + { + $this->initialized['nanoCpus'] = true; + $this->nanoCpus = $nanoCpus; + return $this; + } + /** + * Disable OOM Killer for the container. + * + * @return bool|null + */ + public function getOomKillDisable(): ?bool + { + return $this->oomKillDisable; + } + /** + * Disable OOM Killer for the container. + * + * @param bool|null $oomKillDisable + * + * @return self + */ + public function setOomKillDisable(?bool $oomKillDisable): self + { + $this->initialized['oomKillDisable'] = true; + $this->oomKillDisable = $oomKillDisable; + return $this; + } + /** + * Tune a container's pids limit. Set -1 for unlimited. + * + * @return int|null + */ + public function getPidsLimit(): ?int + { + return $this->pidsLimit; + } + /** + * Tune a container's pids limit. Set -1 for unlimited. + * + * @param int|null $pidsLimit + * + * @return self + */ + public function setPidsLimit(?int $pidsLimit): self + { + $this->initialized['pidsLimit'] = true; + $this->pidsLimit = $pidsLimit; + return $this; + } + /** + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + * + * @return list|null + */ + public function getUlimits(): ?array + { + return $this->ulimits; + } + /** + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + * + * @param list|null $ulimits + * + * @return self + */ + public function setUlimits(?array $ulimits): self + { + $this->initialized['ulimits'] = true; + $this->ulimits = $ulimits; + return $this; + } + /** + * The number of usable CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @return int|null + */ + public function getCpuCount(): ?int + { + return $this->cpuCount; + } + /** + * The number of usable CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @param int|null $cpuCount + * + * @return self + */ + public function setCpuCount(?int $cpuCount): self + { + $this->initialized['cpuCount'] = true; + $this->cpuCount = $cpuCount; + return $this; + } + /** + * The usable percentage of the available CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @return int|null + */ + public function getCpuPercent(): ?int + { + return $this->cpuPercent; + } + /** + * The usable percentage of the available CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @param int|null $cpuPercent + * + * @return self + */ + public function setCpuPercent(?int $cpuPercent): self + { + $this->initialized['cpuPercent'] = true; + $this->cpuPercent = $cpuPercent; + return $this; + } + /** + * Maximum IOps for the container system drive (Windows only) + * + * @return int|null + */ + public function getIOMaximumIOps(): ?int + { + return $this->iOMaximumIOps; + } + /** + * Maximum IOps for the container system drive (Windows only) + * + * @param int|null $iOMaximumIOps + * + * @return self + */ + public function setIOMaximumIOps(?int $iOMaximumIOps): self + { + $this->initialized['iOMaximumIOps'] = true; + $this->iOMaximumIOps = $iOMaximumIOps; + return $this; + } + /** + * Maximum IO in bytes per second for the container system drive (Windows only) + * + * @return int|null + */ + public function getIOMaximumBandwidth(): ?int + { + return $this->iOMaximumBandwidth; + } + /** + * Maximum IO in bytes per second for the container system drive (Windows only) + * + * @param int|null $iOMaximumBandwidth + * + * @return self + */ + public function setIOMaximumBandwidth(?int $iOMaximumBandwidth): self + { + $this->initialized['iOMaximumBandwidth'] = true; + $this->iOMaximumBandwidth = $iOMaximumBandwidth; + return $this; + } + /** + * A list of volume bindings for this container. Each volume binding is a string in one of these forms: + + - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + - `host-src:container-dest:ro` to make the bind-mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. + - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path. + + * + * @return list|null + */ + public function getBinds(): ?array + { + return $this->binds; + } + /** + * A list of volume bindings for this container. Each volume binding is a string in one of these forms: + + - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + - `host-src:container-dest:ro` to make the bind-mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. + - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path. + + * + * @param list|null $binds + * + * @return self + */ + public function setBinds(?array $binds): self + { + $this->initialized['binds'] = true; + $this->binds = $binds; + return $this; + } + /** + * Path to a file where the container ID is written + * + * @return string|null + */ + public function getContainerIDFile(): ?string + { + return $this->containerIDFile; + } + /** + * Path to a file where the container ID is written + * + * @param string|null $containerIDFile + * + * @return self + */ + public function setContainerIDFile(?string $containerIDFile): self + { + $this->initialized['containerIDFile'] = true; + $this->containerIDFile = $containerIDFile; + return $this; + } + /** + * The logging configuration for this container + * + * @return HostConfigLogConfig|null + */ + public function getLogConfig(): ?HostConfigLogConfig + { + return $this->logConfig; + } + /** + * The logging configuration for this container + * + * @param HostConfigLogConfig|null $logConfig + * + * @return self + */ + public function setLogConfig(?HostConfigLogConfig $logConfig): self + { + $this->initialized['logConfig'] = true; + $this->logConfig = $logConfig; + return $this; + } + /** + * Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name to which this container should connect to. + * + * @return string|null + */ + public function getNetworkMode(): ?string + { + return $this->networkMode; + } + /** + * Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name to which this container should connect to. + * + * @param string|null $networkMode + * + * @return self + */ + public function setNetworkMode(?string $networkMode): self + { + $this->initialized['networkMode'] = true; + $this->networkMode = $networkMode; + return $this; + } + /** + * A map of exposed container ports and the host port they should map to. + * + * @return array|null + */ + public function getPortBindings(): ?iterable + { + return $this->portBindings; } - /** - * @param DeviceRate[]|null $blkioDeviceWriteBps + * A map of exposed container ports and the host port they should map to. + * + * @param array|null $portBindings * * @return self */ - public function setBlkioDeviceWriteBps($blkioDeviceWriteBps = null) + public function setPortBindings(?iterable $portBindings): self { - $this->blkioDeviceWriteBps = $blkioDeviceWriteBps; - + $this->initialized['portBindings'] = true; + $this->portBindings = $portBindings; return $this; } - /** - * @return DeviceRate[]|null - */ - public function getBlkioDeviceWriteIOps() + * The behavior to apply when the container exits. The default is not to restart. + + An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + + * + * @return RestartPolicy|null + */ + public function getRestartPolicy(): ?RestartPolicy { - return $this->blkioDeviceWriteIOps; + return $this->restartPolicy; } - /** - * @param DeviceRate[]|null $blkioDeviceWriteIOps - * - * @return self - */ - public function setBlkioDeviceWriteIOps($blkioDeviceWriteIOps = null) + * The behavior to apply when the container exits. The default is not to restart. + + An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + + * + * @param RestartPolicy|null $restartPolicy + * + * @return self + */ + public function setRestartPolicy(?RestartPolicy $restartPolicy): self { - $this->blkioDeviceWriteIOps = $blkioDeviceWriteIOps; - + $this->initialized['restartPolicy'] = true; + $this->restartPolicy = $restartPolicy; return $this; } - /** - * @return int + * Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set. + * + * @return bool|null */ - public function getMemorySwappiness() + public function getAutoRemove(): ?bool { - return $this->memorySwappiness; + return $this->autoRemove; } - /** - * @param int $memorySwappiness + * Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set. + * + * @param bool|null $autoRemove * * @return self */ - public function setMemorySwappiness($memorySwappiness = null) + public function setAutoRemove(?bool $autoRemove): self { - $this->memorySwappiness = $memorySwappiness; - + $this->initialized['autoRemove'] = true; + $this->autoRemove = $autoRemove; return $this; } - /** - * @return bool + * Driver that this container uses to mount volumes. + * + * @return string|null */ - public function getOomKillDisable() + public function getVolumeDriver(): ?string { - return $this->oomKillDisable; + return $this->volumeDriver; } - /** - * @param bool $oomKillDisable + * Driver that this container uses to mount volumes. + * + * @param string|null $volumeDriver * * @return self */ - public function setOomKillDisable($oomKillDisable = null) + public function setVolumeDriver(?string $volumeDriver): self { - $this->oomKillDisable = $oomKillDisable; - + $this->initialized['volumeDriver'] = true; + $this->volumeDriver = $volumeDriver; return $this; } - /** - * @return int + * A list of volumes to inherit from another container, specified in the form `[:]`. + * + * @return list|null */ - public function getOomScoreAdj() + public function getVolumesFrom(): ?array { - return $this->oomScoreAdj; + return $this->volumesFrom; } - /** - * @param int $oomScoreAdj + * A list of volumes to inherit from another container, specified in the form `[:]`. + * + * @param list|null $volumesFrom * * @return self */ - public function setOomScoreAdj($oomScoreAdj = null) + public function setVolumesFrom(?array $volumesFrom): self { - $this->oomScoreAdj = $oomScoreAdj; - + $this->initialized['volumesFrom'] = true; + $this->volumesFrom = $volumesFrom; return $this; } - /** - * @return int + * Specification for mounts to be added to the container. + * + * @return list|null */ - public function getPidsLimit() + public function getMounts(): ?array { - return $this->pidsLimit; + return $this->mounts; } - /** - * @param int $pidsLimit + * Specification for mounts to be added to the container. + * + * @param list|null $mounts * * @return self */ - public function setPidsLimit($pidsLimit = null) + public function setMounts(?array $mounts): self { - $this->pidsLimit = $pidsLimit; - + $this->initialized['mounts'] = true; + $this->mounts = $mounts; return $this; } - /** - * @return PortBinding[][]|null[]|null + * A list of kernel capabilities to add to the container. + * + * @return list|null */ - public function getPortBindings() + public function getCapAdd(): ?array { - return $this->portBindings; + return $this->capAdd; } - /** - * @param PortBinding[][]|null[]|null $portBindings + * A list of kernel capabilities to add to the container. + * + * @param list|null $capAdd * * @return self */ - public function setPortBindings($portBindings = null) + public function setCapAdd(?array $capAdd): self { - $this->portBindings = $portBindings; - + $this->initialized['capAdd'] = true; + $this->capAdd = $capAdd; return $this; } - /** - * @return bool + * A list of kernel capabilities to drop from the container. + * + * @return list|null */ - public function getPublishAllPorts() + public function getCapDrop(): ?array { - return $this->publishAllPorts; + return $this->capDrop; } - /** - * @param bool $publishAllPorts + * A list of kernel capabilities to drop from the container. + * + * @param list|null $capDrop * * @return self */ - public function setPublishAllPorts($publishAllPorts = null) + public function setCapDrop(?array $capDrop): self { - $this->publishAllPorts = $publishAllPorts; - + $this->initialized['capDrop'] = true; + $this->capDrop = $capDrop; return $this; } - /** - * @return bool + * A list of DNS servers for the container to use. + * + * @return list|null */ - public function getPrivileged() + public function getDns(): ?array { - return $this->privileged; + return $this->dns; } - /** - * @param bool $privileged + * A list of DNS servers for the container to use. + * + * @param list|null $dns * * @return self */ - public function setPrivileged($privileged = null) + public function setDns(?array $dns): self { - $this->privileged = $privileged; - + $this->initialized['dns'] = true; + $this->dns = $dns; return $this; } - /** - * @return bool + * A list of DNS options. + * + * @return list|null */ - public function getReadonlyRootfs() + public function getDnsOptions(): ?array { - return $this->readonlyRootfs; + return $this->dnsOptions; } - /** - * @param bool $readonlyRootfs + * A list of DNS options. + * + * @param list|null $dnsOptions * * @return self */ - public function setReadonlyRootfs($readonlyRootfs = null) + public function setDnsOptions(?array $dnsOptions): self { - $this->readonlyRootfs = $readonlyRootfs; - + $this->initialized['dnsOptions'] = true; + $this->dnsOptions = $dnsOptions; return $this; } - /** - * @return string[]|null + * A list of DNS search domains. + * + * @return list|null */ - public function getSysctls() + public function getDnsSearch(): ?array { - return $this->sysctls; + return $this->dnsSearch; } - /** - * @param string[]|null $sysctls + * A list of DNS search domains. + * + * @param list|null $dnsSearch * * @return self */ - public function setSysctls($sysctls = null) + public function setDnsSearch(?array $dnsSearch): self { - $this->sysctls = $sysctls; - + $this->initialized['dnsSearch'] = true; + $this->dnsSearch = $dnsSearch; return $this; } - /** - * @return string[]|null + * A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`. + * + * @return list|null */ - public function getStorageOpt() + public function getExtraHosts(): ?array { - return $this->storageOpt; + return $this->extraHosts; } - /** - * @param string[]|null $storageOpt + * A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`. + * + * @param list|null $extraHosts * * @return self */ - public function setStorageOpt($storageOpt = null) + public function setExtraHosts(?array $extraHosts): self { - $this->storageOpt = $storageOpt; - + $this->initialized['extraHosts'] = true; + $this->extraHosts = $extraHosts; return $this; } - /** - * @return string[]|null + * A list of additional groups that the container process will run as. + * + * @return list|null */ - public function getDns() + public function getGroupAdd(): ?array { - return $this->dns; + return $this->groupAdd; } - /** - * @param string[]|null $dns + * A list of additional groups that the container process will run as. + * + * @param list|null $groupAdd * * @return self */ - public function setDns($dns = null) + public function setGroupAdd(?array $groupAdd): self { - $this->dns = $dns; - + $this->initialized['groupAdd'] = true; + $this->groupAdd = $groupAdd; return $this; } - /** - * @return string[]|null + * IPC namespace to use for the container. + * + * @return string|null */ - public function getDnsOptions() + public function getIpcMode(): ?string { - return $this->dnsOptions; + return $this->ipcMode; } - /** - * @param string[]|null $dnsOptions + * IPC namespace to use for the container. + * + * @param string|null $ipcMode * * @return self */ - public function setDnsOptions($dnsOptions = null) + public function setIpcMode(?string $ipcMode): self { - $this->dnsOptions = $dnsOptions; - + $this->initialized['ipcMode'] = true; + $this->ipcMode = $ipcMode; return $this; } - /** - * @return string[]|null + * Cgroup to use for the container. + * + * @return string|null */ - public function getDnsSearch() + public function getCgroup(): ?string { - return $this->dnsSearch; + return $this->cgroup; } - /** - * @param string[]|null $dnsSearch + * Cgroup to use for the container. + * + * @param string|null $cgroup * * @return self */ - public function setDnsSearch($dnsSearch = null) + public function setCgroup(?string $cgroup): self { - $this->dnsSearch = $dnsSearch; - + $this->initialized['cgroup'] = true; + $this->cgroup = $cgroup; return $this; } - /** - * @return string[]|null + * A list of links for the container in the form `container_name:alias`. + * + * @return list|null */ - public function getExtraHosts() + public function getLinks(): ?array { - return $this->extraHosts; + return $this->links; } - /** - * @param string[]|null $extraHosts + * A list of links for the container in the form `container_name:alias`. + * + * @param list|null $links * * @return self */ - public function setExtraHosts($extraHosts = null) + public function setLinks(?array $links): self { - $this->extraHosts = $extraHosts; - + $this->initialized['links'] = true; + $this->links = $links; return $this; } - /** - * @return string[]|null + * An integer value containing the score given to the container in order to tune OOM killer preferences. + * + * @return int|null */ - public function getVolumesFrom() + public function getOomScoreAdj(): ?int { - return $this->volumesFrom; + return $this->oomScoreAdj; } - /** - * @param string[]|null $volumesFrom + * An integer value containing the score given to the container in order to tune OOM killer preferences. + * + * @param int|null $oomScoreAdj * * @return self */ - public function setVolumesFrom($volumesFrom = null) + public function setOomScoreAdj(?int $oomScoreAdj): self { - $this->volumesFrom = $volumesFrom; - + $this->initialized['oomScoreAdj'] = true; + $this->oomScoreAdj = $oomScoreAdj; + return $this; + } + /** + * Set the PID (Process) Namespace mode for the container. It can be either: + + - `"container:"`: joins another container's PID namespace + - `"host"`: use the host's PID namespace inside the container + + * + * @return string|null + */ + public function getPidMode(): ?string + { + return $this->pidMode; + } + /** + * Set the PID (Process) Namespace mode for the container. It can be either: + + - `"container:"`: joins another container's PID namespace + - `"host"`: use the host's PID namespace inside the container + + * + * @param string|null $pidMode + * + * @return self + */ + public function setPidMode(?string $pidMode): self + { + $this->initialized['pidMode'] = true; + $this->pidMode = $pidMode; return $this; } - /** - * @return string[]|null + * Gives the container full access to the host. + * + * @return bool|null */ - public function getCapAdd() + public function getPrivileged(): ?bool { - return $this->capAdd; + return $this->privileged; } - /** - * @param string[]|null $capAdd + * Gives the container full access to the host. + * + * @param bool|null $privileged * * @return self */ - public function setCapAdd($capAdd = null) + public function setPrivileged(?bool $privileged): self { - $this->capAdd = $capAdd; - + $this->initialized['privileged'] = true; + $this->privileged = $privileged; return $this; } - /** - * @return string[]|null + * Allocates a random host port for all of a container's exposed ports. + * + * @return bool|null */ - public function getCapDrop() + public function getPublishAllPorts(): ?bool { - return $this->capDrop; + return $this->publishAllPorts; } - /** - * @param string[]|null $capDrop + * Allocates a random host port for all of a container's exposed ports. + * + * @param bool|null $publishAllPorts * * @return self */ - public function setCapDrop($capDrop = null) + public function setPublishAllPorts(?bool $publishAllPorts): self { - $this->capDrop = $capDrop; - + $this->initialized['publishAllPorts'] = true; + $this->publishAllPorts = $publishAllPorts; return $this; } - /** - * @return string[]|null + * Mount the container's root filesystem as read only. + * + * @return bool|null */ - public function getGroupAdd() + public function getReadonlyRootfs(): ?bool { - return $this->groupAdd; + return $this->readonlyRootfs; } - /** - * @param string[]|null $groupAdd + * Mount the container's root filesystem as read only. + * + * @param bool|null $readonlyRootfs * * @return self */ - public function setGroupAdd($groupAdd = null) + public function setReadonlyRootfs(?bool $readonlyRootfs): self { - $this->groupAdd = $groupAdd; - + $this->initialized['readonlyRootfs'] = true; + $this->readonlyRootfs = $readonlyRootfs; return $this; } - /** - * @return RestartPolicy + * A list of string values to customize labels for MLS systems, such as SELinux. + * + * @return list|null */ - public function getRestartPolicy() + public function getSecurityOpt(): ?array { - return $this->restartPolicy; + return $this->securityOpt; } - /** - * @param RestartPolicy $restartPolicy + * A list of string values to customize labels for MLS systems, such as SELinux. + * + * @param list|null $securityOpt * * @return self */ - public function setRestartPolicy(?RestartPolicy $restartPolicy = null) + public function setSecurityOpt(?array $securityOpt): self { - $this->restartPolicy = $restartPolicy; - + $this->initialized['securityOpt'] = true; + $this->securityOpt = $securityOpt; return $this; } - /** - * @return string + * Storage driver options for this container, in the form `{"size": "120G"}`. + * + * @return array|null */ - public function getUsernsMode() + public function getStorageOpt(): ?iterable { - return $this->usernsMode; + return $this->storageOpt; } - /** - * @param string $usernsMode + * Storage driver options for this container, in the form `{"size": "120G"}`. + * + * @param array|null $storageOpt * * @return self */ - public function setUsernsMode($usernsMode = null) + public function setStorageOpt(?iterable $storageOpt): self { - $this->usernsMode = $usernsMode; - + $this->initialized['storageOpt'] = true; + $this->storageOpt = $storageOpt; return $this; } - /** - * @return string + * A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ "/run": "rw,noexec,nosuid,size=65536k" }`. + * + * @return array|null */ - public function getNetworkMode() + public function getTmpfs(): ?iterable { - return $this->networkMode; + return $this->tmpfs; } - /** - * @param string $networkMode + * A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ "/run": "rw,noexec,nosuid,size=65536k" }`. + * + * @param array|null $tmpfs * * @return self */ - public function setNetworkMode($networkMode = null) + public function setTmpfs(?iterable $tmpfs): self { - $this->networkMode = $networkMode; - + $this->initialized['tmpfs'] = true; + $this->tmpfs = $tmpfs; return $this; } - /** - * @return Device[]|null + * UTS namespace to use for the container. + * + * @return string|null */ - public function getDevices() + public function getUTSMode(): ?string { - return $this->devices; + return $this->uTSMode; } - /** - * @param Device[]|null $devices + * UTS namespace to use for the container. + * + * @param string|null $uTSMode * * @return self */ - public function setDevices($devices = null) + public function setUTSMode(?string $uTSMode): self { - $this->devices = $devices; - + $this->initialized['uTSMode'] = true; + $this->uTSMode = $uTSMode; return $this; } - /** - * @return Ulimit[]|null + * Sets the usernamespace mode for the container when usernamespace remapping option is enabled. + * + * @return string|null */ - public function getUlimits() + public function getUsernsMode(): ?string { - return $this->ulimits; + return $this->usernsMode; } - /** - * @param Ulimit[]|null $ulimits + * Sets the usernamespace mode for the container when usernamespace remapping option is enabled. + * + * @param string|null $usernsMode * * @return self */ - public function setUlimits($ulimits = null) + public function setUsernsMode(?string $usernsMode): self { - $this->ulimits = $ulimits; - + $this->initialized['usernsMode'] = true; + $this->usernsMode = $usernsMode; return $this; } - /** - * @return string[]|null + * Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. + * + * @return int|null */ - public function getSecurityOpt() + public function getShmSize(): ?int { - return $this->securityOpt; + return $this->shmSize; } - /** - * @param string[]|null $securityOpt + * Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. + * + * @param int|null $shmSize * * @return self */ - public function setSecurityOpt($securityOpt = null) + public function setShmSize(?int $shmSize): self { - $this->securityOpt = $securityOpt; - + $this->initialized['shmSize'] = true; + $this->shmSize = $shmSize; return $this; } - /** - * @return LogConfig + * A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}` + * + * @return array|null */ - public function getLogConfig() + public function getSysctls(): ?iterable { - return $this->logConfig; + return $this->sysctls; } - /** - * @param LogConfig $logConfig + * A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}` + * + * @param array|null $sysctls * * @return self */ - public function setLogConfig(?LogConfig $logConfig = null) + public function setSysctls(?iterable $sysctls): self { - $this->logConfig = $logConfig; - + $this->initialized['sysctls'] = true; + $this->sysctls = $sysctls; return $this; } - /** - * @return string + * Runtime to use with this container. + * + * @return string|null */ - public function getCgroupParent() + public function getRuntime(): ?string { - return $this->cgroupParent; + return $this->runtime; } - /** - * @param string $cgroupParent + * Runtime to use with this container. + * + * @param string|null $runtime * * @return self */ - public function setCgroupParent($cgroupParent = null) + public function setRuntime(?string $runtime): self { - $this->cgroupParent = $cgroupParent; - + $this->initialized['runtime'] = true; + $this->runtime = $runtime; return $this; } - /** - * @return string + * Initial console size, as an `[height, width]` array. (Windows only) + * + * @return list|null */ - public function getVolumeDriver() + public function getConsoleSize(): ?array { - return $this->volumeDriver; + return $this->consoleSize; } - /** - * @param string $volumeDriver + * Initial console size, as an `[height, width]` array. (Windows only) + * + * @param list|null $consoleSize * * @return self */ - public function setVolumeDriver($volumeDriver = null) + public function setConsoleSize(?array $consoleSize): self { - $this->volumeDriver = $volumeDriver; - + $this->initialized['consoleSize'] = true; + $this->consoleSize = $consoleSize; return $this; } - /** - * @return int + * Isolation technology of the container. (Windows only) + * + * @return string|null */ - public function getShmSize() + public function getIsolation(): ?string { - return $this->shmSize; + return $this->isolation; } - /** - * @param int $shmSize + * Isolation technology of the container. (Windows only) + * + * @param string|null $isolation * * @return self */ - public function setShmSize($shmSize = null) + public function setIsolation(?string $isolation): self { - $this->shmSize = $shmSize; - + $this->initialized['isolation'] = true; + $this->isolation = $isolation; return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/HostConfigLogConfig.php b/generated/Model/HostConfigLogConfig.php new file mode 100644 index 000000000..54aa2488f --- /dev/null +++ b/generated/Model/HostConfigLogConfig.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $type; + /** + * + * + * @var array|null + */ + protected $config; + /** + * + * + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + /** + * + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self + { + $this->initialized['type'] = true; + $this->type = $type; + return $this; + } + /** + * + * + * @return array|null + */ + public function getConfig(): ?iterable + { + return $this->config; + } + /** + * + * + * @param array|null $config + * + * @return self + */ + public function setConfig(?iterable $config): self + { + $this->initialized['config'] = true; + $this->config = $config; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/HostConfigPortBindingsItem.php b/generated/Model/HostConfigPortBindingsItem.php new file mode 100644 index 000000000..7d8164e88 --- /dev/null +++ b/generated/Model/HostConfigPortBindingsItem.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The host IP address + * + * @var string|null + */ + protected $hostIp; + /** + * The host port number, as a string + * + * @var string|null + */ + protected $hostPort; + /** + * The host IP address + * + * @return string|null + */ + public function getHostIp(): ?string + { + return $this->hostIp; + } + /** + * The host IP address + * + * @param string|null $hostIp + * + * @return self + */ + public function setHostIp(?string $hostIp): self + { + $this->initialized['hostIp'] = true; + $this->hostIp = $hostIp; + return $this; + } + /** + * The host port number, as a string + * + * @return string|null + */ + public function getHostPort(): ?string + { + return $this->hostPort; + } + /** + * The host port number, as a string + * + * @param string|null $hostPort + * + * @return self + */ + public function setHostPort(?string $hostPort): self + { + $this->initialized['hostPort'] = true; + $this->hostPort = $hostPort; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/IPAM.php b/generated/Model/IPAM.php index c0a9750bc..aa8677380 100644 --- a/generated/Model/IPAM.php +++ b/generated/Model/IPAM.php @@ -5,75 +5,95 @@ class IPAM { /** - * @var string + * @var array */ - protected $driver; + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * Name of the IPAM driver to use. + * + * @var string|null + */ + protected $driver = 'default'; /** - * @var IPAMConfig[]|null + * List of IPAM configuration options, specified as a map: `{"Subnet": , "IPRange": , "Gateway": , "AuxAddress": }` + * + * @var list>|null */ protected $config; /** - * @var string[]|null + * Driver-specific options, specified as a map. + * + * @var list>|null */ protected $options; - /** - * @return string + * Name of the IPAM driver to use. + * + * @return string|null */ - public function getDriver() + public function getDriver(): ?string { return $this->driver; } - /** - * @param string $driver + * Name of the IPAM driver to use. + * + * @param string|null $driver * * @return self */ - public function setDriver($driver = null) + public function setDriver(?string $driver): self { + $this->initialized['driver'] = true; $this->driver = $driver; - return $this; } - /** - * @return IPAMConfig[]|null + * List of IPAM configuration options, specified as a map: `{"Subnet": , "IPRange": , "Gateway": , "AuxAddress": }` + * + * @return list>|null */ - public function getConfig() + public function getConfig(): ?array { return $this->config; } - /** - * @param IPAMConfig[]|null $config + * List of IPAM configuration options, specified as a map: `{"Subnet": , "IPRange": , "Gateway": , "AuxAddress": }` + * + * @param list>|null $config * * @return self */ - public function setConfig($config = null) + public function setConfig(?array $config): self { + $this->initialized['config'] = true; $this->config = $config; - return $this; } - /** - * @return string[]|null + * Driver-specific options, specified as a map. + * + * @return list>|null */ - public function getOptions() + public function getOptions(): ?array { return $this->options; } - /** - * @param string[]|null $options + * Driver-specific options, specified as a map. + * + * @param list>|null $options * * @return self */ - public function setOptions($options = null) + public function setOptions(?array $options): self { + $this->initialized['options'] = true; $this->options = $options; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/IPAMConfig.php b/generated/Model/IPAMConfig.php deleted file mode 100644 index 83f954407..000000000 --- a/generated/Model/IPAMConfig.php +++ /dev/null @@ -1,79 +0,0 @@ -subnet; - } - - /** - * @param string $subnet - * - * @return self - */ - public function setSubnet($subnet = null) - { - $this->subnet = $subnet; - - return $this; - } - - /** - * @return string - */ - public function getIPRange() - { - return $this->iPRange; - } - - /** - * @param string $iPRange - * - * @return self - */ - public function setIPRange($iPRange = null) - { - $this->iPRange = $iPRange; - - return $this; - } - - /** - * @return string - */ - public function getGateway() - { - return $this->gateway; - } - - /** - * @param string $gateway - * - * @return self - */ - public function setGateway($gateway = null) - { - $this->gateway = $gateway; - - return $this; - } -} diff --git a/generated/Model/IdResponse.php b/generated/Model/IdResponse.php new file mode 100644 index 000000000..8f59e6156 --- /dev/null +++ b/generated/Model/IdResponse.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * The id of the newly created object. + * + * @var string|null + */ + protected $id; + /** + * The id of the newly created object. + * + * @return string|null + */ + public function getId(): ?string + { + return $this->id; + } + /** + * The id of the newly created object. + * + * @param string|null $id + * + * @return self + */ + public function setId(?string $id): self + { + $this->initialized['id'] = true; + $this->id = $id; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Image.php b/generated/Model/Image.php index 967329160..0ad2c1f9c 100644 --- a/generated/Model/Image.php +++ b/generated/Model/Image.php @@ -5,387 +5,487 @@ class Image { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var string|null */ protected $id; /** - * @var string + * + * + * @var list|null */ - protected $container; + protected $repoTags; /** - * @var string + * + * + * @var list|null */ - protected $comment; + protected $repoDigests; /** - * @var string + * + * + * @var string|null */ - protected $os; + protected $parent; /** - * @var string + * + * + * @var string|null */ - protected $architecture; + protected $comment; /** - * @var string + * + * + * @var string|null */ - protected $parent; + protected $created; + /** + * + * + * @var string|null + */ + protected $container; /** - * @var ContainerConfig + * Configuration for a container that is portable between hosts + * + * @var Config|null */ protected $containerConfig; /** - * @var string + * + * + * @var string|null */ protected $dockerVersion; /** - * @var int + * + * + * @var string|null */ - protected $virtualSize; + protected $author; /** - * @var int + * Configuration for a container that is portable between hosts + * + * @var Config|null */ - protected $size; + protected $config; /** - * @var string + * + * + * @var string|null */ - protected $author; + protected $architecture; /** - * @var string + * + * + * @var string|null */ - protected $created; + protected $os; /** - * @var GraphDriver + * + * + * @var int|null */ - protected $graphDriver; + protected $size; /** - * @var string[]|null + * + * + * @var int|null */ - protected $repoDigests; + protected $virtualSize; /** - * @var string[]|null + * Information about this container's graph driver. + * + * @var GraphDriver|null */ - protected $repoTags; + protected $graphDriver; /** - * @var ContainerConfig + * + * + * @var ImageRootFS|null */ - protected $config; - + protected $rootFS; /** - * @return string + * + * + * @return string|null */ - public function getId() + public function getId(): ?string { return $this->id; } - /** - * @param string $id + * + * + * @param string|null $id * * @return self */ - public function setId($id = null) + public function setId(?string $id): self { + $this->initialized['id'] = true; $this->id = $id; - return $this; } - /** - * @return string + * + * + * @return list|null */ - public function getContainer() + public function getRepoTags(): ?array { - return $this->container; + return $this->repoTags; } - /** - * @param string $container + * + * + * @param list|null $repoTags * * @return self */ - public function setContainer($container = null) + public function setRepoTags(?array $repoTags): self { - $this->container = $container; - + $this->initialized['repoTags'] = true; + $this->repoTags = $repoTags; return $this; } - /** - * @return string + * + * + * @return list|null */ - public function getComment() + public function getRepoDigests(): ?array { - return $this->comment; + return $this->repoDigests; } - /** - * @param string $comment + * + * + * @param list|null $repoDigests * * @return self */ - public function setComment($comment = null) + public function setRepoDigests(?array $repoDigests): self { - $this->comment = $comment; - + $this->initialized['repoDigests'] = true; + $this->repoDigests = $repoDigests; return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getOs() + public function getParent(): ?string { - return $this->os; + return $this->parent; } - /** - * @param string $os + * + * + * @param string|null $parent * * @return self */ - public function setOs($os = null) + public function setParent(?string $parent): self { - $this->os = $os; - + $this->initialized['parent'] = true; + $this->parent = $parent; return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getArchitecture() + public function getComment(): ?string { - return $this->architecture; + return $this->comment; } - /** - * @param string $architecture + * + * + * @param string|null $comment * * @return self */ - public function setArchitecture($architecture = null) + public function setComment(?string $comment): self { - $this->architecture = $architecture; - + $this->initialized['comment'] = true; + $this->comment = $comment; return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getParent() + public function getCreated(): ?string { - return $this->parent; + return $this->created; } - /** - * @param string $parent + * + * + * @param string|null $created * * @return self */ - public function setParent($parent = null) + public function setCreated(?string $created): self { - $this->parent = $parent; - + $this->initialized['created'] = true; + $this->created = $created; return $this; } - /** - * @return ContainerConfig + * + * + * @return string|null */ - public function getContainerConfig() + public function getContainer(): ?string + { + return $this->container; + } + /** + * + * + * @param string|null $container + * + * @return self + */ + public function setContainer(?string $container): self + { + $this->initialized['container'] = true; + $this->container = $container; + return $this; + } + /** + * Configuration for a container that is portable between hosts + * + * @return Config|null + */ + public function getContainerConfig(): ?Config { return $this->containerConfig; } - /** - * @param ContainerConfig $containerConfig + * Configuration for a container that is portable between hosts + * + * @param Config|null $containerConfig * * @return self */ - public function setContainerConfig(?ContainerConfig $containerConfig = null) + public function setContainerConfig(?Config $containerConfig): self { + $this->initialized['containerConfig'] = true; $this->containerConfig = $containerConfig; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getDockerVersion() + public function getDockerVersion(): ?string { return $this->dockerVersion; } - /** - * @param string $dockerVersion + * + * + * @param string|null $dockerVersion * * @return self */ - public function setDockerVersion($dockerVersion = null) + public function setDockerVersion(?string $dockerVersion): self { + $this->initialized['dockerVersion'] = true; $this->dockerVersion = $dockerVersion; - return $this; } - /** - * @return int + * + * + * @return string|null */ - public function getVirtualSize() + public function getAuthor(): ?string { - return $this->virtualSize; + return $this->author; } - /** - * @param int $virtualSize + * + * + * @param string|null $author * * @return self */ - public function setVirtualSize($virtualSize = null) + public function setAuthor(?string $author): self { - $this->virtualSize = $virtualSize; - + $this->initialized['author'] = true; + $this->author = $author; return $this; } - /** - * @return int + * Configuration for a container that is portable between hosts + * + * @return Config|null */ - public function getSize() + public function getConfig(): ?Config { - return $this->size; + return $this->config; } - /** - * @param int $size + * Configuration for a container that is portable between hosts + * + * @param Config|null $config * * @return self */ - public function setSize($size = null) + public function setConfig(?Config $config): self { - $this->size = $size; - + $this->initialized['config'] = true; + $this->config = $config; return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getAuthor() + public function getArchitecture(): ?string { - return $this->author; + return $this->architecture; } - /** - * @param string $author + * + * + * @param string|null $architecture * * @return self */ - public function setAuthor($author = null) + public function setArchitecture(?string $architecture): self { - $this->author = $author; - + $this->initialized['architecture'] = true; + $this->architecture = $architecture; return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getCreated() + public function getOs(): ?string { - return $this->created; + return $this->os; } - /** - * @param string $created + * + * + * @param string|null $os * * @return self */ - public function setCreated($created = null) + public function setOs(?string $os): self { - $this->created = $created; - + $this->initialized['os'] = true; + $this->os = $os; return $this; } - /** - * @return GraphDriver + * + * + * @return int|null */ - public function getGraphDriver() + public function getSize(): ?int { - return $this->graphDriver; + return $this->size; } - /** - * @param GraphDriver $graphDriver + * + * + * @param int|null $size * * @return self */ - public function setGraphDriver(?GraphDriver $graphDriver = null) + public function setSize(?int $size): self { - $this->graphDriver = $graphDriver; - + $this->initialized['size'] = true; + $this->size = $size; return $this; } - /** - * @return string[]|null + * + * + * @return int|null */ - public function getRepoDigests() + public function getVirtualSize(): ?int { - return $this->repoDigests; + return $this->virtualSize; } - /** - * @param string[]|null $repoDigests + * + * + * @param int|null $virtualSize * * @return self */ - public function setRepoDigests($repoDigests = null) + public function setVirtualSize(?int $virtualSize): self { - $this->repoDigests = $repoDigests; - + $this->initialized['virtualSize'] = true; + $this->virtualSize = $virtualSize; return $this; } - /** - * @return string[]|null + * Information about this container's graph driver. + * + * @return GraphDriver|null */ - public function getRepoTags() + public function getGraphDriver(): ?GraphDriver { - return $this->repoTags; + return $this->graphDriver; } - /** - * @param string[]|null $repoTags + * Information about this container's graph driver. + * + * @param GraphDriver|null $graphDriver * * @return self */ - public function setRepoTags($repoTags = null) + public function setGraphDriver(?GraphDriver $graphDriver): self { - $this->repoTags = $repoTags; - + $this->initialized['graphDriver'] = true; + $this->graphDriver = $graphDriver; return $this; } - /** - * @return ContainerConfig + * + * + * @return ImageRootFS|null */ - public function getConfig() + public function getRootFS(): ?ImageRootFS { - return $this->config; + return $this->rootFS; } - /** - * @param ContainerConfig $config + * + * + * @param ImageRootFS|null $rootFS * * @return self */ - public function setConfig(?ContainerConfig $config = null) + public function setRootFS(?ImageRootFS $rootFS): self { - $this->config = $config; - + $this->initialized['rootFS'] = true; + $this->rootFS = $rootFS; return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/ImageDeleteResponse.php b/generated/Model/ImageDeleteResponse.php new file mode 100644 index 000000000..b861f3699 --- /dev/null +++ b/generated/Model/ImageDeleteResponse.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The image ID of an image that was untagged + * + * @var string|null + */ + protected $untagged; + /** + * The image ID of an image that was deleted + * + * @var string|null + */ + protected $deleted; + /** + * The image ID of an image that was untagged + * + * @return string|null + */ + public function getUntagged(): ?string + { + return $this->untagged; + } + /** + * The image ID of an image that was untagged + * + * @param string|null $untagged + * + * @return self + */ + public function setUntagged(?string $untagged): self + { + $this->initialized['untagged'] = true; + $this->untagged = $untagged; + return $this; + } + /** + * The image ID of an image that was deleted + * + * @return string|null + */ + public function getDeleted(): ?string + { + return $this->deleted; + } + /** + * The image ID of an image that was deleted + * + * @param string|null $deleted + * + * @return self + */ + public function setDeleted(?string $deleted): self + { + $this->initialized['deleted'] = true; + $this->deleted = $deleted; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ImageHistoryItem.php b/generated/Model/ImageHistoryItem.php deleted file mode 100644 index 74660dcae..000000000 --- a/generated/Model/ImageHistoryItem.php +++ /dev/null @@ -1,151 +0,0 @@ -id; - } - - /** - * @param string $id - * - * @return self - */ - public function setId($id = null) - { - $this->id = $id; - - return $this; - } - - /** - * @return int - */ - public function getCreated() - { - return $this->created; - } - - /** - * @param int $created - * - * @return self - */ - public function setCreated($created = null) - { - $this->created = $created; - - return $this; - } - - /** - * @return string - */ - public function getCreatedBy() - { - return $this->createdBy; - } - - /** - * @param string $createdBy - * - * @return self - */ - public function setCreatedBy($createdBy = null) - { - $this->createdBy = $createdBy; - - return $this; - } - - /** - * @return string[]|null - */ - public function getTags() - { - return $this->tags; - } - - /** - * @param string[]|null $tags - * - * @return self - */ - public function setTags($tags = null) - { - $this->tags = $tags; - - return $this; - } - - /** - * @return int - */ - public function getSize() - { - return $this->size; - } - - /** - * @param int $size - * - * @return self - */ - public function setSize($size = null) - { - $this->size = $size; - - return $this; - } - - /** - * @return string - */ - public function getComment() - { - return $this->comment; - } - - /** - * @param string $comment - * - * @return self - */ - public function setComment($comment = null) - { - $this->comment = $comment; - - return $this; - } -} diff --git a/generated/Model/ImageItem.php b/generated/Model/ImageItem.php deleted file mode 100644 index 09569bfe1..000000000 --- a/generated/Model/ImageItem.php +++ /dev/null @@ -1,199 +0,0 @@ -repoTags; - } - - /** - * @param string[]|null $repoTags - * - * @return self - */ - public function setRepoTags($repoTags = null) - { - $this->repoTags = $repoTags; - - return $this; - } - - /** - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * @param string $id - * - * @return self - */ - public function setId($id = null) - { - $this->id = $id; - - return $this; - } - - /** - * @return string - */ - public function getParentId() - { - return $this->parentId; - } - - /** - * @param string $parentId - * - * @return self - */ - public function setParentId($parentId = null) - { - $this->parentId = $parentId; - - return $this; - } - - /** - * @return int - */ - public function getCreated() - { - return $this->created; - } - - /** - * @param int $created - * - * @return self - */ - public function setCreated($created = null) - { - $this->created = $created; - - return $this; - } - - /** - * @return int - */ - public function getSize() - { - return $this->size; - } - - /** - * @param int $size - * - * @return self - */ - public function setSize($size = null) - { - $this->size = $size; - - return $this; - } - - /** - * @return int - */ - public function getVirtualSize() - { - return $this->virtualSize; - } - - /** - * @param int $virtualSize - * - * @return self - */ - public function setVirtualSize($virtualSize = null) - { - $this->virtualSize = $virtualSize; - - return $this; - } - - /** - * @return string[]|null - */ - public function getLabels() - { - return $this->labels; - } - - /** - * @param string[]|null $labels - * - * @return self - */ - public function setLabels($labels = null) - { - $this->labels = $labels; - - return $this; - } - - /** - * @return string[]|null - */ - public function getRepoDigests() - { - return $this->repoDigests; - } - - /** - * @param string[]|null $repoDigests - * - * @return self - */ - public function setRepoDigests($repoDigests = null) - { - $this->repoDigests = $repoDigests; - - return $this; - } -} diff --git a/generated/Model/ImageRootFS.php b/generated/Model/ImageRootFS.php new file mode 100644 index 000000000..9dc3e6682 --- /dev/null +++ b/generated/Model/ImageRootFS.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $type; + /** + * + * + * @var list|null + */ + protected $layers; + /** + * + * + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + /** + * + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self + { + $this->initialized['type'] = true; + $this->type = $type; + return $this; + } + /** + * + * + * @return list|null + */ + public function getLayers(): ?array + { + return $this->layers; + } + /** + * + * + * @param list|null $layers + * + * @return self + */ + public function setLayers(?array $layers): self + { + $this->initialized['layers'] = true; + $this->layers = $layers; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ImageSearchResult.php b/generated/Model/ImageSearchResult.php deleted file mode 100644 index 9643d0b22..000000000 --- a/generated/Model/ImageSearchResult.php +++ /dev/null @@ -1,127 +0,0 @@ -description; - } - - /** - * @param string $description - * - * @return self - */ - public function setDescription($description = null) - { - $this->description = $description; - - return $this; - } - - /** - * @return bool - */ - public function getIsOfficial() - { - return $this->isOfficial; - } - - /** - * @param bool $isOfficial - * - * @return self - */ - public function setIsOfficial($isOfficial = null) - { - $this->isOfficial = $isOfficial; - - return $this; - } - - /** - * @return bool - */ - public function getIsAutomated() - { - return $this->isAutomated; - } - - /** - * @param bool $isAutomated - * - * @return self - */ - public function setIsAutomated($isAutomated = null) - { - $this->isAutomated = $isAutomated; - - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } - - /** - * @return int - */ - public function getStarCount() - { - return $this->starCount; - } - - /** - * @param int $starCount - * - * @return self - */ - public function setStarCount($starCount = null) - { - $this->starCount = $starCount; - - return $this; - } -} diff --git a/generated/Model/ImageSummary.php b/generated/Model/ImageSummary.php new file mode 100644 index 000000000..8a9f5c72b --- /dev/null +++ b/generated/Model/ImageSummary.php @@ -0,0 +1,295 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $id; + /** + * + * + * @var string|null + */ + protected $parentId; + /** + * + * + * @var list|null + */ + protected $repoTags; + /** + * + * + * @var list|null + */ + protected $repoDigests; + /** + * + * + * @var int|null + */ + protected $created; + /** + * + * + * @var int|null + */ + protected $size; + /** + * + * + * @var int|null + */ + protected $sharedSize; + /** + * + * + * @var int|null + */ + protected $virtualSize; + /** + * + * + * @var array|null + */ + protected $labels; + /** + * + * + * @var int|null + */ + protected $containers; + /** + * + * + * @return string|null + */ + public function getId(): ?string + { + return $this->id; + } + /** + * + * + * @param string|null $id + * + * @return self + */ + public function setId(?string $id): self + { + $this->initialized['id'] = true; + $this->id = $id; + return $this; + } + /** + * + * + * @return string|null + */ + public function getParentId(): ?string + { + return $this->parentId; + } + /** + * + * + * @param string|null $parentId + * + * @return self + */ + public function setParentId(?string $parentId): self + { + $this->initialized['parentId'] = true; + $this->parentId = $parentId; + return $this; + } + /** + * + * + * @return list|null + */ + public function getRepoTags(): ?array + { + return $this->repoTags; + } + /** + * + * + * @param list|null $repoTags + * + * @return self + */ + public function setRepoTags(?array $repoTags): self + { + $this->initialized['repoTags'] = true; + $this->repoTags = $repoTags; + return $this; + } + /** + * + * + * @return list|null + */ + public function getRepoDigests(): ?array + { + return $this->repoDigests; + } + /** + * + * + * @param list|null $repoDigests + * + * @return self + */ + public function setRepoDigests(?array $repoDigests): self + { + $this->initialized['repoDigests'] = true; + $this->repoDigests = $repoDigests; + return $this; + } + /** + * + * + * @return int|null + */ + public function getCreated(): ?int + { + return $this->created; + } + /** + * + * + * @param int|null $created + * + * @return self + */ + public function setCreated(?int $created): self + { + $this->initialized['created'] = true; + $this->created = $created; + return $this; + } + /** + * + * + * @return int|null + */ + public function getSize(): ?int + { + return $this->size; + } + /** + * + * + * @param int|null $size + * + * @return self + */ + public function setSize(?int $size): self + { + $this->initialized['size'] = true; + $this->size = $size; + return $this; + } + /** + * + * + * @return int|null + */ + public function getSharedSize(): ?int + { + return $this->sharedSize; + } + /** + * + * + * @param int|null $sharedSize + * + * @return self + */ + public function setSharedSize(?int $sharedSize): self + { + $this->initialized['sharedSize'] = true; + $this->sharedSize = $sharedSize; + return $this; + } + /** + * + * + * @return int|null + */ + public function getVirtualSize(): ?int + { + return $this->virtualSize; + } + /** + * + * + * @param int|null $virtualSize + * + * @return self + */ + public function setVirtualSize(?int $virtualSize): self + { + $this->initialized['virtualSize'] = true; + $this->virtualSize = $virtualSize; + return $this; + } + /** + * + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * + * + * @return int|null + */ + public function getContainers(): ?int + { + return $this->containers; + } + /** + * + * + * @param int|null $containers + * + * @return self + */ + public function setContainers(?int $containers): self + { + $this->initialized['containers'] = true; + $this->containers = $containers; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ImagesNameHistoryGetResponse200Item.php b/generated/Model/ImagesNameHistoryGetResponse200Item.php new file mode 100644 index 000000000..d4d444ca6 --- /dev/null +++ b/generated/Model/ImagesNameHistoryGetResponse200Item.php @@ -0,0 +1,183 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $id; + /** + * + * + * @var int|null + */ + protected $created; + /** + * + * + * @var string|null + */ + protected $createdBy; + /** + * + * + * @var list|null + */ + protected $tags; + /** + * + * + * @var int|null + */ + protected $size; + /** + * + * + * @var string|null + */ + protected $comment; + /** + * + * + * @return string|null + */ + public function getId(): ?string + { + return $this->id; + } + /** + * + * + * @param string|null $id + * + * @return self + */ + public function setId(?string $id): self + { + $this->initialized['id'] = true; + $this->id = $id; + return $this; + } + /** + * + * + * @return int|null + */ + public function getCreated(): ?int + { + return $this->created; + } + /** + * + * + * @param int|null $created + * + * @return self + */ + public function setCreated(?int $created): self + { + $this->initialized['created'] = true; + $this->created = $created; + return $this; + } + /** + * + * + * @return string|null + */ + public function getCreatedBy(): ?string + { + return $this->createdBy; + } + /** + * + * + * @param string|null $createdBy + * + * @return self + */ + public function setCreatedBy(?string $createdBy): self + { + $this->initialized['createdBy'] = true; + $this->createdBy = $createdBy; + return $this; + } + /** + * + * + * @return list|null + */ + public function getTags(): ?array + { + return $this->tags; + } + /** + * + * + * @param list|null $tags + * + * @return self + */ + public function setTags(?array $tags): self + { + $this->initialized['tags'] = true; + $this->tags = $tags; + return $this; + } + /** + * + * + * @return int|null + */ + public function getSize(): ?int + { + return $this->size; + } + /** + * + * + * @param int|null $size + * + * @return self + */ + public function setSize(?int $size): self + { + $this->initialized['size'] = true; + $this->size = $size; + return $this; + } + /** + * + * + * @return string|null + */ + public function getComment(): ?string + { + return $this->comment; + } + /** + * + * + * @param string|null $comment + * + * @return self + */ + public function setComment(?string $comment): self + { + $this->initialized['comment'] = true; + $this->comment = $comment; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ImagesPrunePostResponse200.php b/generated/Model/ImagesPrunePostResponse200.php new file mode 100644 index 000000000..28f68765d --- /dev/null +++ b/generated/Model/ImagesPrunePostResponse200.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * Images that were deleted + * + * @var list|null + */ + protected $imagesDeleted; + /** + * Disk space reclaimed in bytes + * + * @var int|null + */ + protected $spaceReclaimed; + /** + * Images that were deleted + * + * @return list|null + */ + public function getImagesDeleted(): ?array + { + return $this->imagesDeleted; + } + /** + * Images that were deleted + * + * @param list|null $imagesDeleted + * + * @return self + */ + public function setImagesDeleted(?array $imagesDeleted): self + { + $this->initialized['imagesDeleted'] = true; + $this->imagesDeleted = $imagesDeleted; + return $this; + } + /** + * Disk space reclaimed in bytes + * + * @return int|null + */ + public function getSpaceReclaimed(): ?int + { + return $this->spaceReclaimed; + } + /** + * Disk space reclaimed in bytes + * + * @param int|null $spaceReclaimed + * + * @return self + */ + public function setSpaceReclaimed(?int $spaceReclaimed): self + { + $this->initialized['spaceReclaimed'] = true; + $this->spaceReclaimed = $spaceReclaimed; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ImagesSearchGetResponse200Item.php b/generated/Model/ImagesSearchGetResponse200Item.php new file mode 100644 index 000000000..4fded414c --- /dev/null +++ b/generated/Model/ImagesSearchGetResponse200Item.php @@ -0,0 +1,155 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $description; + /** + * + * + * @var bool|null + */ + protected $isOfficial; + /** + * + * + * @var bool|null + */ + protected $isAutomated; + /** + * + * + * @var string|null + */ + protected $name; + /** + * + * + * @var int|null + */ + protected $starCount; + /** + * + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->description; + } + /** + * + * + * @param string|null $description + * + * @return self + */ + public function setDescription(?string $description): self + { + $this->initialized['description'] = true; + $this->description = $description; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getIsOfficial(): ?bool + { + return $this->isOfficial; + } + /** + * + * + * @param bool|null $isOfficial + * + * @return self + */ + public function setIsOfficial(?bool $isOfficial): self + { + $this->initialized['isOfficial'] = true; + $this->isOfficial = $isOfficial; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getIsAutomated(): ?bool + { + return $this->isAutomated; + } + /** + * + * + * @param bool|null $isAutomated + * + * @return self + */ + public function setIsAutomated(?bool $isAutomated): self + { + $this->initialized['isAutomated'] = true; + $this->isAutomated = $isAutomated; + return $this; + } + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * + * + * @return int|null + */ + public function getStarCount(): ?int + { + return $this->starCount; + } + /** + * + * + * @param int|null $starCount + * + * @return self + */ + public function setStarCount(?int $starCount): self + { + $this->initialized['starCount'] = true; + $this->starCount = $starCount; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/InfoGetResponse200.php b/generated/Model/InfoGetResponse200.php new file mode 100644 index 000000000..2e19dcf5f --- /dev/null +++ b/generated/Model/InfoGetResponse200.php @@ -0,0 +1,1163 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $architecture; + /** + * + * + * @var int|null + */ + protected $containers; + /** + * + * + * @var int|null + */ + protected $containersRunning; + /** + * + * + * @var int|null + */ + protected $containersStopped; + /** + * + * + * @var int|null + */ + protected $containersPaused; + /** + * + * + * @var bool|null + */ + protected $cpuCfsPeriod; + /** + * + * + * @var bool|null + */ + protected $cpuCfsQuota; + /** + * + * + * @var bool|null + */ + protected $debug; + /** + * + * + * @var string|null + */ + protected $discoveryBackend; + /** + * + * + * @var string|null + */ + protected $dockerRootDir; + /** + * + * + * @var string|null + */ + protected $driver; + /** + * + * + * @var list>|null + */ + protected $driverStatus; + /** + * + * + * @var list>|null + */ + protected $systemStatus; + /** + * + * + * @var InfoGetResponse200Plugins|null + */ + protected $plugins; + /** + * + * + * @var bool|null + */ + protected $experimentalBuild; + /** + * + * + * @var string|null + */ + protected $httpProxy; + /** + * + * + * @var string|null + */ + protected $httpsProxy; + /** + * + * + * @var string|null + */ + protected $iD; + /** + * + * + * @var bool|null + */ + protected $iPv4Forwarding; + /** + * + * + * @var int|null + */ + protected $images; + /** + * + * + * @var string|null + */ + protected $indexServerAddress; + /** + * + * + * @var string|null + */ + protected $initPath; + /** + * + * + * @var string|null + */ + protected $initSha1; + /** + * + * + * @var string|null + */ + protected $kernelVersion; + /** + * + * + * @var list|null + */ + protected $labels; + /** + * + * + * @var int|null + */ + protected $memTotal; + /** + * + * + * @var bool|null + */ + protected $memoryLimit; + /** + * + * + * @var int|null + */ + protected $nCPU; + /** + * + * + * @var int|null + */ + protected $nEventsListener; + /** + * + * + * @var int|null + */ + protected $nFd; + /** + * + * + * @var int|null + */ + protected $nGoroutines; + /** + * + * + * @var string|null + */ + protected $name; + /** + * + * + * @var string|null + */ + protected $noProxy; + /** + * + * + * @var bool|null + */ + protected $oomKillDisable; + /** + * + * + * @var string|null + */ + protected $oSType; + /** + * + * + * @var int|null + */ + protected $oomScoreAdj; + /** + * + * + * @var string|null + */ + protected $operatingSystem; + /** + * + * + * @var InfoGetResponse200RegistryConfig|null + */ + protected $registryConfig; + /** + * + * + * @var bool|null + */ + protected $swapLimit; + /** + * + * + * @var string|null + */ + protected $systemTime; + /** + * + * + * @var string|null + */ + protected $serverVersion; + /** + * + * + * @return string|null + */ + public function getArchitecture(): ?string + { + return $this->architecture; + } + /** + * + * + * @param string|null $architecture + * + * @return self + */ + public function setArchitecture(?string $architecture): self + { + $this->initialized['architecture'] = true; + $this->architecture = $architecture; + return $this; + } + /** + * + * + * @return int|null + */ + public function getContainers(): ?int + { + return $this->containers; + } + /** + * + * + * @param int|null $containers + * + * @return self + */ + public function setContainers(?int $containers): self + { + $this->initialized['containers'] = true; + $this->containers = $containers; + return $this; + } + /** + * + * + * @return int|null + */ + public function getContainersRunning(): ?int + { + return $this->containersRunning; + } + /** + * + * + * @param int|null $containersRunning + * + * @return self + */ + public function setContainersRunning(?int $containersRunning): self + { + $this->initialized['containersRunning'] = true; + $this->containersRunning = $containersRunning; + return $this; + } + /** + * + * + * @return int|null + */ + public function getContainersStopped(): ?int + { + return $this->containersStopped; + } + /** + * + * + * @param int|null $containersStopped + * + * @return self + */ + public function setContainersStopped(?int $containersStopped): self + { + $this->initialized['containersStopped'] = true; + $this->containersStopped = $containersStopped; + return $this; + } + /** + * + * + * @return int|null + */ + public function getContainersPaused(): ?int + { + return $this->containersPaused; + } + /** + * + * + * @param int|null $containersPaused + * + * @return self + */ + public function setContainersPaused(?int $containersPaused): self + { + $this->initialized['containersPaused'] = true; + $this->containersPaused = $containersPaused; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getCpuCfsPeriod(): ?bool + { + return $this->cpuCfsPeriod; + } + /** + * + * + * @param bool|null $cpuCfsPeriod + * + * @return self + */ + public function setCpuCfsPeriod(?bool $cpuCfsPeriod): self + { + $this->initialized['cpuCfsPeriod'] = true; + $this->cpuCfsPeriod = $cpuCfsPeriod; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getCpuCfsQuota(): ?bool + { + return $this->cpuCfsQuota; + } + /** + * + * + * @param bool|null $cpuCfsQuota + * + * @return self + */ + public function setCpuCfsQuota(?bool $cpuCfsQuota): self + { + $this->initialized['cpuCfsQuota'] = true; + $this->cpuCfsQuota = $cpuCfsQuota; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getDebug(): ?bool + { + return $this->debug; + } + /** + * + * + * @param bool|null $debug + * + * @return self + */ + public function setDebug(?bool $debug): self + { + $this->initialized['debug'] = true; + $this->debug = $debug; + return $this; + } + /** + * + * + * @return string|null + */ + public function getDiscoveryBackend(): ?string + { + return $this->discoveryBackend; + } + /** + * + * + * @param string|null $discoveryBackend + * + * @return self + */ + public function setDiscoveryBackend(?string $discoveryBackend): self + { + $this->initialized['discoveryBackend'] = true; + $this->discoveryBackend = $discoveryBackend; + return $this; + } + /** + * + * + * @return string|null + */ + public function getDockerRootDir(): ?string + { + return $this->dockerRootDir; + } + /** + * + * + * @param string|null $dockerRootDir + * + * @return self + */ + public function setDockerRootDir(?string $dockerRootDir): self + { + $this->initialized['dockerRootDir'] = true; + $this->dockerRootDir = $dockerRootDir; + return $this; + } + /** + * + * + * @return string|null + */ + public function getDriver(): ?string + { + return $this->driver; + } + /** + * + * + * @param string|null $driver + * + * @return self + */ + public function setDriver(?string $driver): self + { + $this->initialized['driver'] = true; + $this->driver = $driver; + return $this; + } + /** + * + * + * @return list>|null + */ + public function getDriverStatus(): ?array + { + return $this->driverStatus; + } + /** + * + * + * @param list>|null $driverStatus + * + * @return self + */ + public function setDriverStatus(?array $driverStatus): self + { + $this->initialized['driverStatus'] = true; + $this->driverStatus = $driverStatus; + return $this; + } + /** + * + * + * @return list>|null + */ + public function getSystemStatus(): ?array + { + return $this->systemStatus; + } + /** + * + * + * @param list>|null $systemStatus + * + * @return self + */ + public function setSystemStatus(?array $systemStatus): self + { + $this->initialized['systemStatus'] = true; + $this->systemStatus = $systemStatus; + return $this; + } + /** + * + * + * @return InfoGetResponse200Plugins|null + */ + public function getPlugins(): ?InfoGetResponse200Plugins + { + return $this->plugins; + } + /** + * + * + * @param InfoGetResponse200Plugins|null $plugins + * + * @return self + */ + public function setPlugins(?InfoGetResponse200Plugins $plugins): self + { + $this->initialized['plugins'] = true; + $this->plugins = $plugins; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getExperimentalBuild(): ?bool + { + return $this->experimentalBuild; + } + /** + * + * + * @param bool|null $experimentalBuild + * + * @return self + */ + public function setExperimentalBuild(?bool $experimentalBuild): self + { + $this->initialized['experimentalBuild'] = true; + $this->experimentalBuild = $experimentalBuild; + return $this; + } + /** + * + * + * @return string|null + */ + public function getHttpProxy(): ?string + { + return $this->httpProxy; + } + /** + * + * + * @param string|null $httpProxy + * + * @return self + */ + public function setHttpProxy(?string $httpProxy): self + { + $this->initialized['httpProxy'] = true; + $this->httpProxy = $httpProxy; + return $this; + } + /** + * + * + * @return string|null + */ + public function getHttpsProxy(): ?string + { + return $this->httpsProxy; + } + /** + * + * + * @param string|null $httpsProxy + * + * @return self + */ + public function setHttpsProxy(?string $httpsProxy): self + { + $this->initialized['httpsProxy'] = true; + $this->httpsProxy = $httpsProxy; + return $this; + } + /** + * + * + * @return string|null + */ + public function getID(): ?string + { + return $this->iD; + } + /** + * + * + * @param string|null $iD + * + * @return self + */ + public function setID(?string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getIPv4Forwarding(): ?bool + { + return $this->iPv4Forwarding; + } + /** + * + * + * @param bool|null $iPv4Forwarding + * + * @return self + */ + public function setIPv4Forwarding(?bool $iPv4Forwarding): self + { + $this->initialized['iPv4Forwarding'] = true; + $this->iPv4Forwarding = $iPv4Forwarding; + return $this; + } + /** + * + * + * @return int|null + */ + public function getImages(): ?int + { + return $this->images; + } + /** + * + * + * @param int|null $images + * + * @return self + */ + public function setImages(?int $images): self + { + $this->initialized['images'] = true; + $this->images = $images; + return $this; + } + /** + * + * + * @return string|null + */ + public function getIndexServerAddress(): ?string + { + return $this->indexServerAddress; + } + /** + * + * + * @param string|null $indexServerAddress + * + * @return self + */ + public function setIndexServerAddress(?string $indexServerAddress): self + { + $this->initialized['indexServerAddress'] = true; + $this->indexServerAddress = $indexServerAddress; + return $this; + } + /** + * + * + * @return string|null + */ + public function getInitPath(): ?string + { + return $this->initPath; + } + /** + * + * + * @param string|null $initPath + * + * @return self + */ + public function setInitPath(?string $initPath): self + { + $this->initialized['initPath'] = true; + $this->initPath = $initPath; + return $this; + } + /** + * + * + * @return string|null + */ + public function getInitSha1(): ?string + { + return $this->initSha1; + } + /** + * + * + * @param string|null $initSha1 + * + * @return self + */ + public function setInitSha1(?string $initSha1): self + { + $this->initialized['initSha1'] = true; + $this->initSha1 = $initSha1; + return $this; + } + /** + * + * + * @return string|null + */ + public function getKernelVersion(): ?string + { + return $this->kernelVersion; + } + /** + * + * + * @param string|null $kernelVersion + * + * @return self + */ + public function setKernelVersion(?string $kernelVersion): self + { + $this->initialized['kernelVersion'] = true; + $this->kernelVersion = $kernelVersion; + return $this; + } + /** + * + * + * @return list|null + */ + public function getLabels(): ?array + { + return $this->labels; + } + /** + * + * + * @param list|null $labels + * + * @return self + */ + public function setLabels(?array $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * + * + * @return int|null + */ + public function getMemTotal(): ?int + { + return $this->memTotal; + } + /** + * + * + * @param int|null $memTotal + * + * @return self + */ + public function setMemTotal(?int $memTotal): self + { + $this->initialized['memTotal'] = true; + $this->memTotal = $memTotal; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getMemoryLimit(): ?bool + { + return $this->memoryLimit; + } + /** + * + * + * @param bool|null $memoryLimit + * + * @return self + */ + public function setMemoryLimit(?bool $memoryLimit): self + { + $this->initialized['memoryLimit'] = true; + $this->memoryLimit = $memoryLimit; + return $this; + } + /** + * + * + * @return int|null + */ + public function getNCPU(): ?int + { + return $this->nCPU; + } + /** + * + * + * @param int|null $nCPU + * + * @return self + */ + public function setNCPU(?int $nCPU): self + { + $this->initialized['nCPU'] = true; + $this->nCPU = $nCPU; + return $this; + } + /** + * + * + * @return int|null + */ + public function getNEventsListener(): ?int + { + return $this->nEventsListener; + } + /** + * + * + * @param int|null $nEventsListener + * + * @return self + */ + public function setNEventsListener(?int $nEventsListener): self + { + $this->initialized['nEventsListener'] = true; + $this->nEventsListener = $nEventsListener; + return $this; + } + /** + * + * + * @return int|null + */ + public function getNFd(): ?int + { + return $this->nFd; + } + /** + * + * + * @param int|null $nFd + * + * @return self + */ + public function setNFd(?int $nFd): self + { + $this->initialized['nFd'] = true; + $this->nFd = $nFd; + return $this; + } + /** + * + * + * @return int|null + */ + public function getNGoroutines(): ?int + { + return $this->nGoroutines; + } + /** + * + * + * @param int|null $nGoroutines + * + * @return self + */ + public function setNGoroutines(?int $nGoroutines): self + { + $this->initialized['nGoroutines'] = true; + $this->nGoroutines = $nGoroutines; + return $this; + } + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * + * + * @return string|null + */ + public function getNoProxy(): ?string + { + return $this->noProxy; + } + /** + * + * + * @param string|null $noProxy + * + * @return self + */ + public function setNoProxy(?string $noProxy): self + { + $this->initialized['noProxy'] = true; + $this->noProxy = $noProxy; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getOomKillDisable(): ?bool + { + return $this->oomKillDisable; + } + /** + * + * + * @param bool|null $oomKillDisable + * + * @return self + */ + public function setOomKillDisable(?bool $oomKillDisable): self + { + $this->initialized['oomKillDisable'] = true; + $this->oomKillDisable = $oomKillDisable; + return $this; + } + /** + * + * + * @return string|null + */ + public function getOSType(): ?string + { + return $this->oSType; + } + /** + * + * + * @param string|null $oSType + * + * @return self + */ + public function setOSType(?string $oSType): self + { + $this->initialized['oSType'] = true; + $this->oSType = $oSType; + return $this; + } + /** + * + * + * @return int|null + */ + public function getOomScoreAdj(): ?int + { + return $this->oomScoreAdj; + } + /** + * + * + * @param int|null $oomScoreAdj + * + * @return self + */ + public function setOomScoreAdj(?int $oomScoreAdj): self + { + $this->initialized['oomScoreAdj'] = true; + $this->oomScoreAdj = $oomScoreAdj; + return $this; + } + /** + * + * + * @return string|null + */ + public function getOperatingSystem(): ?string + { + return $this->operatingSystem; + } + /** + * + * + * @param string|null $operatingSystem + * + * @return self + */ + public function setOperatingSystem(?string $operatingSystem): self + { + $this->initialized['operatingSystem'] = true; + $this->operatingSystem = $operatingSystem; + return $this; + } + /** + * + * + * @return InfoGetResponse200RegistryConfig|null + */ + public function getRegistryConfig(): ?InfoGetResponse200RegistryConfig + { + return $this->registryConfig; + } + /** + * + * + * @param InfoGetResponse200RegistryConfig|null $registryConfig + * + * @return self + */ + public function setRegistryConfig(?InfoGetResponse200RegistryConfig $registryConfig): self + { + $this->initialized['registryConfig'] = true; + $this->registryConfig = $registryConfig; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getSwapLimit(): ?bool + { + return $this->swapLimit; + } + /** + * + * + * @param bool|null $swapLimit + * + * @return self + */ + public function setSwapLimit(?bool $swapLimit): self + { + $this->initialized['swapLimit'] = true; + $this->swapLimit = $swapLimit; + return $this; + } + /** + * + * + * @return string|null + */ + public function getSystemTime(): ?string + { + return $this->systemTime; + } + /** + * + * + * @param string|null $systemTime + * + * @return self + */ + public function setSystemTime(?string $systemTime): self + { + $this->initialized['systemTime'] = true; + $this->systemTime = $systemTime; + return $this; + } + /** + * + * + * @return string|null + */ + public function getServerVersion(): ?string + { + return $this->serverVersion; + } + /** + * + * + * @param string|null $serverVersion + * + * @return self + */ + public function setServerVersion(?string $serverVersion): self + { + $this->initialized['serverVersion'] = true; + $this->serverVersion = $serverVersion; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/InfoGetResponse200Plugins.php b/generated/Model/InfoGetResponse200Plugins.php new file mode 100644 index 000000000..63fb7587d --- /dev/null +++ b/generated/Model/InfoGetResponse200Plugins.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var list|null + */ + protected $volume; + /** + * + * + * @var list|null + */ + protected $network; + /** + * + * + * @return list|null + */ + public function getVolume(): ?array + { + return $this->volume; + } + /** + * + * + * @param list|null $volume + * + * @return self + */ + public function setVolume(?array $volume): self + { + $this->initialized['volume'] = true; + $this->volume = $volume; + return $this; + } + /** + * + * + * @return list|null + */ + public function getNetwork(): ?array + { + return $this->network; + } + /** + * + * + * @param list|null $network + * + * @return self + */ + public function setNetwork(?array $network): self + { + $this->initialized['network'] = true; + $this->network = $network; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/InfoGetResponse200RegistryConfig.php b/generated/Model/InfoGetResponse200RegistryConfig.php new file mode 100644 index 000000000..49b6c765b --- /dev/null +++ b/generated/Model/InfoGetResponse200RegistryConfig.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var array|null + */ + protected $indexConfigs; + /** + * + * + * @var list|null + */ + protected $insecureRegistryCIDRs; + /** + * + * + * @return array|null + */ + public function getIndexConfigs(): ?iterable + { + return $this->indexConfigs; + } + /** + * + * + * @param array|null $indexConfigs + * + * @return self + */ + public function setIndexConfigs(?iterable $indexConfigs): self + { + $this->initialized['indexConfigs'] = true; + $this->indexConfigs = $indexConfigs; + return $this; + } + /** + * + * + * @return list|null + */ + public function getInsecureRegistryCIDRs(): ?array + { + return $this->insecureRegistryCIDRs; + } + /** + * + * + * @param list|null $insecureRegistryCIDRs + * + * @return self + */ + public function setInsecureRegistryCIDRs(?array $insecureRegistryCIDRs): self + { + $this->initialized['insecureRegistryCIDRs'] = true; + $this->insecureRegistryCIDRs = $insecureRegistryCIDRs; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/InfoGetResponse200RegistryConfigIndexConfigsItem.php b/generated/Model/InfoGetResponse200RegistryConfigIndexConfigsItem.php new file mode 100644 index 000000000..0088879a9 --- /dev/null +++ b/generated/Model/InfoGetResponse200RegistryConfigIndexConfigsItem.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * + * + * @var list|null + */ + protected $mirrors; + /** + * + * + * @var string|null + */ + protected $name; + /** + * + * + * @var bool|null + */ + protected $official; + /** + * + * + * @var bool|null + */ + protected $secure; + /** + * + * + * @return list|null + */ + public function getMirrors(): ?array + { + return $this->mirrors; + } + /** + * + * + * @param list|null $mirrors + * + * @return self + */ + public function setMirrors(?array $mirrors): self + { + $this->initialized['mirrors'] = true; + $this->mirrors = $mirrors; + return $this; + } + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getOfficial(): ?bool + { + return $this->official; + } + /** + * + * + * @param bool|null $official + * + * @return self + */ + public function setOfficial(?bool $official): self + { + $this->initialized['official'] = true; + $this->official = $official; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getSecure(): ?bool + { + return $this->secure; + } + /** + * + * + * @param bool|null $secure + * + * @return self + */ + public function setSecure(?bool $secure): self + { + $this->initialized['secure'] = true; + $this->secure = $secure; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/LogConfig.php b/generated/Model/LogConfig.php deleted file mode 100644 index 2b061be65..000000000 --- a/generated/Model/LogConfig.php +++ /dev/null @@ -1,55 +0,0 @@ -type; - } - - /** - * @param string $type - * - * @return self - */ - public function setType($type = null) - { - $this->type = $type; - - return $this; - } - - /** - * @return string[]|null - */ - public function getConfig() - { - return $this->config; - } - - /** - * @param string[]|null $config - * - * @return self - */ - public function setConfig($config = null) - { - $this->config = $config; - - return $this; - } -} diff --git a/generated/Model/Mount.php b/generated/Model/Mount.php index d0eef2973..b4158c176 100644 --- a/generated/Model/Mount.php +++ b/generated/Model/Mount.php @@ -5,171 +5,222 @@ class Mount { /** - * @var string + * @var array */ - protected $name; + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } /** - * @var string + * Container path. + * + * @var string|null */ - protected $source; + protected $target; /** - * @var string + * Mount source (e.g. a volume name, a host path). + * + * @var mixed|null */ - protected $destination; + protected $source; /** - * @var string + * The mount type. Available types: + + - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. + - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. + - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. + + * + * @var string|null + */ + protected $type; + /** + * Whether the mount should be read-only. + * + * @var bool|null */ - protected $driver; + protected $readOnly; /** - * @var string + * Optional configuration for the `bind` type. + * + * @var MountBindOptions|null */ - protected $mode; + protected $bindOptions; /** - * @var bool + * Optional configuration for the `volume` type. + * + * @var MountVolumeOptions|null */ - protected $rW; + protected $volumeOptions; /** - * @var string + * Optional configuration for the `tmpfs` type. + * + * @var MountTmpfsOptions|null */ - protected $propagation; - + protected $tmpfsOptions; /** - * @return string + * Container path. + * + * @return string|null */ - public function getName() + public function getTarget(): ?string { - return $this->name; + return $this->target; } - /** - * @param string $name + * Container path. + * + * @param string|null $target * * @return self */ - public function setName($name = null) + public function setTarget(?string $target): self { - $this->name = $name; - + $this->initialized['target'] = true; + $this->target = $target; return $this; } - /** - * @return string + * Mount source (e.g. a volume name, a host path). + * + * @return mixed */ public function getSource() { return $this->source; } - /** - * @param string $source + * Mount source (e.g. a volume name, a host path). + * + * @param mixed $source * * @return self */ - public function setSource($source = null) + public function setSource($source): self { + $this->initialized['source'] = true; $this->source = $source; - return $this; } - /** - * @return string - */ - public function getDestination() + * The mount type. Available types: + + - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. + - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. + - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. + + * + * @return string|null + */ + public function getType(): ?string { - return $this->destination; + return $this->type; } - /** - * @param string $destination - * - * @return self - */ - public function setDestination($destination = null) + * The mount type. Available types: + + - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. + - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. + - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. + + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self { - $this->destination = $destination; - + $this->initialized['type'] = true; + $this->type = $type; return $this; } - /** - * @return string + * Whether the mount should be read-only. + * + * @return bool|null */ - public function getDriver() + public function getReadOnly(): ?bool { - return $this->driver; + return $this->readOnly; } - /** - * @param string $driver + * Whether the mount should be read-only. + * + * @param bool|null $readOnly * * @return self */ - public function setDriver($driver = null) + public function setReadOnly(?bool $readOnly): self { - $this->driver = $driver; - + $this->initialized['readOnly'] = true; + $this->readOnly = $readOnly; return $this; } - /** - * @return string + * Optional configuration for the `bind` type. + * + * @return MountBindOptions|null */ - public function getMode() + public function getBindOptions(): ?MountBindOptions { - return $this->mode; + return $this->bindOptions; } - /** - * @param string $mode + * Optional configuration for the `bind` type. + * + * @param MountBindOptions|null $bindOptions * * @return self */ - public function setMode($mode = null) + public function setBindOptions(?MountBindOptions $bindOptions): self { - $this->mode = $mode; - + $this->initialized['bindOptions'] = true; + $this->bindOptions = $bindOptions; return $this; } - /** - * @return bool + * Optional configuration for the `volume` type. + * + * @return MountVolumeOptions|null */ - public function getRW() + public function getVolumeOptions(): ?MountVolumeOptions { - return $this->rW; + return $this->volumeOptions; } - /** - * @param bool $rW + * Optional configuration for the `volume` type. + * + * @param MountVolumeOptions|null $volumeOptions * * @return self */ - public function setRW($rW = null) + public function setVolumeOptions(?MountVolumeOptions $volumeOptions): self { - $this->rW = $rW; - + $this->initialized['volumeOptions'] = true; + $this->volumeOptions = $volumeOptions; return $this; } - /** - * @return string + * Optional configuration for the `tmpfs` type. + * + * @return MountTmpfsOptions|null */ - public function getPropagation() + public function getTmpfsOptions(): ?MountTmpfsOptions { - return $this->propagation; + return $this->tmpfsOptions; } - /** - * @param string $propagation + * Optional configuration for the `tmpfs` type. + * + * @param MountTmpfsOptions|null $tmpfsOptions * * @return self */ - public function setPropagation($propagation = null) + public function setTmpfsOptions(?MountTmpfsOptions $tmpfsOptions): self { - $this->propagation = $propagation; - + $this->initialized['tmpfsOptions'] = true; + $this->tmpfsOptions = $tmpfsOptions; return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/MountBindOptions.php b/generated/Model/MountBindOptions.php new file mode 100644 index 000000000..4f5bbe6e5 --- /dev/null +++ b/generated/Model/MountBindOptions.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. + * + * @var mixed|null + */ + protected $propagation; + /** + * A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. + * + * @return mixed + */ + public function getPropagation() + { + return $this->propagation; + } + /** + * A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. + * + * @param mixed $propagation + * + * @return self + */ + public function setPropagation($propagation): self + { + $this->initialized['propagation'] = true; + $this->propagation = $propagation; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/MountPoint.php b/generated/Model/MountPoint.php new file mode 100644 index 000000000..634667c9d --- /dev/null +++ b/generated/Model/MountPoint.php @@ -0,0 +1,305 @@ +initialized); + } + /** + * The mount type: + + - `bind` a mount of a file or directory from the host into the container. + - `volume` a docker volume with the given `Name`. + - `tmpfs` a `tmpfs`. + + * + * @var string|null + */ + protected $type; + /** + * Name is the name reference to the underlying data defined by `Source` + e.g., the volume name. + + * + * @var string|null + */ + protected $name; + /** + * Source location of the mount. + + For volumes, this contains the storage location of the volume (within + `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains + the source (host) part of the bind-mount. For `tmpfs` mount points, this + field is empty. + + * + * @var string|null + */ + protected $source; + /** + * Destination is the path relative to the container root (`/`) where + the `Source` is mounted inside the container. + + * + * @var string|null + */ + protected $destination; + /** + * Driver is the volume driver used to create the volume (if it is a volume). + * + * @var string|null + */ + protected $driver; + /** + * Mode is a comma separated list of options supplied by the user when + creating the bind/volume mount. + + The default is platform-specific (`"z"` on Linux, empty on Windows). + + * + * @var string|null + */ + protected $mode; + /** + * Whether the mount is mounted writable (read-write). + * + * @var bool|null + */ + protected $rW; + /** + * Propagation describes how mounts are propagated from the host into the + mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) + for details. This field is not used on Windows. + + * + * @var string|null + */ + protected $propagation; + /** + * The mount type: + + - `bind` a mount of a file or directory from the host into the container. + - `volume` a docker volume with the given `Name`. + - `tmpfs` a `tmpfs`. + + * + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + /** + * The mount type: + + - `bind` a mount of a file or directory from the host into the container. + - `volume` a docker volume with the given `Name`. + - `tmpfs` a `tmpfs`. + + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self + { + $this->initialized['type'] = true; + $this->type = $type; + return $this; + } + /** + * Name is the name reference to the underlying data defined by `Source` + e.g., the volume name. + + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * Name is the name reference to the underlying data defined by `Source` + e.g., the volume name. + + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * Source location of the mount. + + For volumes, this contains the storage location of the volume (within + `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains + the source (host) part of the bind-mount. For `tmpfs` mount points, this + field is empty. + + * + * @return string|null + */ + public function getSource(): ?string + { + return $this->source; + } + /** + * Source location of the mount. + + For volumes, this contains the storage location of the volume (within + `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains + the source (host) part of the bind-mount. For `tmpfs` mount points, this + field is empty. + + * + * @param string|null $source + * + * @return self + */ + public function setSource(?string $source): self + { + $this->initialized['source'] = true; + $this->source = $source; + return $this; + } + /** + * Destination is the path relative to the container root (`/`) where + the `Source` is mounted inside the container. + + * + * @return string|null + */ + public function getDestination(): ?string + { + return $this->destination; + } + /** + * Destination is the path relative to the container root (`/`) where + the `Source` is mounted inside the container. + + * + * @param string|null $destination + * + * @return self + */ + public function setDestination(?string $destination): self + { + $this->initialized['destination'] = true; + $this->destination = $destination; + return $this; + } + /** + * Driver is the volume driver used to create the volume (if it is a volume). + * + * @return string|null + */ + public function getDriver(): ?string + { + return $this->driver; + } + /** + * Driver is the volume driver used to create the volume (if it is a volume). + * + * @param string|null $driver + * + * @return self + */ + public function setDriver(?string $driver): self + { + $this->initialized['driver'] = true; + $this->driver = $driver; + return $this; + } + /** + * Mode is a comma separated list of options supplied by the user when + creating the bind/volume mount. + + The default is platform-specific (`"z"` on Linux, empty on Windows). + + * + * @return string|null + */ + public function getMode(): ?string + { + return $this->mode; + } + /** + * Mode is a comma separated list of options supplied by the user when + creating the bind/volume mount. + + The default is platform-specific (`"z"` on Linux, empty on Windows). + + * + * @param string|null $mode + * + * @return self + */ + public function setMode(?string $mode): self + { + $this->initialized['mode'] = true; + $this->mode = $mode; + return $this; + } + /** + * Whether the mount is mounted writable (read-write). + * + * @return bool|null + */ + public function getRW(): ?bool + { + return $this->rW; + } + /** + * Whether the mount is mounted writable (read-write). + * + * @param bool|null $rW + * + * @return self + */ + public function setRW(?bool $rW): self + { + $this->initialized['rW'] = true; + $this->rW = $rW; + return $this; + } + /** + * Propagation describes how mounts are propagated from the host into the + mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) + for details. This field is not used on Windows. + + * + * @return string|null + */ + public function getPropagation(): ?string + { + return $this->propagation; + } + /** + * Propagation describes how mounts are propagated from the host into the + mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) + for details. This field is not used on Windows. + + * + * @param string|null $propagation + * + * @return self + */ + public function setPropagation(?string $propagation): self + { + $this->initialized['propagation'] = true; + $this->propagation = $propagation; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/MountTmpfsOptions.php b/generated/Model/MountTmpfsOptions.php new file mode 100644 index 000000000..1ec96a6bb --- /dev/null +++ b/generated/Model/MountTmpfsOptions.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The size for the tmpfs mount in bytes. + * + * @var int|null + */ + protected $sizeBytes; + /** + * The permission mode for the tmpfs mount in an integer. + * + * @var int|null + */ + protected $mode; + /** + * The size for the tmpfs mount in bytes. + * + * @return int|null + */ + public function getSizeBytes(): ?int + { + return $this->sizeBytes; + } + /** + * The size for the tmpfs mount in bytes. + * + * @param int|null $sizeBytes + * + * @return self + */ + public function setSizeBytes(?int $sizeBytes): self + { + $this->initialized['sizeBytes'] = true; + $this->sizeBytes = $sizeBytes; + return $this; + } + /** + * The permission mode for the tmpfs mount in an integer. + * + * @return int|null + */ + public function getMode(): ?int + { + return $this->mode; + } + /** + * The permission mode for the tmpfs mount in an integer. + * + * @param int|null $mode + * + * @return self + */ + public function setMode(?int $mode): self + { + $this->initialized['mode'] = true; + $this->mode = $mode; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/MountVolumeOptions.php b/generated/Model/MountVolumeOptions.php new file mode 100644 index 000000000..b55d15f8c --- /dev/null +++ b/generated/Model/MountVolumeOptions.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * Populate volume with data from the target. + * + * @var bool|null + */ + protected $noCopy = false; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * Map of driver specific options + * + * @var MountVolumeOptionsDriverConfig|null + */ + protected $driverConfig; + /** + * Populate volume with data from the target. + * + * @return bool|null + */ + public function getNoCopy(): ?bool + { + return $this->noCopy; + } + /** + * Populate volume with data from the target. + * + * @param bool|null $noCopy + * + * @return self + */ + public function setNoCopy(?bool $noCopy): self + { + $this->initialized['noCopy'] = true; + $this->noCopy = $noCopy; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * Map of driver specific options + * + * @return MountVolumeOptionsDriverConfig|null + */ + public function getDriverConfig(): ?MountVolumeOptionsDriverConfig + { + return $this->driverConfig; + } + /** + * Map of driver specific options + * + * @param MountVolumeOptionsDriverConfig|null $driverConfig + * + * @return self + */ + public function setDriverConfig(?MountVolumeOptionsDriverConfig $driverConfig): self + { + $this->initialized['driverConfig'] = true; + $this->driverConfig = $driverConfig; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/MountVolumeOptionsDriverConfig.php b/generated/Model/MountVolumeOptionsDriverConfig.php new file mode 100644 index 000000000..f7bfeb74d --- /dev/null +++ b/generated/Model/MountVolumeOptionsDriverConfig.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * Name of the driver to use to create the volume. + * + * @var string|null + */ + protected $name; + /** + * key/value map of driver specific options. + * + * @var array|null + */ + protected $options; + /** + * Name of the driver to use to create the volume. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * Name of the driver to use to create the volume. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * key/value map of driver specific options. + * + * @return array|null + */ + public function getOptions(): ?iterable + { + return $this->options; + } + /** + * key/value map of driver specific options. + * + * @param array|null $options + * + * @return self + */ + public function setOptions(?iterable $options): self + { + $this->initialized['options'] = true; + $this->options = $options; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Network.php b/generated/Model/Network.php index ec7e03605..0a299b0fd 100644 --- a/generated/Model/Network.php +++ b/generated/Model/Network.php @@ -5,243 +5,319 @@ class Network { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var string|null */ protected $name; /** - * @var string + * + * + * @var string|null */ protected $id; /** - * @var string + * + * + * @var string|null + */ + protected $created; + /** + * + * + * @var string|null */ protected $scope; /** - * @var string + * + * + * @var string|null */ protected $driver; /** - * @var bool + * + * + * @var bool|null */ protected $enableIPv6; /** - * @var IPAM + * + * + * @var IPAM|null */ protected $iPAM; /** - * @var bool + * + * + * @var bool|null */ protected $internal; /** - * @var NetworkContainer[]|null + * + * + * @var array|null */ protected $containers; /** - * @var string[] + * + * + * @var array|null */ protected $options; /** - * @var string[]|null + * + * + * @var array|null */ protected $labels; - /** - * @return string + * + * + * @return string|null */ - public function getName() + public function getName(): ?string { return $this->name; } - /** - * @param string $name + * + * + * @param string|null $name * * @return self */ - public function setName($name = null) + public function setName(?string $name): self { + $this->initialized['name'] = true; $this->name = $name; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getId() + public function getId(): ?string { return $this->id; } - /** - * @param string $id + * + * + * @param string|null $id * * @return self */ - public function setId($id = null) + public function setId(?string $id): self { + $this->initialized['id'] = true; $this->id = $id; - return $this; } - /** - * @return string + * + * + * @return string|null + */ + public function getCreated(): ?string + { + return $this->created; + } + /** + * + * + * @param string|null $created + * + * @return self + */ + public function setCreated(?string $created): self + { + $this->initialized['created'] = true; + $this->created = $created; + return $this; + } + /** + * + * + * @return string|null */ - public function getScope() + public function getScope(): ?string { return $this->scope; } - /** - * @param string $scope + * + * + * @param string|null $scope * * @return self */ - public function setScope($scope = null) + public function setScope(?string $scope): self { + $this->initialized['scope'] = true; $this->scope = $scope; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getDriver() + public function getDriver(): ?string { return $this->driver; } - /** - * @param string $driver + * + * + * @param string|null $driver * * @return self */ - public function setDriver($driver = null) + public function setDriver(?string $driver): self { + $this->initialized['driver'] = true; $this->driver = $driver; - return $this; } - /** - * @return bool + * + * + * @return bool|null */ - public function getEnableIPv6() + public function getEnableIPv6(): ?bool { return $this->enableIPv6; } - /** - * @param bool $enableIPv6 + * + * + * @param bool|null $enableIPv6 * * @return self */ - public function setEnableIPv6($enableIPv6 = null) + public function setEnableIPv6(?bool $enableIPv6): self { + $this->initialized['enableIPv6'] = true; $this->enableIPv6 = $enableIPv6; - return $this; } - /** - * @return IPAM + * + * + * @return IPAM|null */ - public function getIPAM() + public function getIPAM(): ?IPAM { return $this->iPAM; } - /** - * @param IPAM $iPAM + * + * + * @param IPAM|null $iPAM * * @return self */ - public function setIPAM(?IPAM $iPAM = null) + public function setIPAM(?IPAM $iPAM): self { + $this->initialized['iPAM'] = true; $this->iPAM = $iPAM; - return $this; } - /** - * @return bool + * + * + * @return bool|null */ - public function getInternal() + public function getInternal(): ?bool { return $this->internal; } - /** - * @param bool $internal + * + * + * @param bool|null $internal * * @return self */ - public function setInternal($internal = null) + public function setInternal(?bool $internal): self { + $this->initialized['internal'] = true; $this->internal = $internal; - return $this; } - /** - * @return NetworkContainer[]|null + * + * + * @return array|null */ - public function getContainers() + public function getContainers(): ?iterable { return $this->containers; } - /** - * @param NetworkContainer[]|null $containers + * + * + * @param array|null $containers * * @return self */ - public function setContainers($containers = null) + public function setContainers(?iterable $containers): self { + $this->initialized['containers'] = true; $this->containers = $containers; - return $this; } - /** - * @return string[] + * + * + * @return array|null */ - public function getOptions() + public function getOptions(): ?iterable { return $this->options; } - /** - * @param string[] $options + * + * + * @param array|null $options * * @return self */ - public function setOptions(?\ArrayObject $options = null) + public function setOptions(?iterable $options): self { + $this->initialized['options'] = true; $this->options = $options; - return $this; } - /** - * @return string[]|null + * + * + * @return array|null */ - public function getLabels() + public function getLabels(): ?iterable { return $this->labels; } - /** - * @param string[]|null $labels + * + * + * @param array|null $labels * * @return self */ - public function setLabels($labels = null) + public function setLabels(?iterable $labels): self { + $this->initialized['labels'] = true; $this->labels = $labels; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/NetworkAttachment.php b/generated/Model/NetworkAttachment.php deleted file mode 100644 index e70ccc164..000000000 --- a/generated/Model/NetworkAttachment.php +++ /dev/null @@ -1,55 +0,0 @@ -network; - } - - /** - * @param SwarmNetwork $network - * - * @return self - */ - public function setNetwork(?SwarmNetwork $network = null) - { - $this->network = $network; - - return $this; - } - - /** - * @return string[]|null - */ - public function getAddresses() - { - return $this->addresses; - } - - /** - * @param string[]|null $addresses - * - * @return self - */ - public function setAddresses($addresses = null) - { - $this->addresses = $addresses; - - return $this; - } -} diff --git a/generated/Model/NetworkAttachmentConfig.php b/generated/Model/NetworkAttachmentConfig.php deleted file mode 100644 index e0eef625a..000000000 --- a/generated/Model/NetworkAttachmentConfig.php +++ /dev/null @@ -1,55 +0,0 @@ -target; - } - - /** - * @param string $target - * - * @return self - */ - public function setTarget($target = null) - { - $this->target = $target; - - return $this; - } - - /** - * @return string[]|null - */ - public function getAliases() - { - return $this->aliases; - } - - /** - * @param string[]|null $aliases - * - * @return self - */ - public function setAliases($aliases = null) - { - $this->aliases = $aliases; - - return $this; - } -} diff --git a/generated/Model/NetworkConfig.php b/generated/Model/NetworkConfig.php index 61e0f1b26..bfebc39cb 100644 --- a/generated/Model/NetworkConfig.php +++ b/generated/Model/NetworkConfig.php @@ -5,195 +5,207 @@ class NetworkConfig { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var string|null */ protected $bridge; /** - * @var string + * + * + * @var string|null */ protected $gateway; /** - * @var string + * + * + * @var string|null */ - protected $iPAddress; + protected $address; /** - * @var int + * + * + * @var int|null */ protected $iPPrefixLen; /** - * @var string + * + * + * @var string|null */ protected $macAddress; /** - * @var string + * + * + * @var string|null */ protected $portMapping; /** - * @var ContainerNetwork[] - */ - protected $networks; - /** - * @var PortBinding[][]|null[]|null + * + * + * @var list|null */ protected $ports; - /** - * @return string + * + * + * @return string|null */ - public function getBridge() + public function getBridge(): ?string { return $this->bridge; } - /** - * @param string $bridge + * + * + * @param string|null $bridge * * @return self */ - public function setBridge($bridge = null) + public function setBridge(?string $bridge): self { + $this->initialized['bridge'] = true; $this->bridge = $bridge; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getGateway() + public function getGateway(): ?string { return $this->gateway; } - /** - * @param string $gateway + * + * + * @param string|null $gateway * * @return self */ - public function setGateway($gateway = null) + public function setGateway(?string $gateway): self { + $this->initialized['gateway'] = true; $this->gateway = $gateway; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getIPAddress() + public function getAddress(): ?string { - return $this->iPAddress; + return $this->address; } - /** - * @param string $iPAddress + * + * + * @param string|null $address * * @return self */ - public function setIPAddress($iPAddress = null) + public function setAddress(?string $address): self { - $this->iPAddress = $iPAddress; - + $this->initialized['address'] = true; + $this->address = $address; return $this; } - /** - * @return int + * + * + * @return int|null */ - public function getIPPrefixLen() + public function getIPPrefixLen(): ?int { return $this->iPPrefixLen; } - /** - * @param int $iPPrefixLen + * + * + * @param int|null $iPPrefixLen * * @return self */ - public function setIPPrefixLen($iPPrefixLen = null) + public function setIPPrefixLen(?int $iPPrefixLen): self { + $this->initialized['iPPrefixLen'] = true; $this->iPPrefixLen = $iPPrefixLen; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getMacAddress() + public function getMacAddress(): ?string { return $this->macAddress; } - /** - * @param string $macAddress + * + * + * @param string|null $macAddress * * @return self */ - public function setMacAddress($macAddress = null) + public function setMacAddress(?string $macAddress): self { + $this->initialized['macAddress'] = true; $this->macAddress = $macAddress; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getPortMapping() + public function getPortMapping(): ?string { return $this->portMapping; } - /** - * @param string $portMapping + * + * + * @param string|null $portMapping * * @return self */ - public function setPortMapping($portMapping = null) + public function setPortMapping(?string $portMapping): self { + $this->initialized['portMapping'] = true; $this->portMapping = $portMapping; - return $this; } - - /** - * @return ContainerNetwork[] - */ - public function getNetworks() - { - return $this->networks; - } - /** - * @param ContainerNetwork[] $networks + * * - * @return self + * @return list|null */ - public function setNetworks(?\ArrayObject $networks = null) - { - $this->networks = $networks; - - return $this; - } - - /** - * @return PortBinding[][]|null[]|null - */ - public function getPorts() + public function getPorts(): ?array { return $this->ports; } - /** - * @param PortBinding[][]|null[]|null $ports + * + * + * @param list|null $ports * * @return self */ - public function setPorts($ports = null) + public function setPorts(?array $ports): self { + $this->initialized['ports'] = true; $this->ports = $ports; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/NetworkContainer.php b/generated/Model/NetworkContainer.php index 40d276a44..1a540d6c4 100644 --- a/generated/Model/NetworkContainer.php +++ b/generated/Model/NetworkContainer.php @@ -5,123 +5,123 @@ class NetworkContainer { /** - * @var string + * @var array */ - protected $name; + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } /** - * @var string + * + * + * @var string|null */ protected $endpointID; /** - * @var string + * + * + * @var string|null */ protected $macAddress; /** - * @var string + * + * + * @var string|null */ protected $iPv4Address; /** - * @var string + * + * + * @var string|null */ protected $iPv6Address; - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name + * * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } - - /** - * @return string + * @return string|null */ - public function getEndpointID() + public function getEndpointID(): ?string { return $this->endpointID; } - /** - * @param string $endpointID + * + * + * @param string|null $endpointID * * @return self */ - public function setEndpointID($endpointID = null) + public function setEndpointID(?string $endpointID): self { + $this->initialized['endpointID'] = true; $this->endpointID = $endpointID; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getMacAddress() + public function getMacAddress(): ?string { return $this->macAddress; } - /** - * @param string $macAddress + * + * + * @param string|null $macAddress * * @return self */ - public function setMacAddress($macAddress = null) + public function setMacAddress(?string $macAddress): self { + $this->initialized['macAddress'] = true; $this->macAddress = $macAddress; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getIPv4Address() + public function getIPv4Address(): ?string { return $this->iPv4Address; } - /** - * @param string $iPv4Address + * + * + * @param string|null $iPv4Address * * @return self */ - public function setIPv4Address($iPv4Address = null) + public function setIPv4Address(?string $iPv4Address): self { + $this->initialized['iPv4Address'] = true; $this->iPv4Address = $iPv4Address; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getIPv6Address() + public function getIPv6Address(): ?string { return $this->iPv6Address; } - /** - * @param string $iPv6Address + * + * + * @param string|null $iPv6Address * * @return self */ - public function setIPv6Address($iPv6Address = null) + public function setIPv6Address(?string $iPv6Address): self { + $this->initialized['iPv6Address'] = true; $this->iPv6Address = $iPv6Address; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/NetworkCreateConfig.php b/generated/Model/NetworkCreateConfig.php deleted file mode 100644 index 11e39c658..000000000 --- a/generated/Model/NetworkCreateConfig.php +++ /dev/null @@ -1,199 +0,0 @@ -name; - } - - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } - - /** - * @return bool - */ - public function getCheckDuplicate() - { - return $this->checkDuplicate; - } - - /** - * @param bool $checkDuplicate - * - * @return self - */ - public function setCheckDuplicate($checkDuplicate = null) - { - $this->checkDuplicate = $checkDuplicate; - - return $this; - } - - /** - * @return string - */ - public function getDriver() - { - return $this->driver; - } - - /** - * @param string $driver - * - * @return self - */ - public function setDriver($driver = null) - { - $this->driver = $driver; - - return $this; - } - - /** - * @return bool - */ - public function getEnableIPv6() - { - return $this->enableIPv6; - } - - /** - * @param bool $enableIPv6 - * - * @return self - */ - public function setEnableIPv6($enableIPv6 = null) - { - $this->enableIPv6 = $enableIPv6; - - return $this; - } - - /** - * @return IPAM - */ - public function getIPAM() - { - return $this->iPAM; - } - - /** - * @param IPAM $iPAM - * - * @return self - */ - public function setIPAM(?IPAM $iPAM = null) - { - $this->iPAM = $iPAM; - - return $this; - } - - /** - * @return bool - */ - public function getInternal() - { - return $this->internal; - } - - /** - * @param bool $internal - * - * @return self - */ - public function setInternal($internal = null) - { - $this->internal = $internal; - - return $this; - } - - /** - * @return string[] - */ - public function getOptions() - { - return $this->options; - } - - /** - * @param string[] $options - * - * @return self - */ - public function setOptions(?\ArrayObject $options = null) - { - $this->options = $options; - - return $this; - } - - /** - * @return string[]|null - */ - public function getLabels() - { - return $this->labels; - } - - /** - * @param string[]|null $labels - * - * @return self - */ - public function setLabels($labels = null) - { - $this->labels = $labels; - - return $this; - } -} diff --git a/generated/Model/NetworkCreateResult.php b/generated/Model/NetworkCreateResult.php deleted file mode 100644 index 1255580c5..000000000 --- a/generated/Model/NetworkCreateResult.php +++ /dev/null @@ -1,55 +0,0 @@ -id; - } - - /** - * @param string $id - * - * @return self - */ - public function setId($id = null) - { - $this->id = $id; - - return $this; - } - - /** - * @return string - */ - public function getWarning() - { - return $this->warning; - } - - /** - * @param string $warning - * - * @return self - */ - public function setWarning($warning = null) - { - $this->warning = $warning; - - return $this; - } -} diff --git a/generated/Model/NetworkingConfig.php b/generated/Model/NetworkingConfig.php deleted file mode 100644 index 9b95c58f7..000000000 --- a/generated/Model/NetworkingConfig.php +++ /dev/null @@ -1,31 +0,0 @@ -endpointsConfig; - } - - /** - * @param EndpointSettings[] $endpointsConfig - * - * @return self - */ - public function setEndpointsConfig(?\ArrayObject $endpointsConfig = null) - { - $this->endpointsConfig = $endpointsConfig; - - return $this; - } -} diff --git a/generated/Model/NetworksCreatePostBody.php b/generated/Model/NetworksCreatePostBody.php new file mode 100644 index 000000000..ea51ecbaa --- /dev/null +++ b/generated/Model/NetworksCreatePostBody.php @@ -0,0 +1,239 @@ +initialized); + } + /** + * The network's name. + * + * @var string|null + */ + protected $name; + /** + * Check for networks with duplicate names. + * + * @var bool|null + */ + protected $checkDuplicate; + /** + * Name of the network driver plugin to use. + * + * @var string|null + */ + protected $driver = 'bridge'; + /** + * Restrict external access to the network. + * + * @var bool|null + */ + protected $internal; + /** + * + * + * @var IPAM|null + */ + protected $iPAM; + /** + * Enable IPv6 on the network. + * + * @var bool|null + */ + protected $enableIPv6; + /** + * Network specific options to be used by the drivers. + * + * @var array|null + */ + protected $options; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * The network's name. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * The network's name. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * Check for networks with duplicate names. + * + * @return bool|null + */ + public function getCheckDuplicate(): ?bool + { + return $this->checkDuplicate; + } + /** + * Check for networks with duplicate names. + * + * @param bool|null $checkDuplicate + * + * @return self + */ + public function setCheckDuplicate(?bool $checkDuplicate): self + { + $this->initialized['checkDuplicate'] = true; + $this->checkDuplicate = $checkDuplicate; + return $this; + } + /** + * Name of the network driver plugin to use. + * + * @return string|null + */ + public function getDriver(): ?string + { + return $this->driver; + } + /** + * Name of the network driver plugin to use. + * + * @param string|null $driver + * + * @return self + */ + public function setDriver(?string $driver): self + { + $this->initialized['driver'] = true; + $this->driver = $driver; + return $this; + } + /** + * Restrict external access to the network. + * + * @return bool|null + */ + public function getInternal(): ?bool + { + return $this->internal; + } + /** + * Restrict external access to the network. + * + * @param bool|null $internal + * + * @return self + */ + public function setInternal(?bool $internal): self + { + $this->initialized['internal'] = true; + $this->internal = $internal; + return $this; + } + /** + * + * + * @return IPAM|null + */ + public function getIPAM(): ?IPAM + { + return $this->iPAM; + } + /** + * + * + * @param IPAM|null $iPAM + * + * @return self + */ + public function setIPAM(?IPAM $iPAM): self + { + $this->initialized['iPAM'] = true; + $this->iPAM = $iPAM; + return $this; + } + /** + * Enable IPv6 on the network. + * + * @return bool|null + */ + public function getEnableIPv6(): ?bool + { + return $this->enableIPv6; + } + /** + * Enable IPv6 on the network. + * + * @param bool|null $enableIPv6 + * + * @return self + */ + public function setEnableIPv6(?bool $enableIPv6): self + { + $this->initialized['enableIPv6'] = true; + $this->enableIPv6 = $enableIPv6; + return $this; + } + /** + * Network specific options to be used by the drivers. + * + * @return array|null + */ + public function getOptions(): ?iterable + { + return $this->options; + } + /** + * Network specific options to be used by the drivers. + * + * @param array|null $options + * + * @return self + */ + public function setOptions(?iterable $options): self + { + $this->initialized['options'] = true; + $this->options = $options; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/NetworksCreatePostResponse201.php b/generated/Model/NetworksCreatePostResponse201.php new file mode 100644 index 000000000..691c8f597 --- /dev/null +++ b/generated/Model/NetworksCreatePostResponse201.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The ID of the created network. + * + * @var string|null + */ + protected $id; + /** + * + * + * @var string|null + */ + protected $warning; + /** + * The ID of the created network. + * + * @return string|null + */ + public function getId(): ?string + { + return $this->id; + } + /** + * The ID of the created network. + * + * @param string|null $id + * + * @return self + */ + public function setId(?string $id): self + { + $this->initialized['id'] = true; + $this->id = $id; + return $this; + } + /** + * + * + * @return string|null + */ + public function getWarning(): ?string + { + return $this->warning; + } + /** + * + * + * @param string|null $warning + * + * @return self + */ + public function setWarning(?string $warning): self + { + $this->initialized['warning'] = true; + $this->warning = $warning; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/NetworksIdConnectPostBody.php b/generated/Model/NetworksIdConnectPostBody.php new file mode 100644 index 000000000..e23af78bb --- /dev/null +++ b/generated/Model/NetworksIdConnectPostBody.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The ID or name of the container to connect to the network. + * + * @var string|null + */ + protected $container; + /** + * Configuration for a network endpoint. + * + * @var EndpointSettings|null + */ + protected $endpointConfig; + /** + * The ID or name of the container to connect to the network. + * + * @return string|null + */ + public function getContainer(): ?string + { + return $this->container; + } + /** + * The ID or name of the container to connect to the network. + * + * @param string|null $container + * + * @return self + */ + public function setContainer(?string $container): self + { + $this->initialized['container'] = true; + $this->container = $container; + return $this; + } + /** + * Configuration for a network endpoint. + * + * @return EndpointSettings|null + */ + public function getEndpointConfig(): ?EndpointSettings + { + return $this->endpointConfig; + } + /** + * Configuration for a network endpoint. + * + * @param EndpointSettings|null $endpointConfig + * + * @return self + */ + public function setEndpointConfig(?EndpointSettings $endpointConfig): self + { + $this->initialized['endpointConfig'] = true; + $this->endpointConfig = $endpointConfig; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/NetworksIdDisconnectPostBody.php b/generated/Model/NetworksIdDisconnectPostBody.php new file mode 100644 index 000000000..2631d21fc --- /dev/null +++ b/generated/Model/NetworksIdDisconnectPostBody.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The ID or name of the container to disconnect from the network. + * + * @var string|null + */ + protected $container; + /** + * Force the container to disconnect from the network. + * + * @var bool|null + */ + protected $force; + /** + * The ID or name of the container to disconnect from the network. + * + * @return string|null + */ + public function getContainer(): ?string + { + return $this->container; + } + /** + * The ID or name of the container to disconnect from the network. + * + * @param string|null $container + * + * @return self + */ + public function setContainer(?string $container): self + { + $this->initialized['container'] = true; + $this->container = $container; + return $this; + } + /** + * Force the container to disconnect from the network. + * + * @return bool|null + */ + public function getForce(): ?bool + { + return $this->force; + } + /** + * Force the container to disconnect from the network. + * + * @param bool|null $force + * + * @return self + */ + public function setForce(?bool $force): self + { + $this->initialized['force'] = true; + $this->force = $force; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/NetworksPrunePostResponse200.php b/generated/Model/NetworksPrunePostResponse200.php new file mode 100644 index 000000000..5f7d8596e --- /dev/null +++ b/generated/Model/NetworksPrunePostResponse200.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * Networks that were deleted + * + * @var list|null + */ + protected $volumesDeleted; + /** + * Networks that were deleted + * + * @return list|null + */ + public function getVolumesDeleted(): ?array + { + return $this->volumesDeleted; + } + /** + * Networks that were deleted + * + * @param list|null $volumesDeleted + * + * @return self + */ + public function setVolumesDeleted(?array $volumesDeleted): self + { + $this->initialized['volumesDeleted'] = true; + $this->volumesDeleted = $volumesDeleted; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Node.php b/generated/Model/Node.php index ae0f5f893..0191d6ded 100644 --- a/generated/Model/Node.php +++ b/generated/Model/Node.php @@ -5,195 +5,179 @@ class Node { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var string|null */ protected $iD; /** - * @var NodeVersion + * + * + * @var NodeVersion|null */ protected $version; /** - * @var \DateTime + * + * + * @var string|null */ protected $createdAt; /** - * @var \DateTime + * + * + * @var string|null */ protected $updatedAt; /** - * @var NodeSpec + * + * + * @var NodeSpec|null */ protected $spec; /** - * @var NodeDescription + * + * + * @var NodeDescription|null */ protected $description; /** - * @var NodeStatus - */ - protected $status; - /** - * @var NodeManagerStatus - */ - protected $managerStatus; - - /** - * @return string + * + * + * @return string|null */ - public function getID() + public function getID(): ?string { return $this->iD; } - /** - * @param string $iD + * + * + * @param string|null $iD * * @return self */ - public function setID($iD = null) + public function setID(?string $iD): self { + $this->initialized['iD'] = true; $this->iD = $iD; - return $this; } - /** - * @return NodeVersion + * + * + * @return NodeVersion|null */ - public function getVersion() + public function getVersion(): ?NodeVersion { return $this->version; } - /** - * @param NodeVersion $version + * + * + * @param NodeVersion|null $version * * @return self */ - public function setVersion(?NodeVersion $version = null) + public function setVersion(?NodeVersion $version): self { + $this->initialized['version'] = true; $this->version = $version; - return $this; } - /** - * @return \DateTime + * + * + * @return string|null */ - public function getCreatedAt() + public function getCreatedAt(): ?string { return $this->createdAt; } - /** - * @param \DateTime $createdAt + * + * + * @param string|null $createdAt * * @return self */ - public function setCreatedAt(?\DateTime $createdAt = null) + public function setCreatedAt(?string $createdAt): self { + $this->initialized['createdAt'] = true; $this->createdAt = $createdAt; - return $this; } - /** - * @return \DateTime + * + * + * @return string|null */ - public function getUpdatedAt() + public function getUpdatedAt(): ?string { return $this->updatedAt; } - /** - * @param \DateTime $updatedAt + * + * + * @param string|null $updatedAt * * @return self */ - public function setUpdatedAt(?\DateTime $updatedAt = null) + public function setUpdatedAt(?string $updatedAt): self { + $this->initialized['updatedAt'] = true; $this->updatedAt = $updatedAt; - return $this; } - /** - * @return NodeSpec + * + * + * @return NodeSpec|null */ - public function getSpec() + public function getSpec(): ?NodeSpec { return $this->spec; } - /** - * @param NodeSpec $spec + * + * + * @param NodeSpec|null $spec * * @return self */ - public function setSpec(?NodeSpec $spec = null) + public function setSpec(?NodeSpec $spec): self { + $this->initialized['spec'] = true; $this->spec = $spec; - return $this; } - - /** - * @return NodeDescription - */ - public function getDescription() - { - return $this->description; - } - /** - * @param NodeDescription $description + * * - * @return self - */ - public function setDescription(?NodeDescription $description = null) - { - $this->description = $description; - - return $this; - } - - /** - * @return NodeStatus + * @return NodeDescription|null */ - public function getStatus() + public function getDescription(): ?NodeDescription { - return $this->status; + return $this->description; } - /** - * @param NodeStatus $status + * * - * @return self - */ - public function setStatus(?NodeStatus $status = null) - { - $this->status = $status; - - return $this; - } - - /** - * @return NodeManagerStatus - */ - public function getManagerStatus() - { - return $this->managerStatus; - } - - /** - * @param NodeManagerStatus $managerStatus + * @param NodeDescription|null $description * * @return self */ - public function setManagerStatus(?NodeManagerStatus $managerStatus = null) + public function setDescription(?NodeDescription $description): self { - $this->managerStatus = $managerStatus; - + $this->initialized['description'] = true; + $this->description = $description; return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/NodeDescription.php b/generated/Model/NodeDescription.php index b80872c47..5d9a78084 100644 --- a/generated/Model/NodeDescription.php +++ b/generated/Model/NodeDescription.php @@ -5,99 +5,123 @@ class NodeDescription { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var string|null */ protected $hostname; /** - * @var NodePlatform + * + * + * @var NodeDescriptionPlatform|null */ protected $platform; /** - * @var NodeResources + * + * + * @var NodeDescriptionResources|null */ protected $resources; /** - * @var NodeEngine + * + * + * @var NodeDescriptionEngine|null */ protected $engine; - /** - * @return string + * + * + * @return string|null */ - public function getHostname() + public function getHostname(): ?string { return $this->hostname; } - /** - * @param string $hostname + * + * + * @param string|null $hostname * * @return self */ - public function setHostname($hostname = null) + public function setHostname(?string $hostname): self { + $this->initialized['hostname'] = true; $this->hostname = $hostname; - return $this; } - /** - * @return NodePlatform + * + * + * @return NodeDescriptionPlatform|null */ - public function getPlatform() + public function getPlatform(): ?NodeDescriptionPlatform { return $this->platform; } - /** - * @param NodePlatform $platform + * + * + * @param NodeDescriptionPlatform|null $platform * * @return self */ - public function setPlatform(?NodePlatform $platform = null) + public function setPlatform(?NodeDescriptionPlatform $platform): self { + $this->initialized['platform'] = true; $this->platform = $platform; - return $this; } - /** - * @return NodeResources + * + * + * @return NodeDescriptionResources|null */ - public function getResources() + public function getResources(): ?NodeDescriptionResources { return $this->resources; } - /** - * @param NodeResources $resources + * + * + * @param NodeDescriptionResources|null $resources * * @return self */ - public function setResources(?NodeResources $resources = null) + public function setResources(?NodeDescriptionResources $resources): self { + $this->initialized['resources'] = true; $this->resources = $resources; - return $this; } - /** - * @return NodeEngine + * + * + * @return NodeDescriptionEngine|null */ - public function getEngine() + public function getEngine(): ?NodeDescriptionEngine { return $this->engine; } - /** - * @param NodeEngine $engine + * + * + * @param NodeDescriptionEngine|null $engine * * @return self */ - public function setEngine(?NodeEngine $engine = null) + public function setEngine(?NodeDescriptionEngine $engine): self { + $this->initialized['engine'] = true; $this->engine = $engine; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/NodeDescriptionEngine.php b/generated/Model/NodeDescriptionEngine.php new file mode 100644 index 000000000..b0a690bcd --- /dev/null +++ b/generated/Model/NodeDescriptionEngine.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $engineVersion; + /** + * + * + * @var array|null + */ + protected $labels; + /** + * + * + * @var list|null + */ + protected $plugins; + /** + * + * + * @return string|null + */ + public function getEngineVersion(): ?string + { + return $this->engineVersion; + } + /** + * + * + * @param string|null $engineVersion + * + * @return self + */ + public function setEngineVersion(?string $engineVersion): self + { + $this->initialized['engineVersion'] = true; + $this->engineVersion = $engineVersion; + return $this; + } + /** + * + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * + * + * @return list|null + */ + public function getPlugins(): ?array + { + return $this->plugins; + } + /** + * + * + * @param list|null $plugins + * + * @return self + */ + public function setPlugins(?array $plugins): self + { + $this->initialized['plugins'] = true; + $this->plugins = $plugins; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/NodeDescriptionEnginePluginsItem.php b/generated/Model/NodeDescriptionEnginePluginsItem.php new file mode 100644 index 000000000..f3b7d3e82 --- /dev/null +++ b/generated/Model/NodeDescriptionEnginePluginsItem.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $type; + /** + * + * + * @var string|null + */ + protected $name; + /** + * + * + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + /** + * + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self + { + $this->initialized['type'] = true; + $this->type = $type; + return $this; + } + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/NodeDescriptionPlatform.php b/generated/Model/NodeDescriptionPlatform.php new file mode 100644 index 000000000..95d17e440 --- /dev/null +++ b/generated/Model/NodeDescriptionPlatform.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $architecture; + /** + * + * + * @var string|null + */ + protected $oS; + /** + * + * + * @return string|null + */ + public function getArchitecture(): ?string + { + return $this->architecture; + } + /** + * + * + * @param string|null $architecture + * + * @return self + */ + public function setArchitecture(?string $architecture): self + { + $this->initialized['architecture'] = true; + $this->architecture = $architecture; + return $this; + } + /** + * + * + * @return string|null + */ + public function getOS(): ?string + { + return $this->oS; + } + /** + * + * + * @param string|null $oS + * + * @return self + */ + public function setOS(?string $oS): self + { + $this->initialized['oS'] = true; + $this->oS = $oS; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/NodeDescriptionResources.php b/generated/Model/NodeDescriptionResources.php new file mode 100644 index 000000000..5d81e1556 --- /dev/null +++ b/generated/Model/NodeDescriptionResources.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var int|null + */ + protected $nanoCPUs; + /** + * + * + * @var int|null + */ + protected $memoryBytes; + /** + * + * + * @return int|null + */ + public function getNanoCPUs(): ?int + { + return $this->nanoCPUs; + } + /** + * + * + * @param int|null $nanoCPUs + * + * @return self + */ + public function setNanoCPUs(?int $nanoCPUs): self + { + $this->initialized['nanoCPUs'] = true; + $this->nanoCPUs = $nanoCPUs; + return $this; + } + /** + * + * + * @return int|null + */ + public function getMemoryBytes(): ?int + { + return $this->memoryBytes; + } + /** + * + * + * @param int|null $memoryBytes + * + * @return self + */ + public function setMemoryBytes(?int $memoryBytes): self + { + $this->initialized['memoryBytes'] = true; + $this->memoryBytes = $memoryBytes; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/NodeEngine.php b/generated/Model/NodeEngine.php deleted file mode 100644 index 434dcf787..000000000 --- a/generated/Model/NodeEngine.php +++ /dev/null @@ -1,79 +0,0 @@ -engineVersion; - } - - /** - * @param bool $engineVersion - * - * @return self - */ - public function setEngineVersion($engineVersion = null) - { - $this->engineVersion = $engineVersion; - - return $this; - } - - /** - * @return string[]|null - */ - public function getLabels() - { - return $this->labels; - } - - /** - * @param string[]|null $labels - * - * @return self - */ - public function setLabels($labels = null) - { - $this->labels = $labels; - - return $this; - } - - /** - * @return NodePlugin[] - */ - public function getPlugins() - { - return $this->plugins; - } - - /** - * @param NodePlugin[] $plugins - * - * @return self - */ - public function setPlugins(?array $plugins = null) - { - $this->plugins = $plugins; - - return $this; - } -} diff --git a/generated/Model/NodeManagerStatus.php b/generated/Model/NodeManagerStatus.php deleted file mode 100644 index 4f7b1edea..000000000 --- a/generated/Model/NodeManagerStatus.php +++ /dev/null @@ -1,79 +0,0 @@ -leader; - } - - /** - * @param bool $leader - * - * @return self - */ - public function setLeader($leader = null) - { - $this->leader = $leader; - - return $this; - } - - /** - * @return string - */ - public function getReachability() - { - return $this->reachability; - } - - /** - * @param string $reachability - * - * @return self - */ - public function setReachability($reachability = null) - { - $this->reachability = $reachability; - - return $this; - } - - /** - * @return string - */ - public function getAddr() - { - return $this->addr; - } - - /** - * @param string $addr - * - * @return self - */ - public function setAddr($addr = null) - { - $this->addr = $addr; - - return $this; - } -} diff --git a/generated/Model/NodePlatform.php b/generated/Model/NodePlatform.php deleted file mode 100644 index e13b51a40..000000000 --- a/generated/Model/NodePlatform.php +++ /dev/null @@ -1,55 +0,0 @@ -architecture; - } - - /** - * @param string $architecture - * - * @return self - */ - public function setArchitecture($architecture = null) - { - $this->architecture = $architecture; - - return $this; - } - - /** - * @return string - */ - public function getOS() - { - return $this->oS; - } - - /** - * @param string $oS - * - * @return self - */ - public function setOS($oS = null) - { - $this->oS = $oS; - - return $this; - } -} diff --git a/generated/Model/NodePlugin.php b/generated/Model/NodePlugin.php deleted file mode 100644 index 639960fef..000000000 --- a/generated/Model/NodePlugin.php +++ /dev/null @@ -1,55 +0,0 @@ -type; - } - - /** - * @param string $type - * - * @return self - */ - public function setType($type = null) - { - $this->type = $type; - - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } -} diff --git a/generated/Model/NodeResources.php b/generated/Model/NodeResources.php deleted file mode 100644 index 6f1b7d0b5..000000000 --- a/generated/Model/NodeResources.php +++ /dev/null @@ -1,55 +0,0 @@ -nanoCPUs; - } - - /** - * @param int $nanoCPUs - * - * @return self - */ - public function setNanoCPUs($nanoCPUs = null) - { - $this->nanoCPUs = $nanoCPUs; - - return $this; - } - - /** - * @return int - */ - public function getMemoryBytes() - { - return $this->memoryBytes; - } - - /** - * @param int $memoryBytes - * - * @return self - */ - public function setMemoryBytes($memoryBytes = null) - { - $this->memoryBytes = $memoryBytes; - - return $this; - } -} diff --git a/generated/Model/NodeSpec.php b/generated/Model/NodeSpec.php index 242871954..557ef8fd5 100644 --- a/generated/Model/NodeSpec.php +++ b/generated/Model/NodeSpec.php @@ -5,99 +5,123 @@ class NodeSpec { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * Name for the node. + * + * @var string|null */ protected $name; /** - * @var string + * User-defined key/value metadata. + * + * @var array|null */ - protected $role; + protected $labels; /** - * @var string + * Role of the node. + * + * @var string|null */ - protected $availability; + protected $role; /** - * @var string[]|null + * Availability of the node. + * + * @var string|null */ - protected $labels; - + protected $availability; /** - * @return string + * Name for the node. + * + * @return string|null */ - public function getName() + public function getName(): ?string { return $this->name; } - /** - * @param string $name + * Name for the node. + * + * @param string|null $name * * @return self */ - public function setName($name = null) + public function setName(?string $name): self { + $this->initialized['name'] = true; $this->name = $name; - return $this; } - /** - * @return string + * User-defined key/value metadata. + * + * @return array|null */ - public function getRole() + public function getLabels(): ?iterable { - return $this->role; + return $this->labels; } - /** - * @param string $role + * User-defined key/value metadata. + * + * @param array|null $labels * * @return self */ - public function setRole($role = null) + public function setLabels(?iterable $labels): self { - $this->role = $role; - + $this->initialized['labels'] = true; + $this->labels = $labels; return $this; } - /** - * @return string + * Role of the node. + * + * @return string|null */ - public function getAvailability() + public function getRole(): ?string { - return $this->availability; + return $this->role; } - /** - * @param string $availability + * Role of the node. + * + * @param string|null $role * * @return self */ - public function setAvailability($availability = null) + public function setRole(?string $role): self { - $this->availability = $availability; - + $this->initialized['role'] = true; + $this->role = $role; return $this; } - /** - * @return string[]|null + * Availability of the node. + * + * @return string|null */ - public function getLabels() + public function getAvailability(): ?string { - return $this->labels; + return $this->availability; } - /** - * @param string[]|null $labels + * Availability of the node. + * + * @param string|null $availability * * @return self */ - public function setLabels($labels = null) + public function setAvailability(?string $availability): self { - $this->labels = $labels; - + $this->initialized['availability'] = true; + $this->availability = $availability; return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/NodeStatus.php b/generated/Model/NodeStatus.php deleted file mode 100644 index f3ace0f10..000000000 --- a/generated/Model/NodeStatus.php +++ /dev/null @@ -1,31 +0,0 @@ -state; - } - - /** - * @param string $state - * - * @return self - */ - public function setState($state = null) - { - $this->state = $state; - - return $this; - } -} diff --git a/generated/Model/NodeVersion.php b/generated/Model/NodeVersion.php index a80ff88a1..6b6b06660 100644 --- a/generated/Model/NodeVersion.php +++ b/generated/Model/NodeVersion.php @@ -5,27 +5,39 @@ class NodeVersion { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var int|null */ protected $index; - /** - * @return string + * + * + * @return int|null */ - public function getIndex() + public function getIndex(): ?int { return $this->index; } - /** - * @param string $index + * + * + * @param int|null $index * * @return self */ - public function setIndex($index = null) + public function setIndex(?int $index): self { + $this->initialized['index'] = true; $this->index = $index; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/Plugin.php b/generated/Model/Plugin.php new file mode 100644 index 000000000..578202b37 --- /dev/null +++ b/generated/Model/Plugin.php @@ -0,0 +1,155 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $id; + /** + * + * + * @var string|null + */ + protected $name; + /** + * True when the plugin is running. False when the plugin is not running, only installed. + * + * @var bool|null + */ + protected $enabled; + /** + * Settings that can be modified by users. + * + * @var PluginSettings|null + */ + protected $settings; + /** + * The config of a plugin. + * + * @var PluginConfig|null + */ + protected $config; + /** + * + * + * @return string|null + */ + public function getId(): ?string + { + return $this->id; + } + /** + * + * + * @param string|null $id + * + * @return self + */ + public function setId(?string $id): self + { + $this->initialized['id'] = true; + $this->id = $id; + return $this; + } + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * True when the plugin is running. False when the plugin is not running, only installed. + * + * @return bool|null + */ + public function getEnabled(): ?bool + { + return $this->enabled; + } + /** + * True when the plugin is running. False when the plugin is not running, only installed. + * + * @param bool|null $enabled + * + * @return self + */ + public function setEnabled(?bool $enabled): self + { + $this->initialized['enabled'] = true; + $this->enabled = $enabled; + return $this; + } + /** + * Settings that can be modified by users. + * + * @return PluginSettings|null + */ + public function getSettings(): ?PluginSettings + { + return $this->settings; + } + /** + * Settings that can be modified by users. + * + * @param PluginSettings|null $settings + * + * @return self + */ + public function setSettings(?PluginSettings $settings): self + { + $this->initialized['settings'] = true; + $this->settings = $settings; + return $this; + } + /** + * The config of a plugin. + * + * @return PluginConfig|null + */ + public function getConfig(): ?PluginConfig + { + return $this->config; + } + /** + * The config of a plugin. + * + * @param PluginConfig|null $config + * + * @return self + */ + public function setConfig(?PluginConfig $config): self + { + $this->initialized['config'] = true; + $this->config = $config; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginConfig.php b/generated/Model/PluginConfig.php new file mode 100644 index 000000000..1f8a0b32e --- /dev/null +++ b/generated/Model/PluginConfig.php @@ -0,0 +1,379 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $description; + /** + * + * + * @var string|null + */ + protected $documentation; + /** + * The interface between Docker and the plugin + * + * @var PluginConfigInterface|null + */ + protected $interface; + /** + * + * + * @var list|null + */ + protected $entrypoint; + /** + * + * + * @var string|null + */ + protected $workDir; + /** + * + * + * @var PluginConfigUser|null + */ + protected $user; + /** + * + * + * @var PluginConfigNetwork|null + */ + protected $network; + /** + * + * + * @var PluginConfigLinux|null + */ + protected $linux; + /** + * + * + * @var string|null + */ + protected $propagatedMount; + /** + * + * + * @var list|null + */ + protected $mounts; + /** + * + * + * @var list|null + */ + protected $env; + /** + * + * + * @var PluginConfigArgs|null + */ + protected $args; + /** + * + * + * @var PluginConfigRootfs|null + */ + protected $rootfs; + /** + * + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->description; + } + /** + * + * + * @param string|null $description + * + * @return self + */ + public function setDescription(?string $description): self + { + $this->initialized['description'] = true; + $this->description = $description; + return $this; + } + /** + * + * + * @return string|null + */ + public function getDocumentation(): ?string + { + return $this->documentation; + } + /** + * + * + * @param string|null $documentation + * + * @return self + */ + public function setDocumentation(?string $documentation): self + { + $this->initialized['documentation'] = true; + $this->documentation = $documentation; + return $this; + } + /** + * The interface between Docker and the plugin + * + * @return PluginConfigInterface|null + */ + public function getInterface(): ?PluginConfigInterface + { + return $this->interface; + } + /** + * The interface between Docker and the plugin + * + * @param PluginConfigInterface|null $interface + * + * @return self + */ + public function setInterface(?PluginConfigInterface $interface): self + { + $this->initialized['interface'] = true; + $this->interface = $interface; + return $this; + } + /** + * + * + * @return list|null + */ + public function getEntrypoint(): ?array + { + return $this->entrypoint; + } + /** + * + * + * @param list|null $entrypoint + * + * @return self + */ + public function setEntrypoint(?array $entrypoint): self + { + $this->initialized['entrypoint'] = true; + $this->entrypoint = $entrypoint; + return $this; + } + /** + * + * + * @return string|null + */ + public function getWorkDir(): ?string + { + return $this->workDir; + } + /** + * + * + * @param string|null $workDir + * + * @return self + */ + public function setWorkDir(?string $workDir): self + { + $this->initialized['workDir'] = true; + $this->workDir = $workDir; + return $this; + } + /** + * + * + * @return PluginConfigUser|null + */ + public function getUser(): ?PluginConfigUser + { + return $this->user; + } + /** + * + * + * @param PluginConfigUser|null $user + * + * @return self + */ + public function setUser(?PluginConfigUser $user): self + { + $this->initialized['user'] = true; + $this->user = $user; + return $this; + } + /** + * + * + * @return PluginConfigNetwork|null + */ + public function getNetwork(): ?PluginConfigNetwork + { + return $this->network; + } + /** + * + * + * @param PluginConfigNetwork|null $network + * + * @return self + */ + public function setNetwork(?PluginConfigNetwork $network): self + { + $this->initialized['network'] = true; + $this->network = $network; + return $this; + } + /** + * + * + * @return PluginConfigLinux|null + */ + public function getLinux(): ?PluginConfigLinux + { + return $this->linux; + } + /** + * + * + * @param PluginConfigLinux|null $linux + * + * @return self + */ + public function setLinux(?PluginConfigLinux $linux): self + { + $this->initialized['linux'] = true; + $this->linux = $linux; + return $this; + } + /** + * + * + * @return string|null + */ + public function getPropagatedMount(): ?string + { + return $this->propagatedMount; + } + /** + * + * + * @param string|null $propagatedMount + * + * @return self + */ + public function setPropagatedMount(?string $propagatedMount): self + { + $this->initialized['propagatedMount'] = true; + $this->propagatedMount = $propagatedMount; + return $this; + } + /** + * + * + * @return list|null + */ + public function getMounts(): ?array + { + return $this->mounts; + } + /** + * + * + * @param list|null $mounts + * + * @return self + */ + public function setMounts(?array $mounts): self + { + $this->initialized['mounts'] = true; + $this->mounts = $mounts; + return $this; + } + /** + * + * + * @return list|null + */ + public function getEnv(): ?array + { + return $this->env; + } + /** + * + * + * @param list|null $env + * + * @return self + */ + public function setEnv(?array $env): self + { + $this->initialized['env'] = true; + $this->env = $env; + return $this; + } + /** + * + * + * @return PluginConfigArgs|null + */ + public function getArgs(): ?PluginConfigArgs + { + return $this->args; + } + /** + * + * + * @param PluginConfigArgs|null $args + * + * @return self + */ + public function setArgs(?PluginConfigArgs $args): self + { + $this->initialized['args'] = true; + $this->args = $args; + return $this; + } + /** + * + * + * @return PluginConfigRootfs|null + */ + public function getRootfs(): ?PluginConfigRootfs + { + return $this->rootfs; + } + /** + * + * + * @param PluginConfigRootfs|null $rootfs + * + * @return self + */ + public function setRootfs(?PluginConfigRootfs $rootfs): self + { + $this->initialized['rootfs'] = true; + $this->rootfs = $rootfs; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginConfigArgs.php b/generated/Model/PluginConfigArgs.php new file mode 100644 index 000000000..93d5fb8bf --- /dev/null +++ b/generated/Model/PluginConfigArgs.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $name; + /** + * + * + * @var string|null + */ + protected $description; + /** + * + * + * @var list|null + */ + protected $settable; + /** + * + * + * @var list|null + */ + protected $value; + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->description; + } + /** + * + * + * @param string|null $description + * + * @return self + */ + public function setDescription(?string $description): self + { + $this->initialized['description'] = true; + $this->description = $description; + return $this; + } + /** + * + * + * @return list|null + */ + public function getSettable(): ?array + { + return $this->settable; + } + /** + * + * + * @param list|null $settable + * + * @return self + */ + public function setSettable(?array $settable): self + { + $this->initialized['settable'] = true; + $this->settable = $settable; + return $this; + } + /** + * + * + * @return list|null + */ + public function getValue(): ?array + { + return $this->value; + } + /** + * + * + * @param list|null $value + * + * @return self + */ + public function setValue(?array $value): self + { + $this->initialized['value'] = true; + $this->value = $value; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginConfigInterface.php b/generated/Model/PluginConfigInterface.php new file mode 100644 index 000000000..df7fda035 --- /dev/null +++ b/generated/Model/PluginConfigInterface.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var list|null + */ + protected $types; + /** + * + * + * @var string|null + */ + protected $socket; + /** + * + * + * @return list|null + */ + public function getTypes(): ?array + { + return $this->types; + } + /** + * + * + * @param list|null $types + * + * @return self + */ + public function setTypes(?array $types): self + { + $this->initialized['types'] = true; + $this->types = $types; + return $this; + } + /** + * + * + * @return string|null + */ + public function getSocket(): ?string + { + return $this->socket; + } + /** + * + * + * @param string|null $socket + * + * @return self + */ + public function setSocket(?string $socket): self + { + $this->initialized['socket'] = true; + $this->socket = $socket; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginConfigLinux.php b/generated/Model/PluginConfigLinux.php new file mode 100644 index 000000000..8589fcd5b --- /dev/null +++ b/generated/Model/PluginConfigLinux.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * + * + * @var list|null + */ + protected $capabilities; + /** + * + * + * @var bool|null + */ + protected $allowAllDevices; + /** + * + * + * @var list|null + */ + protected $devices; + /** + * + * + * @return list|null + */ + public function getCapabilities(): ?array + { + return $this->capabilities; + } + /** + * + * + * @param list|null $capabilities + * + * @return self + */ + public function setCapabilities(?array $capabilities): self + { + $this->initialized['capabilities'] = true; + $this->capabilities = $capabilities; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getAllowAllDevices(): ?bool + { + return $this->allowAllDevices; + } + /** + * + * + * @param bool|null $allowAllDevices + * + * @return self + */ + public function setAllowAllDevices(?bool $allowAllDevices): self + { + $this->initialized['allowAllDevices'] = true; + $this->allowAllDevices = $allowAllDevices; + return $this; + } + /** + * + * + * @return list|null + */ + public function getDevices(): ?array + { + return $this->devices; + } + /** + * + * + * @param list|null $devices + * + * @return self + */ + public function setDevices(?array $devices): self + { + $this->initialized['devices'] = true; + $this->devices = $devices; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginConfigNetwork.php b/generated/Model/PluginConfigNetwork.php new file mode 100644 index 000000000..2680d067d --- /dev/null +++ b/generated/Model/PluginConfigNetwork.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $type; + /** + * + * + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + /** + * + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self + { + $this->initialized['type'] = true; + $this->type = $type; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginConfigRootfs.php b/generated/Model/PluginConfigRootfs.php new file mode 100644 index 000000000..013938b57 --- /dev/null +++ b/generated/Model/PluginConfigRootfs.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $type; + /** + * + * + * @var list|null + */ + protected $diffIds; + /** + * + * + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + /** + * + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self + { + $this->initialized['type'] = true; + $this->type = $type; + return $this; + } + /** + * + * + * @return list|null + */ + public function getDiffIds(): ?array + { + return $this->diffIds; + } + /** + * + * + * @param list|null $diffIds + * + * @return self + */ + public function setDiffIds(?array $diffIds): self + { + $this->initialized['diffIds'] = true; + $this->diffIds = $diffIds; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginConfigUser.php b/generated/Model/PluginConfigUser.php new file mode 100644 index 000000000..e7a626f6f --- /dev/null +++ b/generated/Model/PluginConfigUser.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var int|null + */ + protected $uID; + /** + * + * + * @var int|null + */ + protected $gID; + /** + * + * + * @return int|null + */ + public function getUID(): ?int + { + return $this->uID; + } + /** + * + * + * @param int|null $uID + * + * @return self + */ + public function setUID(?int $uID): self + { + $this->initialized['uID'] = true; + $this->uID = $uID; + return $this; + } + /** + * + * + * @return int|null + */ + public function getGID(): ?int + { + return $this->gID; + } + /** + * + * + * @param int|null $gID + * + * @return self + */ + public function setGID(?int $gID): self + { + $this->initialized['gID'] = true; + $this->gID = $gID; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginDevice.php b/generated/Model/PluginDevice.php new file mode 100644 index 000000000..8e2d4ea7c --- /dev/null +++ b/generated/Model/PluginDevice.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $name; + /** + * + * + * @var string|null + */ + protected $description; + /** + * + * + * @var list|null + */ + protected $settable; + /** + * + * + * @var string|null + */ + protected $path; + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->description; + } + /** + * + * + * @param string|null $description + * + * @return self + */ + public function setDescription(?string $description): self + { + $this->initialized['description'] = true; + $this->description = $description; + return $this; + } + /** + * + * + * @return list|null + */ + public function getSettable(): ?array + { + return $this->settable; + } + /** + * + * + * @param list|null $settable + * + * @return self + */ + public function setSettable(?array $settable): self + { + $this->initialized['settable'] = true; + $this->settable = $settable; + return $this; + } + /** + * + * + * @return string|null + */ + public function getPath(): ?string + { + return $this->path; + } + /** + * + * + * @param string|null $path + * + * @return self + */ + public function setPath(?string $path): self + { + $this->initialized['path'] = true; + $this->path = $path; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginEnv.php b/generated/Model/PluginEnv.php new file mode 100644 index 000000000..4561c24c8 --- /dev/null +++ b/generated/Model/PluginEnv.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $name; + /** + * + * + * @var string|null + */ + protected $description; + /** + * + * + * @var list|null + */ + protected $settable; + /** + * + * + * @var string|null + */ + protected $value; + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->description; + } + /** + * + * + * @param string|null $description + * + * @return self + */ + public function setDescription(?string $description): self + { + $this->initialized['description'] = true; + $this->description = $description; + return $this; + } + /** + * + * + * @return list|null + */ + public function getSettable(): ?array + { + return $this->settable; + } + /** + * + * + * @param list|null $settable + * + * @return self + */ + public function setSettable(?array $settable): self + { + $this->initialized['settable'] = true; + $this->settable = $settable; + return $this; + } + /** + * + * + * @return string|null + */ + public function getValue(): ?string + { + return $this->value; + } + /** + * + * + * @param string|null $value + * + * @return self + */ + public function setValue(?string $value): self + { + $this->initialized['value'] = true; + $this->value = $value; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginInterfaceType.php b/generated/Model/PluginInterfaceType.php new file mode 100644 index 000000000..50b83a3f8 --- /dev/null +++ b/generated/Model/PluginInterfaceType.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $prefix; + /** + * + * + * @var string|null + */ + protected $capability; + /** + * + * + * @var string|null + */ + protected $version; + /** + * + * + * @return string|null + */ + public function getPrefix(): ?string + { + return $this->prefix; + } + /** + * + * + * @param string|null $prefix + * + * @return self + */ + public function setPrefix(?string $prefix): self + { + $this->initialized['prefix'] = true; + $this->prefix = $prefix; + return $this; + } + /** + * + * + * @return string|null + */ + public function getCapability(): ?string + { + return $this->capability; + } + /** + * + * + * @param string|null $capability + * + * @return self + */ + public function setCapability(?string $capability): self + { + $this->initialized['capability'] = true; + $this->capability = $capability; + return $this; + } + /** + * + * + * @return string|null + */ + public function getVersion(): ?string + { + return $this->version; + } + /** + * + * + * @param string|null $version + * + * @return self + */ + public function setVersion(?string $version): self + { + $this->initialized['version'] = true; + $this->version = $version; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginMount.php b/generated/Model/PluginMount.php new file mode 100644 index 000000000..78ca56cc0 --- /dev/null +++ b/generated/Model/PluginMount.php @@ -0,0 +1,211 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $name; + /** + * + * + * @var string|null + */ + protected $description; + /** + * + * + * @var list|null + */ + protected $settable; + /** + * + * + * @var string|null + */ + protected $source; + /** + * + * + * @var string|null + */ + protected $destination; + /** + * + * + * @var string|null + */ + protected $type; + /** + * + * + * @var list|null + */ + protected $options; + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->description; + } + /** + * + * + * @param string|null $description + * + * @return self + */ + public function setDescription(?string $description): self + { + $this->initialized['description'] = true; + $this->description = $description; + return $this; + } + /** + * + * + * @return list|null + */ + public function getSettable(): ?array + { + return $this->settable; + } + /** + * + * + * @param list|null $settable + * + * @return self + */ + public function setSettable(?array $settable): self + { + $this->initialized['settable'] = true; + $this->settable = $settable; + return $this; + } + /** + * + * + * @return string|null + */ + public function getSource(): ?string + { + return $this->source; + } + /** + * + * + * @param string|null $source + * + * @return self + */ + public function setSource(?string $source): self + { + $this->initialized['source'] = true; + $this->source = $source; + return $this; + } + /** + * + * + * @return string|null + */ + public function getDestination(): ?string + { + return $this->destination; + } + /** + * + * + * @param string|null $destination + * + * @return self + */ + public function setDestination(?string $destination): self + { + $this->initialized['destination'] = true; + $this->destination = $destination; + return $this; + } + /** + * + * + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + /** + * + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self + { + $this->initialized['type'] = true; + $this->type = $type; + return $this; + } + /** + * + * + * @return list|null + */ + public function getOptions(): ?array + { + return $this->options; + } + /** + * + * + * @param list|null $options + * + * @return self + */ + public function setOptions(?array $options): self + { + $this->initialized['options'] = true; + $this->options = $options; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginSettings.php b/generated/Model/PluginSettings.php new file mode 100644 index 000000000..f79bf0b72 --- /dev/null +++ b/generated/Model/PluginSettings.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * + * + * @var list|null + */ + protected $mounts; + /** + * + * + * @var list|null + */ + protected $env; + /** + * + * + * @var list|null + */ + protected $args; + /** + * + * + * @var list|null + */ + protected $devices; + /** + * + * + * @return list|null + */ + public function getMounts(): ?array + { + return $this->mounts; + } + /** + * + * + * @param list|null $mounts + * + * @return self + */ + public function setMounts(?array $mounts): self + { + $this->initialized['mounts'] = true; + $this->mounts = $mounts; + return $this; + } + /** + * + * + * @return list|null + */ + public function getEnv(): ?array + { + return $this->env; + } + /** + * + * + * @param list|null $env + * + * @return self + */ + public function setEnv(?array $env): self + { + $this->initialized['env'] = true; + $this->env = $env; + return $this; + } + /** + * + * + * @return list|null + */ + public function getArgs(): ?array + { + return $this->args; + } + /** + * + * + * @param list|null $args + * + * @return self + */ + public function setArgs(?array $args): self + { + $this->initialized['args'] = true; + $this->args = $args; + return $this; + } + /** + * + * + * @return list|null + */ + public function getDevices(): ?array + { + return $this->devices; + } + /** + * + * + * @param list|null $devices + * + * @return self + */ + public function setDevices(?array $devices): self + { + $this->initialized['devices'] = true; + $this->devices = $devices; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginsPrivilegesGetResponse200Item.php b/generated/Model/PluginsPrivilegesGetResponse200Item.php new file mode 100644 index 000000000..d00b46935 --- /dev/null +++ b/generated/Model/PluginsPrivilegesGetResponse200Item.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $name; + /** + * + * + * @var string|null + */ + protected $description; + /** + * + * + * @var list|null + */ + protected $value; + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->description; + } + /** + * + * + * @param string|null $description + * + * @return self + */ + public function setDescription(?string $description): self + { + $this->initialized['description'] = true; + $this->description = $description; + return $this; + } + /** + * + * + * @return list|null + */ + public function getValue(): ?array + { + return $this->value; + } + /** + * + * + * @param list|null $value + * + * @return self + */ + public function setValue(?array $value): self + { + $this->initialized['value'] = true; + $this->value = $value; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginsPullPostBodyItem.php b/generated/Model/PluginsPullPostBodyItem.php new file mode 100644 index 000000000..904a80ed7 --- /dev/null +++ b/generated/Model/PluginsPullPostBodyItem.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $name; + /** + * + * + * @var string|null + */ + protected $description; + /** + * + * + * @var list|null + */ + protected $value; + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->description; + } + /** + * + * + * @param string|null $description + * + * @return self + */ + public function setDescription(?string $description): self + { + $this->initialized['description'] = true; + $this->description = $description; + return $this; + } + /** + * + * + * @return list|null + */ + public function getValue(): ?array + { + return $this->value; + } + /** + * + * + * @param list|null $value + * + * @return self + */ + public function setValue(?array $value): self + { + $this->initialized['value'] = true; + $this->value = $value; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Port.php b/generated/Model/Port.php index f94c49af8..2a991d0d3 100644 --- a/generated/Model/Port.php +++ b/generated/Model/Port.php @@ -5,75 +5,123 @@ class Port { /** - * @var int + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var string|null + */ + protected $iP; + /** + * Port on the container + * + * @var int|null */ protected $privatePort; /** - * @var int + * Port exposed on the host + * + * @var int|null */ protected $publicPort; /** - * @var string + * + * + * @var string|null */ protected $type; - /** - * @return int + * + * + * @return string|null + */ + public function getIP(): ?string + { + return $this->iP; + } + /** + * + * + * @param string|null $iP + * + * @return self + */ + public function setIP(?string $iP): self + { + $this->initialized['iP'] = true; + $this->iP = $iP; + return $this; + } + /** + * Port on the container + * + * @return int|null */ - public function getPrivatePort() + public function getPrivatePort(): ?int { return $this->privatePort; } - /** - * @param int $privatePort + * Port on the container + * + * @param int|null $privatePort * * @return self */ - public function setPrivatePort($privatePort = null) + public function setPrivatePort(?int $privatePort): self { + $this->initialized['privatePort'] = true; $this->privatePort = $privatePort; - return $this; } - /** - * @return int + * Port exposed on the host + * + * @return int|null */ - public function getPublicPort() + public function getPublicPort(): ?int { return $this->publicPort; } - /** - * @param int $publicPort + * Port exposed on the host + * + * @param int|null $publicPort * * @return self */ - public function setPublicPort($publicPort = null) + public function setPublicPort(?int $publicPort): self { + $this->initialized['publicPort'] = true; $this->publicPort = $publicPort; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getType() + public function getType(): ?string { return $this->type; } - /** - * @param string $type + * + * + * @param string|null $type * * @return self */ - public function setType($type = null) + public function setType(?string $type): self { + $this->initialized['type'] = true; $this->type = $type; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/PortBinding.php b/generated/Model/PortBinding.php deleted file mode 100644 index 2f478f4fd..000000000 --- a/generated/Model/PortBinding.php +++ /dev/null @@ -1,55 +0,0 @@ -hostPort; - } - - /** - * @param string $hostPort - * - * @return self - */ - public function setHostPort($hostPort = null) - { - $this->hostPort = $hostPort; - - return $this; - } - - /** - * @return string - */ - public function getHostIp() - { - return $this->hostIp; - } - - /** - * @param string $hostIp - * - * @return self - */ - public function setHostIp($hostIp = null) - { - $this->hostIp = $hostIp; - - return $this; - } -} diff --git a/generated/Model/PortConfig.php b/generated/Model/PortConfig.php deleted file mode 100644 index bfe27b2f5..000000000 --- a/generated/Model/PortConfig.php +++ /dev/null @@ -1,103 +0,0 @@ -name; - } - - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } - - /** - * @return string - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * @param string $protocol - * - * @return self - */ - public function setProtocol($protocol = null) - { - $this->protocol = $protocol; - - return $this; - } - - /** - * @return int - */ - public function getTargetPort() - { - return $this->targetPort; - } - - /** - * @param int $targetPort - * - * @return self - */ - public function setTargetPort($targetPort = null) - { - $this->targetPort = $targetPort; - - return $this; - } - - /** - * @return int - */ - public function getPublishedPort() - { - return $this->publishedPort; - } - - /** - * @param int $publishedPort - * - * @return self - */ - public function setPublishedPort($publishedPort = null) - { - $this->publishedPort = $publishedPort; - - return $this; - } -} diff --git a/generated/Model/ProcessConfig.php b/generated/Model/ProcessConfig.php index 9599d8b96..b80c21f7f 100644 --- a/generated/Model/ProcessConfig.php +++ b/generated/Model/ProcessConfig.php @@ -5,123 +5,151 @@ class ProcessConfig { /** - * @var bool + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var bool|null */ protected $privileged; /** - * @var string + * + * + * @var string|null */ protected $user; /** - * @var bool + * + * + * @var bool|null */ protected $tty; /** - * @var string + * + * + * @var string|null */ protected $entrypoint; /** - * @var string[]|null + * + * + * @var list|null */ protected $arguments; - /** - * @return bool + * + * + * @return bool|null */ - public function getPrivileged() + public function getPrivileged(): ?bool { return $this->privileged; } - /** - * @param bool $privileged + * + * + * @param bool|null $privileged * * @return self */ - public function setPrivileged($privileged = null) + public function setPrivileged(?bool $privileged): self { + $this->initialized['privileged'] = true; $this->privileged = $privileged; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getUser() + public function getUser(): ?string { return $this->user; } - /** - * @param string $user + * + * + * @param string|null $user * * @return self */ - public function setUser($user = null) + public function setUser(?string $user): self { + $this->initialized['user'] = true; $this->user = $user; - return $this; } - /** - * @return bool + * + * + * @return bool|null */ - public function getTty() + public function getTty(): ?bool { return $this->tty; } - /** - * @param bool $tty + * + * + * @param bool|null $tty * * @return self */ - public function setTty($tty = null) + public function setTty(?bool $tty): self { + $this->initialized['tty'] = true; $this->tty = $tty; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getEntrypoint() + public function getEntrypoint(): ?string { return $this->entrypoint; } - /** - * @param string $entrypoint + * + * + * @param string|null $entrypoint * * @return self */ - public function setEntrypoint($entrypoint = null) + public function setEntrypoint(?string $entrypoint): self { + $this->initialized['entrypoint'] = true; $this->entrypoint = $entrypoint; - return $this; } - /** - * @return string[]|null + * + * + * @return list|null */ - public function getArguments() + public function getArguments(): ?array { return $this->arguments; } - /** - * @param string[]|null $arguments + * + * + * @param list|null $arguments * * @return self */ - public function setArguments($arguments = null) + public function setArguments(?array $arguments): self { + $this->initialized['arguments'] = true; $this->arguments = $arguments; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/ProgressDetail.php b/generated/Model/ProgressDetail.php index 91ad6caa4..b35b3ba2f 100644 --- a/generated/Model/ProgressDetail.php +++ b/generated/Model/ProgressDetail.php @@ -5,99 +5,67 @@ class ProgressDetail { /** - * @var int + * @var array */ - protected $code; - /** - * @var int - */ - protected $message; - /** - * @var int - */ - protected $current; - /** - * @var int - */ - protected $total; - - /** - * @return int - */ - public function getCode() + protected $initialized = []; + public function isInitialized($property): bool { - return $this->code; + return array_key_exists($property, $this->initialized); } - /** - * @param int $code + * * - * @return self - */ - public function setCode($code = null) - { - $this->code = $code; - - return $this; - } - - /** - * @return int + * @var int|null */ - public function getMessage() - { - return $this->message; - } - + protected $code; /** - * @param int $message + * * - * @return self + * @var int|null */ - public function setMessage($message = null) - { - $this->message = $message; - - return $this; - } - + protected $message; /** - * @return int + * + * + * @return int|null */ - public function getCurrent() + public function getCode(): ?int { - return $this->current; + return $this->code; } - /** - * @param int $current + * + * + * @param int|null $code * * @return self */ - public function setCurrent($current = null) + public function setCode(?int $code): self { - $this->current = $current; - + $this->initialized['code'] = true; + $this->code = $code; return $this; } - /** - * @return int + * + * + * @return int|null */ - public function getTotal() + public function getMessage(): ?int { - return $this->total; + return $this->message; } - /** - * @param int $total + * + * + * @param int|null $message * * @return self */ - public function setTotal($total = null) + public function setMessage(?int $message): self { - $this->total = $total; - + $this->initialized['message'] = true; + $this->message = $message; return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/PushImageInfo.php b/generated/Model/PushImageInfo.php index 79d58b462..5b42d31d2 100644 --- a/generated/Model/PushImageInfo.php +++ b/generated/Model/PushImageInfo.php @@ -5,99 +5,123 @@ class PushImageInfo { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var string|null */ protected $error; /** - * @var string + * + * + * @var string|null */ protected $status; /** - * @var string + * + * + * @var string|null */ protected $progress; /** - * @var ProgressDetail + * + * + * @var ProgressDetail|null */ protected $progressDetail; - /** - * @return string + * + * + * @return string|null */ - public function getError() + public function getError(): ?string { return $this->error; } - /** - * @param string $error + * + * + * @param string|null $error * * @return self */ - public function setError($error = null) + public function setError(?string $error): self { + $this->initialized['error'] = true; $this->error = $error; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getStatus() + public function getStatus(): ?string { return $this->status; } - /** - * @param string $status + * + * + * @param string|null $status * * @return self */ - public function setStatus($status = null) + public function setStatus(?string $status): self { + $this->initialized['status'] = true; $this->status = $status; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getProgress() + public function getProgress(): ?string { return $this->progress; } - /** - * @param string $progress + * + * + * @param string|null $progress * * @return self */ - public function setProgress($progress = null) + public function setProgress(?string $progress): self { + $this->initialized['progress'] = true; $this->progress = $progress; - return $this; } - /** - * @return ProgressDetail + * + * + * @return ProgressDetail|null */ - public function getProgressDetail() + public function getProgressDetail(): ?ProgressDetail { return $this->progressDetail; } - /** - * @param ProgressDetail $progressDetail + * + * + * @param ProgressDetail|null $progressDetail * * @return self */ - public function setProgressDetail(?ProgressDetail $progressDetail = null) + public function setProgressDetail(?ProgressDetail $progressDetail): self { + $this->initialized['progressDetail'] = true; $this->progressDetail = $progressDetail; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/Registry.php b/generated/Model/Registry.php deleted file mode 100644 index de5579486..000000000 --- a/generated/Model/Registry.php +++ /dev/null @@ -1,103 +0,0 @@ -mirrors; - } - - /** - * @param string[]|null $mirrors - * - * @return self - */ - public function setMirrors($mirrors = null) - { - $this->mirrors = $mirrors; - - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } - - /** - * @return bool - */ - public function getOfficial() - { - return $this->official; - } - - /** - * @param bool $official - * - * @return self - */ - public function setOfficial($official = null) - { - $this->official = $official; - - return $this; - } - - /** - * @return bool - */ - public function getSecure() - { - return $this->secure; - } - - /** - * @param bool $secure - * - * @return self - */ - public function setSecure($secure = null) - { - $this->secure = $secure; - - return $this; - } -} diff --git a/generated/Model/RegistryConfig.php b/generated/Model/RegistryConfig.php deleted file mode 100644 index 406411237..000000000 --- a/generated/Model/RegistryConfig.php +++ /dev/null @@ -1,55 +0,0 @@ -indexConfigs; - } - - /** - * @param Registry[] $indexConfigs - * - * @return self - */ - public function setIndexConfigs(?\ArrayObject $indexConfigs = null) - { - $this->indexConfigs = $indexConfigs; - - return $this; - } - - /** - * @return string[]|null - */ - public function getInsecureRegistryCIDRs() - { - return $this->insecureRegistryCIDRs; - } - - /** - * @param string[]|null $insecureRegistryCIDRs - * - * @return self - */ - public function setInsecureRegistryCIDRs($insecureRegistryCIDRs = null) - { - $this->insecureRegistryCIDRs = $insecureRegistryCIDRs; - - return $this; - } -} diff --git a/generated/Model/ReplicatedService.php b/generated/Model/ReplicatedService.php deleted file mode 100644 index ece65d0ff..000000000 --- a/generated/Model/ReplicatedService.php +++ /dev/null @@ -1,31 +0,0 @@ -replicas; - } - - /** - * @param int $replicas - * - * @return self - */ - public function setReplicas($replicas = null) - { - $this->replicas = $replicas; - - return $this; - } -} diff --git a/generated/Model/ResourceUpdate.php b/generated/Model/ResourceUpdate.php deleted file mode 100644 index b5feacc1b..000000000 --- a/generated/Model/ResourceUpdate.php +++ /dev/null @@ -1,271 +0,0 @@ -blkioWeight; - } - - /** - * @param int $blkioWeight - * - * @return self - */ - public function setBlkioWeight($blkioWeight = null) - { - $this->blkioWeight = $blkioWeight; - - return $this; - } - - /** - * @return int - */ - public function getCpuShares() - { - return $this->cpuShares; - } - - /** - * @param int $cpuShares - * - * @return self - */ - public function setCpuShares($cpuShares = null) - { - $this->cpuShares = $cpuShares; - - return $this; - } - - /** - * @return int - */ - public function getCpuPeriod() - { - return $this->cpuPeriod; - } - - /** - * @param int $cpuPeriod - * - * @return self - */ - public function setCpuPeriod($cpuPeriod = null) - { - $this->cpuPeriod = $cpuPeriod; - - 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 - */ - public function getCpusetCpus() - { - return $this->cpusetCpus; - } - - /** - * @param string $cpusetCpus - * - * @return self - */ - public function setCpusetCpus($cpusetCpus = null) - { - $this->cpusetCpus = $cpusetCpus; - - return $this; - } - - /** - * @return string - */ - public function getCpusetMems() - { - return $this->cpusetMems; - } - - /** - * @param string $cpusetMems - * - * @return self - */ - public function setCpusetMems($cpusetMems = null) - { - $this->cpusetMems = $cpusetMems; - - return $this; - } - - /** - * @return int - */ - public function getMemory() - { - return $this->memory; - } - - /** - * @param int $memory - * - * @return self - */ - public function setMemory($memory = null) - { - $this->memory = $memory; - - return $this; - } - - /** - * @return int - */ - public function getMemorySwap() - { - return $this->memorySwap; - } - - /** - * @param int $memorySwap - * - * @return self - */ - public function setMemorySwap($memorySwap = null) - { - $this->memorySwap = $memorySwap; - - 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 RestartPolicy - */ - public function getRestartPolicy() - { - return $this->restartPolicy; - } - - /** - * @param RestartPolicy $restartPolicy - * - * @return self - */ - public function setRestartPolicy(?RestartPolicy $restartPolicy = null) - { - $this->restartPolicy = $restartPolicy; - - return $this; - } -} diff --git a/generated/Model/Resources.php b/generated/Model/Resources.php new file mode 100644 index 000000000..d794e2054 --- /dev/null +++ b/generated/Model/Resources.php @@ -0,0 +1,845 @@ +initialized); + } + /** + * An integer value representing this container's relative CPU weight versus other containers. + * + * @var int|null + */ + protected $cpuShares; + /** + * Memory limit in bytes. + * + * @var int|null + */ + protected $memory = 0; + /** + * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + * + * @var string|null + */ + protected $cgroupParent; + /** + * Block IO weight (relative weight). + * + * @var int|null + */ + protected $blkioWeight; + /** + * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. + * + * @var list|null + */ + protected $blkioWeightDevice; + /** + * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @var list|null + */ + protected $blkioDeviceReadBps; + /** + * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @var list|null + */ + protected $blkioDeviceWriteBps; + /** + * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @var list|null + */ + protected $blkioDeviceReadIOps; + /** + * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @var list|null + */ + protected $blkioDeviceWriteIOps; + /** + * The length of a CPU period in microseconds. + * + * @var int|null + */ + protected $cpuPeriod; + /** + * Microseconds of CPU time that the container can get in a CPU period. + * + * @var int|null + */ + protected $cpuQuota; + /** + * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @var int|null + */ + protected $cpuRealtimePeriod; + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @var int|null + */ + protected $cpuRealtimeRuntime; + /** + * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * + * @var string|null + */ + protected $cpusetCpus; + /** + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + * + * @var string|null + */ + protected $cpusetMems; + /** + * A list of devices to add to the container. + * + * @var list|null + */ + protected $devices; + /** + * Disk limit (in bytes). + * + * @var int|null + */ + protected $diskQuota; + /** + * Kernel memory limit in bytes. + * + * @var int|null + */ + protected $kernelMemory; + /** + * Memory soft limit in bytes. + * + * @var int|null + */ + protected $memoryReservation; + /** + * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + * + * @var int|null + */ + protected $memorySwap; + /** + * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + * + * @var int|null + */ + protected $memorySwappiness; + /** + * CPU quota in units of 10-9 CPUs. + * + * @var int|null + */ + protected $nanoCpus; + /** + * Disable OOM Killer for the container. + * + * @var bool|null + */ + protected $oomKillDisable; + /** + * Tune a container's pids limit. Set -1 for unlimited. + * + * @var int|null + */ + protected $pidsLimit; + /** + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + * + * @var list|null + */ + protected $ulimits; + /** + * The number of usable CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @var int|null + */ + protected $cpuCount; + /** + * The usable percentage of the available CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @var int|null + */ + protected $cpuPercent; + /** + * Maximum IOps for the container system drive (Windows only) + * + * @var int|null + */ + protected $iOMaximumIOps; + /** + * Maximum IO in bytes per second for the container system drive (Windows only) + * + * @var int|null + */ + protected $iOMaximumBandwidth; + /** + * An integer value representing this container's relative CPU weight versus other containers. + * + * @return int|null + */ + public function getCpuShares(): ?int + { + return $this->cpuShares; + } + /** + * An integer value representing this container's relative CPU weight versus other containers. + * + * @param int|null $cpuShares + * + * @return self + */ + public function setCpuShares(?int $cpuShares): self + { + $this->initialized['cpuShares'] = true; + $this->cpuShares = $cpuShares; + return $this; + } + /** + * Memory limit in bytes. + * + * @return int|null + */ + public function getMemory(): ?int + { + return $this->memory; + } + /** + * Memory limit in bytes. + * + * @param int|null $memory + * + * @return self + */ + public function setMemory(?int $memory): self + { + $this->initialized['memory'] = true; + $this->memory = $memory; + return $this; + } + /** + * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + * + * @return string|null + */ + public function getCgroupParent(): ?string + { + return $this->cgroupParent; + } + /** + * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + * + * @param string|null $cgroupParent + * + * @return self + */ + public function setCgroupParent(?string $cgroupParent): self + { + $this->initialized['cgroupParent'] = true; + $this->cgroupParent = $cgroupParent; + return $this; + } + /** + * Block IO weight (relative weight). + * + * @return int|null + */ + public function getBlkioWeight(): ?int + { + return $this->blkioWeight; + } + /** + * Block IO weight (relative weight). + * + * @param int|null $blkioWeight + * + * @return self + */ + public function setBlkioWeight(?int $blkioWeight): self + { + $this->initialized['blkioWeight'] = true; + $this->blkioWeight = $blkioWeight; + return $this; + } + /** + * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. + * + * @return list|null + */ + public function getBlkioWeightDevice(): ?array + { + return $this->blkioWeightDevice; + } + /** + * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. + * + * @param list|null $blkioWeightDevice + * + * @return self + */ + public function setBlkioWeightDevice(?array $blkioWeightDevice): self + { + $this->initialized['blkioWeightDevice'] = true; + $this->blkioWeightDevice = $blkioWeightDevice; + return $this; + } + /** + * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @return list|null + */ + public function getBlkioDeviceReadBps(): ?array + { + return $this->blkioDeviceReadBps; + } + /** + * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @param list|null $blkioDeviceReadBps + * + * @return self + */ + public function setBlkioDeviceReadBps(?array $blkioDeviceReadBps): self + { + $this->initialized['blkioDeviceReadBps'] = true; + $this->blkioDeviceReadBps = $blkioDeviceReadBps; + return $this; + } + /** + * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @return list|null + */ + public function getBlkioDeviceWriteBps(): ?array + { + return $this->blkioDeviceWriteBps; + } + /** + * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @param list|null $blkioDeviceWriteBps + * + * @return self + */ + public function setBlkioDeviceWriteBps(?array $blkioDeviceWriteBps): self + { + $this->initialized['blkioDeviceWriteBps'] = true; + $this->blkioDeviceWriteBps = $blkioDeviceWriteBps; + return $this; + } + /** + * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @return list|null + */ + public function getBlkioDeviceReadIOps(): ?array + { + return $this->blkioDeviceReadIOps; + } + /** + * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @param list|null $blkioDeviceReadIOps + * + * @return self + */ + public function setBlkioDeviceReadIOps(?array $blkioDeviceReadIOps): self + { + $this->initialized['blkioDeviceReadIOps'] = true; + $this->blkioDeviceReadIOps = $blkioDeviceReadIOps; + return $this; + } + /** + * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @return list|null + */ + public function getBlkioDeviceWriteIOps(): ?array + { + return $this->blkioDeviceWriteIOps; + } + /** + * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + * + * @param list|null $blkioDeviceWriteIOps + * + * @return self + */ + public function setBlkioDeviceWriteIOps(?array $blkioDeviceWriteIOps): self + { + $this->initialized['blkioDeviceWriteIOps'] = true; + $this->blkioDeviceWriteIOps = $blkioDeviceWriteIOps; + return $this; + } + /** + * The length of a CPU period in microseconds. + * + * @return int|null + */ + public function getCpuPeriod(): ?int + { + return $this->cpuPeriod; + } + /** + * The length of a CPU period in microseconds. + * + * @param int|null $cpuPeriod + * + * @return self + */ + public function setCpuPeriod(?int $cpuPeriod): self + { + $this->initialized['cpuPeriod'] = true; + $this->cpuPeriod = $cpuPeriod; + return $this; + } + /** + * Microseconds of CPU time that the container can get in a CPU period. + * + * @return int|null + */ + public function getCpuQuota(): ?int + { + return $this->cpuQuota; + } + /** + * Microseconds of CPU time that the container can get in a CPU period. + * + * @param int|null $cpuQuota + * + * @return self + */ + public function setCpuQuota(?int $cpuQuota): self + { + $this->initialized['cpuQuota'] = true; + $this->cpuQuota = $cpuQuota; + return $this; + } + /** + * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @return int|null + */ + public function getCpuRealtimePeriod(): ?int + { + return $this->cpuRealtimePeriod; + } + /** + * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @param int|null $cpuRealtimePeriod + * + * @return self + */ + public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self + { + $this->initialized['cpuRealtimePeriod'] = true; + $this->cpuRealtimePeriod = $cpuRealtimePeriod; + return $this; + } + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @return int|null + */ + public function getCpuRealtimeRuntime(): ?int + { + return $this->cpuRealtimeRuntime; + } + /** + * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + * + * @param int|null $cpuRealtimeRuntime + * + * @return self + */ + public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self + { + $this->initialized['cpuRealtimeRuntime'] = true; + $this->cpuRealtimeRuntime = $cpuRealtimeRuntime; + return $this; + } + /** + * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * + * @return string|null + */ + public function getCpusetCpus(): ?string + { + return $this->cpusetCpus; + } + /** + * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * + * @param string|null $cpusetCpus + * + * @return self + */ + public function setCpusetCpus(?string $cpusetCpus): self + { + $this->initialized['cpusetCpus'] = true; + $this->cpusetCpus = $cpusetCpus; + return $this; + } + /** + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + * + * @return string|null + */ + public function getCpusetMems(): ?string + { + return $this->cpusetMems; + } + /** + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + * + * @param string|null $cpusetMems + * + * @return self + */ + public function setCpusetMems(?string $cpusetMems): self + { + $this->initialized['cpusetMems'] = true; + $this->cpusetMems = $cpusetMems; + return $this; + } + /** + * A list of devices to add to the container. + * + * @return list|null + */ + public function getDevices(): ?array + { + return $this->devices; + } + /** + * A list of devices to add to the container. + * + * @param list|null $devices + * + * @return self + */ + public function setDevices(?array $devices): self + { + $this->initialized['devices'] = true; + $this->devices = $devices; + return $this; + } + /** + * Disk limit (in bytes). + * + * @return int|null + */ + public function getDiskQuota(): ?int + { + return $this->diskQuota; + } + /** + * Disk limit (in bytes). + * + * @param int|null $diskQuota + * + * @return self + */ + public function setDiskQuota(?int $diskQuota): self + { + $this->initialized['diskQuota'] = true; + $this->diskQuota = $diskQuota; + return $this; + } + /** + * Kernel memory limit in bytes. + * + * @return int|null + */ + public function getKernelMemory(): ?int + { + return $this->kernelMemory; + } + /** + * Kernel memory limit in bytes. + * + * @param int|null $kernelMemory + * + * @return self + */ + public function setKernelMemory(?int $kernelMemory): self + { + $this->initialized['kernelMemory'] = true; + $this->kernelMemory = $kernelMemory; + return $this; + } + /** + * Memory soft limit in bytes. + * + * @return int|null + */ + public function getMemoryReservation(): ?int + { + return $this->memoryReservation; + } + /** + * Memory soft limit in bytes. + * + * @param int|null $memoryReservation + * + * @return self + */ + public function setMemoryReservation(?int $memoryReservation): self + { + $this->initialized['memoryReservation'] = true; + $this->memoryReservation = $memoryReservation; + return $this; + } + /** + * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + * + * @return int|null + */ + public function getMemorySwap(): ?int + { + return $this->memorySwap; + } + /** + * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + * + * @param int|null $memorySwap + * + * @return self + */ + public function setMemorySwap(?int $memorySwap): self + { + $this->initialized['memorySwap'] = true; + $this->memorySwap = $memorySwap; + return $this; + } + /** + * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + * + * @return int|null + */ + public function getMemorySwappiness(): ?int + { + return $this->memorySwappiness; + } + /** + * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + * + * @param int|null $memorySwappiness + * + * @return self + */ + public function setMemorySwappiness(?int $memorySwappiness): self + { + $this->initialized['memorySwappiness'] = true; + $this->memorySwappiness = $memorySwappiness; + return $this; + } + /** + * CPU quota in units of 10-9 CPUs. + * + * @return int|null + */ + public function getNanoCpus(): ?int + { + return $this->nanoCpus; + } + /** + * CPU quota in units of 10-9 CPUs. + * + * @param int|null $nanoCpus + * + * @return self + */ + public function setNanoCpus(?int $nanoCpus): self + { + $this->initialized['nanoCpus'] = true; + $this->nanoCpus = $nanoCpus; + return $this; + } + /** + * Disable OOM Killer for the container. + * + * @return bool|null + */ + public function getOomKillDisable(): ?bool + { + return $this->oomKillDisable; + } + /** + * Disable OOM Killer for the container. + * + * @param bool|null $oomKillDisable + * + * @return self + */ + public function setOomKillDisable(?bool $oomKillDisable): self + { + $this->initialized['oomKillDisable'] = true; + $this->oomKillDisable = $oomKillDisable; + return $this; + } + /** + * Tune a container's pids limit. Set -1 for unlimited. + * + * @return int|null + */ + public function getPidsLimit(): ?int + { + return $this->pidsLimit; + } + /** + * Tune a container's pids limit. Set -1 for unlimited. + * + * @param int|null $pidsLimit + * + * @return self + */ + public function setPidsLimit(?int $pidsLimit): self + { + $this->initialized['pidsLimit'] = true; + $this->pidsLimit = $pidsLimit; + return $this; + } + /** + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + * + * @return list|null + */ + public function getUlimits(): ?array + { + return $this->ulimits; + } + /** + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + * + * @param list|null $ulimits + * + * @return self + */ + public function setUlimits(?array $ulimits): self + { + $this->initialized['ulimits'] = true; + $this->ulimits = $ulimits; + return $this; + } + /** + * The number of usable CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @return int|null + */ + public function getCpuCount(): ?int + { + return $this->cpuCount; + } + /** + * The number of usable CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @param int|null $cpuCount + * + * @return self + */ + public function setCpuCount(?int $cpuCount): self + { + $this->initialized['cpuCount'] = true; + $this->cpuCount = $cpuCount; + return $this; + } + /** + * The usable percentage of the available CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @return int|null + */ + public function getCpuPercent(): ?int + { + return $this->cpuPercent; + } + /** + * The usable percentage of the available CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + + * + * @param int|null $cpuPercent + * + * @return self + */ + public function setCpuPercent(?int $cpuPercent): self + { + $this->initialized['cpuPercent'] = true; + $this->cpuPercent = $cpuPercent; + return $this; + } + /** + * Maximum IOps for the container system drive (Windows only) + * + * @return int|null + */ + public function getIOMaximumIOps(): ?int + { + return $this->iOMaximumIOps; + } + /** + * Maximum IOps for the container system drive (Windows only) + * + * @param int|null $iOMaximumIOps + * + * @return self + */ + public function setIOMaximumIOps(?int $iOMaximumIOps): self + { + $this->initialized['iOMaximumIOps'] = true; + $this->iOMaximumIOps = $iOMaximumIOps; + return $this; + } + /** + * Maximum IO in bytes per second for the container system drive (Windows only) + * + * @return int|null + */ + public function getIOMaximumBandwidth(): ?int + { + return $this->iOMaximumBandwidth; + } + /** + * Maximum IO in bytes per second for the container system drive (Windows only) + * + * @param int|null $iOMaximumBandwidth + * + * @return self + */ + public function setIOMaximumBandwidth(?int $iOMaximumBandwidth): self + { + $this->initialized['iOMaximumBandwidth'] = true; + $this->iOMaximumBandwidth = $iOMaximumBandwidth; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ResourcesBlkioWeightDeviceItem.php b/generated/Model/ResourcesBlkioWeightDeviceItem.php new file mode 100644 index 000000000..1947dbbb0 --- /dev/null +++ b/generated/Model/ResourcesBlkioWeightDeviceItem.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $path; + /** + * + * + * @var int|null + */ + protected $weight; + /** + * + * + * @return string|null + */ + public function getPath(): ?string + { + return $this->path; + } + /** + * + * + * @param string|null $path + * + * @return self + */ + public function setPath(?string $path): self + { + $this->initialized['path'] = true; + $this->path = $path; + return $this; + } + /** + * + * + * @return int|null + */ + public function getWeight(): ?int + { + return $this->weight; + } + /** + * + * + * @param int|null $weight + * + * @return self + */ + public function setWeight(?int $weight): self + { + $this->initialized['weight'] = true; + $this->weight = $weight; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ResourcesUlimitsItem.php b/generated/Model/ResourcesUlimitsItem.php new file mode 100644 index 000000000..d74e0128e --- /dev/null +++ b/generated/Model/ResourcesUlimitsItem.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * Name of ulimit + * + * @var string|null + */ + protected $name; + /** + * Soft limit + * + * @var int|null + */ + protected $soft; + /** + * Hard limit + * + * @var int|null + */ + protected $hard; + /** + * Name of ulimit + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * Name of ulimit + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * Soft limit + * + * @return int|null + */ + public function getSoft(): ?int + { + return $this->soft; + } + /** + * Soft limit + * + * @param int|null $soft + * + * @return self + */ + public function setSoft(?int $soft): self + { + $this->initialized['soft'] = true; + $this->soft = $soft; + return $this; + } + /** + * Hard limit + * + * @return int|null + */ + public function getHard(): ?int + { + return $this->hard; + } + /** + * Hard limit + * + * @param int|null $hard + * + * @return self + */ + public function setHard(?int $hard): self + { + $this->initialized['hard'] = true; + $this->hard = $hard; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/RestartPolicy.php b/generated/Model/RestartPolicy.php index 34a64ee70..218d4a5f4 100644 --- a/generated/Model/RestartPolicy.php +++ b/generated/Model/RestartPolicy.php @@ -5,51 +5,76 @@ class RestartPolicy { /** - * @var string + * @var array */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * - `always` Always restart + - `unless-stopped` Restart always except when the user has manually stopped the container + - `on-failure` Restart only when the container exit code is non-zero + + * + * @var string|null + */ protected $name; /** - * @var int + * If `on-failure` is used, the number of times to retry before giving up + * + * @var int|null */ protected $maximumRetryCount; - /** - * @return string - */ - public function getName() + * - `always` Always restart + - `unless-stopped` Restart always except when the user has manually stopped the container + - `on-failure` Restart only when the container exit code is non-zero + + * + * @return string|null + */ + public function getName(): ?string { return $this->name; } - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) + * - `always` Always restart + - `unless-stopped` Restart always except when the user has manually stopped the container + - `on-failure` Restart only when the container exit code is non-zero + + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self { + $this->initialized['name'] = true; $this->name = $name; - return $this; } - /** - * @return int + * If `on-failure` is used, the number of times to retry before giving up + * + * @return int|null */ - public function getMaximumRetryCount() + public function getMaximumRetryCount(): ?int { return $this->maximumRetryCount; } - /** - * @param int $maximumRetryCount + * If `on-failure` is used, the number of times to retry before giving up + * + * @param int|null $maximumRetryCount * * @return self */ - public function setMaximumRetryCount($maximumRetryCount = null) + public function setMaximumRetryCount(?int $maximumRetryCount): self { + $this->initialized['maximumRetryCount'] = true; $this->maximumRetryCount = $maximumRetryCount; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/Secret.php b/generated/Model/Secret.php new file mode 100644 index 000000000..bd046075f --- /dev/null +++ b/generated/Model/Secret.php @@ -0,0 +1,155 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $iD; + /** + * + * + * @var SecretVersion|null + */ + protected $version; + /** + * + * + * @var string|null + */ + protected $createdAt; + /** + * + * + * @var string|null + */ + protected $updatedAt; + /** + * User modifiable configuration for a service. + * + * @var ServiceSpec|null + */ + protected $spec; + /** + * + * + * @return string|null + */ + public function getID(): ?string + { + return $this->iD; + } + /** + * + * + * @param string|null $iD + * + * @return self + */ + public function setID(?string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + return $this; + } + /** + * + * + * @return SecretVersion|null + */ + public function getVersion(): ?SecretVersion + { + return $this->version; + } + /** + * + * + * @param SecretVersion|null $version + * + * @return self + */ + public function setVersion(?SecretVersion $version): self + { + $this->initialized['version'] = true; + $this->version = $version; + return $this; + } + /** + * + * + * @return string|null + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + /** + * + * + * @param string|null $createdAt + * + * @return self + */ + public function setCreatedAt(?string $createdAt): self + { + $this->initialized['createdAt'] = true; + $this->createdAt = $createdAt; + return $this; + } + /** + * + * + * @return string|null + */ + public function getUpdatedAt(): ?string + { + return $this->updatedAt; + } + /** + * + * + * @param string|null $updatedAt + * + * @return self + */ + public function setUpdatedAt(?string $updatedAt): self + { + $this->initialized['updatedAt'] = true; + $this->updatedAt = $updatedAt; + return $this; + } + /** + * User modifiable configuration for a service. + * + * @return ServiceSpec|null + */ + public function getSpec(): ?ServiceSpec + { + return $this->spec; + } + /** + * User modifiable configuration for a service. + * + * @param ServiceSpec|null $spec + * + * @return self + */ + public function setSpec(?ServiceSpec $spec): self + { + $this->initialized['spec'] = true; + $this->spec = $spec; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SecretSpec.php b/generated/Model/SecretSpec.php new file mode 100644 index 000000000..fbff241d2 --- /dev/null +++ b/generated/Model/SecretSpec.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * User-defined name of the secret. + * + * @var string|null + */ + protected $name; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * Base64-url-safe-encoded secret data + * + * @var list|null + */ + protected $data; + /** + * User-defined name of the secret. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * User-defined name of the secret. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * Base64-url-safe-encoded secret data + * + * @return list|null + */ + public function getData(): ?array + { + return $this->data; + } + /** + * Base64-url-safe-encoded secret data + * + * @param list|null $data + * + * @return self + */ + public function setData(?array $data): self + { + $this->initialized['data'] = true; + $this->data = $data; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SecretVersion.php b/generated/Model/SecretVersion.php new file mode 100644 index 000000000..6884f3180 --- /dev/null +++ b/generated/Model/SecretVersion.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * + * + * @var int|null + */ + protected $index; + /** + * + * + * @return int|null + */ + public function getIndex(): ?int + { + return $this->index; + } + /** + * + * + * @param int|null $index + * + * @return self + */ + public function setIndex(?int $index): self + { + $this->initialized['index'] = true; + $this->index = $index; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SecretsCreatePostBody.php b/generated/Model/SecretsCreatePostBody.php new file mode 100644 index 000000000..50bb37fe9 --- /dev/null +++ b/generated/Model/SecretsCreatePostBody.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * User-defined name of the secret. + * + * @var string|null + */ + protected $name; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * Base64-url-safe-encoded secret data + * + * @var list|null + */ + protected $data; + /** + * User-defined name of the secret. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * User-defined name of the secret. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * Base64-url-safe-encoded secret data + * + * @return list|null + */ + public function getData(): ?array + { + return $this->data; + } + /** + * Base64-url-safe-encoded secret data + * + * @param list|null $data + * + * @return self + */ + public function setData(?array $data): self + { + $this->initialized['data'] = true; + $this->data = $data; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SecretsCreatePostResponse201.php b/generated/Model/SecretsCreatePostResponse201.php new file mode 100644 index 000000000..a23bf4b26 --- /dev/null +++ b/generated/Model/SecretsCreatePostResponse201.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * The ID of the created secret. + * + * @var string|null + */ + protected $iD; + /** + * The ID of the created secret. + * + * @return string|null + */ + public function getID(): ?string + { + return $this->iD; + } + /** + * The ID of the created secret. + * + * @param string|null $iD + * + * @return self + */ + public function setID(?string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Service.php b/generated/Model/Service.php index 36816a126..ef32d8166 100644 --- a/generated/Model/Service.php +++ b/generated/Model/Service.php @@ -5,171 +5,207 @@ class Service { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var string|null */ protected $iD; /** - * @var NodeVersion + * + * + * @var ServiceVersion|null */ protected $version; /** - * @var \DateTime + * + * + * @var string|null */ protected $createdAt; /** - * @var \DateTime + * + * + * @var string|null */ protected $updatedAt; /** - * @var ServiceSpec + * User modifiable configuration for a service. + * + * @var ServiceSpec|null */ protected $spec; /** - * @var Endpoint + * + * + * @var ServiceEndpoint|null */ protected $endpoint; /** - * @var UpdateStatus + * The status of a service update. + * + * @var ServiceUpdateStatus|null */ protected $updateStatus; - /** - * @return string + * + * + * @return string|null */ - public function getID() + public function getID(): ?string { return $this->iD; } - /** - * @param string $iD + * + * + * @param string|null $iD * * @return self */ - public function setID($iD = null) + public function setID(?string $iD): self { + $this->initialized['iD'] = true; $this->iD = $iD; - return $this; } - /** - * @return NodeVersion + * + * + * @return ServiceVersion|null */ - public function getVersion() + public function getVersion(): ?ServiceVersion { return $this->version; } - /** - * @param NodeVersion $version + * + * + * @param ServiceVersion|null $version * * @return self */ - public function setVersion(?NodeVersion $version = null) + public function setVersion(?ServiceVersion $version): self { + $this->initialized['version'] = true; $this->version = $version; - return $this; } - /** - * @return \DateTime + * + * + * @return string|null */ - public function getCreatedAt() + public function getCreatedAt(): ?string { return $this->createdAt; } - /** - * @param \DateTime $createdAt + * + * + * @param string|null $createdAt * * @return self */ - public function setCreatedAt(?\DateTime $createdAt = null) + public function setCreatedAt(?string $createdAt): self { + $this->initialized['createdAt'] = true; $this->createdAt = $createdAt; - return $this; } - /** - * @return \DateTime + * + * + * @return string|null */ - public function getUpdatedAt() + public function getUpdatedAt(): ?string { return $this->updatedAt; } - /** - * @param \DateTime $updatedAt + * + * + * @param string|null $updatedAt * * @return self */ - public function setUpdatedAt(?\DateTime $updatedAt = null) + public function setUpdatedAt(?string $updatedAt): self { + $this->initialized['updatedAt'] = true; $this->updatedAt = $updatedAt; - return $this; } - /** - * @return ServiceSpec + * User modifiable configuration for a service. + * + * @return ServiceSpec|null */ - public function getSpec() + public function getSpec(): ?ServiceSpec { return $this->spec; } - /** - * @param ServiceSpec $spec + * User modifiable configuration for a service. + * + * @param ServiceSpec|null $spec * * @return self */ - public function setSpec(?ServiceSpec $spec = null) + public function setSpec(?ServiceSpec $spec): self { + $this->initialized['spec'] = true; $this->spec = $spec; - return $this; } - /** - * @return Endpoint + * + * + * @return ServiceEndpoint|null */ - public function getEndpoint() + public function getEndpoint(): ?ServiceEndpoint { return $this->endpoint; } - /** - * @param Endpoint $endpoint + * + * + * @param ServiceEndpoint|null $endpoint * * @return self */ - public function setEndpoint(?Endpoint $endpoint = null) + public function setEndpoint(?ServiceEndpoint $endpoint): self { + $this->initialized['endpoint'] = true; $this->endpoint = $endpoint; - return $this; } - /** - * @return UpdateStatus + * The status of a service update. + * + * @return ServiceUpdateStatus|null */ - public function getUpdateStatus() + public function getUpdateStatus(): ?ServiceUpdateStatus { return $this->updateStatus; } - /** - * @param UpdateStatus $updateStatus + * The status of a service update. + * + * @param ServiceUpdateStatus|null $updateStatus * * @return self */ - public function setUpdateStatus(?UpdateStatus $updateStatus = null) + public function setUpdateStatus(?ServiceUpdateStatus $updateStatus): self { + $this->initialized['updateStatus'] = true; $this->updateStatus = $updateStatus; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/ServiceCreateResponse.php b/generated/Model/ServiceCreateResponse.php deleted file mode 100644 index 221114041..000000000 --- a/generated/Model/ServiceCreateResponse.php +++ /dev/null @@ -1,31 +0,0 @@ -id; - } - - /** - * @param string $id - * - * @return self - */ - public function setId($id = null) - { - $this->id = $id; - - return $this; - } -} diff --git a/generated/Model/ServiceEndpoint.php b/generated/Model/ServiceEndpoint.php new file mode 100644 index 000000000..b49891bae --- /dev/null +++ b/generated/Model/ServiceEndpoint.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * Properties that can be configured to access and load balance a service. + * + * @var EndpointSpec|null + */ + protected $spec; + /** + * + * + * @var list|null + */ + protected $ports; + /** + * + * + * @var list|null + */ + protected $virtualIPs; + /** + * Properties that can be configured to access and load balance a service. + * + * @return EndpointSpec|null + */ + public function getSpec(): ?EndpointSpec + { + return $this->spec; + } + /** + * Properties that can be configured to access and load balance a service. + * + * @param EndpointSpec|null $spec + * + * @return self + */ + public function setSpec(?EndpointSpec $spec): self + { + $this->initialized['spec'] = true; + $this->spec = $spec; + return $this; + } + /** + * + * + * @return list|null + */ + public function getPorts(): ?array + { + return $this->ports; + } + /** + * + * + * @param list|null $ports + * + * @return self + */ + public function setPorts(?array $ports): self + { + $this->initialized['ports'] = true; + $this->ports = $ports; + return $this; + } + /** + * + * + * @return list|null + */ + public function getVirtualIPs(): ?array + { + return $this->virtualIPs; + } + /** + * + * + * @param list|null $virtualIPs + * + * @return self + */ + public function setVirtualIPs(?array $virtualIPs): self + { + $this->initialized['virtualIPs'] = true; + $this->virtualIPs = $virtualIPs; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServiceEndpointVirtualIPsItem.php b/generated/Model/ServiceEndpointVirtualIPsItem.php new file mode 100644 index 000000000..36699b2ab --- /dev/null +++ b/generated/Model/ServiceEndpointVirtualIPsItem.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $networkID; + /** + * + * + * @var string|null + */ + protected $addr; + /** + * + * + * @return string|null + */ + public function getNetworkID(): ?string + { + return $this->networkID; + } + /** + * + * + * @param string|null $networkID + * + * @return self + */ + public function setNetworkID(?string $networkID): self + { + $this->initialized['networkID'] = true; + $this->networkID = $networkID; + return $this; + } + /** + * + * + * @return string|null + */ + public function getAddr(): ?string + { + return $this->addr; + } + /** + * + * + * @param string|null $addr + * + * @return self + */ + public function setAddr(?string $addr): self + { + $this->initialized['addr'] = true; + $this->addr = $addr; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServiceSpec.php b/generated/Model/ServiceSpec.php index 23ad2748f..4534d4389 100644 --- a/generated/Model/ServiceSpec.php +++ b/generated/Model/ServiceSpec.php @@ -5,171 +5,207 @@ class ServiceSpec { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * Name of the service. + * + * @var string|null */ protected $name; /** - * @var string[]|null + * User-defined key/value metadata. + * + * @var array|null */ protected $labels; /** - * @var TaskSpec + * User modifiable task configuration. + * + * @var TaskSpec|null */ protected $taskTemplate; /** - * @var ServiceSpecMode + * Scheduling mode for the service. + * + * @var ServiceSpecMode|null */ protected $mode; /** - * @var UpdateConfig + * Specification for the update strategy of the service. + * + * @var ServiceSpecUpdateConfig|null */ protected $updateConfig; /** - * @var NetworkAttachmentConfig[]|null + * Array of network names or IDs to attach the service to. + * + * @var list|null */ protected $networks; /** - * @var string + * Properties that can be configured to access and load balance a service. + * + * @var EndpointSpec|null */ protected $endpointSpec; - /** - * @return string + * Name of the service. + * + * @return string|null */ - public function getName() + public function getName(): ?string { return $this->name; } - /** - * @param string $name + * Name of the service. + * + * @param string|null $name * * @return self */ - public function setName($name = null) + public function setName(?string $name): self { + $this->initialized['name'] = true; $this->name = $name; - return $this; } - /** - * @return string[]|null + * User-defined key/value metadata. + * + * @return array|null */ - public function getLabels() + public function getLabels(): ?iterable { return $this->labels; } - /** - * @param string[]|null $labels + * User-defined key/value metadata. + * + * @param array|null $labels * * @return self */ - public function setLabels($labels = null) + public function setLabels(?iterable $labels): self { + $this->initialized['labels'] = true; $this->labels = $labels; - return $this; } - /** - * @return TaskSpec + * User modifiable task configuration. + * + * @return TaskSpec|null */ - public function getTaskTemplate() + public function getTaskTemplate(): ?TaskSpec { return $this->taskTemplate; } - /** - * @param TaskSpec $taskTemplate + * User modifiable task configuration. + * + * @param TaskSpec|null $taskTemplate * * @return self */ - public function setTaskTemplate(?TaskSpec $taskTemplate = null) + public function setTaskTemplate(?TaskSpec $taskTemplate): self { + $this->initialized['taskTemplate'] = true; $this->taskTemplate = $taskTemplate; - return $this; } - /** - * @return ServiceSpecMode + * Scheduling mode for the service. + * + * @return ServiceSpecMode|null */ - public function getMode() + public function getMode(): ?ServiceSpecMode { return $this->mode; } - /** - * @param ServiceSpecMode $mode + * Scheduling mode for the service. + * + * @param ServiceSpecMode|null $mode * * @return self */ - public function setMode(?ServiceSpecMode $mode = null) + public function setMode(?ServiceSpecMode $mode): self { + $this->initialized['mode'] = true; $this->mode = $mode; - return $this; } - /** - * @return UpdateConfig + * Specification for the update strategy of the service. + * + * @return ServiceSpecUpdateConfig|null */ - public function getUpdateConfig() + public function getUpdateConfig(): ?ServiceSpecUpdateConfig { return $this->updateConfig; } - /** - * @param UpdateConfig $updateConfig + * Specification for the update strategy of the service. + * + * @param ServiceSpecUpdateConfig|null $updateConfig * * @return self */ - public function setUpdateConfig(?UpdateConfig $updateConfig = null) + public function setUpdateConfig(?ServiceSpecUpdateConfig $updateConfig): self { + $this->initialized['updateConfig'] = true; $this->updateConfig = $updateConfig; - return $this; } - /** - * @return NetworkAttachmentConfig[]|null + * Array of network names or IDs to attach the service to. + * + * @return list|null */ - public function getNetworks() + public function getNetworks(): ?array { return $this->networks; } - /** - * @param NetworkAttachmentConfig[]|null $networks + * Array of network names or IDs to attach the service to. + * + * @param list|null $networks * * @return self */ - public function setNetworks($networks = null) + public function setNetworks(?array $networks): self { + $this->initialized['networks'] = true; $this->networks = $networks; - return $this; } - /** - * @return string + * Properties that can be configured to access and load balance a service. + * + * @return EndpointSpec|null */ - public function getEndpointSpec() + public function getEndpointSpec(): ?EndpointSpec { return $this->endpointSpec; } - /** - * @param string $endpointSpec + * Properties that can be configured to access and load balance a service. + * + * @param EndpointSpec|null $endpointSpec * * @return self */ - public function setEndpointSpec($endpointSpec = null) + public function setEndpointSpec(?EndpointSpec $endpointSpec): self { + $this->initialized['endpointSpec'] = true; $this->endpointSpec = $endpointSpec; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/ServiceSpecMode.php b/generated/Model/ServiceSpecMode.php index 6ed9b53fe..d1b49a2cb 100644 --- a/generated/Model/ServiceSpecMode.php +++ b/generated/Model/ServiceSpecMode.php @@ -5,51 +5,67 @@ class ServiceSpecMode { /** - * @var ReplicatedService + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var ServiceSpecModeReplicated|null */ protected $replicated; /** - * @var GlobalService + * + * + * @var mixed|null */ protected $global; - /** - * @return ReplicatedService + * + * + * @return ServiceSpecModeReplicated|null */ - public function getReplicated() + public function getReplicated(): ?ServiceSpecModeReplicated { return $this->replicated; } - /** - * @param ReplicatedService $replicated + * + * + * @param ServiceSpecModeReplicated|null $replicated * * @return self */ - public function setReplicated(?ReplicatedService $replicated = null) + public function setReplicated(?ServiceSpecModeReplicated $replicated): self { + $this->initialized['replicated'] = true; $this->replicated = $replicated; - return $this; } - /** - * @return GlobalService + * + * + * @return mixed */ public function getGlobal() { return $this->global; } - /** - * @param GlobalService $global + * + * + * @param mixed $global * * @return self */ - public function setGlobal(?GlobalService $global = null) + public function setGlobal($global): self { + $this->initialized['global'] = true; $this->global = $global; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/ServiceSpecModeReplicated.php b/generated/Model/ServiceSpecModeReplicated.php new file mode 100644 index 000000000..5751ef5bf --- /dev/null +++ b/generated/Model/ServiceSpecModeReplicated.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * + * + * @var int|null + */ + protected $replicas; + /** + * + * + * @return int|null + */ + public function getReplicas(): ?int + { + return $this->replicas; + } + /** + * + * + * @param int|null $replicas + * + * @return self + */ + public function setReplicas(?int $replicas): self + { + $this->initialized['replicas'] = true; + $this->replicas = $replicas; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServiceSpecNetworksItem.php b/generated/Model/ServiceSpecNetworksItem.php new file mode 100644 index 000000000..0fd6b0837 --- /dev/null +++ b/generated/Model/ServiceSpecNetworksItem.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $target; + /** + * + * + * @var list|null + */ + protected $aliases; + /** + * + * + * @return string|null + */ + public function getTarget(): ?string + { + return $this->target; + } + /** + * + * + * @param string|null $target + * + * @return self + */ + public function setTarget(?string $target): self + { + $this->initialized['target'] = true; + $this->target = $target; + return $this; + } + /** + * + * + * @return list|null + */ + public function getAliases(): ?array + { + return $this->aliases; + } + /** + * + * + * @param list|null $aliases + * + * @return self + */ + public function setAliases(?array $aliases): self + { + $this->initialized['aliases'] = true; + $this->aliases = $aliases; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServiceSpecUpdateConfig.php b/generated/Model/ServiceSpecUpdateConfig.php new file mode 100644 index 000000000..2166e575c --- /dev/null +++ b/generated/Model/ServiceSpecUpdateConfig.php @@ -0,0 +1,155 @@ +initialized); + } + /** + * Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism). + * + * @var int|null + */ + protected $parallelism; + /** + * Amount of time between updates, in nanoseconds. + * + * @var int|null + */ + protected $delay; + /** + * Action to take if an updated task fails to run, or stops running during the update. + * + * @var string|null + */ + protected $failureAction; + /** + * Amount of time to monitor each updated task for failures, in nanoseconds. + * + * @var int|null + */ + protected $monitor; + /** + * The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1. + * + * @var float|null + */ + protected $maxFailureRatio = 0; + /** + * Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism). + * + * @return int|null + */ + public function getParallelism(): ?int + { + return $this->parallelism; + } + /** + * Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism). + * + * @param int|null $parallelism + * + * @return self + */ + public function setParallelism(?int $parallelism): self + { + $this->initialized['parallelism'] = true; + $this->parallelism = $parallelism; + return $this; + } + /** + * Amount of time between updates, in nanoseconds. + * + * @return int|null + */ + public function getDelay(): ?int + { + return $this->delay; + } + /** + * Amount of time between updates, in nanoseconds. + * + * @param int|null $delay + * + * @return self + */ + public function setDelay(?int $delay): self + { + $this->initialized['delay'] = true; + $this->delay = $delay; + return $this; + } + /** + * Action to take if an updated task fails to run, or stops running during the update. + * + * @return string|null + */ + public function getFailureAction(): ?string + { + return $this->failureAction; + } + /** + * Action to take if an updated task fails to run, or stops running during the update. + * + * @param string|null $failureAction + * + * @return self + */ + public function setFailureAction(?string $failureAction): self + { + $this->initialized['failureAction'] = true; + $this->failureAction = $failureAction; + return $this; + } + /** + * Amount of time to monitor each updated task for failures, in nanoseconds. + * + * @return int|null + */ + public function getMonitor(): ?int + { + return $this->monitor; + } + /** + * Amount of time to monitor each updated task for failures, in nanoseconds. + * + * @param int|null $monitor + * + * @return self + */ + public function setMonitor(?int $monitor): self + { + $this->initialized['monitor'] = true; + $this->monitor = $monitor; + return $this; + } + /** + * The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1. + * + * @return float|null + */ + public function getMaxFailureRatio(): ?float + { + return $this->maxFailureRatio; + } + /** + * The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1. + * + * @param float|null $maxFailureRatio + * + * @return self + */ + public function setMaxFailureRatio(?float $maxFailureRatio): self + { + $this->initialized['maxFailureRatio'] = true; + $this->maxFailureRatio = $maxFailureRatio; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServiceUpdateResponse.php b/generated/Model/ServiceUpdateResponse.php new file mode 100644 index 000000000..e069f785d --- /dev/null +++ b/generated/Model/ServiceUpdateResponse.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * Optional warning messages + * + * @var list|null + */ + protected $warnings; + /** + * Optional warning messages + * + * @return list|null + */ + public function getWarnings(): ?array + { + return $this->warnings; + } + /** + * Optional warning messages + * + * @param list|null $warnings + * + * @return self + */ + public function setWarnings(?array $warnings): self + { + $this->initialized['warnings'] = true; + $this->warnings = $warnings; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServiceUpdateStatus.php b/generated/Model/ServiceUpdateStatus.php new file mode 100644 index 000000000..58692e68b --- /dev/null +++ b/generated/Model/ServiceUpdateStatus.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $state; + /** + * + * + * @var string|null + */ + protected $startedAt; + /** + * + * + * @var string|null + */ + protected $completedAt; + /** + * + * + * @var string|null + */ + protected $message; + /** + * + * + * @return string|null + */ + public function getState(): ?string + { + return $this->state; + } + /** + * + * + * @param string|null $state + * + * @return self + */ + public function setState(?string $state): self + { + $this->initialized['state'] = true; + $this->state = $state; + return $this; + } + /** + * + * + * @return string|null + */ + public function getStartedAt(): ?string + { + return $this->startedAt; + } + /** + * + * + * @param string|null $startedAt + * + * @return self + */ + public function setStartedAt(?string $startedAt): self + { + $this->initialized['startedAt'] = true; + $this->startedAt = $startedAt; + return $this; + } + /** + * + * + * @return string|null + */ + public function getCompletedAt(): ?string + { + return $this->completedAt; + } + /** + * + * + * @param string|null $completedAt + * + * @return self + */ + public function setCompletedAt(?string $completedAt): self + { + $this->initialized['completedAt'] = true; + $this->completedAt = $completedAt; + return $this; + } + /** + * + * + * @return string|null + */ + public function getMessage(): ?string + { + return $this->message; + } + /** + * + * + * @param string|null $message + * + * @return self + */ + public function setMessage(?string $message): self + { + $this->initialized['message'] = true; + $this->message = $message; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServiceVersion.php b/generated/Model/ServiceVersion.php new file mode 100644 index 000000000..aa2b2430f --- /dev/null +++ b/generated/Model/ServiceVersion.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * + * + * @var int|null + */ + protected $index; + /** + * + * + * @return int|null + */ + public function getIndex(): ?int + { + return $this->index; + } + /** + * + * + * @param int|null $index + * + * @return self + */ + public function setIndex(?int $index): self + { + $this->initialized['index'] = true; + $this->index = $index; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServicesCreatePostBody.php b/generated/Model/ServicesCreatePostBody.php new file mode 100644 index 000000000..3170bbcb0 --- /dev/null +++ b/generated/Model/ServicesCreatePostBody.php @@ -0,0 +1,211 @@ +initialized); + } + /** + * Name of the service. + * + * @var string|null + */ + protected $name; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * User modifiable task configuration. + * + * @var TaskSpec|null + */ + protected $taskTemplate; + /** + * Scheduling mode for the service. + * + * @var ServiceSpecMode|null + */ + protected $mode; + /** + * Specification for the update strategy of the service. + * + * @var ServiceSpecUpdateConfig|null + */ + protected $updateConfig; + /** + * Array of network names or IDs to attach the service to. + * + * @var list|null + */ + protected $networks; + /** + * Properties that can be configured to access and load balance a service. + * + * @var EndpointSpec|null + */ + protected $endpointSpec; + /** + * Name of the service. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * Name of the service. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * User modifiable task configuration. + * + * @return TaskSpec|null + */ + public function getTaskTemplate(): ?TaskSpec + { + return $this->taskTemplate; + } + /** + * User modifiable task configuration. + * + * @param TaskSpec|null $taskTemplate + * + * @return self + */ + public function setTaskTemplate(?TaskSpec $taskTemplate): self + { + $this->initialized['taskTemplate'] = true; + $this->taskTemplate = $taskTemplate; + return $this; + } + /** + * Scheduling mode for the service. + * + * @return ServiceSpecMode|null + */ + public function getMode(): ?ServiceSpecMode + { + return $this->mode; + } + /** + * Scheduling mode for the service. + * + * @param ServiceSpecMode|null $mode + * + * @return self + */ + public function setMode(?ServiceSpecMode $mode): self + { + $this->initialized['mode'] = true; + $this->mode = $mode; + return $this; + } + /** + * Specification for the update strategy of the service. + * + * @return ServiceSpecUpdateConfig|null + */ + public function getUpdateConfig(): ?ServiceSpecUpdateConfig + { + return $this->updateConfig; + } + /** + * Specification for the update strategy of the service. + * + * @param ServiceSpecUpdateConfig|null $updateConfig + * + * @return self + */ + public function setUpdateConfig(?ServiceSpecUpdateConfig $updateConfig): self + { + $this->initialized['updateConfig'] = true; + $this->updateConfig = $updateConfig; + return $this; + } + /** + * Array of network names or IDs to attach the service to. + * + * @return list|null + */ + public function getNetworks(): ?array + { + return $this->networks; + } + /** + * Array of network names or IDs to attach the service to. + * + * @param list|null $networks + * + * @return self + */ + public function setNetworks(?array $networks): self + { + $this->initialized['networks'] = true; + $this->networks = $networks; + return $this; + } + /** + * Properties that can be configured to access and load balance a service. + * + * @return EndpointSpec|null + */ + public function getEndpointSpec(): ?EndpointSpec + { + return $this->endpointSpec; + } + /** + * Properties that can be configured to access and load balance a service. + * + * @param EndpointSpec|null $endpointSpec + * + * @return self + */ + public function setEndpointSpec(?EndpointSpec $endpointSpec): self + { + $this->initialized['endpointSpec'] = true; + $this->endpointSpec = $endpointSpec; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServicesCreatePostResponse201.php b/generated/Model/ServicesCreatePostResponse201.php new file mode 100644 index 000000000..aa1224037 --- /dev/null +++ b/generated/Model/ServicesCreatePostResponse201.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The ID of the created service. + * + * @var string|null + */ + protected $iD; + /** + * Optional warning message + * + * @var string|null + */ + protected $warning; + /** + * The ID of the created service. + * + * @return string|null + */ + public function getID(): ?string + { + return $this->iD; + } + /** + * The ID of the created service. + * + * @param string|null $iD + * + * @return self + */ + public function setID(?string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + return $this; + } + /** + * Optional warning message + * + * @return string|null + */ + public function getWarning(): ?string + { + return $this->warning; + } + /** + * Optional warning message + * + * @param string|null $warning + * + * @return self + */ + public function setWarning(?string $warning): self + { + $this->initialized['warning'] = true; + $this->warning = $warning; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServicesIdUpdatePostBody.php b/generated/Model/ServicesIdUpdatePostBody.php new file mode 100644 index 000000000..f91e96c5b --- /dev/null +++ b/generated/Model/ServicesIdUpdatePostBody.php @@ -0,0 +1,211 @@ +initialized); + } + /** + * Name of the service. + * + * @var string|null + */ + protected $name; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * User modifiable task configuration. + * + * @var TaskSpec|null + */ + protected $taskTemplate; + /** + * Scheduling mode for the service. + * + * @var ServiceSpecMode|null + */ + protected $mode; + /** + * Specification for the update strategy of the service. + * + * @var ServiceSpecUpdateConfig|null + */ + protected $updateConfig; + /** + * Array of network names or IDs to attach the service to. + * + * @var list|null + */ + protected $networks; + /** + * Properties that can be configured to access and load balance a service. + * + * @var EndpointSpec|null + */ + protected $endpointSpec; + /** + * Name of the service. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * Name of the service. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * User modifiable task configuration. + * + * @return TaskSpec|null + */ + public function getTaskTemplate(): ?TaskSpec + { + return $this->taskTemplate; + } + /** + * User modifiable task configuration. + * + * @param TaskSpec|null $taskTemplate + * + * @return self + */ + public function setTaskTemplate(?TaskSpec $taskTemplate): self + { + $this->initialized['taskTemplate'] = true; + $this->taskTemplate = $taskTemplate; + return $this; + } + /** + * Scheduling mode for the service. + * + * @return ServiceSpecMode|null + */ + public function getMode(): ?ServiceSpecMode + { + return $this->mode; + } + /** + * Scheduling mode for the service. + * + * @param ServiceSpecMode|null $mode + * + * @return self + */ + public function setMode(?ServiceSpecMode $mode): self + { + $this->initialized['mode'] = true; + $this->mode = $mode; + return $this; + } + /** + * Specification for the update strategy of the service. + * + * @return ServiceSpecUpdateConfig|null + */ + public function getUpdateConfig(): ?ServiceSpecUpdateConfig + { + return $this->updateConfig; + } + /** + * Specification for the update strategy of the service. + * + * @param ServiceSpecUpdateConfig|null $updateConfig + * + * @return self + */ + public function setUpdateConfig(?ServiceSpecUpdateConfig $updateConfig): self + { + $this->initialized['updateConfig'] = true; + $this->updateConfig = $updateConfig; + return $this; + } + /** + * Array of network names or IDs to attach the service to. + * + * @return list|null + */ + public function getNetworks(): ?array + { + return $this->networks; + } + /** + * Array of network names or IDs to attach the service to. + * + * @param list|null $networks + * + * @return self + */ + public function setNetworks(?array $networks): self + { + $this->initialized['networks'] = true; + $this->networks = $networks; + return $this; + } + /** + * Properties that can be configured to access and load balance a service. + * + * @return EndpointSpec|null + */ + public function getEndpointSpec(): ?EndpointSpec + { + return $this->endpointSpec; + } + /** + * Properties that can be configured to access and load balance a service. + * + * @param EndpointSpec|null $endpointSpec + * + * @return self + */ + public function setEndpointSpec(?EndpointSpec $endpointSpec): self + { + $this->initialized['endpointSpec'] = true; + $this->endpointSpec = $endpointSpec; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmConfig.php b/generated/Model/SwarmConfig.php deleted file mode 100644 index 4f28bcb42..000000000 --- a/generated/Model/SwarmConfig.php +++ /dev/null @@ -1,103 +0,0 @@ -listenAddr; - } - - /** - * @param string $listenAddr - * - * @return self - */ - public function setListenAddr($listenAddr = null) - { - $this->listenAddr = $listenAddr; - - return $this; - } - - /** - * @return string - */ - public function getAdvertiseAddr() - { - return $this->advertiseAddr; - } - - /** - * @param string $advertiseAddr - * - * @return self - */ - public function setAdvertiseAddr($advertiseAddr = null) - { - $this->advertiseAddr = $advertiseAddr; - - return $this; - } - - /** - * @return bool - */ - public function getForceNewCluster() - { - return $this->forceNewCluster; - } - - /** - * @param bool $forceNewCluster - * - * @return self - */ - public function setForceNewCluster($forceNewCluster = null) - { - $this->forceNewCluster = $forceNewCluster; - - return $this; - } - - /** - * @return SwarmConfigSpec - */ - public function getSpec() - { - return $this->spec; - } - - /** - * @param SwarmConfigSpec $spec - * - * @return self - */ - public function setSpec(?SwarmConfigSpec $spec = null) - { - $this->spec = $spec; - - return $this; - } -} diff --git a/generated/Model/SwarmConfigSpec.php b/generated/Model/SwarmConfigSpec.php deleted file mode 100644 index 58174e77c..000000000 --- a/generated/Model/SwarmConfigSpec.php +++ /dev/null @@ -1,103 +0,0 @@ -orchestration; - } - - /** - * @param SwarmConfigSpecOrchestration $orchestration - * - * @return self - */ - public function setOrchestration(?SwarmConfigSpecOrchestration $orchestration = null) - { - $this->orchestration = $orchestration; - - return $this; - } - - /** - * @return SwarmConfigSpecRaft - */ - public function getRaft() - { - return $this->raft; - } - - /** - * @param SwarmConfigSpecRaft $raft - * - * @return self - */ - public function setRaft(?SwarmConfigSpecRaft $raft = null) - { - $this->raft = $raft; - - return $this; - } - - /** - * @return SwarmConfigSpecDispatcher - */ - public function getDispatcher() - { - return $this->dispatcher; - } - - /** - * @param SwarmConfigSpecDispatcher $dispatcher - * - * @return self - */ - public function setDispatcher(?SwarmConfigSpecDispatcher $dispatcher = null) - { - $this->dispatcher = $dispatcher; - - return $this; - } - - /** - * @return SwarmConfigSpecCAConfig - */ - public function getCAConfig() - { - return $this->cAConfig; - } - - /** - * @param SwarmConfigSpecCAConfig $cAConfig - * - * @return self - */ - public function setCAConfig(?SwarmConfigSpecCAConfig $cAConfig = null) - { - $this->cAConfig = $cAConfig; - - return $this; - } -} diff --git a/generated/Model/SwarmConfigSpecCAConfig.php b/generated/Model/SwarmConfigSpecCAConfig.php deleted file mode 100644 index 2bde0ed35..000000000 --- a/generated/Model/SwarmConfigSpecCAConfig.php +++ /dev/null @@ -1,55 +0,0 @@ -nodeCertExpiry; - } - - /** - * @param bool $nodeCertExpiry - * - * @return self - */ - public function setNodeCertExpiry($nodeCertExpiry = null) - { - $this->nodeCertExpiry = $nodeCertExpiry; - - return $this; - } - - /** - * @return SwarmConfigSpecCAConfigExternalCA - */ - public function getExternalCA() - { - return $this->externalCA; - } - - /** - * @param SwarmConfigSpecCAConfigExternalCA $externalCA - * - * @return self - */ - public function setExternalCA(?SwarmConfigSpecCAConfigExternalCA $externalCA = null) - { - $this->externalCA = $externalCA; - - return $this; - } -} diff --git a/generated/Model/SwarmConfigSpecCAConfigExternalCA.php b/generated/Model/SwarmConfigSpecCAConfigExternalCA.php deleted file mode 100644 index 8ab5b3cad..000000000 --- a/generated/Model/SwarmConfigSpecCAConfigExternalCA.php +++ /dev/null @@ -1,79 +0,0 @@ -protocol; - } - - /** - * @param string $protocol - * - * @return self - */ - public function setProtocol($protocol = null) - { - $this->protocol = $protocol; - - return $this; - } - - /** - * @return string - */ - public function getURL() - { - return $this->uRL; - } - - /** - * @param string $uRL - * - * @return self - */ - public function setURL($uRL = null) - { - $this->uRL = $uRL; - - return $this; - } - - /** - * @return string[]|null - */ - public function getOptions() - { - return $this->options; - } - - /** - * @param string[]|null $options - * - * @return self - */ - public function setOptions($options = null) - { - $this->options = $options; - - return $this; - } -} diff --git a/generated/Model/SwarmConfigSpecDispatcher.php b/generated/Model/SwarmConfigSpecDispatcher.php deleted file mode 100644 index 2ab13d3a0..000000000 --- a/generated/Model/SwarmConfigSpecDispatcher.php +++ /dev/null @@ -1,31 +0,0 @@ -heartbeatPeriod; - } - - /** - * @param int $heartbeatPeriod - * - * @return self - */ - public function setHeartbeatPeriod($heartbeatPeriod = null) - { - $this->heartbeatPeriod = $heartbeatPeriod; - - return $this; - } -} diff --git a/generated/Model/SwarmConfigSpecOrchestration.php b/generated/Model/SwarmConfigSpecOrchestration.php deleted file mode 100644 index 11feee358..000000000 --- a/generated/Model/SwarmConfigSpecOrchestration.php +++ /dev/null @@ -1,31 +0,0 @@ -taskHistoryRetentionLimit; - } - - /** - * @param int $taskHistoryRetentionLimit - * - * @return self - */ - public function setTaskHistoryRetentionLimit($taskHistoryRetentionLimit = null) - { - $this->taskHistoryRetentionLimit = $taskHistoryRetentionLimit; - - return $this; - } -} diff --git a/generated/Model/SwarmConfigSpecRaft.php b/generated/Model/SwarmConfigSpecRaft.php deleted file mode 100644 index 420c924eb..000000000 --- a/generated/Model/SwarmConfigSpecRaft.php +++ /dev/null @@ -1,127 +0,0 @@ -snapshotInterval; - } - - /** - * @param int $snapshotInterval - * - * @return self - */ - public function setSnapshotInterval($snapshotInterval = null) - { - $this->snapshotInterval = $snapshotInterval; - - return $this; - } - - /** - * @return int - */ - public function getKeepOldSnapshots() - { - return $this->keepOldSnapshots; - } - - /** - * @param int $keepOldSnapshots - * - * @return self - */ - public function setKeepOldSnapshots($keepOldSnapshots = null) - { - $this->keepOldSnapshots = $keepOldSnapshots; - - return $this; - } - - /** - * @return int - */ - public function getLogEntriesForSlowFollowers() - { - return $this->logEntriesForSlowFollowers; - } - - /** - * @param int $logEntriesForSlowFollowers - * - * @return self - */ - public function setLogEntriesForSlowFollowers($logEntriesForSlowFollowers = null) - { - $this->logEntriesForSlowFollowers = $logEntriesForSlowFollowers; - - return $this; - } - - /** - * @return int - */ - public function getHeartbeatTick() - { - return $this->heartbeatTick; - } - - /** - * @param int $heartbeatTick - * - * @return self - */ - public function setHeartbeatTick($heartbeatTick = null) - { - $this->heartbeatTick = $heartbeatTick; - - return $this; - } - - /** - * @return int - */ - public function getElectionTick() - { - return $this->electionTick; - } - - /** - * @param int $electionTick - * - * @return self - */ - public function setElectionTick($electionTick = null) - { - $this->electionTick = $electionTick; - - return $this; - } -} diff --git a/generated/Model/SwarmGetResponse200.php b/generated/Model/SwarmGetResponse200.php new file mode 100644 index 000000000..a013e8a8c --- /dev/null +++ b/generated/Model/SwarmGetResponse200.php @@ -0,0 +1,183 @@ +initialized); + } + /** + * The ID of the swarm. + * + * @var string|null + */ + protected $iD; + /** + * + * + * @var ClusterInfoVersion|null + */ + protected $version; + /** + * + * + * @var string|null + */ + protected $createdAt; + /** + * + * + * @var string|null + */ + protected $updatedAt; + /** + * User modifiable swarm configuration. + * + * @var SwarmSpec|null + */ + protected $spec; + /** + * The tokens workers and managers need to join the swarm. + * + * @var SwarmGetResponse200JoinTokens|null + */ + protected $joinTokens; + /** + * The ID of the swarm. + * + * @return string|null + */ + public function getID(): ?string + { + return $this->iD; + } + /** + * The ID of the swarm. + * + * @param string|null $iD + * + * @return self + */ + public function setID(?string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + return $this; + } + /** + * + * + * @return ClusterInfoVersion|null + */ + public function getVersion(): ?ClusterInfoVersion + { + return $this->version; + } + /** + * + * + * @param ClusterInfoVersion|null $version + * + * @return self + */ + public function setVersion(?ClusterInfoVersion $version): self + { + $this->initialized['version'] = true; + $this->version = $version; + return $this; + } + /** + * + * + * @return string|null + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + /** + * + * + * @param string|null $createdAt + * + * @return self + */ + public function setCreatedAt(?string $createdAt): self + { + $this->initialized['createdAt'] = true; + $this->createdAt = $createdAt; + return $this; + } + /** + * + * + * @return string|null + */ + public function getUpdatedAt(): ?string + { + return $this->updatedAt; + } + /** + * + * + * @param string|null $updatedAt + * + * @return self + */ + public function setUpdatedAt(?string $updatedAt): self + { + $this->initialized['updatedAt'] = true; + $this->updatedAt = $updatedAt; + return $this; + } + /** + * User modifiable swarm configuration. + * + * @return SwarmSpec|null + */ + public function getSpec(): ?SwarmSpec + { + return $this->spec; + } + /** + * User modifiable swarm configuration. + * + * @param SwarmSpec|null $spec + * + * @return self + */ + public function setSpec(?SwarmSpec $spec): self + { + $this->initialized['spec'] = true; + $this->spec = $spec; + return $this; + } + /** + * The tokens workers and managers need to join the swarm. + * + * @return SwarmGetResponse200JoinTokens|null + */ + public function getJoinTokens(): ?SwarmGetResponse200JoinTokens + { + return $this->joinTokens; + } + /** + * The tokens workers and managers need to join the swarm. + * + * @param SwarmGetResponse200JoinTokens|null $joinTokens + * + * @return self + */ + public function setJoinTokens(?SwarmGetResponse200JoinTokens $joinTokens): self + { + $this->initialized['joinTokens'] = true; + $this->joinTokens = $joinTokens; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmGetResponse200JoinTokens.php b/generated/Model/SwarmGetResponse200JoinTokens.php new file mode 100644 index 000000000..2ad824ed2 --- /dev/null +++ b/generated/Model/SwarmGetResponse200JoinTokens.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The token workers can use to join the swarm. + * + * @var string|null + */ + protected $worker; + /** + * The token managers can use to join the swarm. + * + * @var string|null + */ + protected $manager; + /** + * The token workers can use to join the swarm. + * + * @return string|null + */ + public function getWorker(): ?string + { + return $this->worker; + } + /** + * The token workers can use to join the swarm. + * + * @param string|null $worker + * + * @return self + */ + public function setWorker(?string $worker): self + { + $this->initialized['worker'] = true; + $this->worker = $worker; + return $this; + } + /** + * The token managers can use to join the swarm. + * + * @return string|null + */ + public function getManager(): ?string + { + return $this->manager; + } + /** + * The token managers can use to join the swarm. + * + * @param string|null $manager + * + * @return self + */ + public function setManager(?string $manager): self + { + $this->initialized['manager'] = true; + $this->manager = $manager; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmIPAMOptions.php b/generated/Model/SwarmIPAMOptions.php deleted file mode 100644 index d9e94a6d8..000000000 --- a/generated/Model/SwarmIPAMOptions.php +++ /dev/null @@ -1,55 +0,0 @@ -driver; - } - - /** - * @param Driver $driver - * - * @return self - */ - public function setDriver(?Driver $driver = null) - { - $this->driver = $driver; - - return $this; - } - - /** - * @return IPAMConfig[]|null - */ - public function getConfigs() - { - return $this->configs; - } - - /** - * @param IPAMConfig[]|null $configs - * - * @return self - */ - public function setConfigs($configs = null) - { - $this->configs = $configs; - - return $this; - } -} diff --git a/generated/Model/SwarmInitPostBody.php b/generated/Model/SwarmInitPostBody.php new file mode 100644 index 000000000..23dbfea0b --- /dev/null +++ b/generated/Model/SwarmInitPostBody.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used. + * + * @var string|null + */ + protected $listenAddr; + /** + * Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. + * + * @var string|null + */ + protected $advertiseAddr; + /** + * Force creation of a new swarm. + * + * @var bool|null + */ + protected $forceNewCluster; + /** + * User modifiable swarm configuration. + * + * @var SwarmSpec|null + */ + protected $spec; + /** + * Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used. + * + * @return string|null + */ + public function getListenAddr(): ?string + { + return $this->listenAddr; + } + /** + * Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used. + * + * @param string|null $listenAddr + * + * @return self + */ + public function setListenAddr(?string $listenAddr): self + { + $this->initialized['listenAddr'] = true; + $this->listenAddr = $listenAddr; + return $this; + } + /** + * Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. + * + * @return string|null + */ + public function getAdvertiseAddr(): ?string + { + return $this->advertiseAddr; + } + /** + * Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. + * + * @param string|null $advertiseAddr + * + * @return self + */ + public function setAdvertiseAddr(?string $advertiseAddr): self + { + $this->initialized['advertiseAddr'] = true; + $this->advertiseAddr = $advertiseAddr; + return $this; + } + /** + * Force creation of a new swarm. + * + * @return bool|null + */ + public function getForceNewCluster(): ?bool + { + return $this->forceNewCluster; + } + /** + * Force creation of a new swarm. + * + * @param bool|null $forceNewCluster + * + * @return self + */ + public function setForceNewCluster(?bool $forceNewCluster): self + { + $this->initialized['forceNewCluster'] = true; + $this->forceNewCluster = $forceNewCluster; + return $this; + } + /** + * User modifiable swarm configuration. + * + * @return SwarmSpec|null + */ + public function getSpec(): ?SwarmSpec + { + return $this->spec; + } + /** + * User modifiable swarm configuration. + * + * @param SwarmSpec|null $spec + * + * @return self + */ + public function setSpec(?SwarmSpec $spec): self + { + $this->initialized['spec'] = true; + $this->spec = $spec; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmJoinConfig.php b/generated/Model/SwarmJoinConfig.php deleted file mode 100644 index b7935a5a3..000000000 --- a/generated/Model/SwarmJoinConfig.php +++ /dev/null @@ -1,103 +0,0 @@ -listenAddr; - } - - /** - * @param string $listenAddr - * - * @return self - */ - public function setListenAddr($listenAddr = null) - { - $this->listenAddr = $listenAddr; - - return $this; - } - - /** - * @return string - */ - public function getAdvertiseAddr() - { - return $this->advertiseAddr; - } - - /** - * @param string $advertiseAddr - * - * @return self - */ - public function setAdvertiseAddr($advertiseAddr = null) - { - $this->advertiseAddr = $advertiseAddr; - - return $this; - } - - /** - * @return string[]|null - */ - public function getRemoteAddrs() - { - return $this->remoteAddrs; - } - - /** - * @param string[]|null $remoteAddrs - * - * @return self - */ - public function setRemoteAddrs($remoteAddrs = null) - { - $this->remoteAddrs = $remoteAddrs; - - return $this; - } - - /** - * @return string - */ - public function getJoinToken() - { - return $this->joinToken; - } - - /** - * @param string $joinToken - * - * @return self - */ - public function setJoinToken($joinToken = null) - { - $this->joinToken = $joinToken; - - return $this; - } -} diff --git a/generated/Model/SwarmJoinPostBody.php b/generated/Model/SwarmJoinPostBody.php new file mode 100644 index 000000000..1f9b8a19b --- /dev/null +++ b/generated/Model/SwarmJoinPostBody.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). + * + * @var string|null + */ + protected $listenAddr; + /** + * Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. + * + * @var string|null + */ + protected $advertiseAddr; + /** + * Addresses of manager nodes already participating in the swarm. + * + * @var string|null + */ + protected $remoteAddrs; + /** + * Secret token for joining this swarm. + * + * @var string|null + */ + protected $joinToken; + /** + * Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). + * + * @return string|null + */ + public function getListenAddr(): ?string + { + return $this->listenAddr; + } + /** + * Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). + * + * @param string|null $listenAddr + * + * @return self + */ + public function setListenAddr(?string $listenAddr): self + { + $this->initialized['listenAddr'] = true; + $this->listenAddr = $listenAddr; + return $this; + } + /** + * Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. + * + * @return string|null + */ + public function getAdvertiseAddr(): ?string + { + return $this->advertiseAddr; + } + /** + * Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. + * + * @param string|null $advertiseAddr + * + * @return self + */ + public function setAdvertiseAddr(?string $advertiseAddr): self + { + $this->initialized['advertiseAddr'] = true; + $this->advertiseAddr = $advertiseAddr; + return $this; + } + /** + * Addresses of manager nodes already participating in the swarm. + * + * @return string|null + */ + public function getRemoteAddrs(): ?string + { + return $this->remoteAddrs; + } + /** + * Addresses of manager nodes already participating in the swarm. + * + * @param string|null $remoteAddrs + * + * @return self + */ + public function setRemoteAddrs(?string $remoteAddrs): self + { + $this->initialized['remoteAddrs'] = true; + $this->remoteAddrs = $remoteAddrs; + return $this; + } + /** + * Secret token for joining this swarm. + * + * @return string|null + */ + public function getJoinToken(): ?string + { + return $this->joinToken; + } + /** + * Secret token for joining this swarm. + * + * @param string|null $joinToken + * + * @return self + */ + public function setJoinToken(?string $joinToken): self + { + $this->initialized['joinToken'] = true; + $this->joinToken = $joinToken; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmJoinTokens.php b/generated/Model/SwarmJoinTokens.php deleted file mode 100644 index ac20e6fe2..000000000 --- a/generated/Model/SwarmJoinTokens.php +++ /dev/null @@ -1,55 +0,0 @@ -worker; - } - - /** - * @param string $worker - * - * @return self - */ - public function setWorker($worker = null) - { - $this->worker = $worker; - - return $this; - } - - /** - * @return string - */ - public function getManager() - { - return $this->manager; - } - - /** - * @param string $manager - * - * @return self - */ - public function setManager($manager = null) - { - $this->manager = $manager; - - return $this; - } -} diff --git a/generated/Model/SwarmNetwork.php b/generated/Model/SwarmNetwork.php deleted file mode 100644 index ec5e56596..000000000 --- a/generated/Model/SwarmNetwork.php +++ /dev/null @@ -1,175 +0,0 @@ -iD; - } - - /** - * @param string $iD - * - * @return self - */ - public function setID($iD = null) - { - $this->iD = $iD; - - return $this; - } - - /** - * @return NodeVersion - */ - public function getVersion() - { - return $this->version; - } - - /** - * @param NodeVersion $version - * - * @return self - */ - public function setVersion(?NodeVersion $version = null) - { - $this->version = $version; - - return $this; - } - - /** - * @return \DateTime - */ - public function getCreatedAt() - { - return $this->createdAt; - } - - /** - * @param \DateTime $createdAt - * - * @return self - */ - public function setCreatedAt(?\DateTime $createdAt = null) - { - $this->createdAt = $createdAt; - - return $this; - } - - /** - * @return \DateTime - */ - public function getUpdatedAt() - { - return $this->updatedAt; - } - - /** - * @param \DateTime $updatedAt - * - * @return self - */ - public function setUpdatedAt(?\DateTime $updatedAt = null) - { - $this->updatedAt = $updatedAt; - - return $this; - } - - /** - * @return SwarmNetworkSpec - */ - public function getSpec() - { - return $this->spec; - } - - /** - * @param SwarmNetworkSpec $spec - * - * @return self - */ - public function setSpec(?SwarmNetworkSpec $spec = null) - { - $this->spec = $spec; - - return $this; - } - - /** - * @return Driver - */ - public function getDriverState() - { - return $this->driverState; - } - - /** - * @param Driver $driverState - * - * @return self - */ - public function setDriverState(?Driver $driverState = null) - { - $this->driverState = $driverState; - - return $this; - } - - /** - * @return SwarmIPAMOptions - */ - public function getIPAM() - { - return $this->iPAM; - } - - /** - * @param SwarmIPAMOptions $iPAM - * - * @return self - */ - public function setIPAM(?SwarmIPAMOptions $iPAM = null) - { - $this->iPAM = $iPAM; - - return $this; - } -} diff --git a/generated/Model/SwarmNetworkSpec.php b/generated/Model/SwarmNetworkSpec.php deleted file mode 100644 index 3b216f702..000000000 --- a/generated/Model/SwarmNetworkSpec.php +++ /dev/null @@ -1,151 +0,0 @@ -name; - } - - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } - - /** - * @return string[]|null - */ - public function getLabels() - { - return $this->labels; - } - - /** - * @param string[]|null $labels - * - * @return self - */ - public function setLabels($labels = null) - { - $this->labels = $labels; - - return $this; - } - - /** - * @return Driver - */ - public function getDriverConfiguration() - { - return $this->driverConfiguration; - } - - /** - * @param Driver $driverConfiguration - * - * @return self - */ - public function setDriverConfiguration(?Driver $driverConfiguration = null) - { - $this->driverConfiguration = $driverConfiguration; - - return $this; - } - - /** - * @return bool - */ - public function getIPv6Enabled() - { - return $this->iPv6Enabled; - } - - /** - * @param bool $iPv6Enabled - * - * @return self - */ - public function setIPv6Enabled($iPv6Enabled = null) - { - $this->iPv6Enabled = $iPv6Enabled; - - return $this; - } - - /** - * @return bool - */ - public function getInternal() - { - return $this->internal; - } - - /** - * @param bool $internal - * - * @return self - */ - public function setInternal($internal = null) - { - $this->internal = $internal; - - return $this; - } - - /** - * @return SwarmIPAMOptions - */ - public function getIPAM() - { - return $this->iPAM; - } - - /** - * @param SwarmIPAMOptions $iPAM - * - * @return self - */ - public function setIPAM(?SwarmIPAMOptions $iPAM = null) - { - $this->iPAM = $iPAM; - - return $this; - } -} diff --git a/generated/Model/SwarmSpec.php b/generated/Model/SwarmSpec.php new file mode 100644 index 000000000..d0dc6d285 --- /dev/null +++ b/generated/Model/SwarmSpec.php @@ -0,0 +1,239 @@ +initialized); + } + /** + * Name of the swarm. + * + * @var string|null + */ + protected $name; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * Orchestration configuration. + * + * @var SwarmSpecOrchestration|null + */ + protected $orchestration; + /** + * Raft configuration. + * + * @var SwarmSpecRaft|null + */ + protected $raft; + /** + * Dispatcher configuration. + * + * @var SwarmSpecDispatcher|null + */ + protected $dispatcher; + /** + * CA configuration. + * + * @var SwarmSpecCAConfig|null + */ + protected $cAConfig; + /** + * Parameters related to encryption-at-rest. + * + * @var SwarmSpecEncryptionConfig|null + */ + protected $encryptionConfig; + /** + * Defaults for creating tasks in this cluster. + * + * @var SwarmSpecTaskDefaults|null + */ + protected $taskDefaults; + /** + * Name of the swarm. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * Name of the swarm. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * Orchestration configuration. + * + * @return SwarmSpecOrchestration|null + */ + public function getOrchestration(): ?SwarmSpecOrchestration + { + return $this->orchestration; + } + /** + * Orchestration configuration. + * + * @param SwarmSpecOrchestration|null $orchestration + * + * @return self + */ + public function setOrchestration(?SwarmSpecOrchestration $orchestration): self + { + $this->initialized['orchestration'] = true; + $this->orchestration = $orchestration; + return $this; + } + /** + * Raft configuration. + * + * @return SwarmSpecRaft|null + */ + public function getRaft(): ?SwarmSpecRaft + { + return $this->raft; + } + /** + * Raft configuration. + * + * @param SwarmSpecRaft|null $raft + * + * @return self + */ + public function setRaft(?SwarmSpecRaft $raft): self + { + $this->initialized['raft'] = true; + $this->raft = $raft; + return $this; + } + /** + * Dispatcher configuration. + * + * @return SwarmSpecDispatcher|null + */ + public function getDispatcher(): ?SwarmSpecDispatcher + { + return $this->dispatcher; + } + /** + * Dispatcher configuration. + * + * @param SwarmSpecDispatcher|null $dispatcher + * + * @return self + */ + public function setDispatcher(?SwarmSpecDispatcher $dispatcher): self + { + $this->initialized['dispatcher'] = true; + $this->dispatcher = $dispatcher; + return $this; + } + /** + * CA configuration. + * + * @return SwarmSpecCAConfig|null + */ + public function getCAConfig(): ?SwarmSpecCAConfig + { + return $this->cAConfig; + } + /** + * CA configuration. + * + * @param SwarmSpecCAConfig|null $cAConfig + * + * @return self + */ + public function setCAConfig(?SwarmSpecCAConfig $cAConfig): self + { + $this->initialized['cAConfig'] = true; + $this->cAConfig = $cAConfig; + return $this; + } + /** + * Parameters related to encryption-at-rest. + * + * @return SwarmSpecEncryptionConfig|null + */ + public function getEncryptionConfig(): ?SwarmSpecEncryptionConfig + { + return $this->encryptionConfig; + } + /** + * Parameters related to encryption-at-rest. + * + * @param SwarmSpecEncryptionConfig|null $encryptionConfig + * + * @return self + */ + public function setEncryptionConfig(?SwarmSpecEncryptionConfig $encryptionConfig): self + { + $this->initialized['encryptionConfig'] = true; + $this->encryptionConfig = $encryptionConfig; + return $this; + } + /** + * Defaults for creating tasks in this cluster. + * + * @return SwarmSpecTaskDefaults|null + */ + public function getTaskDefaults(): ?SwarmSpecTaskDefaults + { + return $this->taskDefaults; + } + /** + * Defaults for creating tasks in this cluster. + * + * @param SwarmSpecTaskDefaults|null $taskDefaults + * + * @return self + */ + public function setTaskDefaults(?SwarmSpecTaskDefaults $taskDefaults): self + { + $this->initialized['taskDefaults'] = true; + $this->taskDefaults = $taskDefaults; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmSpecCAConfig.php b/generated/Model/SwarmSpecCAConfig.php new file mode 100644 index 000000000..429776dc4 --- /dev/null +++ b/generated/Model/SwarmSpecCAConfig.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The duration node certificates are issued for. + * + * @var int|null + */ + protected $nodeCertExpiry; + /** + * Configuration for forwarding signing requests to an external certificate authority. + * + * @var list|null + */ + protected $externalCAs; + /** + * The duration node certificates are issued for. + * + * @return int|null + */ + public function getNodeCertExpiry(): ?int + { + return $this->nodeCertExpiry; + } + /** + * The duration node certificates are issued for. + * + * @param int|null $nodeCertExpiry + * + * @return self + */ + public function setNodeCertExpiry(?int $nodeCertExpiry): self + { + $this->initialized['nodeCertExpiry'] = true; + $this->nodeCertExpiry = $nodeCertExpiry; + return $this; + } + /** + * Configuration for forwarding signing requests to an external certificate authority. + * + * @return list|null + */ + public function getExternalCAs(): ?array + { + return $this->externalCAs; + } + /** + * Configuration for forwarding signing requests to an external certificate authority. + * + * @param list|null $externalCAs + * + * @return self + */ + public function setExternalCAs(?array $externalCAs): self + { + $this->initialized['externalCAs'] = true; + $this->externalCAs = $externalCAs; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmSpecCAConfigExternalCAsItem.php b/generated/Model/SwarmSpecCAConfigExternalCAsItem.php new file mode 100644 index 000000000..7a0664ba5 --- /dev/null +++ b/generated/Model/SwarmSpecCAConfigExternalCAsItem.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * Protocol for communication with the external CA (currently only `cfssl` is supported). + * + * @var string|null + */ + protected $protocol = 'cfssl'; + /** + * URL where certificate signing requests should be sent. + * + * @var string|null + */ + protected $uRL; + /** + * An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver. + * + * @var array|null + */ + protected $options; + /** + * Protocol for communication with the external CA (currently only `cfssl` is supported). + * + * @return string|null + */ + public function getProtocol(): ?string + { + return $this->protocol; + } + /** + * Protocol for communication with the external CA (currently only `cfssl` is supported). + * + * @param string|null $protocol + * + * @return self + */ + public function setProtocol(?string $protocol): self + { + $this->initialized['protocol'] = true; + $this->protocol = $protocol; + return $this; + } + /** + * URL where certificate signing requests should be sent. + * + * @return string|null + */ + public function getURL(): ?string + { + return $this->uRL; + } + /** + * URL where certificate signing requests should be sent. + * + * @param string|null $uRL + * + * @return self + */ + public function setURL(?string $uRL): self + { + $this->initialized['uRL'] = true; + $this->uRL = $uRL; + return $this; + } + /** + * An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver. + * + * @return array|null + */ + public function getOptions(): ?iterable + { + return $this->options; + } + /** + * An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver. + * + * @param array|null $options + * + * @return self + */ + public function setOptions(?iterable $options): self + { + $this->initialized['options'] = true; + $this->options = $options; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmSpecDispatcher.php b/generated/Model/SwarmSpecDispatcher.php new file mode 100644 index 000000000..4716d5be3 --- /dev/null +++ b/generated/Model/SwarmSpecDispatcher.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * The delay for an agent to send a heartbeat to the dispatcher. + * + * @var int|null + */ + protected $heartbeatPeriod; + /** + * The delay for an agent to send a heartbeat to the dispatcher. + * + * @return int|null + */ + public function getHeartbeatPeriod(): ?int + { + return $this->heartbeatPeriod; + } + /** + * The delay for an agent to send a heartbeat to the dispatcher. + * + * @param int|null $heartbeatPeriod + * + * @return self + */ + public function setHeartbeatPeriod(?int $heartbeatPeriod): self + { + $this->initialized['heartbeatPeriod'] = true; + $this->heartbeatPeriod = $heartbeatPeriod; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmSpecEncryptionConfig.php b/generated/Model/SwarmSpecEncryptionConfig.php new file mode 100644 index 000000000..c582a9907 --- /dev/null +++ b/generated/Model/SwarmSpecEncryptionConfig.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * If set, generate a key and use it to lock data stored on the managers. + * + * @var bool|null + */ + protected $autoLockManagers; + /** + * If set, generate a key and use it to lock data stored on the managers. + * + * @return bool|null + */ + public function getAutoLockManagers(): ?bool + { + return $this->autoLockManagers; + } + /** + * If set, generate a key and use it to lock data stored on the managers. + * + * @param bool|null $autoLockManagers + * + * @return self + */ + public function setAutoLockManagers(?bool $autoLockManagers): self + { + $this->initialized['autoLockManagers'] = true; + $this->autoLockManagers = $autoLockManagers; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmSpecOrchestration.php b/generated/Model/SwarmSpecOrchestration.php new file mode 100644 index 000000000..f415d4fa6 --- /dev/null +++ b/generated/Model/SwarmSpecOrchestration.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks. + * + * @var int|null + */ + protected $taskHistoryRetentionLimit; + /** + * The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks. + * + * @return int|null + */ + public function getTaskHistoryRetentionLimit(): ?int + { + return $this->taskHistoryRetentionLimit; + } + /** + * The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks. + * + * @param int|null $taskHistoryRetentionLimit + * + * @return self + */ + public function setTaskHistoryRetentionLimit(?int $taskHistoryRetentionLimit): self + { + $this->initialized['taskHistoryRetentionLimit'] = true; + $this->taskHistoryRetentionLimit = $taskHistoryRetentionLimit; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmSpecRaft.php b/generated/Model/SwarmSpecRaft.php new file mode 100644 index 000000000..ab36fc82b --- /dev/null +++ b/generated/Model/SwarmSpecRaft.php @@ -0,0 +1,173 @@ +initialized); + } + /** + * The number of log entries between snapshots. + * + * @var int|null + */ + protected $snapshotInterval; + /** + * The number of snapshots to keep beyond the current snapshot. + * + * @var int|null + */ + protected $keepOldSnapshots; + /** + * The number of log entries to keep around to sync up slow followers after a snapshot is created. + * + * @var int|null + */ + protected $logEntriesForSlowFollowers; + /** + * The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`. + + A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + + * + * @var int|null + */ + protected $electionTick; + /** + * The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. + + A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + + * + * @var int|null + */ + protected $heartbeatTick; + /** + * The number of log entries between snapshots. + * + * @return int|null + */ + public function getSnapshotInterval(): ?int + { + return $this->snapshotInterval; + } + /** + * The number of log entries between snapshots. + * + * @param int|null $snapshotInterval + * + * @return self + */ + public function setSnapshotInterval(?int $snapshotInterval): self + { + $this->initialized['snapshotInterval'] = true; + $this->snapshotInterval = $snapshotInterval; + return $this; + } + /** + * The number of snapshots to keep beyond the current snapshot. + * + * @return int|null + */ + public function getKeepOldSnapshots(): ?int + { + return $this->keepOldSnapshots; + } + /** + * The number of snapshots to keep beyond the current snapshot. + * + * @param int|null $keepOldSnapshots + * + * @return self + */ + public function setKeepOldSnapshots(?int $keepOldSnapshots): self + { + $this->initialized['keepOldSnapshots'] = true; + $this->keepOldSnapshots = $keepOldSnapshots; + return $this; + } + /** + * The number of log entries to keep around to sync up slow followers after a snapshot is created. + * + * @return int|null + */ + public function getLogEntriesForSlowFollowers(): ?int + { + return $this->logEntriesForSlowFollowers; + } + /** + * The number of log entries to keep around to sync up slow followers after a snapshot is created. + * + * @param int|null $logEntriesForSlowFollowers + * + * @return self + */ + public function setLogEntriesForSlowFollowers(?int $logEntriesForSlowFollowers): self + { + $this->initialized['logEntriesForSlowFollowers'] = true; + $this->logEntriesForSlowFollowers = $logEntriesForSlowFollowers; + return $this; + } + /** + * The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`. + + A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + + * + * @return int|null + */ + public function getElectionTick(): ?int + { + return $this->electionTick; + } + /** + * The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`. + + A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + + * + * @param int|null $electionTick + * + * @return self + */ + public function setElectionTick(?int $electionTick): self + { + $this->initialized['electionTick'] = true; + $this->electionTick = $electionTick; + return $this; + } + /** + * The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. + + A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + + * + * @return int|null + */ + public function getHeartbeatTick(): ?int + { + return $this->heartbeatTick; + } + /** + * The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. + + A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + + * + * @param int|null $heartbeatTick + * + * @return self + */ + public function setHeartbeatTick(?int $heartbeatTick): self + { + $this->initialized['heartbeatTick'] = true; + $this->heartbeatTick = $heartbeatTick; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmSpecTaskDefaults.php b/generated/Model/SwarmSpecTaskDefaults.php new file mode 100644 index 000000000..cc2fcafe1 --- /dev/null +++ b/generated/Model/SwarmSpecTaskDefaults.php @@ -0,0 +1,52 @@ +initialized); + } + /** + * The log driver to use for tasks created in the orchestrator if unspecified by a service. + + Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated. + + * + * @var SwarmSpecTaskDefaultsLogDriver|null + */ + protected $logDriver; + /** + * The log driver to use for tasks created in the orchestrator if unspecified by a service. + + Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated. + + * + * @return SwarmSpecTaskDefaultsLogDriver|null + */ + public function getLogDriver(): ?SwarmSpecTaskDefaultsLogDriver + { + return $this->logDriver; + } + /** + * The log driver to use for tasks created in the orchestrator if unspecified by a service. + + Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated. + + * + * @param SwarmSpecTaskDefaultsLogDriver|null $logDriver + * + * @return self + */ + public function setLogDriver(?SwarmSpecTaskDefaultsLogDriver $logDriver): self + { + $this->initialized['logDriver'] = true; + $this->logDriver = $logDriver; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmSpecTaskDefaultsLogDriver.php b/generated/Model/SwarmSpecTaskDefaultsLogDriver.php new file mode 100644 index 000000000..4fd58aa5f --- /dev/null +++ b/generated/Model/SwarmSpecTaskDefaultsLogDriver.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $name; + /** + * + * + * @var array|null + */ + protected $options; + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * + * + * @return array|null + */ + public function getOptions(): ?iterable + { + return $this->options; + } + /** + * + * + * @param array|null $options + * + * @return self + */ + public function setOptions(?iterable $options): self + { + $this->initialized['options'] = true; + $this->options = $options; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmUnlockPostBody.php b/generated/Model/SwarmUnlockPostBody.php new file mode 100644 index 000000000..729e6c31f --- /dev/null +++ b/generated/Model/SwarmUnlockPostBody.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * The swarm's unlock key. + * + * @var string|null + */ + protected $unlockKey; + /** + * The swarm's unlock key. + * + * @return string|null + */ + public function getUnlockKey(): ?string + { + return $this->unlockKey; + } + /** + * The swarm's unlock key. + * + * @param string|null $unlockKey + * + * @return self + */ + public function setUnlockKey(?string $unlockKey): self + { + $this->initialized['unlockKey'] = true; + $this->unlockKey = $unlockKey; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmUnlockkeyGetResponse200.php b/generated/Model/SwarmUnlockkeyGetResponse200.php new file mode 100644 index 000000000..37706a925 --- /dev/null +++ b/generated/Model/SwarmUnlockkeyGetResponse200.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * The swarm's unlock key. + * + * @var string|null + */ + protected $unlockKey; + /** + * The swarm's unlock key. + * + * @return string|null + */ + public function getUnlockKey(): ?string + { + return $this->unlockKey; + } + /** + * The swarm's unlock key. + * + * @param string|null $unlockKey + * + * @return self + */ + public function setUnlockKey(?string $unlockKey): self + { + $this->initialized['unlockKey'] = true; + $this->unlockKey = $unlockKey; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmUpdateConfig.php b/generated/Model/SwarmUpdateConfig.php deleted file mode 100644 index 16d51efee..000000000 --- a/generated/Model/SwarmUpdateConfig.php +++ /dev/null @@ -1,151 +0,0 @@ -name; - } - - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } - - /** - * @return SwarmConfigSpecOrchestration - */ - public function getOrchestration() - { - return $this->orchestration; - } - - /** - * @param SwarmConfigSpecOrchestration $orchestration - * - * @return self - */ - public function setOrchestration(?SwarmConfigSpecOrchestration $orchestration = null) - { - $this->orchestration = $orchestration; - - return $this; - } - - /** - * @return SwarmConfigSpecRaft - */ - public function getRaft() - { - return $this->raft; - } - - /** - * @param SwarmConfigSpecRaft $raft - * - * @return self - */ - public function setRaft(?SwarmConfigSpecRaft $raft = null) - { - $this->raft = $raft; - - return $this; - } - - /** - * @return SwarmConfigSpecDispatcher - */ - public function getDispatcher() - { - return $this->dispatcher; - } - - /** - * @param SwarmConfigSpecDispatcher $dispatcher - * - * @return self - */ - public function setDispatcher(?SwarmConfigSpecDispatcher $dispatcher = null) - { - $this->dispatcher = $dispatcher; - - return $this; - } - - /** - * @return SwarmConfigSpecCAConfig - */ - public function getCAConfig() - { - return $this->cAConfig; - } - - /** - * @param SwarmConfigSpecCAConfig $cAConfig - * - * @return self - */ - public function setCAConfig(?SwarmConfigSpecCAConfig $cAConfig = null) - { - $this->cAConfig = $cAConfig; - - return $this; - } - - /** - * @return SwarmJoinTokens - */ - public function getJoinTokens() - { - return $this->joinTokens; - } - - /** - * @param SwarmJoinTokens $joinTokens - * - * @return self - */ - public function setJoinTokens(?SwarmJoinTokens $joinTokens = null) - { - $this->joinTokens = $joinTokens; - - return $this; - } -} diff --git a/generated/Model/SystemDfGetResponse200.php b/generated/Model/SystemDfGetResponse200.php new file mode 100644 index 000000000..a62574985 --- /dev/null +++ b/generated/Model/SystemDfGetResponse200.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * + * + * @var int|null + */ + protected $layersSize; + /** + * + * + * @var list|null + */ + protected $images; + /** + * + * + * @var list>|null + */ + protected $containers; + /** + * + * + * @var list|null + */ + protected $volumes; + /** + * + * + * @return int|null + */ + public function getLayersSize(): ?int + { + return $this->layersSize; + } + /** + * + * + * @param int|null $layersSize + * + * @return self + */ + public function setLayersSize(?int $layersSize): self + { + $this->initialized['layersSize'] = true; + $this->layersSize = $layersSize; + return $this; + } + /** + * + * + * @return list|null + */ + public function getImages(): ?array + { + return $this->images; + } + /** + * + * + * @param list|null $images + * + * @return self + */ + public function setImages(?array $images): self + { + $this->initialized['images'] = true; + $this->images = $images; + return $this; + } + /** + * + * + * @return list>|null + */ + public function getContainers(): ?array + { + return $this->containers; + } + /** + * + * + * @param list>|null $containers + * + * @return self + */ + public function setContainers(?array $containers): self + { + $this->initialized['containers'] = true; + $this->containers = $containers; + return $this; + } + /** + * + * + * @return list|null + */ + public function getVolumes(): ?array + { + return $this->volumes; + } + /** + * + * + * @param list|null $volumes + * + * @return self + */ + public function setVolumes(?array $volumes): self + { + $this->initialized['volumes'] = true; + $this->volumes = $volumes; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SystemInformation.php b/generated/Model/SystemInformation.php deleted file mode 100644 index 9581cad8b..000000000 --- a/generated/Model/SystemInformation.php +++ /dev/null @@ -1,1039 +0,0 @@ -architecture; - } - - /** - * @param string $architecture - * - * @return self - */ - public function setArchitecture($architecture = null) - { - $this->architecture = $architecture; - - return $this; - } - - /** - * @return string - */ - public function getClusterStore() - { - return $this->clusterStore; - } - - /** - * @param string $clusterStore - * - * @return self - */ - public function setClusterStore($clusterStore = null) - { - $this->clusterStore = $clusterStore; - - return $this; - } - - /** - * @return string - */ - public function getCgroupDriver() - { - return $this->cgroupDriver; - } - - /** - * @param string $cgroupDriver - * - * @return self - */ - public function setCgroupDriver($cgroupDriver = null) - { - $this->cgroupDriver = $cgroupDriver; - - return $this; - } - - /** - * @return int - */ - public function getContainers() - { - return $this->containers; - } - - /** - * @param int $containers - * - * @return self - */ - public function setContainers($containers = null) - { - $this->containers = $containers; - - return $this; - } - - /** - * @return int - */ - public function getContainersRunning() - { - return $this->containersRunning; - } - - /** - * @param int $containersRunning - * - * @return self - */ - public function setContainersRunning($containersRunning = null) - { - $this->containersRunning = $containersRunning; - - return $this; - } - - /** - * @return int - */ - public function getContainersStopped() - { - return $this->containersStopped; - } - - /** - * @param int $containersStopped - * - * @return self - */ - public function setContainersStopped($containersStopped = null) - { - $this->containersStopped = $containersStopped; - - return $this; - } - - /** - * @return int - */ - public function getContainersPaused() - { - return $this->containersPaused; - } - - /** - * @param int $containersPaused - * - * @return self - */ - public function setContainersPaused($containersPaused = null) - { - $this->containersPaused = $containersPaused; - - return $this; - } - - /** - * @return bool - */ - public function getCpuCfsPeriod() - { - return $this->cpuCfsPeriod; - } - - /** - * @param bool $cpuCfsPeriod - * - * @return self - */ - public function setCpuCfsPeriod($cpuCfsPeriod = null) - { - $this->cpuCfsPeriod = $cpuCfsPeriod; - - return $this; - } - - /** - * @return bool - */ - public function getCpuCfsQuota() - { - return $this->cpuCfsQuota; - } - - /** - * @param bool $cpuCfsQuota - * - * @return self - */ - public function setCpuCfsQuota($cpuCfsQuota = null) - { - $this->cpuCfsQuota = $cpuCfsQuota; - - return $this; - } - - /** - * @return bool - */ - public function getDebug() - { - return $this->debug; - } - - /** - * @param bool $debug - * - * @return self - */ - public function setDebug($debug = null) - { - $this->debug = $debug; - - return $this; - } - - /** - * @return string - */ - public function getDiscoveryBackend() - { - return $this->discoveryBackend; - } - - /** - * @param string $discoveryBackend - * - * @return self - */ - public function setDiscoveryBackend($discoveryBackend = null) - { - $this->discoveryBackend = $discoveryBackend; - - return $this; - } - - /** - * @return string - */ - public function getDockerRootDir() - { - return $this->dockerRootDir; - } - - /** - * @param string $dockerRootDir - * - * @return self - */ - public function setDockerRootDir($dockerRootDir = null) - { - $this->dockerRootDir = $dockerRootDir; - - return $this; - } - - /** - * @return string - */ - public function getDriver() - { - return $this->driver; - } - - /** - * @param string $driver - * - * @return self - */ - public function setDriver($driver = null) - { - $this->driver = $driver; - - return $this; - } - - /** - * @return string[][]|null[]|null - */ - public function getDriverStatus() - { - return $this->driverStatus; - } - - /** - * @param string[][]|null[]|null $driverStatus - * - * @return self - */ - public function setDriverStatus($driverStatus = null) - { - $this->driverStatus = $driverStatus; - - return $this; - } - - /** - * @return string[][]|null[]|null - */ - public function getSystemStatus() - { - return $this->systemStatus; - } - - /** - * @param string[][]|null[]|null $systemStatus - * - * @return self - */ - public function setSystemStatus($systemStatus = null) - { - $this->systemStatus = $systemStatus; - - return $this; - } - - /** - * @return bool - */ - public function getExperimentalBuild() - { - return $this->experimentalBuild; - } - - /** - * @param bool $experimentalBuild - * - * @return self - */ - public function setExperimentalBuild($experimentalBuild = null) - { - $this->experimentalBuild = $experimentalBuild; - - return $this; - } - - /** - * @return string - */ - public function getHttpProxy() - { - return $this->httpProxy; - } - - /** - * @param string $httpProxy - * - * @return self - */ - public function setHttpProxy($httpProxy = null) - { - $this->httpProxy = $httpProxy; - - return $this; - } - - /** - * @return string - */ - public function getHttpsProxy() - { - return $this->httpsProxy; - } - - /** - * @param string $httpsProxy - * - * @return self - */ - public function setHttpsProxy($httpsProxy = null) - { - $this->httpsProxy = $httpsProxy; - - return $this; - } - - /** - * @return string - */ - public function getID() - { - return $this->iD; - } - - /** - * @param string $iD - * - * @return self - */ - public function setID($iD = null) - { - $this->iD = $iD; - - return $this; - } - - /** - * @return bool - */ - public function getIPv4Forwarding() - { - return $this->iPv4Forwarding; - } - - /** - * @param bool $iPv4Forwarding - * - * @return self - */ - public function setIPv4Forwarding($iPv4Forwarding = null) - { - $this->iPv4Forwarding = $iPv4Forwarding; - - return $this; - } - - /** - * @return int - */ - public function getImages() - { - return $this->images; - } - - /** - * @param int $images - * - * @return self - */ - public function setImages($images = null) - { - $this->images = $images; - - return $this; - } - - /** - * @return string - */ - public function getIndexServerAddress() - { - return $this->indexServerAddress; - } - - /** - * @param string $indexServerAddress - * - * @return self - */ - public function setIndexServerAddress($indexServerAddress = null) - { - $this->indexServerAddress = $indexServerAddress; - - return $this; - } - - /** - * @return string - */ - public function getInitPath() - { - return $this->initPath; - } - - /** - * @param string $initPath - * - * @return self - */ - public function setInitPath($initPath = null) - { - $this->initPath = $initPath; - - return $this; - } - - /** - * @return string - */ - public function getInitSha1() - { - return $this->initSha1; - } - - /** - * @param string $initSha1 - * - * @return self - */ - public function setInitSha1($initSha1 = null) - { - $this->initSha1 = $initSha1; - - return $this; - } - - /** - * @return bool - */ - public function getKernelMemory() - { - return $this->kernelMemory; - } - - /** - * @param bool $kernelMemory - * - * @return self - */ - public function setKernelMemory($kernelMemory = null) - { - $this->kernelMemory = $kernelMemory; - - return $this; - } - - /** - * @return string - */ - public function getKernelVersion() - { - return $this->kernelVersion; - } - - /** - * @param string $kernelVersion - * - * @return self - */ - public function setKernelVersion($kernelVersion = null) - { - $this->kernelVersion = $kernelVersion; - - return $this; - } - - /** - * @return string[]|null - */ - public function getLabels() - { - return $this->labels; - } - - /** - * @param string[]|null $labels - * - * @return self - */ - public function setLabels($labels = null) - { - $this->labels = $labels; - - return $this; - } - - /** - * @return int - */ - public function getMemTotal() - { - return $this->memTotal; - } - - /** - * @param int $memTotal - * - * @return self - */ - public function setMemTotal($memTotal = null) - { - $this->memTotal = $memTotal; - - return $this; - } - - /** - * @return bool - */ - public function getMemoryLimit() - { - return $this->memoryLimit; - } - - /** - * @param bool $memoryLimit - * - * @return self - */ - public function setMemoryLimit($memoryLimit = null) - { - $this->memoryLimit = $memoryLimit; - - return $this; - } - - /** - * @return int - */ - public function getNCPU() - { - return $this->nCPU; - } - - /** - * @param int $nCPU - * - * @return self - */ - public function setNCPU($nCPU = null) - { - $this->nCPU = $nCPU; - - return $this; - } - - /** - * @return int - */ - public function getNEventsListener() - { - return $this->nEventsListener; - } - - /** - * @param int $nEventsListener - * - * @return self - */ - public function setNEventsListener($nEventsListener = null) - { - $this->nEventsListener = $nEventsListener; - - return $this; - } - - /** - * @return int - */ - public function getNFd() - { - return $this->nFd; - } - - /** - * @param int $nFd - * - * @return self - */ - public function setNFd($nFd = null) - { - $this->nFd = $nFd; - - return $this; - } - - /** - * @return int - */ - public function getNGoroutines() - { - return $this->nGoroutines; - } - - /** - * @param int $nGoroutines - * - * @return self - */ - public function setNGoroutines($nGoroutines = null) - { - $this->nGoroutines = $nGoroutines; - - return $this; - } - - /** - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } - - /** - * @return string - */ - public function getNoProxy() - { - return $this->noProxy; - } - - /** - * @param string $noProxy - * - * @return self - */ - public function setNoProxy($noProxy = null) - { - $this->noProxy = $noProxy; - - return $this; - } - - /** - * @return bool - */ - public function getOomKillDisable() - { - return $this->oomKillDisable; - } - - /** - * @param bool $oomKillDisable - * - * @return self - */ - public function setOomKillDisable($oomKillDisable = null) - { - $this->oomKillDisable = $oomKillDisable; - - return $this; - } - - /** - * @return string - */ - public function getOSType() - { - return $this->oSType; - } - - /** - * @param string $oSType - * - * @return self - */ - public function setOSType($oSType = null) - { - $this->oSType = $oSType; - - return $this; - } - - /** - * @return string - */ - public function getOperatingSystem() - { - return $this->operatingSystem; - } - - /** - * @param string $operatingSystem - * - * @return self - */ - public function setOperatingSystem($operatingSystem = null) - { - $this->operatingSystem = $operatingSystem; - - return $this; - } - - /** - * @return RegistryConfig - */ - public function getRegistryConfig() - { - return $this->registryConfig; - } - - /** - * @param RegistryConfig $registryConfig - * - * @return self - */ - public function setRegistryConfig(?RegistryConfig $registryConfig = null) - { - $this->registryConfig = $registryConfig; - - return $this; - } - - /** - * @return string[]|null - */ - public function getSecurityOptions() - { - return $this->securityOptions; - } - - /** - * @param string[]|null $securityOptions - * - * @return self - */ - public function setSecurityOptions($securityOptions = null) - { - $this->securityOptions = $securityOptions; - - return $this; - } - - /** - * @return bool - */ - public function getSwapLimit() - { - return $this->swapLimit; - } - - /** - * @param bool $swapLimit - * - * @return self - */ - public function setSwapLimit($swapLimit = null) - { - $this->swapLimit = $swapLimit; - - return $this; - } - - /** - * @return string - */ - public function getSystemTime() - { - return $this->systemTime; - } - - /** - * @param string $systemTime - * - * @return self - */ - public function setSystemTime($systemTime = null) - { - $this->systemTime = $systemTime; - - return $this; - } - - /** - * @return string - */ - public function getServerVersion() - { - return $this->serverVersion; - } - - /** - * @param string $serverVersion - * - * @return self - */ - public function setServerVersion($serverVersion = null) - { - $this->serverVersion = $serverVersion; - - return $this; - } -} diff --git a/generated/Model/Task.php b/generated/Model/Task.php index 53c4d50b9..0b7c4a4e6 100644 --- a/generated/Model/Task.php +++ b/generated/Model/Task.php @@ -5,339 +5,347 @@ class Task { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * The ID of the task. + * + * @var string|null */ protected $iD; /** - * @var NodeVersion + * + * + * @var TaskVersion|null */ protected $version; /** - * @var \DateTime + * + * + * @var string|null */ protected $createdAt; /** - * @var \DateTime + * + * + * @var string|null */ protected $updatedAt; /** - * @var string + * Name of the task. + * + * @var string|null */ protected $name; /** - * @var TaskSpec + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * User modifiable task configuration. + * + * @var TaskSpec|null */ protected $spec; /** - * @var string + * The ID of the service this task is part of. + * + * @var string|null */ protected $serviceID; /** - * @var int + * + * + * @var int|null */ - protected $instance; + protected $slot; /** - * @var string + * The ID of the node that this task is on. + * + * @var string|null */ protected $nodeID; /** - * @var Annotations - */ - protected $serviceAnnotations; - /** - * @var TaskStatus + * + * + * @var TaskStatus|null */ protected $status; /** - * @var string + * + * + * @var string|null */ protected $desiredState; /** - * @var NetworkAttachment[]|null - */ - protected $networksAttachments; - /** - * @var Endpoint - */ - protected $endpoint; - - /** - * @return string + * The ID of the task. + * + * @return string|null */ - public function getID() + public function getID(): ?string { return $this->iD; } - /** - * @param string $iD + * The ID of the task. + * + * @param string|null $iD * * @return self */ - public function setID($iD = null) + public function setID(?string $iD): self { + $this->initialized['iD'] = true; $this->iD = $iD; - return $this; } - /** - * @return NodeVersion + * + * + * @return TaskVersion|null */ - public function getVersion() + public function getVersion(): ?TaskVersion { return $this->version; } - /** - * @param NodeVersion $version + * + * + * @param TaskVersion|null $version * * @return self */ - public function setVersion(?NodeVersion $version = null) + public function setVersion(?TaskVersion $version): self { + $this->initialized['version'] = true; $this->version = $version; - return $this; } - /** - * @return \DateTime + * + * + * @return string|null */ - public function getCreatedAt() + public function getCreatedAt(): ?string { return $this->createdAt; } - /** - * @param \DateTime $createdAt + * + * + * @param string|null $createdAt * * @return self */ - public function setCreatedAt(?\DateTime $createdAt = null) + public function setCreatedAt(?string $createdAt): self { + $this->initialized['createdAt'] = true; $this->createdAt = $createdAt; - return $this; } - /** - * @return \DateTime + * + * + * @return string|null */ - public function getUpdatedAt() + public function getUpdatedAt(): ?string { return $this->updatedAt; } - /** - * @param \DateTime $updatedAt + * + * + * @param string|null $updatedAt * * @return self */ - public function setUpdatedAt(?\DateTime $updatedAt = null) + public function setUpdatedAt(?string $updatedAt): self { + $this->initialized['updatedAt'] = true; $this->updatedAt = $updatedAt; - return $this; } - /** - * @return string + * Name of the task. + * + * @return string|null */ - public function getName() + public function getName(): ?string { return $this->name; } - /** - * @param string $name + * Name of the task. + * + * @param string|null $name * * @return self */ - public function setName($name = null) + public function setName(?string $name): self { + $this->initialized['name'] = true; $this->name = $name; - return $this; } - /** - * @return TaskSpec + * User-defined key/value metadata. + * + * @return array|null */ - public function getSpec() + public function getLabels(): ?iterable { - return $this->spec; + return $this->labels; } - /** - * @param TaskSpec $spec + * User-defined key/value metadata. + * + * @param array|null $labels * * @return self */ - public function setSpec(?TaskSpec $spec = null) + public function setLabels(?iterable $labels): self { - $this->spec = $spec; - + $this->initialized['labels'] = true; + $this->labels = $labels; return $this; } - /** - * @return string + * User modifiable task configuration. + * + * @return TaskSpec|null */ - public function getServiceID() + public function getSpec(): ?TaskSpec { - return $this->serviceID; + return $this->spec; } - /** - * @param string $serviceID + * User modifiable task configuration. + * + * @param TaskSpec|null $spec * * @return self */ - public function setServiceID($serviceID = null) + public function setSpec(?TaskSpec $spec): self { - $this->serviceID = $serviceID; - + $this->initialized['spec'] = true; + $this->spec = $spec; return $this; } - /** - * @return int + * The ID of the service this task is part of. + * + * @return string|null */ - public function getInstance() + public function getServiceID(): ?string { - return $this->instance; + return $this->serviceID; } - /** - * @param int $instance + * The ID of the service this task is part of. + * + * @param string|null $serviceID * * @return self */ - public function setInstance($instance = null) + public function setServiceID(?string $serviceID): self { - $this->instance = $instance; - + $this->initialized['serviceID'] = true; + $this->serviceID = $serviceID; return $this; } - /** - * @return string + * + * + * @return int|null */ - public function getNodeID() + public function getSlot(): ?int { - return $this->nodeID; + return $this->slot; } - /** - * @param string $nodeID + * + * + * @param int|null $slot * * @return self */ - public function setNodeID($nodeID = null) + public function setSlot(?int $slot): self { - $this->nodeID = $nodeID; - + $this->initialized['slot'] = true; + $this->slot = $slot; return $this; } - /** - * @return Annotations + * The ID of the node that this task is on. + * + * @return string|null */ - public function getServiceAnnotations() + public function getNodeID(): ?string { - return $this->serviceAnnotations; + return $this->nodeID; } - /** - * @param Annotations $serviceAnnotations + * The ID of the node that this task is on. + * + * @param string|null $nodeID * * @return self */ - public function setServiceAnnotations(?Annotations $serviceAnnotations = null) + public function setNodeID(?string $nodeID): self { - $this->serviceAnnotations = $serviceAnnotations; - + $this->initialized['nodeID'] = true; + $this->nodeID = $nodeID; return $this; } - /** - * @return TaskStatus + * + * + * @return TaskStatus|null */ - public function getStatus() + public function getStatus(): ?TaskStatus { return $this->status; } - /** - * @param TaskStatus $status + * + * + * @param TaskStatus|null $status * * @return self */ - public function setStatus(?TaskStatus $status = null) + public function setStatus(?TaskStatus $status): self { + $this->initialized['status'] = true; $this->status = $status; - return $this; } - - /** - * @return string - */ - public function getDesiredState() - { - return $this->desiredState; - } - /** - * @param string $desiredState + * * - * @return self - */ - public function setDesiredState($desiredState = null) - { - $this->desiredState = $desiredState; - - return $this; - } - - /** - * @return NetworkAttachment[]|null + * @return string|null */ - public function getNetworksAttachments() + public function getDesiredState(): ?string { - return $this->networksAttachments; + return $this->desiredState; } - /** - * @param NetworkAttachment[]|null $networksAttachments + * * - * @return self - */ - public function setNetworksAttachments($networksAttachments = null) - { - $this->networksAttachments = $networksAttachments; - - return $this; - } - - /** - * @return Endpoint - */ - public function getEndpoint() - { - return $this->endpoint; - } - - /** - * @param Endpoint $endpoint + * @param string|null $desiredState * * @return self */ - public function setEndpoint(?Endpoint $endpoint = null) + public function setDesiredState(?string $desiredState): self { - $this->endpoint = $endpoint; - + $this->initialized['desiredState'] = true; + $this->desiredState = $desiredState; return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/TaskSpec.php b/generated/Model/TaskSpec.php index 344ab8a83..c0fba2aa9 100644 --- a/generated/Model/TaskSpec.php +++ b/generated/Model/TaskSpec.php @@ -5,99 +5,207 @@ class TaskSpec { /** - * @var ContainerSpec + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var TaskSpecContainerSpec|null */ protected $containerSpec; /** - * @var TaskSpecResourceRequirements + * Resource requirements which apply to each individual container created as part of the service. + * + * @var TaskSpecResources|null */ protected $resources; /** - * @var TaskSpecRestartPolicy + * Specification for the restart policy which applies to containers created as part of this service. + * + * @var TaskSpecRestartPolicy|null */ protected $restartPolicy; /** - * @var TaskSpecPlacement + * + * + * @var TaskSpecPlacement|null */ protected $placement; - /** - * @return ContainerSpec + * A counter that triggers an update even if no relevant parameters have been changed. + * + * @var int|null + */ + protected $forceUpdate; + /** + * + * + * @var list|null + */ + protected $networks; + /** + * Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified. + * + * @var TaskSpecLogDriver|null + */ + protected $logDriver; + /** + * + * + * @return TaskSpecContainerSpec|null */ - public function getContainerSpec() + public function getContainerSpec(): ?TaskSpecContainerSpec { return $this->containerSpec; } - /** - * @param ContainerSpec $containerSpec + * + * + * @param TaskSpecContainerSpec|null $containerSpec * * @return self */ - public function setContainerSpec(?ContainerSpec $containerSpec = null) + public function setContainerSpec(?TaskSpecContainerSpec $containerSpec): self { + $this->initialized['containerSpec'] = true; $this->containerSpec = $containerSpec; - return $this; } - /** - * @return TaskSpecResourceRequirements + * Resource requirements which apply to each individual container created as part of the service. + * + * @return TaskSpecResources|null */ - public function getResources() + public function getResources(): ?TaskSpecResources { return $this->resources; } - /** - * @param TaskSpecResourceRequirements $resources + * Resource requirements which apply to each individual container created as part of the service. + * + * @param TaskSpecResources|null $resources * * @return self */ - public function setResources(?TaskSpecResourceRequirements $resources = null) + public function setResources(?TaskSpecResources $resources): self { + $this->initialized['resources'] = true; $this->resources = $resources; - return $this; } - /** - * @return TaskSpecRestartPolicy + * Specification for the restart policy which applies to containers created as part of this service. + * + * @return TaskSpecRestartPolicy|null */ - public function getRestartPolicy() + public function getRestartPolicy(): ?TaskSpecRestartPolicy { return $this->restartPolicy; } - /** - * @param TaskSpecRestartPolicy $restartPolicy + * Specification for the restart policy which applies to containers created as part of this service. + * + * @param TaskSpecRestartPolicy|null $restartPolicy * * @return self */ - public function setRestartPolicy(?TaskSpecRestartPolicy $restartPolicy = null) + public function setRestartPolicy(?TaskSpecRestartPolicy $restartPolicy): self { + $this->initialized['restartPolicy'] = true; $this->restartPolicy = $restartPolicy; - return $this; } - /** - * @return TaskSpecPlacement + * + * + * @return TaskSpecPlacement|null */ - public function getPlacement() + public function getPlacement(): ?TaskSpecPlacement { return $this->placement; } - /** - * @param TaskSpecPlacement $placement + * + * + * @param TaskSpecPlacement|null $placement * * @return self */ - public function setPlacement(?TaskSpecPlacement $placement = null) + public function setPlacement(?TaskSpecPlacement $placement): self { + $this->initialized['placement'] = true; $this->placement = $placement; - return $this; } -} + /** + * A counter that triggers an update even if no relevant parameters have been changed. + * + * @return int|null + */ + public function getForceUpdate(): ?int + { + return $this->forceUpdate; + } + /** + * A counter that triggers an update even if no relevant parameters have been changed. + * + * @param int|null $forceUpdate + * + * @return self + */ + public function setForceUpdate(?int $forceUpdate): self + { + $this->initialized['forceUpdate'] = true; + $this->forceUpdate = $forceUpdate; + return $this; + } + /** + * + * + * @return list|null + */ + public function getNetworks(): ?array + { + return $this->networks; + } + /** + * + * + * @param list|null $networks + * + * @return self + */ + public function setNetworks(?array $networks): self + { + $this->initialized['networks'] = true; + $this->networks = $networks; + return $this; + } + /** + * Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified. + * + * @return TaskSpecLogDriver|null + */ + public function getLogDriver(): ?TaskSpecLogDriver + { + return $this->logDriver; + } + /** + * Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified. + * + * @param TaskSpecLogDriver|null $logDriver + * + * @return self + */ + public function setLogDriver(?TaskSpecLogDriver $logDriver): self + { + $this->initialized['logDriver'] = true; + $this->logDriver = $logDriver; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecContainerSpec.php b/generated/Model/TaskSpecContainerSpec.php new file mode 100644 index 000000000..fe97adac5 --- /dev/null +++ b/generated/Model/TaskSpecContainerSpec.php @@ -0,0 +1,323 @@ +initialized); + } + /** + * The image name to use for the container. + * + * @var string|null + */ + protected $image; + /** + * The command to be run in the image. + * + * @var list|null + */ + protected $command; + /** + * Arguments to the command. + * + * @var list|null + */ + protected $args; + /** + * A list of environment variables in the form `VAR=value`. + * + * @var list|null + */ + protected $env; + /** + * The working directory for commands to run in. + * + * @var string|null + */ + protected $dir; + /** + * The user inside the container. + * + * @var string|null + */ + protected $user; + /** + * User-defined key/value data. + * + * @var array|null + */ + protected $labels; + /** + * Whether a pseudo-TTY should be allocated. + * + * @var bool|null + */ + protected $tTY; + /** + * Specification for mounts to be added to containers created as part of the service. + * + * @var list|null + */ + protected $mounts; + /** + * Amount of time to wait for the container to terminate before forcefully killing it. + * + * @var int|null + */ + protected $stopGracePeriod; + /** + * Specification for DNS related configurations in resolver configuration file (`resolv.conf`). + * + * @var TaskSpecContainerSpecDNSConfig|null + */ + protected $dNSConfig; + /** + * The image name to use for the container. + * + * @return string|null + */ + public function getImage(): ?string + { + return $this->image; + } + /** + * The image name to use for the container. + * + * @param string|null $image + * + * @return self + */ + public function setImage(?string $image): self + { + $this->initialized['image'] = true; + $this->image = $image; + return $this; + } + /** + * The command to be run in the image. + * + * @return list|null + */ + public function getCommand(): ?array + { + return $this->command; + } + /** + * The command to be run in the image. + * + * @param list|null $command + * + * @return self + */ + public function setCommand(?array $command): self + { + $this->initialized['command'] = true; + $this->command = $command; + return $this; + } + /** + * Arguments to the command. + * + * @return list|null + */ + public function getArgs(): ?array + { + return $this->args; + } + /** + * Arguments to the command. + * + * @param list|null $args + * + * @return self + */ + public function setArgs(?array $args): self + { + $this->initialized['args'] = true; + $this->args = $args; + return $this; + } + /** + * A list of environment variables in the form `VAR=value`. + * + * @return list|null + */ + public function getEnv(): ?array + { + return $this->env; + } + /** + * A list of environment variables in the form `VAR=value`. + * + * @param list|null $env + * + * @return self + */ + public function setEnv(?array $env): self + { + $this->initialized['env'] = true; + $this->env = $env; + return $this; + } + /** + * The working directory for commands to run in. + * + * @return string|null + */ + public function getDir(): ?string + { + return $this->dir; + } + /** + * The working directory for commands to run in. + * + * @param string|null $dir + * + * @return self + */ + public function setDir(?string $dir): self + { + $this->initialized['dir'] = true; + $this->dir = $dir; + return $this; + } + /** + * The user inside the container. + * + * @return string|null + */ + public function getUser(): ?string + { + return $this->user; + } + /** + * The user inside the container. + * + * @param string|null $user + * + * @return self + */ + public function setUser(?string $user): self + { + $this->initialized['user'] = true; + $this->user = $user; + return $this; + } + /** + * User-defined key/value data. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value data. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * Whether a pseudo-TTY should be allocated. + * + * @return bool|null + */ + public function getTTY(): ?bool + { + return $this->tTY; + } + /** + * Whether a pseudo-TTY should be allocated. + * + * @param bool|null $tTY + * + * @return self + */ + public function setTTY(?bool $tTY): self + { + $this->initialized['tTY'] = true; + $this->tTY = $tTY; + return $this; + } + /** + * Specification for mounts to be added to containers created as part of the service. + * + * @return list|null + */ + public function getMounts(): ?array + { + return $this->mounts; + } + /** + * Specification for mounts to be added to containers created as part of the service. + * + * @param list|null $mounts + * + * @return self + */ + public function setMounts(?array $mounts): self + { + $this->initialized['mounts'] = true; + $this->mounts = $mounts; + return $this; + } + /** + * Amount of time to wait for the container to terminate before forcefully killing it. + * + * @return int|null + */ + public function getStopGracePeriod(): ?int + { + return $this->stopGracePeriod; + } + /** + * Amount of time to wait for the container to terminate before forcefully killing it. + * + * @param int|null $stopGracePeriod + * + * @return self + */ + public function setStopGracePeriod(?int $stopGracePeriod): self + { + $this->initialized['stopGracePeriod'] = true; + $this->stopGracePeriod = $stopGracePeriod; + return $this; + } + /** + * Specification for DNS related configurations in resolver configuration file (`resolv.conf`). + * + * @return TaskSpecContainerSpecDNSConfig|null + */ + public function getDNSConfig(): ?TaskSpecContainerSpecDNSConfig + { + return $this->dNSConfig; + } + /** + * Specification for DNS related configurations in resolver configuration file (`resolv.conf`). + * + * @param TaskSpecContainerSpecDNSConfig|null $dNSConfig + * + * @return self + */ + public function setDNSConfig(?TaskSpecContainerSpecDNSConfig $dNSConfig): self + { + $this->initialized['dNSConfig'] = true; + $this->dNSConfig = $dNSConfig; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecContainerSpecDNSConfig.php b/generated/Model/TaskSpecContainerSpecDNSConfig.php new file mode 100644 index 000000000..730b5e301 --- /dev/null +++ b/generated/Model/TaskSpecContainerSpecDNSConfig.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * The IP addresses of the name servers. + * + * @var list|null + */ + protected $nameservers; + /** + * A search list for host-name lookup. + * + * @var list|null + */ + protected $search; + /** + * A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.). + * + * @var list|null + */ + protected $options; + /** + * The IP addresses of the name servers. + * + * @return list|null + */ + public function getNameservers(): ?array + { + return $this->nameservers; + } + /** + * The IP addresses of the name servers. + * + * @param list|null $nameservers + * + * @return self + */ + public function setNameservers(?array $nameservers): self + { + $this->initialized['nameservers'] = true; + $this->nameservers = $nameservers; + return $this; + } + /** + * A search list for host-name lookup. + * + * @return list|null + */ + public function getSearch(): ?array + { + return $this->search; + } + /** + * A search list for host-name lookup. + * + * @param list|null $search + * + * @return self + */ + public function setSearch(?array $search): self + { + $this->initialized['search'] = true; + $this->search = $search; + return $this; + } + /** + * A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.). + * + * @return list|null + */ + public function getOptions(): ?array + { + return $this->options; + } + /** + * A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.). + * + * @param list|null $options + * + * @return self + */ + public function setOptions(?array $options): self + { + $this->initialized['options'] = true; + $this->options = $options; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecLogDriver.php b/generated/Model/TaskSpecLogDriver.php new file mode 100644 index 000000000..d05438448 --- /dev/null +++ b/generated/Model/TaskSpecLogDriver.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $name; + /** + * + * + * @var array|null + */ + protected $options; + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * + * + * @return array|null + */ + public function getOptions(): ?iterable + { + return $this->options; + } + /** + * + * + * @param array|null $options + * + * @return self + */ + public function setOptions(?iterable $options): self + { + $this->initialized['options'] = true; + $this->options = $options; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecNetworksItem.php b/generated/Model/TaskSpecNetworksItem.php new file mode 100644 index 000000000..e85d3b150 --- /dev/null +++ b/generated/Model/TaskSpecNetworksItem.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $target; + /** + * + * + * @var list|null + */ + protected $aliases; + /** + * + * + * @return string|null + */ + public function getTarget(): ?string + { + return $this->target; + } + /** + * + * + * @param string|null $target + * + * @return self + */ + public function setTarget(?string $target): self + { + $this->initialized['target'] = true; + $this->target = $target; + return $this; + } + /** + * + * + * @return list|null + */ + public function getAliases(): ?array + { + return $this->aliases; + } + /** + * + * + * @param list|null $aliases + * + * @return self + */ + public function setAliases(?array $aliases): self + { + $this->initialized['aliases'] = true; + $this->aliases = $aliases; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecPlacement.php b/generated/Model/TaskSpecPlacement.php index 847e03554..4b0fe9dbe 100644 --- a/generated/Model/TaskSpecPlacement.php +++ b/generated/Model/TaskSpecPlacement.php @@ -5,27 +5,39 @@ class TaskSpecPlacement { /** - * @var string[]|null + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * An array of constraints. + * + * @var list|null */ protected $constraints; - /** - * @return string[]|null + * An array of constraints. + * + * @return list|null */ - public function getConstraints() + public function getConstraints(): ?array { return $this->constraints; } - /** - * @param string[]|null $constraints + * An array of constraints. + * + * @param list|null $constraints * * @return self */ - public function setConstraints($constraints = null) + public function setConstraints(?array $constraints): self { + $this->initialized['constraints'] = true; $this->constraints = $constraints; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/TaskSpecResourceRequirements.php b/generated/Model/TaskSpecResourceRequirements.php deleted file mode 100644 index 570602a49..000000000 --- a/generated/Model/TaskSpecResourceRequirements.php +++ /dev/null @@ -1,55 +0,0 @@ -limits; - } - - /** - * @param NodeResources $limits - * - * @return self - */ - public function setLimits(?NodeResources $limits = null) - { - $this->limits = $limits; - - return $this; - } - - /** - * @return NodeResources - */ - public function getReservations() - { - return $this->reservations; - } - - /** - * @param NodeResources $reservations - * - * @return self - */ - public function setReservations(?NodeResources $reservations = null) - { - $this->reservations = $reservations; - - return $this; - } -} diff --git a/generated/Model/TaskSpecResources.php b/generated/Model/TaskSpecResources.php new file mode 100644 index 000000000..77f0b20c8 --- /dev/null +++ b/generated/Model/TaskSpecResources.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * Define resources limits. + * + * @var TaskSpecResourcesLimits|null + */ + protected $limits; + /** + * Define resources reservation. + * + * @var TaskSpecResourcesReservations|null + */ + protected $reservations; + /** + * Define resources limits. + * + * @return TaskSpecResourcesLimits|null + */ + public function getLimits(): ?TaskSpecResourcesLimits + { + return $this->limits; + } + /** + * Define resources limits. + * + * @param TaskSpecResourcesLimits|null $limits + * + * @return self + */ + public function setLimits(?TaskSpecResourcesLimits $limits): self + { + $this->initialized['limits'] = true; + $this->limits = $limits; + return $this; + } + /** + * Define resources reservation. + * + * @return TaskSpecResourcesReservations|null + */ + public function getReservations(): ?TaskSpecResourcesReservations + { + return $this->reservations; + } + /** + * Define resources reservation. + * + * @param TaskSpecResourcesReservations|null $reservations + * + * @return self + */ + public function setReservations(?TaskSpecResourcesReservations $reservations): self + { + $this->initialized['reservations'] = true; + $this->reservations = $reservations; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecResourcesLimits.php b/generated/Model/TaskSpecResourcesLimits.php new file mode 100644 index 000000000..748bf3ff3 --- /dev/null +++ b/generated/Model/TaskSpecResourcesLimits.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * CPU limit in units of 10-9 CPU shares. + * + * @var int|null + */ + protected $nanoCPUs; + /** + * Memory limit in Bytes. + * + * @var int|null + */ + protected $memoryBytes; + /** + * CPU limit in units of 10-9 CPU shares. + * + * @return int|null + */ + public function getNanoCPUs(): ?int + { + return $this->nanoCPUs; + } + /** + * CPU limit in units of 10-9 CPU shares. + * + * @param int|null $nanoCPUs + * + * @return self + */ + public function setNanoCPUs(?int $nanoCPUs): self + { + $this->initialized['nanoCPUs'] = true; + $this->nanoCPUs = $nanoCPUs; + return $this; + } + /** + * Memory limit in Bytes. + * + * @return int|null + */ + public function getMemoryBytes(): ?int + { + return $this->memoryBytes; + } + /** + * Memory limit in Bytes. + * + * @param int|null $memoryBytes + * + * @return self + */ + public function setMemoryBytes(?int $memoryBytes): self + { + $this->initialized['memoryBytes'] = true; + $this->memoryBytes = $memoryBytes; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecResourcesReservations.php b/generated/Model/TaskSpecResourcesReservations.php new file mode 100644 index 000000000..a7766dab7 --- /dev/null +++ b/generated/Model/TaskSpecResourcesReservations.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * CPU reservation in units of 10-9 CPU shares. + * + * @var int|null + */ + protected $nanoCPUs; + /** + * Memory reservation in Bytes. + * + * @var int|null + */ + protected $memoryBytes; + /** + * CPU reservation in units of 10-9 CPU shares. + * + * @return int|null + */ + public function getNanoCPUs(): ?int + { + return $this->nanoCPUs; + } + /** + * CPU reservation in units of 10-9 CPU shares. + * + * @param int|null $nanoCPUs + * + * @return self + */ + public function setNanoCPUs(?int $nanoCPUs): self + { + $this->initialized['nanoCPUs'] = true; + $this->nanoCPUs = $nanoCPUs; + return $this; + } + /** + * Memory reservation in Bytes. + * + * @return int|null + */ + public function getMemoryBytes(): ?int + { + return $this->memoryBytes; + } + /** + * Memory reservation in Bytes. + * + * @param int|null $memoryBytes + * + * @return self + */ + public function setMemoryBytes(?int $memoryBytes): self + { + $this->initialized['memoryBytes'] = true; + $this->memoryBytes = $memoryBytes; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecRestartPolicy.php b/generated/Model/TaskSpecRestartPolicy.php index 147917169..c088edfb1 100644 --- a/generated/Model/TaskSpecRestartPolicy.php +++ b/generated/Model/TaskSpecRestartPolicy.php @@ -5,99 +5,123 @@ class TaskSpecRestartPolicy { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * Condition for restart. + * + * @var string|null */ protected $condition; /** - * @var int + * Delay between restart attempts. + * + * @var int|null */ protected $delay; /** - * @var int + * Maximum attempts to restart a given container before giving up (default value is 0, which is ignored). + * + * @var int|null */ - protected $maxAttempts; + protected $maxAttempts = 0; /** - * @var int + * Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded). + * + * @var int|null */ - protected $window; - + protected $window = 0; /** - * @return string + * Condition for restart. + * + * @return string|null */ - public function getCondition() + public function getCondition(): ?string { return $this->condition; } - /** - * @param string $condition + * Condition for restart. + * + * @param string|null $condition * * @return self */ - public function setCondition($condition = null) + public function setCondition(?string $condition): self { + $this->initialized['condition'] = true; $this->condition = $condition; - return $this; } - /** - * @return int + * Delay between restart attempts. + * + * @return int|null */ - public function getDelay() + public function getDelay(): ?int { return $this->delay; } - /** - * @param int $delay + * Delay between restart attempts. + * + * @param int|null $delay * * @return self */ - public function setDelay($delay = null) + public function setDelay(?int $delay): self { + $this->initialized['delay'] = true; $this->delay = $delay; - return $this; } - /** - * @return int + * Maximum attempts to restart a given container before giving up (default value is 0, which is ignored). + * + * @return int|null */ - public function getMaxAttempts() + public function getMaxAttempts(): ?int { return $this->maxAttempts; } - /** - * @param int $maxAttempts + * Maximum attempts to restart a given container before giving up (default value is 0, which is ignored). + * + * @param int|null $maxAttempts * * @return self */ - public function setMaxAttempts($maxAttempts = null) + public function setMaxAttempts(?int $maxAttempts): self { + $this->initialized['maxAttempts'] = true; $this->maxAttempts = $maxAttempts; - return $this; } - /** - * @return int + * Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded). + * + * @return int|null */ - public function getWindow() + public function getWindow(): ?int { return $this->window; } - /** - * @param int $window + * Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded). + * + * @param int|null $window * * @return self */ - public function setWindow($window = null) + public function setWindow(?int $window): self { + $this->initialized['window'] = true; $this->window = $window; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/TaskStatus.php b/generated/Model/TaskStatus.php index 82873456d..356bbd943 100644 --- a/generated/Model/TaskStatus.php +++ b/generated/Model/TaskStatus.php @@ -5,123 +5,151 @@ class TaskStatus { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * + * + * @var string|null */ protected $timestamp; /** - * @var string + * + * + * @var string|null */ protected $state; /** - * @var string + * + * + * @var string|null */ protected $message; /** - * @var string + * + * + * @var string|null */ protected $err; /** - * @var ContainerStatus + * + * + * @var TaskStatusContainerStatus|null */ protected $containerStatus; - /** - * @return string + * + * + * @return string|null */ - public function getTimestamp() + public function getTimestamp(): ?string { return $this->timestamp; } - /** - * @param string $timestamp + * + * + * @param string|null $timestamp * * @return self */ - public function setTimestamp($timestamp = null) + public function setTimestamp(?string $timestamp): self { + $this->initialized['timestamp'] = true; $this->timestamp = $timestamp; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getState() + public function getState(): ?string { return $this->state; } - /** - * @param string $state + * + * + * @param string|null $state * * @return self */ - public function setState($state = null) + public function setState(?string $state): self { + $this->initialized['state'] = true; $this->state = $state; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getMessage() + public function getMessage(): ?string { return $this->message; } - /** - * @param string $message + * + * + * @param string|null $message * * @return self */ - public function setMessage($message = null) + public function setMessage(?string $message): self { + $this->initialized['message'] = true; $this->message = $message; - return $this; } - /** - * @return string + * + * + * @return string|null */ - public function getErr() + public function getErr(): ?string { return $this->err; } - /** - * @param string $err + * + * + * @param string|null $err * * @return self */ - public function setErr($err = null) + public function setErr(?string $err): self { + $this->initialized['err'] = true; $this->err = $err; - return $this; } - /** - * @return ContainerStatus + * + * + * @return TaskStatusContainerStatus|null */ - public function getContainerStatus() + public function getContainerStatus(): ?TaskStatusContainerStatus { return $this->containerStatus; } - /** - * @param ContainerStatus $containerStatus + * + * + * @param TaskStatusContainerStatus|null $containerStatus * * @return self */ - public function setContainerStatus(?ContainerStatus $containerStatus = null) + public function setContainerStatus(?TaskStatusContainerStatus $containerStatus): self { + $this->initialized['containerStatus'] = true; $this->containerStatus = $containerStatus; - return $this; } -} +} \ No newline at end of file diff --git a/generated/Model/TaskStatusContainerStatus.php b/generated/Model/TaskStatusContainerStatus.php new file mode 100644 index 000000000..918c63278 --- /dev/null +++ b/generated/Model/TaskStatusContainerStatus.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $containerID; + /** + * + * + * @var int|null + */ + protected $pID; + /** + * + * + * @var int|null + */ + protected $exitCode; + /** + * + * + * @return string|null + */ + public function getContainerID(): ?string + { + return $this->containerID; + } + /** + * + * + * @param string|null $containerID + * + * @return self + */ + public function setContainerID(?string $containerID): self + { + $this->initialized['containerID'] = true; + $this->containerID = $containerID; + return $this; + } + /** + * + * + * @return int|null + */ + public function getPID(): ?int + { + return $this->pID; + } + /** + * + * + * @param int|null $pID + * + * @return self + */ + public function setPID(?int $pID): self + { + $this->initialized['pID'] = true; + $this->pID = $pID; + return $this; + } + /** + * + * + * @return int|null + */ + public function getExitCode(): ?int + { + return $this->exitCode; + } + /** + * + * + * @param int|null $exitCode + * + * @return self + */ + public function setExitCode(?int $exitCode): self + { + $this->initialized['exitCode'] = true; + $this->exitCode = $exitCode; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskVersion.php b/generated/Model/TaskVersion.php new file mode 100644 index 000000000..fc464cc69 --- /dev/null +++ b/generated/Model/TaskVersion.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * + * + * @var int|null + */ + protected $index; + /** + * + * + * @return int|null + */ + public function getIndex(): ?int + { + return $this->index; + } + /** + * + * + * @param int|null $index + * + * @return self + */ + public function setIndex(?int $index): self + { + $this->initialized['index'] = true; + $this->index = $index; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ThrottleDevice.php b/generated/Model/ThrottleDevice.php new file mode 100644 index 000000000..da5200876 --- /dev/null +++ b/generated/Model/ThrottleDevice.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * Device path + * + * @var string|null + */ + protected $path; + /** + * Rate + * + * @var int|null + */ + protected $rate; + /** + * Device path + * + * @return string|null + */ + public function getPath(): ?string + { + return $this->path; + } + /** + * Device path + * + * @param string|null $path + * + * @return self + */ + public function setPath(?string $path): self + { + $this->initialized['path'] = true; + $this->path = $path; + return $this; + } + /** + * Rate + * + * @return int|null + */ + public function getRate(): ?int + { + return $this->rate; + } + /** + * Rate + * + * @param int|null $rate + * + * @return self + */ + public function setRate(?int $rate): self + { + $this->initialized['rate'] = true; + $this->rate = $rate; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Ulimit.php b/generated/Model/Ulimit.php deleted file mode 100644 index 5715cd828..000000000 --- a/generated/Model/Ulimit.php +++ /dev/null @@ -1,79 +0,0 @@ -name; - } - - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } - - /** - * @return int - */ - public function getSoft() - { - return $this->soft; - } - - /** - * @param int $soft - * - * @return self - */ - public function setSoft($soft = null) - { - $this->soft = $soft; - - return $this; - } - - /** - * @return int - */ - public function getHard() - { - return $this->hard; - } - - /** - * @param int $hard - * - * @return self - */ - public function setHard($hard = null) - { - $this->hard = $hard; - - return $this; - } -} diff --git a/generated/Model/UpdateConfig.php b/generated/Model/UpdateConfig.php deleted file mode 100644 index 01e4a2b4d..000000000 --- a/generated/Model/UpdateConfig.php +++ /dev/null @@ -1,79 +0,0 @@ -parallelism; - } - - /** - * @param int $parallelism - * - * @return self - */ - public function setParallelism($parallelism = null) - { - $this->parallelism = $parallelism; - - return $this; - } - - /** - * @return int - */ - public function getDelay() - { - return $this->delay; - } - - /** - * @param int $delay - * - * @return self - */ - public function setDelay($delay = null) - { - $this->delay = $delay; - - return $this; - } - - /** - * @return string - */ - public function getFailureAction() - { - return $this->failureAction; - } - - /** - * @param string $failureAction - * - * @return self - */ - public function setFailureAction($failureAction = null) - { - $this->failureAction = $failureAction; - - return $this; - } -} diff --git a/generated/Model/UpdateStatus.php b/generated/Model/UpdateStatus.php deleted file mode 100644 index 8486bd110..000000000 --- a/generated/Model/UpdateStatus.php +++ /dev/null @@ -1,103 +0,0 @@ -state; - } - - /** - * @param string $state - * - * @return self - */ - public function setState($state = null) - { - $this->state = $state; - - return $this; - } - - /** - * @return \DateTime - */ - public function getStartedAt() - { - return $this->startedAt; - } - - /** - * @param \DateTime $startedAt - * - * @return self - */ - public function setStartedAt(?\DateTime $startedAt = null) - { - $this->startedAt = $startedAt; - - return $this; - } - - /** - * @return \DateTime - */ - public function getCompletedAt() - { - return $this->completedAt; - } - - /** - * @param \DateTime $completedAt - * - * @return self - */ - public function setCompletedAt(?\DateTime $completedAt = null) - { - $this->completedAt = $completedAt; - - return $this; - } - - /** - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * @param string $message - * - * @return self - */ - public function setMessage($message = null) - { - $this->message = $message; - - return $this; - } -} diff --git a/generated/Model/Version.php b/generated/Model/Version.php deleted file mode 100644 index 7327ecf42..000000000 --- a/generated/Model/Version.php +++ /dev/null @@ -1,223 +0,0 @@ -version; - } - - /** - * @param string $version - * - * @return self - */ - public function setVersion($version = null) - { - $this->version = $version; - - return $this; - } - - /** - * @return string - */ - public function getOs() - { - return $this->os; - } - - /** - * @param string $os - * - * @return self - */ - public function setOs($os = null) - { - $this->os = $os; - - return $this; - } - - /** - * @return string - */ - public function getKernelVersion() - { - return $this->kernelVersion; - } - - /** - * @param string $kernelVersion - * - * @return self - */ - public function setKernelVersion($kernelVersion = null) - { - $this->kernelVersion = $kernelVersion; - - return $this; - } - - /** - * @return string - */ - public function getGoVersion() - { - return $this->goVersion; - } - - /** - * @param string $goVersion - * - * @return self - */ - public function setGoVersion($goVersion = null) - { - $this->goVersion = $goVersion; - - return $this; - } - - /** - * @return string - */ - public function getGitCommit() - { - return $this->gitCommit; - } - - /** - * @param string $gitCommit - * - * @return self - */ - public function setGitCommit($gitCommit = null) - { - $this->gitCommit = $gitCommit; - - return $this; - } - - /** - * @return string - */ - public function getArch() - { - return $this->arch; - } - - /** - * @param string $arch - * - * @return self - */ - public function setArch($arch = null) - { - $this->arch = $arch; - - return $this; - } - - /** - * @return string - */ - public function getApiVersion() - { - return $this->apiVersion; - } - - /** - * @param string $apiVersion - * - * @return self - */ - public function setApiVersion($apiVersion = null) - { - $this->apiVersion = $apiVersion; - - return $this; - } - - /** - * @return bool - */ - public function getExperimental() - { - return $this->experimental; - } - - /** - * @param bool $experimental - * - * @return self - */ - public function setExperimental($experimental = null) - { - $this->experimental = $experimental; - - return $this; - } - - /** - * @return string - */ - public function getBuildTime() - { - return $this->buildTime; - } - - /** - * @param string $buildTime - * - * @return self - */ - public function setBuildTime($buildTime = null) - { - $this->buildTime = $buildTime; - - return $this; - } -} diff --git a/generated/Model/VersionGetResponse200.php b/generated/Model/VersionGetResponse200.php new file mode 100644 index 000000000..5e7690153 --- /dev/null +++ b/generated/Model/VersionGetResponse200.php @@ -0,0 +1,295 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $version; + /** + * + * + * @var string|null + */ + protected $apiVersion; + /** + * + * + * @var string|null + */ + protected $minAPIVersion; + /** + * + * + * @var string|null + */ + protected $gitCommit; + /** + * + * + * @var string|null + */ + protected $goVersion; + /** + * + * + * @var string|null + */ + protected $os; + /** + * + * + * @var string|null + */ + protected $arch; + /** + * + * + * @var string|null + */ + protected $kernelVersion; + /** + * + * + * @var bool|null + */ + protected $experimental; + /** + * + * + * @var string|null + */ + protected $buildTime; + /** + * + * + * @return string|null + */ + public function getVersion(): ?string + { + return $this->version; + } + /** + * + * + * @param string|null $version + * + * @return self + */ + public function setVersion(?string $version): self + { + $this->initialized['version'] = true; + $this->version = $version; + return $this; + } + /** + * + * + * @return string|null + */ + public function getApiVersion(): ?string + { + return $this->apiVersion; + } + /** + * + * + * @param string|null $apiVersion + * + * @return self + */ + public function setApiVersion(?string $apiVersion): self + { + $this->initialized['apiVersion'] = true; + $this->apiVersion = $apiVersion; + return $this; + } + /** + * + * + * @return string|null + */ + public function getMinAPIVersion(): ?string + { + return $this->minAPIVersion; + } + /** + * + * + * @param string|null $minAPIVersion + * + * @return self + */ + public function setMinAPIVersion(?string $minAPIVersion): self + { + $this->initialized['minAPIVersion'] = true; + $this->minAPIVersion = $minAPIVersion; + return $this; + } + /** + * + * + * @return string|null + */ + public function getGitCommit(): ?string + { + return $this->gitCommit; + } + /** + * + * + * @param string|null $gitCommit + * + * @return self + */ + public function setGitCommit(?string $gitCommit): self + { + $this->initialized['gitCommit'] = true; + $this->gitCommit = $gitCommit; + return $this; + } + /** + * + * + * @return string|null + */ + public function getGoVersion(): ?string + { + return $this->goVersion; + } + /** + * + * + * @param string|null $goVersion + * + * @return self + */ + public function setGoVersion(?string $goVersion): self + { + $this->initialized['goVersion'] = true; + $this->goVersion = $goVersion; + return $this; + } + /** + * + * + * @return string|null + */ + public function getOs(): ?string + { + return $this->os; + } + /** + * + * + * @param string|null $os + * + * @return self + */ + public function setOs(?string $os): self + { + $this->initialized['os'] = true; + $this->os = $os; + return $this; + } + /** + * + * + * @return string|null + */ + public function getArch(): ?string + { + return $this->arch; + } + /** + * + * + * @param string|null $arch + * + * @return self + */ + public function setArch(?string $arch): self + { + $this->initialized['arch'] = true; + $this->arch = $arch; + return $this; + } + /** + * + * + * @return string|null + */ + public function getKernelVersion(): ?string + { + return $this->kernelVersion; + } + /** + * + * + * @param string|null $kernelVersion + * + * @return self + */ + public function setKernelVersion(?string $kernelVersion): self + { + $this->initialized['kernelVersion'] = true; + $this->kernelVersion = $kernelVersion; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getExperimental(): ?bool + { + return $this->experimental; + } + /** + * + * + * @param bool|null $experimental + * + * @return self + */ + public function setExperimental(?bool $experimental): self + { + $this->initialized['experimental'] = true; + $this->experimental = $experimental; + return $this; + } + /** + * + * + * @return string|null + */ + public function getBuildTime(): ?string + { + return $this->buildTime; + } + /** + * + * + * @param string|null $buildTime + * + * @return self + */ + public function setBuildTime(?string $buildTime): self + { + $this->initialized['buildTime'] = true; + $this->buildTime = $buildTime; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Volume.php b/generated/Model/Volume.php index ca7071722..fc4a896c1 100644 --- a/generated/Model/Volume.php +++ b/generated/Model/Volume.php @@ -5,75 +5,253 @@ class Volume { /** - * @var string + * @var array + */ + protected $initialized = []; + public function isInitialized($property): bool + { + return array_key_exists($property, $this->initialized); + } + /** + * Name of the volume. + * + * @var string|null */ protected $name; /** - * @var string + * Name of the volume driver used by the volume. + * + * @var string|null */ protected $driver; /** - * @var string + * Mount path of the volume on the host. + * + * @var string|null */ protected $mountpoint; - /** - * @return string + * Low-level details about the volume, provided by the volume driver. + Details are returned as a map with key/value pairs: + `{"key":"value","key2":"value2"}`. + + The `Status` field is optional, and is omitted if the volume driver + does not support this feature. + + * + * @var array|null + */ + protected $status; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. + * + * @var string|null + */ + protected $scope = 'local'; + /** + * The driver specific options used when creating the volume. + * + * @var array|null + */ + protected $options; + /** + * + * + * @var VolumeUsageData|null + */ + protected $usageData; + /** + * Name of the volume. + * + * @return string|null */ - public function getName() + public function getName(): ?string { return $this->name; } - /** - * @param string $name + * Name of the volume. + * + * @param string|null $name * * @return self */ - public function setName($name = null) + public function setName(?string $name): self { + $this->initialized['name'] = true; $this->name = $name; - return $this; } - /** - * @return string + * Name of the volume driver used by the volume. + * + * @return string|null */ - public function getDriver() + public function getDriver(): ?string { return $this->driver; } - /** - * @param string $driver + * Name of the volume driver used by the volume. + * + * @param string|null $driver * * @return self */ - public function setDriver($driver = null) + public function setDriver(?string $driver): self { + $this->initialized['driver'] = true; $this->driver = $driver; - return $this; } - /** - * @return string + * Mount path of the volume on the host. + * + * @return string|null */ - public function getMountpoint() + public function getMountpoint(): ?string { return $this->mountpoint; } - /** - * @param string $mountpoint + * Mount path of the volume on the host. + * + * @param string|null $mountpoint * * @return self */ - public function setMountpoint($mountpoint = null) + public function setMountpoint(?string $mountpoint): self { + $this->initialized['mountpoint'] = true; $this->mountpoint = $mountpoint; - return $this; } -} + /** + * Low-level details about the volume, provided by the volume driver. + Details are returned as a map with key/value pairs: + `{"key":"value","key2":"value2"}`. + + The `Status` field is optional, and is omitted if the volume driver + does not support this feature. + + * + * @return array|null + */ + public function getStatus(): ?iterable + { + return $this->status; + } + /** + * Low-level details about the volume, provided by the volume driver. + Details are returned as a map with key/value pairs: + `{"key":"value","key2":"value2"}`. + + The `Status` field is optional, and is omitted if the volume driver + does not support this feature. + + * + * @param array|null $status + * + * @return self + */ + public function setStatus(?iterable $status): self + { + $this->initialized['status'] = true; + $this->status = $status; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. + * + * @return string|null + */ + public function getScope(): ?string + { + return $this->scope; + } + /** + * The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. + * + * @param string|null $scope + * + * @return self + */ + public function setScope(?string $scope): self + { + $this->initialized['scope'] = true; + $this->scope = $scope; + return $this; + } + /** + * The driver specific options used when creating the volume. + * + * @return array|null + */ + public function getOptions(): ?iterable + { + return $this->options; + } + /** + * The driver specific options used when creating the volume. + * + * @param array|null $options + * + * @return self + */ + public function setOptions(?iterable $options): self + { + $this->initialized['options'] = true; + $this->options = $options; + return $this; + } + /** + * + * + * @return VolumeUsageData|null + */ + public function getUsageData(): ?VolumeUsageData + { + return $this->usageData; + } + /** + * + * + * @param VolumeUsageData|null $usageData + * + * @return self + */ + public function setUsageData(?VolumeUsageData $usageData): self + { + $this->initialized['usageData'] = true; + $this->usageData = $usageData; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/VolumeConfig.php b/generated/Model/VolumeConfig.php deleted file mode 100644 index 068986d60..000000000 --- a/generated/Model/VolumeConfig.php +++ /dev/null @@ -1,79 +0,0 @@ -name; - } - - /** - * @param string $name - * - * @return self - */ - public function setName($name = null) - { - $this->name = $name; - - return $this; - } - - /** - * @return string - */ - public function getDriver() - { - return $this->driver; - } - - /** - * @param string $driver - * - * @return self - */ - public function setDriver($driver = null) - { - $this->driver = $driver; - - return $this; - } - - /** - * @return string[] - */ - public function getDriverOpts() - { - return $this->driverOpts; - } - - /** - * @param string[] $driverOpts - * - * @return self - */ - public function setDriverOpts(?\ArrayObject $driverOpts = null) - { - $this->driverOpts = $driverOpts; - - return $this; - } -} diff --git a/generated/Model/VolumeList.php b/generated/Model/VolumeList.php deleted file mode 100644 index 29cef879d..000000000 --- a/generated/Model/VolumeList.php +++ /dev/null @@ -1,31 +0,0 @@ -volumes; - } - - /** - * @param Volume[]|null $volumes - * - * @return self - */ - public function setVolumes($volumes = null) - { - $this->volumes = $volumes; - - return $this; - } -} diff --git a/generated/Model/VolumeUsageData.php b/generated/Model/VolumeUsageData.php new file mode 100644 index 000000000..81385c3dc --- /dev/null +++ b/generated/Model/VolumeUsageData.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The disk space used by the volume (local driver only) + * + * @var int|null + */ + protected $size = -1; + /** + * The number of containers referencing this volume. + * + * @var int|null + */ + protected $refCount = -1; + /** + * The disk space used by the volume (local driver only) + * + * @return int|null + */ + public function getSize(): ?int + { + return $this->size; + } + /** + * The disk space used by the volume (local driver only) + * + * @param int|null $size + * + * @return self + */ + public function setSize(?int $size): self + { + $this->initialized['size'] = true; + $this->size = $size; + return $this; + } + /** + * The number of containers referencing this volume. + * + * @return int|null + */ + public function getRefCount(): ?int + { + return $this->refCount; + } + /** + * The number of containers referencing this volume. + * + * @param int|null $refCount + * + * @return self + */ + public function setRefCount(?int $refCount): self + { + $this->initialized['refCount'] = true; + $this->refCount = $refCount; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/VolumesCreatePostBody.php b/generated/Model/VolumesCreatePostBody.php new file mode 100644 index 000000000..3f4c0c253 --- /dev/null +++ b/generated/Model/VolumesCreatePostBody.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * The new volume's name. If not specified, Docker generates a name. + * + * @var string|null + */ + protected $name; + /** + * Name of the volume driver to use. + * + * @var string|null + */ + protected $driver = 'local'; + /** + * A mapping of driver options and values. These options are passed directly to the driver and are driver specific. + * + * @var array|null + */ + protected $driverOpts; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * The new volume's name. If not specified, Docker generates a name. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * The new volume's name. If not specified, Docker generates a name. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * Name of the volume driver to use. + * + * @return string|null + */ + public function getDriver(): ?string + { + return $this->driver; + } + /** + * Name of the volume driver to use. + * + * @param string|null $driver + * + * @return self + */ + public function setDriver(?string $driver): self + { + $this->initialized['driver'] = true; + $this->driver = $driver; + return $this; + } + /** + * A mapping of driver options and values. These options are passed directly to the driver and are driver specific. + * + * @return array|null + */ + public function getDriverOpts(): ?iterable + { + return $this->driverOpts; + } + /** + * A mapping of driver options and values. These options are passed directly to the driver and are driver specific. + * + * @param array|null $driverOpts + * + * @return self + */ + public function setDriverOpts(?iterable $driverOpts): self + { + $this->initialized['driverOpts'] = true; + $this->driverOpts = $driverOpts; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/VolumesGetResponse200.php b/generated/Model/VolumesGetResponse200.php new file mode 100644 index 000000000..3e6a60637 --- /dev/null +++ b/generated/Model/VolumesGetResponse200.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * List of volumes + * + * @var list|null + */ + protected $volumes; + /** + * Warnings that occurred when fetching the list of volumes + * + * @var list|null + */ + protected $warnings; + /** + * List of volumes + * + * @return list|null + */ + public function getVolumes(): ?array + { + return $this->volumes; + } + /** + * List of volumes + * + * @param list|null $volumes + * + * @return self + */ + public function setVolumes(?array $volumes): self + { + $this->initialized['volumes'] = true; + $this->volumes = $volumes; + return $this; + } + /** + * Warnings that occurred when fetching the list of volumes + * + * @return list|null + */ + public function getWarnings(): ?array + { + return $this->warnings; + } + /** + * Warnings that occurred when fetching the list of volumes + * + * @param list|null $warnings + * + * @return self + */ + public function setWarnings(?array $warnings): self + { + $this->initialized['warnings'] = true; + $this->warnings = $warnings; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/VolumesPrunePostResponse200.php b/generated/Model/VolumesPrunePostResponse200.php new file mode 100644 index 000000000..e914b2542 --- /dev/null +++ b/generated/Model/VolumesPrunePostResponse200.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * Volumes that were deleted + * + * @var list|null + */ + protected $volumesDeleted; + /** + * Disk space reclaimed in bytes + * + * @var int|null + */ + protected $spaceReclaimed; + /** + * Volumes that were deleted + * + * @return list|null + */ + public function getVolumesDeleted(): ?array + { + return $this->volumesDeleted; + } + /** + * Volumes that were deleted + * + * @param list|null $volumesDeleted + * + * @return self + */ + public function setVolumesDeleted(?array $volumesDeleted): self + { + $this->initialized['volumesDeleted'] = true; + $this->volumesDeleted = $volumesDeleted; + return $this; + } + /** + * Disk space reclaimed in bytes + * + * @return int|null + */ + public function getSpaceReclaimed(): ?int + { + return $this->spaceReclaimed; + } + /** + * Disk space reclaimed in bytes + * + * @param int|null $spaceReclaimed + * + * @return self + */ + public function setSpaceReclaimed(?int $spaceReclaimed): self + { + $this->initialized['spaceReclaimed'] = true; + $this->spaceReclaimed = $spaceReclaimed; + return $this; + } +} \ No newline at end of file diff --git a/generated/Normalizer/AnnotationsNormalizer.php b/generated/Normalizer/AnnotationsNormalizer.php deleted file mode 100644 index b57e9e1bc..000000000 --- a/generated/Normalizer/AnnotationsNormalizer.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($data->{'Name'}); - } - if (property_exists($data, 'Labels')) { - $value = $data->{'Labels'}; - if (is_object($data->{'Labels'})) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Labels'} as $key => $value_1) { - $values[$key] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Labels'})) { - $value = $data->{'Labels'}; - } - $object->setLabels($value); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - $value = $object->getLabels(); - if (is_object($object->getLabels())) { - $values = new \stdClass(); - foreach ($object->getLabels() as $key => $value_1) { - $values->{$key} = $value_1; - } - $value = $values; - } - if (is_null($object->getLabels())) { - $value = $object->getLabels(); - } - $data->{'Labels'} = $value; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/AuthConfigNormalizer.php b/generated/Normalizer/AuthConfigNormalizer.php index 37263cde4..0429851d3 100644 --- a/generated/Normalizer/AuthConfigNormalizer.php +++ b/generated/Normalizer/AuthConfigNormalizer.php @@ -2,80 +2,171 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class AuthConfigNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\AuthConfig') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\AuthConfig) { - return true; - } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class AuthConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $object = new \Docker\API\Model\AuthConfig(); - if (property_exists($data, 'username')) { - $object->setUsername($data->{'username'}); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\AuthConfig::class; } - if (property_exists($data, 'password')) { - $object->setPassword($data->{'password'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\AuthConfig::class; } - if (property_exists($data, 'email')) { - $object->setEmail($data->{'email'}); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\AuthConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('username', $data) && $data['username'] !== null) { + $object->setUsername($data['username']); + } + elseif (\array_key_exists('username', $data) && $data['username'] === null) { + $object->setUsername(null); + } + if (\array_key_exists('password', $data) && $data['password'] !== null) { + $object->setPassword($data['password']); + } + elseif (\array_key_exists('password', $data) && $data['password'] === null) { + $object->setPassword(null); + } + if (\array_key_exists('email', $data) && $data['email'] !== null) { + $object->setEmail($data['email']); + } + elseif (\array_key_exists('email', $data) && $data['email'] === null) { + $object->setEmail(null); + } + if (\array_key_exists('serveraddress', $data) && $data['serveraddress'] !== null) { + $object->setServeraddress($data['serveraddress']); + } + elseif (\array_key_exists('serveraddress', $data) && $data['serveraddress'] === null) { + $object->setServeraddress(null); + } + return $object; } - if (property_exists($data, 'serveraddress')) { - $object->setServeraddress($data->{'serveraddress'}); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('username') && null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); + } + if ($object->isInitialized('password') && null !== $object->getPassword()) { + $data['password'] = $object->getPassword(); + } + if ($object->isInitialized('email') && null !== $object->getEmail()) { + $data['email'] = $object->getEmail(); + } + if ($object->isInitialized('serveraddress') && null !== $object->getServeraddress()) { + $data['serveraddress'] = $object->getServeraddress(); + } + return $data; } - if (property_exists($data, 'registrytoken')) { - $object->setRegistrytoken($data->{'registrytoken'}); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\AuthConfig::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class AuthConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getUsername()) { - $data->{'username'} = $object->getUsername(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\AuthConfig::class; } - if (null !== $object->getPassword()) { - $data->{'password'} = $object->getPassword(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\AuthConfig::class; } - if (null !== $object->getEmail()) { - $data->{'email'} = $object->getEmail(); + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\AuthConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('username', $data) && $data['username'] !== null) { + $object->setUsername($data['username']); + } + elseif (\array_key_exists('username', $data) && $data['username'] === null) { + $object->setUsername(null); + } + if (\array_key_exists('password', $data) && $data['password'] !== null) { + $object->setPassword($data['password']); + } + elseif (\array_key_exists('password', $data) && $data['password'] === null) { + $object->setPassword(null); + } + if (\array_key_exists('email', $data) && $data['email'] !== null) { + $object->setEmail($data['email']); + } + elseif (\array_key_exists('email', $data) && $data['email'] === null) { + $object->setEmail(null); + } + if (\array_key_exists('serveraddress', $data) && $data['serveraddress'] !== null) { + $object->setServeraddress($data['serveraddress']); + } + elseif (\array_key_exists('serveraddress', $data) && $data['serveraddress'] === null) { + $object->setServeraddress(null); + } + return $object; } - if (null !== $object->getServeraddress()) { - $data->{'serveraddress'} = $object->getServeraddress(); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('username') && null !== $object->getUsername()) { + $data['username'] = $object->getUsername(); + } + if ($object->isInitialized('password') && null !== $object->getPassword()) { + $data['password'] = $object->getPassword(); + } + if ($object->isInitialized('email') && null !== $object->getEmail()) { + $data['email'] = $object->getEmail(); + } + if ($object->isInitialized('serveraddress') && null !== $object->getServeraddress()) { + $data['serveraddress'] = $object->getServeraddress(); + } + return $data; } - if (null !== $object->getRegistrytoken()) { - $data->{'registrytoken'} = $object->getRegistrytoken(); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\AuthConfig::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/AuthPostResponse200Normalizer.php b/generated/Normalizer/AuthPostResponse200Normalizer.php new file mode 100644 index 000000000..7015d488f --- /dev/null +++ b/generated/Normalizer/AuthPostResponse200Normalizer.php @@ -0,0 +1,132 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class AuthPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\AuthPostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\AuthPostResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\AuthPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Status', $data) && $data['Status'] !== null) { + $object->setStatus($data['Status']); + } + elseif (\array_key_exists('Status', $data) && $data['Status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('IdentityToken', $data) && $data['IdentityToken'] !== null) { + $object->setIdentityToken($data['IdentityToken']); + } + elseif (\array_key_exists('IdentityToken', $data) && $data['IdentityToken'] === null) { + $object->setIdentityToken(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Status'] = $object->getStatus(); + if ($object->isInitialized('identityToken') && null !== $object->getIdentityToken()) { + $data['IdentityToken'] = $object->getIdentityToken(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\AuthPostResponse200::class => false]; + } + } +} else { + class AuthPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\AuthPostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\AuthPostResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\AuthPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Status', $data) && $data['Status'] !== null) { + $object->setStatus($data['Status']); + } + elseif (\array_key_exists('Status', $data) && $data['Status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('IdentityToken', $data) && $data['IdentityToken'] !== null) { + $object->setIdentityToken($data['IdentityToken']); + } + elseif (\array_key_exists('IdentityToken', $data) && $data['IdentityToken'] === null) { + $object->setIdentityToken(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Status'] = $object->getStatus(); + if ($object->isInitialized('identityToken') && null !== $object->getIdentityToken()) { + $data['IdentityToken'] = $object->getIdentityToken(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\AuthPostResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/AuthResultNormalizer.php b/generated/Normalizer/AuthResultNormalizer.php deleted file mode 100644 index 8965cc431..000000000 --- a/generated/Normalizer/AuthResultNormalizer.php +++ /dev/null @@ -1,63 +0,0 @@ -setStatus($data->{'Status'}); - } - if (property_exists($data, 'IdentityToken')) { - $object->setIdentityToken($data->{'IdentityToken'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getStatus()) { - $data->{'Status'} = $object->getStatus(); - } - if (null !== $object->getIdentityToken()) { - $data->{'IdentityToken'} = $object->getIdentityToken(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/BuildInfoNormalizer.php b/generated/Normalizer/BuildInfoNormalizer.php index 4475f4d09..e3fe05236 100644 --- a/generated/Normalizer/BuildInfoNormalizer.php +++ b/generated/Normalizer/BuildInfoNormalizer.php @@ -2,92 +2,225 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class BuildInfoNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\BuildInfo') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class BuildInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($data instanceof \Docker\API\Model\BuildInfo) { - return true; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\BuildInfo::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\BuildInfo::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\BuildInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && $data['id'] !== null) { + $object->setId($data['id']); + } + elseif (\array_key_exists('id', $data) && $data['id'] === null) { + $object->setId(null); + } + if (\array_key_exists('stream', $data) && $data['stream'] !== null) { + $object->setStream($data['stream']); + } + elseif (\array_key_exists('stream', $data) && $data['stream'] === null) { + $object->setStream(null); + } + if (\array_key_exists('error', $data) && $data['error'] !== null) { + $object->setError($data['error']); + } + elseif (\array_key_exists('error', $data) && $data['error'] === null) { + $object->setError(null); + } + if (\array_key_exists('errorDetail', $data) && $data['errorDetail'] !== null) { + $object->setErrorDetail($this->denormalizer->denormalize($data['errorDetail'], \Docker\API\Model\ErrorDetail::class, 'json', $context)); + } + elseif (\array_key_exists('errorDetail', $data) && $data['errorDetail'] === null) { + $object->setErrorDetail(null); + } + if (\array_key_exists('status', $data) && $data['status'] !== null) { + $object->setStatus($data['status']); + } + elseif (\array_key_exists('status', $data) && $data['status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('progress', $data) && $data['progress'] !== null) { + $object->setProgress($data['progress']); + } + elseif (\array_key_exists('progress', $data) && $data['progress'] === null) { + $object->setProgress(null); + } + if (\array_key_exists('progressDetail', $data) && $data['progressDetail'] !== null) { + $object->setProgressDetail($this->denormalizer->denormalize($data['progressDetail'], \Docker\API\Model\ProgressDetail::class, 'json', $context)); + } + elseif (\array_key_exists('progressDetail', $data) && $data['progressDetail'] === null) { + $object->setProgressDetail(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['id'] = $object->getId(); + } + if ($object->isInitialized('stream') && null !== $object->getStream()) { + $data['stream'] = $object->getStream(); + } + if ($object->isInitialized('error') && null !== $object->getError()) { + $data['error'] = $object->getError(); + } + if ($object->isInitialized('errorDetail') && null !== $object->getErrorDetail()) { + $data['errorDetail'] = $this->normalizer->normalize($object->getErrorDetail(), 'json', $context); + } + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['status'] = $object->getStatus(); + } + if ($object->isInitialized('progress') && null !== $object->getProgress()) { + $data['progress'] = $object->getProgress(); + } + if ($object->isInitialized('progressDetail') && null !== $object->getProgressDetail()) { + $data['progressDetail'] = $this->normalizer->normalize($object->getProgressDetail(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\BuildInfo::class => false]; } - - return false; } - - public function denormalize($data, $class, $format = null, array $context = []) +} else { + class BuildInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $object = new \Docker\API\Model\BuildInfo(); - if (property_exists($data, 'id')) { - $object->setId($data->{'id'}); - } - if (property_exists($data, 'stream')) { - $object->setStream($data->{'stream'}); - } - if (property_exists($data, 'error')) { - $object->setError($data->{'error'}); - } - if (property_exists($data, 'errorDetail')) { - $object->setErrorDetail($this->serializer->denormalize($data->{'errorDetail'}, 'Docker\\API\\Model\\ErrorDetail', 'raw', $context)); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\BuildInfo::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\BuildInfo::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\BuildInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('id', $data) && $data['id'] !== null) { + $object->setId($data['id']); + } + elseif (\array_key_exists('id', $data) && $data['id'] === null) { + $object->setId(null); + } + if (\array_key_exists('stream', $data) && $data['stream'] !== null) { + $object->setStream($data['stream']); + } + elseif (\array_key_exists('stream', $data) && $data['stream'] === null) { + $object->setStream(null); + } + if (\array_key_exists('error', $data) && $data['error'] !== null) { + $object->setError($data['error']); + } + elseif (\array_key_exists('error', $data) && $data['error'] === null) { + $object->setError(null); + } + if (\array_key_exists('errorDetail', $data) && $data['errorDetail'] !== null) { + $object->setErrorDetail($this->denormalizer->denormalize($data['errorDetail'], \Docker\API\Model\ErrorDetail::class, 'json', $context)); + } + elseif (\array_key_exists('errorDetail', $data) && $data['errorDetail'] === null) { + $object->setErrorDetail(null); + } + if (\array_key_exists('status', $data) && $data['status'] !== null) { + $object->setStatus($data['status']); + } + elseif (\array_key_exists('status', $data) && $data['status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('progress', $data) && $data['progress'] !== null) { + $object->setProgress($data['progress']); + } + elseif (\array_key_exists('progress', $data) && $data['progress'] === null) { + $object->setProgress(null); + } + if (\array_key_exists('progressDetail', $data) && $data['progressDetail'] !== null) { + $object->setProgressDetail($this->denormalizer->denormalize($data['progressDetail'], \Docker\API\Model\ProgressDetail::class, 'json', $context)); + } + elseif (\array_key_exists('progressDetail', $data) && $data['progressDetail'] === null) { + $object->setProgressDetail(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['id'] = $object->getId(); + } + if ($object->isInitialized('stream') && null !== $object->getStream()) { + $data['stream'] = $object->getStream(); + } + if ($object->isInitialized('error') && null !== $object->getError()) { + $data['error'] = $object->getError(); + } + if ($object->isInitialized('errorDetail') && null !== $object->getErrorDetail()) { + $data['errorDetail'] = $this->normalizer->normalize($object->getErrorDetail(), 'json', $context); + } + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['status'] = $object->getStatus(); + } + if ($object->isInitialized('progress') && null !== $object->getProgress()) { + $data['progress'] = $object->getProgress(); + } + if ($object->isInitialized('progressDetail') && null !== $object->getProgressDetail()) { + $data['progressDetail'] = $this->normalizer->normalize($object->getProgressDetail(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\BuildInfo::class => false]; } - if (property_exists($data, 'status')) { - $object->setStatus($data->{'status'}); - } - if (property_exists($data, 'progress')) { - $object->setProgress($data->{'progress'}); - } - if (property_exists($data, 'progressDetail')) { - $object->setProgressDetail($this->serializer->denormalize($data->{'progressDetail'}, 'Docker\\API\\Model\\ProgressDetail', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getId()) { - $data->{'id'} = $object->getId(); - } - if (null !== $object->getStream()) { - $data->{'stream'} = $object->getStream(); - } - if (null !== $object->getError()) { - $data->{'error'} = $object->getError(); - } - if (null !== $object->getErrorDetail()) { - $data->{'errorDetail'} = json_decode($this->serializer->normalize($object->getErrorDetail(), 'raw', $context)); - } - if (null !== $object->getStatus()) { - $data->{'status'} = $object->getStatus(); - } - if (null !== $object->getProgress()) { - $data->{'progress'} = $object->getProgress(); - } - if (null !== $object->getProgressDetail()) { - $data->{'progressDetail'} = json_decode($this->serializer->normalize($object->getProgressDetail(), 'raw', $context)); - } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/ClusterInfoNormalizer.php b/generated/Normalizer/ClusterInfoNormalizer.php new file mode 100644 index 000000000..eb343efe7 --- /dev/null +++ b/generated/Normalizer/ClusterInfoNormalizer.php @@ -0,0 +1,190 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ClusterInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterInfo::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterInfo::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ClusterInfoVersion::class, 'json', $context)); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); + } + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\SwarmSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterInfo::class => false]; + } + } +} else { + class ClusterInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterInfo::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterInfo::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ClusterInfoVersion::class, 'json', $context)); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); + } + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\SwarmSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterInfo::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ClusterInfoVersionNormalizer.php b/generated/Normalizer/ClusterInfoVersionNormalizer.php new file mode 100644 index 000000000..22ce890aa --- /dev/null +++ b/generated/Normalizer/ClusterInfoVersionNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ClusterInfoVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterInfoVersion::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterInfoVersion::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterInfoVersion(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Index', $data) && $data['Index'] !== null) { + $object->setIndex($data['Index']); + } + elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { + $object->setIndex(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('index') && null !== $object->getIndex()) { + $data['Index'] = $object->getIndex(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterInfoVersion::class => false]; + } + } +} else { + class ClusterInfoVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterInfoVersion::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterInfoVersion::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterInfoVersion(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Index', $data) && $data['Index'] !== null) { + $object->setIndex($data['Index']); + } + elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { + $object->setIndex(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('index') && null !== $object->getIndex()) { + $data['Index'] = $object->getIndex(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterInfoVersion::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/CommitResultNormalizer.php b/generated/Normalizer/CommitResultNormalizer.php deleted file mode 100644 index 6ed02546a..000000000 --- a/generated/Normalizer/CommitResultNormalizer.php +++ /dev/null @@ -1,57 +0,0 @@ -setId($data->{'Id'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getId()) { - $data->{'Id'} = $object->getId(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ConfigHealthcheckNormalizer.php b/generated/Normalizer/ConfigHealthcheckNormalizer.php new file mode 100644 index 000000000..bf9d3eadc --- /dev/null +++ b/generated/Normalizer/ConfigHealthcheckNormalizer.php @@ -0,0 +1,188 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ConfigHealthcheckNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ConfigHealthcheck::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ConfigHealthcheck::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ConfigHealthcheck(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Test', $data) && $data['Test'] !== null) { + $values = []; + foreach ($data['Test'] as $value) { + $values[] = $value; + } + $object->setTest($values); + } + elseif (\array_key_exists('Test', $data) && $data['Test'] === null) { + $object->setTest(null); + } + if (\array_key_exists('Interval', $data) && $data['Interval'] !== null) { + $object->setInterval($data['Interval']); + } + elseif (\array_key_exists('Interval', $data) && $data['Interval'] === null) { + $object->setInterval(null); + } + if (\array_key_exists('Timeout', $data) && $data['Timeout'] !== null) { + $object->setTimeout($data['Timeout']); + } + elseif (\array_key_exists('Timeout', $data) && $data['Timeout'] === null) { + $object->setTimeout(null); + } + if (\array_key_exists('Retries', $data) && $data['Retries'] !== null) { + $object->setRetries($data['Retries']); + } + elseif (\array_key_exists('Retries', $data) && $data['Retries'] === null) { + $object->setRetries(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('test') && null !== $object->getTest()) { + $values = []; + foreach ($object->getTest() as $value) { + $values[] = $value; + } + $data['Test'] = $values; + } + if ($object->isInitialized('interval') && null !== $object->getInterval()) { + $data['Interval'] = $object->getInterval(); + } + if ($object->isInitialized('timeout') && null !== $object->getTimeout()) { + $data['Timeout'] = $object->getTimeout(); + } + if ($object->isInitialized('retries') && null !== $object->getRetries()) { + $data['Retries'] = $object->getRetries(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ConfigHealthcheck::class => false]; + } + } +} else { + class ConfigHealthcheckNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ConfigHealthcheck::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ConfigHealthcheck::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ConfigHealthcheck(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Test', $data) && $data['Test'] !== null) { + $values = []; + foreach ($data['Test'] as $value) { + $values[] = $value; + } + $object->setTest($values); + } + elseif (\array_key_exists('Test', $data) && $data['Test'] === null) { + $object->setTest(null); + } + if (\array_key_exists('Interval', $data) && $data['Interval'] !== null) { + $object->setInterval($data['Interval']); + } + elseif (\array_key_exists('Interval', $data) && $data['Interval'] === null) { + $object->setInterval(null); + } + if (\array_key_exists('Timeout', $data) && $data['Timeout'] !== null) { + $object->setTimeout($data['Timeout']); + } + elseif (\array_key_exists('Timeout', $data) && $data['Timeout'] === null) { + $object->setTimeout(null); + } + if (\array_key_exists('Retries', $data) && $data['Retries'] !== null) { + $object->setRetries($data['Retries']); + } + elseif (\array_key_exists('Retries', $data) && $data['Retries'] === null) { + $object->setRetries(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('test') && null !== $object->getTest()) { + $values = []; + foreach ($object->getTest() as $value) { + $values[] = $value; + } + $data['Test'] = $values; + } + if ($object->isInitialized('interval') && null !== $object->getInterval()) { + $data['Interval'] = $object->getInterval(); + } + if ($object->isInitialized('timeout') && null !== $object->getTimeout()) { + $data['Timeout'] = $object->getTimeout(); + } + if ($object->isInitialized('retries') && null !== $object->getRetries()) { + $data['Retries'] = $object->getRetries(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ConfigHealthcheck::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ConfigNormalizer.php b/generated/Normalizer/ConfigNormalizer.php new file mode 100644 index 000000000..2cc8a6a45 --- /dev/null +++ b/generated/Normalizer/ConfigNormalizer.php @@ -0,0 +1,710 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Config::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Config::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Config(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Hostname', $data) && $data['Hostname'] !== null) { + $object->setHostname($data['Hostname']); + } + elseif (\array_key_exists('Hostname', $data) && $data['Hostname'] === null) { + $object->setHostname(null); + } + if (\array_key_exists('Domainname', $data) && $data['Domainname'] !== null) { + $object->setDomainname($data['Domainname']); + } + elseif (\array_key_exists('Domainname', $data) && $data['Domainname'] === null) { + $object->setDomainname(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($data['User']); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + if (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] !== null) { + $object->setAttachStdin($data['AttachStdin']); + } + elseif (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] === null) { + $object->setAttachStdin(null); + } + if (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] !== null) { + $object->setAttachStdout($data['AttachStdout']); + } + elseif (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] === null) { + $object->setAttachStdout(null); + } + if (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] !== null) { + $object->setAttachStderr($data['AttachStderr']); + } + elseif (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] === null) { + $object->setAttachStderr(null); + } + if (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['ExposedPorts'] as $key => $value) { + $values[$key] = $value; + } + $object->setExposedPorts($values); + } + elseif (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] === null) { + $object->setExposedPorts(null); + } + if (\array_key_exists('Tty', $data) && $data['Tty'] !== null) { + $object->setTty($data['Tty']); + } + elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { + $object->setTty(null); + } + if (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] !== null) { + $object->setOpenStdin($data['OpenStdin']); + } + elseif (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] === null) { + $object->setOpenStdin(null); + } + if (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] !== null) { + $object->setStdinOnce($data['StdinOnce']); + } + elseif (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] === null) { + $object->setStdinOnce(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values_1 = []; + foreach ($data['Env'] as $value_1) { + $values_1[] = $value_1; + } + $object->setEnv($values_1); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { + $value_2 = $data['Cmd']; + if (is_array($data['Cmd']) && $this->isOnlyNumericKeys($data['Cmd'])) { + $values_2 = []; + foreach ($data['Cmd'] as $value_3) { + $values_2[] = $value_3; + } + $value_2 = $values_2; + } elseif (is_string($data['Cmd'])) { + $value_2 = $data['Cmd']; + } + $object->setCmd($value_2); + } + elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { + $object->setCmd(null); + } + if (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] !== null) { + $object->setHealthcheck($this->denormalizer->denormalize($data['Healthcheck'], \Docker\API\Model\ConfigHealthcheck::class, 'json', $context)); + } + elseif (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] === null) { + $object->setHealthcheck(null); + } + if (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] !== null) { + $object->setArgsEscaped($data['ArgsEscaped']); + } + elseif (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] === null) { + $object->setArgsEscaped(null); + } + if (\array_key_exists('Image', $data) && $data['Image'] !== null) { + $object->setImage($data['Image']); + } + elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { + $object->setImage(null); + } + if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { + $object->setVolumes($this->denormalizer->denormalize($data['Volumes'], \Docker\API\Model\ConfigVolumes::class, 'json', $context)); + } + elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { + $object->setVolumes(null); + } + if (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] !== null) { + $object->setWorkingDir($data['WorkingDir']); + } + elseif (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] === null) { + $object->setWorkingDir(null); + } + if (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] !== null) { + $value_4 = $data['Entrypoint']; + if (is_array($data['Entrypoint']) && $this->isOnlyNumericKeys($data['Entrypoint'])) { + $values_3 = []; + foreach ($data['Entrypoint'] as $value_5) { + $values_3[] = $value_5; + } + $value_4 = $values_3; + } elseif (is_string($data['Entrypoint'])) { + $value_4 = $data['Entrypoint']; + } + $object->setEntrypoint($value_4); + } + elseif (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] === null) { + $object->setEntrypoint(null); + } + if (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] !== null) { + $object->setNetworkDisabled($data['NetworkDisabled']); + } + elseif (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] === null) { + $object->setNetworkDisabled(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + if (\array_key_exists('OnBuild', $data) && $data['OnBuild'] !== null) { + $values_4 = []; + foreach ($data['OnBuild'] as $value_6) { + $values_4[] = $value_6; + } + $object->setOnBuild($values_4); + } + elseif (\array_key_exists('OnBuild', $data) && $data['OnBuild'] === null) { + $object->setOnBuild(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_5 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_1 => $value_7) { + $values_5[$key_1] = $value_7; + } + $object->setLabels($values_5); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('StopSignal', $data) && $data['StopSignal'] !== null) { + $object->setStopSignal($data['StopSignal']); + } + elseif (\array_key_exists('StopSignal', $data) && $data['StopSignal'] === null) { + $object->setStopSignal(null); + } + if (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] !== null) { + $object->setStopTimeout($data['StopTimeout']); + } + elseif (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] === null) { + $object->setStopTimeout(null); + } + if (\array_key_exists('Shell', $data) && $data['Shell'] !== null) { + $values_6 = []; + foreach ($data['Shell'] as $value_8) { + $values_6[] = $value_8; + } + $object->setShell($values_6); + } + elseif (\array_key_exists('Shell', $data) && $data['Shell'] === null) { + $object->setShell(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('hostname') && null !== $object->getHostname()) { + $data['Hostname'] = $object->getHostname(); + } + if ($object->isInitialized('domainname') && null !== $object->getDomainname()) { + $data['Domainname'] = $object->getDomainname(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $object->getUser(); + } + if ($object->isInitialized('attachStdin') && null !== $object->getAttachStdin()) { + $data['AttachStdin'] = $object->getAttachStdin(); + } + if ($object->isInitialized('attachStdout') && null !== $object->getAttachStdout()) { + $data['AttachStdout'] = $object->getAttachStdout(); + } + if ($object->isInitialized('attachStderr') && null !== $object->getAttachStderr()) { + $data['AttachStderr'] = $object->getAttachStderr(); + } + if ($object->isInitialized('exposedPorts') && null !== $object->getExposedPorts()) { + $values = []; + foreach ($object->getExposedPorts() as $key => $value) { + $values[$key] = $value; + } + $data['ExposedPorts'] = $values; + } + if ($object->isInitialized('tty') && null !== $object->getTty()) { + $data['Tty'] = $object->getTty(); + } + if ($object->isInitialized('openStdin') && null !== $object->getOpenStdin()) { + $data['OpenStdin'] = $object->getOpenStdin(); + } + if ($object->isInitialized('stdinOnce') && null !== $object->getStdinOnce()) { + $data['StdinOnce'] = $object->getStdinOnce(); + } + if ($object->isInitialized('env') && null !== $object->getEnv()) { + $values_1 = []; + foreach ($object->getEnv() as $value_1) { + $values_1[] = $value_1; + } + $data['Env'] = $values_1; + } + if ($object->isInitialized('cmd') && null !== $object->getCmd()) { + $value_2 = $object->getCmd(); + if (is_array($object->getCmd())) { + $values_2 = []; + foreach ($object->getCmd() as $value_3) { + $values_2[] = $value_3; + } + $value_2 = $values_2; + } elseif (is_string($object->getCmd())) { + $value_2 = $object->getCmd(); + } + $data['Cmd'] = $value_2; + } + if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) { + $data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context); + } + if ($object->isInitialized('argsEscaped') && null !== $object->getArgsEscaped()) { + $data['ArgsEscaped'] = $object->getArgsEscaped(); + } + if ($object->isInitialized('image') && null !== $object->getImage()) { + $data['Image'] = $object->getImage(); + } + if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { + $data['Volumes'] = $this->normalizer->normalize($object->getVolumes(), 'json', $context); + } + if ($object->isInitialized('workingDir') && null !== $object->getWorkingDir()) { + $data['WorkingDir'] = $object->getWorkingDir(); + } + if ($object->isInitialized('entrypoint') && null !== $object->getEntrypoint()) { + $value_4 = $object->getEntrypoint(); + if (is_array($object->getEntrypoint())) { + $values_3 = []; + foreach ($object->getEntrypoint() as $value_5) { + $values_3[] = $value_5; + } + $value_4 = $values_3; + } elseif (is_string($object->getEntrypoint())) { + $value_4 = $object->getEntrypoint(); + } + $data['Entrypoint'] = $value_4; + } + if ($object->isInitialized('networkDisabled') && null !== $object->getNetworkDisabled()) { + $data['NetworkDisabled'] = $object->getNetworkDisabled(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + if ($object->isInitialized('onBuild') && null !== $object->getOnBuild()) { + $values_4 = []; + foreach ($object->getOnBuild() as $value_6) { + $values_4[] = $value_6; + } + $data['OnBuild'] = $values_4; + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_5 = []; + foreach ($object->getLabels() as $key_1 => $value_7) { + $values_5[$key_1] = $value_7; + } + $data['Labels'] = $values_5; + } + if ($object->isInitialized('stopSignal') && null !== $object->getStopSignal()) { + $data['StopSignal'] = $object->getStopSignal(); + } + if ($object->isInitialized('stopTimeout') && null !== $object->getStopTimeout()) { + $data['StopTimeout'] = $object->getStopTimeout(); + } + if ($object->isInitialized('shell') && null !== $object->getShell()) { + $values_6 = []; + foreach ($object->getShell() as $value_8) { + $values_6[] = $value_8; + } + $data['Shell'] = $values_6; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Config::class => false]; + } + } +} else { + class ConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Config::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Config::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Config(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Hostname', $data) && $data['Hostname'] !== null) { + $object->setHostname($data['Hostname']); + } + elseif (\array_key_exists('Hostname', $data) && $data['Hostname'] === null) { + $object->setHostname(null); + } + if (\array_key_exists('Domainname', $data) && $data['Domainname'] !== null) { + $object->setDomainname($data['Domainname']); + } + elseif (\array_key_exists('Domainname', $data) && $data['Domainname'] === null) { + $object->setDomainname(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($data['User']); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + if (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] !== null) { + $object->setAttachStdin($data['AttachStdin']); + } + elseif (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] === null) { + $object->setAttachStdin(null); + } + if (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] !== null) { + $object->setAttachStdout($data['AttachStdout']); + } + elseif (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] === null) { + $object->setAttachStdout(null); + } + if (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] !== null) { + $object->setAttachStderr($data['AttachStderr']); + } + elseif (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] === null) { + $object->setAttachStderr(null); + } + if (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['ExposedPorts'] as $key => $value) { + $values[$key] = $value; + } + $object->setExposedPorts($values); + } + elseif (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] === null) { + $object->setExposedPorts(null); + } + if (\array_key_exists('Tty', $data) && $data['Tty'] !== null) { + $object->setTty($data['Tty']); + } + elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { + $object->setTty(null); + } + if (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] !== null) { + $object->setOpenStdin($data['OpenStdin']); + } + elseif (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] === null) { + $object->setOpenStdin(null); + } + if (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] !== null) { + $object->setStdinOnce($data['StdinOnce']); + } + elseif (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] === null) { + $object->setStdinOnce(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values_1 = []; + foreach ($data['Env'] as $value_1) { + $values_1[] = $value_1; + } + $object->setEnv($values_1); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { + $value_2 = $data['Cmd']; + if (is_array($data['Cmd']) && $this->isOnlyNumericKeys($data['Cmd'])) { + $values_2 = []; + foreach ($data['Cmd'] as $value_3) { + $values_2[] = $value_3; + } + $value_2 = $values_2; + } elseif (is_string($data['Cmd'])) { + $value_2 = $data['Cmd']; + } + $object->setCmd($value_2); + } + elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { + $object->setCmd(null); + } + if (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] !== null) { + $object->setHealthcheck($this->denormalizer->denormalize($data['Healthcheck'], \Docker\API\Model\ConfigHealthcheck::class, 'json', $context)); + } + elseif (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] === null) { + $object->setHealthcheck(null); + } + if (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] !== null) { + $object->setArgsEscaped($data['ArgsEscaped']); + } + elseif (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] === null) { + $object->setArgsEscaped(null); + } + if (\array_key_exists('Image', $data) && $data['Image'] !== null) { + $object->setImage($data['Image']); + } + elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { + $object->setImage(null); + } + if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { + $object->setVolumes($this->denormalizer->denormalize($data['Volumes'], \Docker\API\Model\ConfigVolumes::class, 'json', $context)); + } + elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { + $object->setVolumes(null); + } + if (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] !== null) { + $object->setWorkingDir($data['WorkingDir']); + } + elseif (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] === null) { + $object->setWorkingDir(null); + } + if (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] !== null) { + $value_4 = $data['Entrypoint']; + if (is_array($data['Entrypoint']) && $this->isOnlyNumericKeys($data['Entrypoint'])) { + $values_3 = []; + foreach ($data['Entrypoint'] as $value_5) { + $values_3[] = $value_5; + } + $value_4 = $values_3; + } elseif (is_string($data['Entrypoint'])) { + $value_4 = $data['Entrypoint']; + } + $object->setEntrypoint($value_4); + } + elseif (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] === null) { + $object->setEntrypoint(null); + } + if (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] !== null) { + $object->setNetworkDisabled($data['NetworkDisabled']); + } + elseif (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] === null) { + $object->setNetworkDisabled(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + if (\array_key_exists('OnBuild', $data) && $data['OnBuild'] !== null) { + $values_4 = []; + foreach ($data['OnBuild'] as $value_6) { + $values_4[] = $value_6; + } + $object->setOnBuild($values_4); + } + elseif (\array_key_exists('OnBuild', $data) && $data['OnBuild'] === null) { + $object->setOnBuild(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_5 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_1 => $value_7) { + $values_5[$key_1] = $value_7; + } + $object->setLabels($values_5); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('StopSignal', $data) && $data['StopSignal'] !== null) { + $object->setStopSignal($data['StopSignal']); + } + elseif (\array_key_exists('StopSignal', $data) && $data['StopSignal'] === null) { + $object->setStopSignal(null); + } + if (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] !== null) { + $object->setStopTimeout($data['StopTimeout']); + } + elseif (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] === null) { + $object->setStopTimeout(null); + } + if (\array_key_exists('Shell', $data) && $data['Shell'] !== null) { + $values_6 = []; + foreach ($data['Shell'] as $value_8) { + $values_6[] = $value_8; + } + $object->setShell($values_6); + } + elseif (\array_key_exists('Shell', $data) && $data['Shell'] === null) { + $object->setShell(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('hostname') && null !== $object->getHostname()) { + $data['Hostname'] = $object->getHostname(); + } + if ($object->isInitialized('domainname') && null !== $object->getDomainname()) { + $data['Domainname'] = $object->getDomainname(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $object->getUser(); + } + if ($object->isInitialized('attachStdin') && null !== $object->getAttachStdin()) { + $data['AttachStdin'] = $object->getAttachStdin(); + } + if ($object->isInitialized('attachStdout') && null !== $object->getAttachStdout()) { + $data['AttachStdout'] = $object->getAttachStdout(); + } + if ($object->isInitialized('attachStderr') && null !== $object->getAttachStderr()) { + $data['AttachStderr'] = $object->getAttachStderr(); + } + if ($object->isInitialized('exposedPorts') && null !== $object->getExposedPorts()) { + $values = []; + foreach ($object->getExposedPorts() as $key => $value) { + $values[$key] = $value; + } + $data['ExposedPorts'] = $values; + } + if ($object->isInitialized('tty') && null !== $object->getTty()) { + $data['Tty'] = $object->getTty(); + } + if ($object->isInitialized('openStdin') && null !== $object->getOpenStdin()) { + $data['OpenStdin'] = $object->getOpenStdin(); + } + if ($object->isInitialized('stdinOnce') && null !== $object->getStdinOnce()) { + $data['StdinOnce'] = $object->getStdinOnce(); + } + if ($object->isInitialized('env') && null !== $object->getEnv()) { + $values_1 = []; + foreach ($object->getEnv() as $value_1) { + $values_1[] = $value_1; + } + $data['Env'] = $values_1; + } + if ($object->isInitialized('cmd') && null !== $object->getCmd()) { + $value_2 = $object->getCmd(); + if (is_array($object->getCmd())) { + $values_2 = []; + foreach ($object->getCmd() as $value_3) { + $values_2[] = $value_3; + } + $value_2 = $values_2; + } elseif (is_string($object->getCmd())) { + $value_2 = $object->getCmd(); + } + $data['Cmd'] = $value_2; + } + if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) { + $data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context); + } + if ($object->isInitialized('argsEscaped') && null !== $object->getArgsEscaped()) { + $data['ArgsEscaped'] = $object->getArgsEscaped(); + } + if ($object->isInitialized('image') && null !== $object->getImage()) { + $data['Image'] = $object->getImage(); + } + if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { + $data['Volumes'] = $this->normalizer->normalize($object->getVolumes(), 'json', $context); + } + if ($object->isInitialized('workingDir') && null !== $object->getWorkingDir()) { + $data['WorkingDir'] = $object->getWorkingDir(); + } + if ($object->isInitialized('entrypoint') && null !== $object->getEntrypoint()) { + $value_4 = $object->getEntrypoint(); + if (is_array($object->getEntrypoint())) { + $values_3 = []; + foreach ($object->getEntrypoint() as $value_5) { + $values_3[] = $value_5; + } + $value_4 = $values_3; + } elseif (is_string($object->getEntrypoint())) { + $value_4 = $object->getEntrypoint(); + } + $data['Entrypoint'] = $value_4; + } + if ($object->isInitialized('networkDisabled') && null !== $object->getNetworkDisabled()) { + $data['NetworkDisabled'] = $object->getNetworkDisabled(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + if ($object->isInitialized('onBuild') && null !== $object->getOnBuild()) { + $values_4 = []; + foreach ($object->getOnBuild() as $value_6) { + $values_4[] = $value_6; + } + $data['OnBuild'] = $values_4; + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_5 = []; + foreach ($object->getLabels() as $key_1 => $value_7) { + $values_5[$key_1] = $value_7; + } + $data['Labels'] = $values_5; + } + if ($object->isInitialized('stopSignal') && null !== $object->getStopSignal()) { + $data['StopSignal'] = $object->getStopSignal(); + } + if ($object->isInitialized('stopTimeout') && null !== $object->getStopTimeout()) { + $data['StopTimeout'] = $object->getStopTimeout(); + } + if ($object->isInitialized('shell') && null !== $object->getShell()) { + $values_6 = []; + foreach ($object->getShell() as $value_8) { + $values_6[] = $value_8; + } + $data['Shell'] = $values_6; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Config::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ConfigVolumesNormalizer.php b/generated/Normalizer/ConfigVolumesNormalizer.php new file mode 100644 index 000000000..0daad1615 --- /dev/null +++ b/generated/Normalizer/ConfigVolumesNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ConfigVolumesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ConfigVolumes::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ConfigVolumes::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ConfigVolumes(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('additionalProperties', $data) && $data['additionalProperties'] !== null) { + $object->setAdditionalProperties($data['additionalProperties']); + } + elseif (\array_key_exists('additionalProperties', $data) && $data['additionalProperties'] === null) { + $object->setAdditionalProperties(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('additionalProperties') && null !== $object->getAdditionalProperties()) { + $data['additionalProperties'] = $object->getAdditionalProperties(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ConfigVolumes::class => false]; + } + } +} else { + class ConfigVolumesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ConfigVolumes::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ConfigVolumes::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ConfigVolumes(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('additionalProperties', $data) && $data['additionalProperties'] !== null) { + $object->setAdditionalProperties($data['additionalProperties']); + } + elseif (\array_key_exists('additionalProperties', $data) && $data['additionalProperties'] === null) { + $object->setAdditionalProperties(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('additionalProperties') && null !== $object->getAdditionalProperties()) { + $data['additionalProperties'] = $object->getAdditionalProperties(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ConfigVolumes::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainerChangeNormalizer.php b/generated/Normalizer/ContainerChangeNormalizer.php deleted file mode 100644 index 2e2bc41a9..000000000 --- a/generated/Normalizer/ContainerChangeNormalizer.php +++ /dev/null @@ -1,62 +0,0 @@ -setPath($data->{'Path'}); - } - if (property_exists($data, 'Kind')) { - $object->setKind($data->{'Kind'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getPath()) { - $data->{'Path'} = $object->getPath(); - } - if (null !== $object->getKind()) { - $data->{'Kind'} = $object->getKind(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerConfigNormalizer.php b/generated/Normalizer/ContainerConfigNormalizer.php deleted file mode 100644 index 731cdb435..000000000 --- a/generated/Normalizer/ContainerConfigNormalizer.php +++ /dev/null @@ -1,307 +0,0 @@ -setHostname($data->{'Hostname'}); - } - if (property_exists($data, 'Domainname')) { - $object->setDomainname($data->{'Domainname'}); - } - if (property_exists($data, 'User')) { - $object->setUser($data->{'User'}); - } - if (property_exists($data, 'AttachStdin')) { - $object->setAttachStdin($data->{'AttachStdin'}); - } - if (property_exists($data, 'AttachStdout')) { - $object->setAttachStdout($data->{'AttachStdout'}); - } - if (property_exists($data, 'AttachStderr')) { - $object->setAttachStderr($data->{'AttachStderr'}); - } - if (property_exists($data, 'Tty')) { - $object->setTty($data->{'Tty'}); - } - if (property_exists($data, 'OpenStdin')) { - $object->setOpenStdin($data->{'OpenStdin'}); - } - if (property_exists($data, 'StdinOnce')) { - $object->setStdinOnce($data->{'StdinOnce'}); - } - if (property_exists($data, 'Env')) { - $value = $data->{'Env'}; - if (is_array($data->{'Env'})) { - $values = []; - foreach ($data->{'Env'} as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Env'})) { - $value = $data->{'Env'}; - } - $object->setEnv($value); - } - if (property_exists($data, 'Cmd')) { - $value_2 = $data->{'Cmd'}; - if (is_array($data->{'Cmd'})) { - $values_1 = []; - foreach ($data->{'Cmd'} as $value_3) { - $values_1[] = $value_3; - } - $value_2 = $values_1; - } - if (is_string($data->{'Cmd'})) { - $value_2 = $data->{'Cmd'}; - } - $object->setCmd($value_2); - } - if (property_exists($data, 'Entrypoint')) { - $value_4 = $data->{'Entrypoint'}; - if (is_array($data->{'Entrypoint'})) { - $values_2 = []; - foreach ($data->{'Entrypoint'} as $value_5) { - $values_2[] = $value_5; - } - $value_4 = $values_2; - } - if (is_string($data->{'Entrypoint'})) { - $value_4 = $data->{'Entrypoint'}; - } - $object->setEntrypoint($value_4); - } - if (property_exists($data, 'Image')) { - $object->setImage($data->{'Image'}); - } - if (property_exists($data, 'Labels')) { - $value_6 = $data->{'Labels'}; - if (is_object($data->{'Labels'})) { - $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Labels'} as $key => $value_7) { - $values_3[$key] = $value_7; - } - $value_6 = $values_3; - } - if (is_null($data->{'Labels'})) { - $value_6 = $data->{'Labels'}; - } - $object->setLabels($value_6); - } - if (property_exists($data, 'Volumes')) { - $value_8 = $data->{'Volumes'}; - if (is_object($data->{'Volumes'})) { - $values_4 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Volumes'} as $key_1 => $value_9) { - $values_4[$key_1] = $value_9; - } - $value_8 = $values_4; - } - if (is_null($data->{'Volumes'})) { - $value_8 = $data->{'Volumes'}; - } - $object->setVolumes($value_8); - } - if (property_exists($data, 'WorkingDir')) { - $object->setWorkingDir($data->{'WorkingDir'}); - } - if (property_exists($data, 'NetworkDisabled')) { - $object->setNetworkDisabled($data->{'NetworkDisabled'}); - } - if (property_exists($data, 'MacAddress')) { - $object->setMacAddress($data->{'MacAddress'}); - } - if (property_exists($data, 'ExposedPorts')) { - $value_10 = $data->{'ExposedPorts'}; - if (is_object($data->{'ExposedPorts'})) { - $values_5 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'ExposedPorts'} as $key_2 => $value_11) { - $values_5[$key_2] = $value_11; - } - $value_10 = $values_5; - } - if (is_null($data->{'ExposedPorts'})) { - $value_10 = $data->{'ExposedPorts'}; - } - $object->setExposedPorts($value_10); - } - if (property_exists($data, 'StopSignal')) { - $object->setStopSignal($data->{'StopSignal'}); - } - if (property_exists($data, 'HostConfig')) { - $object->setHostConfig($this->serializer->denormalize($data->{'HostConfig'}, 'Docker\\API\\Model\\HostConfig', 'raw', $context)); - } - if (property_exists($data, 'NetworkingConfig')) { - $object->setNetworkingConfig($this->serializer->denormalize($data->{'NetworkingConfig'}, 'Docker\\API\\Model\\NetworkingConfig', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getHostname()) { - $data->{'Hostname'} = $object->getHostname(); - } - if (null !== $object->getDomainname()) { - $data->{'Domainname'} = $object->getDomainname(); - } - if (null !== $object->getUser()) { - $data->{'User'} = $object->getUser(); - } - if (null !== $object->getAttachStdin()) { - $data->{'AttachStdin'} = $object->getAttachStdin(); - } - if (null !== $object->getAttachStdout()) { - $data->{'AttachStdout'} = $object->getAttachStdout(); - } - if (null !== $object->getAttachStderr()) { - $data->{'AttachStderr'} = $object->getAttachStderr(); - } - if (null !== $object->getTty()) { - $data->{'Tty'} = $object->getTty(); - } - if (null !== $object->getOpenStdin()) { - $data->{'OpenStdin'} = $object->getOpenStdin(); - } - if (null !== $object->getStdinOnce()) { - $data->{'StdinOnce'} = $object->getStdinOnce(); - } - $value = $object->getEnv(); - if (is_array($object->getEnv())) { - $values = []; - foreach ($object->getEnv() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getEnv())) { - $value = $object->getEnv(); - } - $data->{'Env'} = $value; - if (null !== $object->getCmd()) { - $value_2 = $object->getCmd(); - if (is_array($object->getCmd())) { - $values_1 = []; - foreach ($object->getCmd() as $value_3) { - $values_1[] = $value_3; - } - $value_2 = $values_1; - } - if (is_string($object->getCmd())) { - $value_2 = $object->getCmd(); - } - $data->{'Cmd'} = $value_2; - } - if (null !== $object->getEntrypoint()) { - $value_4 = $object->getEntrypoint(); - if (is_array($object->getEntrypoint())) { - $values_2 = []; - foreach ($object->getEntrypoint() as $value_5) { - $values_2[] = $value_5; - } - $value_4 = $values_2; - } - if (is_string($object->getEntrypoint())) { - $value_4 = $object->getEntrypoint(); - } - $data->{'Entrypoint'} = $value_4; - } - if (null !== $object->getImage()) { - $data->{'Image'} = $object->getImage(); - } - $value_6 = $object->getLabels(); - if (is_object($object->getLabels())) { - $values_3 = new \stdClass(); - foreach ($object->getLabels() as $key => $value_7) { - $values_3->{$key} = $value_7; - } - $value_6 = $values_3; - } - if (is_null($object->getLabels())) { - $value_6 = $object->getLabels(); - } - $data->{'Labels'} = $value_6; - $value_8 = $object->getVolumes(); - if (is_object($object->getVolumes())) { - $values_4 = new \stdClass(); - foreach ($object->getVolumes() as $key_1 => $value_9) { - $values_4->{$key_1} = $value_9; - } - $value_8 = $values_4; - } - if (is_null($object->getVolumes())) { - $value_8 = $object->getVolumes(); - } - $data->{'Volumes'} = $value_8; - if (null !== $object->getWorkingDir()) { - $data->{'WorkingDir'} = $object->getWorkingDir(); - } - if (null !== $object->getNetworkDisabled()) { - $data->{'NetworkDisabled'} = $object->getNetworkDisabled(); - } - if (null !== $object->getMacAddress()) { - $data->{'MacAddress'} = $object->getMacAddress(); - } - $value_10 = $object->getExposedPorts(); - if (is_object($object->getExposedPorts())) { - $values_5 = new \stdClass(); - foreach ($object->getExposedPorts() as $key_2 => $value_11) { - $values_5->{$key_2} = $value_11; - } - $value_10 = $values_5; - } - if (is_null($object->getExposedPorts())) { - $value_10 = $object->getExposedPorts(); - } - $data->{'ExposedPorts'} = $value_10; - if (null !== $object->getStopSignal()) { - $data->{'StopSignal'} = $object->getStopSignal(); - } - if (null !== $object->getHostConfig()) { - $data->{'HostConfig'} = json_decode($this->serializer->normalize($object->getHostConfig(), 'raw', $context)); - } - if (null !== $object->getNetworkingConfig()) { - $data->{'NetworkingConfig'} = json_decode($this->serializer->normalize($object->getNetworkingConfig(), 'raw', $context)); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerConnectNormalizer.php b/generated/Normalizer/ContainerConnectNormalizer.php deleted file mode 100644 index 6a240f2c5..000000000 --- a/generated/Normalizer/ContainerConnectNormalizer.php +++ /dev/null @@ -1,71 +0,0 @@ -setContainer($data->{'Container'}); - } - if (property_exists($data, 'EndpointConfig')) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'EndpointConfig'} as $key => $value) { - $values[$key] = $this->serializer->denormalize($value, 'Docker\\API\\Model\\EndpointConfig', 'raw', $context); - } - $object->setEndpointConfig($values); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getContainer()) { - $data->{'Container'} = $object->getContainer(); - } - if (null !== $object->getEndpointConfig()) { - $values = new \stdClass(); - foreach ($object->getEndpointConfig() as $key => $value) { - $values->{$key} = $value; - } - $data->{'EndpointConfig'} = $values; - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerCreateResultNormalizer.php b/generated/Normalizer/ContainerCreateResultNormalizer.php deleted file mode 100644 index d5eb6da43..000000000 --- a/generated/Normalizer/ContainerCreateResultNormalizer.php +++ /dev/null @@ -1,83 +0,0 @@ -setId($data->{'Id'}); - } - if (property_exists($data, 'Warnings')) { - $value = $data->{'Warnings'}; - if (is_array($data->{'Warnings'})) { - $values = []; - foreach ($data->{'Warnings'} as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Warnings'})) { - $value = $data->{'Warnings'}; - } - $object->setWarnings($value); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getId()) { - $data->{'Id'} = $object->getId(); - } - $value = $object->getWarnings(); - if (is_array($object->getWarnings())) { - $values = []; - foreach ($object->getWarnings() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getWarnings())) { - $value = $object->getWarnings(); - } - $data->{'Warnings'} = $value; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerDisconnectNormalizer.php b/generated/Normalizer/ContainerDisconnectNormalizer.php deleted file mode 100644 index 787704d78..000000000 --- a/generated/Normalizer/ContainerDisconnectNormalizer.php +++ /dev/null @@ -1,63 +0,0 @@ -setContainer($data->{'Container'}); - } - if (property_exists($data, 'Force')) { - $object->setForce($data->{'Force'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getContainer()) { - $data->{'Container'} = $object->getContainer(); - } - if (null !== $object->getForce()) { - $data->{'Force'} = $object->getForce(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerInfoNormalizer.php b/generated/Normalizer/ContainerInfoNormalizer.php deleted file mode 100644 index d38d07841..000000000 --- a/generated/Normalizer/ContainerInfoNormalizer.php +++ /dev/null @@ -1,227 +0,0 @@ -setId($data->{'Id'}); - } - if (property_exists($data, 'Names')) { - $value = $data->{'Names'}; - if (is_array($data->{'Names'})) { - $values = []; - foreach ($data->{'Names'} as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Names'})) { - $value = $data->{'Names'}; - } - $object->setNames($value); - } - if (property_exists($data, 'Image')) { - $object->setImage($data->{'Image'}); - } - if (property_exists($data, 'ImageID')) { - $object->setImageID($data->{'ImageID'}); - } - if (property_exists($data, 'Command')) { - $object->setCommand($data->{'Command'}); - } - if (property_exists($data, 'Created')) { - $object->setCreated($data->{'Created'}); - } - if (property_exists($data, 'State')) { - $object->setState($data->{'State'}); - } - if (property_exists($data, 'Status')) { - $object->setStatus($data->{'Status'}); - } - if (property_exists($data, 'Ports')) { - $value_2 = $data->{'Ports'}; - if (is_array($data->{'Ports'})) { - $values_1 = []; - foreach ($data->{'Ports'} as $value_3) { - $values_1[] = $this->serializer->denormalize($value_3, 'Docker\\API\\Model\\Port', 'raw', $context); - } - $value_2 = $values_1; - } - if (is_null($data->{'Ports'})) { - $value_2 = $data->{'Ports'}; - } - $object->setPorts($value_2); - } - if (property_exists($data, 'Labels')) { - $value_4 = $data->{'Labels'}; - if (is_object($data->{'Labels'})) { - $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Labels'} as $key => $value_5) { - $values_2[$key] = $value_5; - } - $value_4 = $values_2; - } - if (is_null($data->{'Labels'})) { - $value_4 = $data->{'Labels'}; - } - $object->setLabels($value_4); - } - if (property_exists($data, 'SizeRw')) { - $object->setSizeRw($data->{'SizeRw'}); - } - if (property_exists($data, 'SizeRootFs')) { - $object->setSizeRootFs($data->{'SizeRootFs'}); - } - if (property_exists($data, 'HostConfig')) { - $object->setHostConfig($this->serializer->denormalize($data->{'HostConfig'}, 'Docker\\API\\Model\\HostConfig', 'raw', $context)); - } - if (property_exists($data, 'NetworkSettings')) { - $object->setNetworkSettings($this->serializer->denormalize($data->{'NetworkSettings'}, 'Docker\\API\\Model\\NetworkConfig', 'raw', $context)); - } - if (property_exists($data, 'Mounts')) { - $value_6 = $data->{'Mounts'}; - if (is_array($data->{'Mounts'})) { - $values_3 = []; - foreach ($data->{'Mounts'} as $value_7) { - $values_3[] = $this->serializer->denormalize($value_7, 'Docker\\API\\Model\\Mount', 'raw', $context); - } - $value_6 = $values_3; - } - if (is_null($data->{'Mounts'})) { - $value_6 = $data->{'Mounts'}; - } - $object->setMounts($value_6); - } - if (property_exists($data, 'Node')) { - $object->setNode($this->serializer->denormalize($data->{'Node'}, 'Docker\\API\\Model\\ContainerNode', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getId()) { - $data->{'Id'} = $object->getId(); - } - $value = $object->getNames(); - if (is_array($object->getNames())) { - $values = []; - foreach ($object->getNames() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getNames())) { - $value = $object->getNames(); - } - $data->{'Names'} = $value; - if (null !== $object->getImage()) { - $data->{'Image'} = $object->getImage(); - } - if (null !== $object->getImageID()) { - $data->{'ImageID'} = $object->getImageID(); - } - if (null !== $object->getCommand()) { - $data->{'Command'} = $object->getCommand(); - } - if (null !== $object->getCreated()) { - $data->{'Created'} = $object->getCreated(); - } - if (null !== $object->getState()) { - $data->{'State'} = $object->getState(); - } - if (null !== $object->getStatus()) { - $data->{'Status'} = $object->getStatus(); - } - $value_2 = $object->getPorts(); - if (is_array($object->getPorts())) { - $values_1 = []; - foreach ($object->getPorts() as $value_3) { - $values_1[] = $value_3; - } - $value_2 = $values_1; - } - if (is_null($object->getPorts())) { - $value_2 = $object->getPorts(); - } - $data->{'Ports'} = $value_2; - $value_4 = $object->getLabels(); - if (is_object($object->getLabels())) { - $values_2 = new \stdClass(); - foreach ($object->getLabels() as $key => $value_5) { - $values_2->{$key} = $value_5; - } - $value_4 = $values_2; - } - if (is_null($object->getLabels())) { - $value_4 = $object->getLabels(); - } - $data->{'Labels'} = $value_4; - if (null !== $object->getSizeRw()) { - $data->{'SizeRw'} = $object->getSizeRw(); - } - if (null !== $object->getSizeRootFs()) { - $data->{'SizeRootFs'} = $object->getSizeRootFs(); - } - if (null !== $object->getHostConfig()) { - $data->{'HostConfig'} = json_decode($this->serializer->normalize($object->getHostConfig(), 'raw', $context)); - } - if (null !== $object->getNetworkSettings()) { - $data->{'NetworkSettings'} = json_decode($this->serializer->normalize($object->getNetworkSettings(), 'raw', $context)); - } - $value_6 = $object->getMounts(); - if (is_array($object->getMounts())) { - $values_3 = []; - foreach ($object->getMounts() as $value_7) { - $values_3[] = $value_7; - } - $value_6 = $values_3; - } - if (is_null($object->getMounts())) { - $value_6 = $object->getMounts(); - } - $data->{'Mounts'} = $value_6; - if (null !== $object->getNode()) { - $data->{'Node'} = json_decode($this->serializer->normalize($object->getNode(), 'raw', $context)); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerNetworkNormalizer.php b/generated/Normalizer/ContainerNetworkNormalizer.php deleted file mode 100644 index cd6c225ac..000000000 --- a/generated/Normalizer/ContainerNetworkNormalizer.php +++ /dev/null @@ -1,104 +0,0 @@ -setNetworkID($data->{'NetworkID'}); - } - if (property_exists($data, 'EndpointID')) { - $object->setEndpointID($data->{'EndpointID'}); - } - if (property_exists($data, 'Gateway')) { - $object->setGateway($data->{'Gateway'}); - } - if (property_exists($data, 'IPAddress')) { - $object->setIPAddress($data->{'IPAddress'}); - } - if (property_exists($data, 'IPPrefixLen')) { - $object->setIPPrefixLen($data->{'IPPrefixLen'}); - } - if (property_exists($data, 'IPv6Gateway')) { - $object->setIPv6Gateway($data->{'IPv6Gateway'}); - } - if (property_exists($data, 'GlobalIPv6Address')) { - $object->setGlobalIPv6Address($data->{'GlobalIPv6Address'}); - } - if (property_exists($data, 'GlobalIPv6PrefixLen')) { - $object->setGlobalIPv6PrefixLen($data->{'GlobalIPv6PrefixLen'}); - } - if (property_exists($data, 'MacAddress')) { - $object->setMacAddress($data->{'MacAddress'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getNetworkID()) { - $data->{'NetworkID'} = $object->getNetworkID(); - } - if (null !== $object->getEndpointID()) { - $data->{'EndpointID'} = $object->getEndpointID(); - } - if (null !== $object->getGateway()) { - $data->{'Gateway'} = $object->getGateway(); - } - if (null !== $object->getIPAddress()) { - $data->{'IPAddress'} = $object->getIPAddress(); - } - if (null !== $object->getIPPrefixLen()) { - $data->{'IPPrefixLen'} = $object->getIPPrefixLen(); - } - if (null !== $object->getIPv6Gateway()) { - $data->{'IPv6Gateway'} = $object->getIPv6Gateway(); - } - if (null !== $object->getGlobalIPv6Address()) { - $data->{'GlobalIPv6Address'} = $object->getGlobalIPv6Address(); - } - if (null !== $object->getGlobalIPv6PrefixLen()) { - $data->{'GlobalIPv6PrefixLen'} = $object->getGlobalIPv6PrefixLen(); - } - if (null !== $object->getMacAddress()) { - $data->{'MacAddress'} = $object->getMacAddress(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerNodeNormalizer.php b/generated/Normalizer/ContainerNodeNormalizer.php deleted file mode 100644 index fec19f83e..000000000 --- a/generated/Normalizer/ContainerNodeNormalizer.php +++ /dev/null @@ -1,75 +0,0 @@ -setId($data->{'Id'}); - } - if (property_exists($data, 'Ip')) { - $object->setIp($data->{'Ip'}); - } - if (property_exists($data, 'Addr')) { - $object->setAddr($data->{'Addr'}); - } - if (property_exists($data, 'Name')) { - $object->setName($data->{'Name'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getId()) { - $data->{'Id'} = $object->getId(); - } - if (null !== $object->getIp()) { - $data->{'Ip'} = $object->getIp(); - } - if (null !== $object->getAddr()) { - $data->{'Addr'} = $object->getAddr(); - } - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerNormalizer.php b/generated/Normalizer/ContainerNormalizer.php deleted file mode 100644 index 7c42edd72..000000000 --- a/generated/Normalizer/ContainerNormalizer.php +++ /dev/null @@ -1,223 +0,0 @@ -setAppArmorProfile($data->{'AppArmorProfile'}); - } - if (property_exists($data, 'Args')) { - $value = $data->{'Args'}; - if (is_array($data->{'Args'})) { - $values = []; - foreach ($data->{'Args'} as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Args'})) { - $value = $data->{'Args'}; - } - $object->setArgs($value); - } - if (property_exists($data, 'Config')) { - $object->setConfig($this->serializer->denormalize($data->{'Config'}, 'Docker\\API\\Model\\ContainerConfig', 'raw', $context)); - } - if (property_exists($data, 'Created')) { - $object->setCreated($data->{'Created'}); - } - if (property_exists($data, 'Driver')) { - $object->setDriver($data->{'Driver'}); - } - if (property_exists($data, 'ExecDriver')) { - $object->setExecDriver($data->{'ExecDriver'}); - } - if (property_exists($data, 'ExecIDs')) { - $object->setExecIDs($data->{'ExecIDs'}); - } - if (property_exists($data, 'HostConfig')) { - $object->setHostConfig($this->serializer->denormalize($data->{'HostConfig'}, 'Docker\\API\\Model\\HostConfig', 'raw', $context)); - } - if (property_exists($data, 'HostnamePath')) { - $object->setHostnamePath($data->{'HostnamePath'}); - } - if (property_exists($data, 'HostsPath')) { - $object->setHostsPath($data->{'HostsPath'}); - } - if (property_exists($data, 'LogPath')) { - $object->setLogPath($data->{'LogPath'}); - } - if (property_exists($data, 'Id')) { - $object->setId($data->{'Id'}); - } - if (property_exists($data, 'Image')) { - $object->setImage($data->{'Image'}); - } - if (property_exists($data, 'MountLabel')) { - $object->setMountLabel($data->{'MountLabel'}); - } - if (property_exists($data, 'Name')) { - $object->setName($data->{'Name'}); - } - if (property_exists($data, 'NetworkSettings')) { - $object->setNetworkSettings($this->serializer->denormalize($data->{'NetworkSettings'}, 'Docker\\API\\Model\\NetworkConfig', 'raw', $context)); - } - if (property_exists($data, 'Path')) { - $object->setPath($data->{'Path'}); - } - if (property_exists($data, 'ProcessLabel')) { - $object->setProcessLabel($data->{'ProcessLabel'}); - } - if (property_exists($data, 'ResolvConfPath')) { - $object->setResolvConfPath($data->{'ResolvConfPath'}); - } - if (property_exists($data, 'RestartCount')) { - $object->setRestartCount($data->{'RestartCount'}); - } - if (property_exists($data, 'State')) { - $object->setState($this->serializer->denormalize($data->{'State'}, 'Docker\\API\\Model\\ContainerState', 'raw', $context)); - } - if (property_exists($data, 'Mounts')) { - $value_2 = $data->{'Mounts'}; - if (is_array($data->{'Mounts'})) { - $values_1 = []; - foreach ($data->{'Mounts'} as $value_3) { - $values_1[] = $this->serializer->denormalize($value_3, 'Docker\\API\\Model\\Mount', 'raw', $context); - } - $value_2 = $values_1; - } - if (is_null($data->{'Mounts'})) { - $value_2 = $data->{'Mounts'}; - } - $object->setMounts($value_2); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getAppArmorProfile()) { - $data->{'AppArmorProfile'} = $object->getAppArmorProfile(); - } - $value = $object->getArgs(); - if (is_array($object->getArgs())) { - $values = []; - foreach ($object->getArgs() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getArgs())) { - $value = $object->getArgs(); - } - $data->{'Args'} = $value; - if (null !== $object->getConfig()) { - $data->{'Config'} = json_decode($this->serializer->normalize($object->getConfig(), 'raw', $context)); - } - if (null !== $object->getCreated()) { - $data->{'Created'} = $object->getCreated(); - } - if (null !== $object->getDriver()) { - $data->{'Driver'} = $object->getDriver(); - } - if (null !== $object->getExecDriver()) { - $data->{'ExecDriver'} = $object->getExecDriver(); - } - if (null !== $object->getExecIDs()) { - $data->{'ExecIDs'} = $object->getExecIDs(); - } - if (null !== $object->getHostConfig()) { - $data->{'HostConfig'} = json_decode($this->serializer->normalize($object->getHostConfig(), 'raw', $context)); - } - if (null !== $object->getHostnamePath()) { - $data->{'HostnamePath'} = $object->getHostnamePath(); - } - if (null !== $object->getHostsPath()) { - $data->{'HostsPath'} = $object->getHostsPath(); - } - if (null !== $object->getLogPath()) { - $data->{'LogPath'} = $object->getLogPath(); - } - if (null !== $object->getId()) { - $data->{'Id'} = $object->getId(); - } - if (null !== $object->getImage()) { - $data->{'Image'} = $object->getImage(); - } - if (null !== $object->getMountLabel()) { - $data->{'MountLabel'} = $object->getMountLabel(); - } - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - if (null !== $object->getNetworkSettings()) { - $data->{'NetworkSettings'} = json_decode($this->serializer->normalize($object->getNetworkSettings(), 'raw', $context)); - } - if (null !== $object->getPath()) { - $data->{'Path'} = $object->getPath(); - } - if (null !== $object->getProcessLabel()) { - $data->{'ProcessLabel'} = $object->getProcessLabel(); - } - if (null !== $object->getResolvConfPath()) { - $data->{'ResolvConfPath'} = $object->getResolvConfPath(); - } - if (null !== $object->getRestartCount()) { - $data->{'RestartCount'} = $object->getRestartCount(); - } - if (null !== $object->getState()) { - $data->{'State'} = json_decode($this->serializer->normalize($object->getState(), 'raw', $context)); - } - $value_2 = $object->getMounts(); - if (is_array($object->getMounts())) { - $values_1 = []; - foreach ($object->getMounts() as $value_3) { - $values_1[] = $value_3; - } - $value_2 = $values_1; - } - if (is_null($object->getMounts())) { - $value_2 = $object->getMounts(); - } - $data->{'Mounts'} = $value_2; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerSpecMountBindOptionsNormalizer.php b/generated/Normalizer/ContainerSpecMountBindOptionsNormalizer.php deleted file mode 100644 index 5d3673aa1..000000000 --- a/generated/Normalizer/ContainerSpecMountBindOptionsNormalizer.php +++ /dev/null @@ -1,57 +0,0 @@ -setPropagation($data->{'Propagation'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getPropagation()) { - $data->{'Propagation'} = $object->getPropagation(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerSpecMountNormalizer.php b/generated/Normalizer/ContainerSpecMountNormalizer.php deleted file mode 100644 index 98184725e..000000000 --- a/generated/Normalizer/ContainerSpecMountNormalizer.php +++ /dev/null @@ -1,87 +0,0 @@ -setType($data->{'Type'}); - } - if (property_exists($data, 'Source')) { - $object->setSource($data->{'Source'}); - } - if (property_exists($data, 'Target')) { - $object->setTarget($data->{'Target'}); - } - if (property_exists($data, 'ReadOnly')) { - $object->setReadOnly($data->{'ReadOnly'}); - } - if (property_exists($data, 'BindOptions')) { - $object->setBindOptions($this->serializer->denormalize($data->{'BindOptions'}, 'Docker\\API\\Model\\ContainerSpecMountBindOptions', 'raw', $context)); - } - if (property_exists($data, 'VolumeOptions')) { - $object->setVolumeOptions($this->serializer->denormalize($data->{'VolumeOptions'}, 'Docker\\API\\Model\\ContainerSpecMountVolumeOptions', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getType()) { - $data->{'Type'} = $object->getType(); - } - if (null !== $object->getSource()) { - $data->{'Source'} = $object->getSource(); - } - if (null !== $object->getTarget()) { - $data->{'Target'} = $object->getTarget(); - } - if (null !== $object->getReadOnly()) { - $data->{'ReadOnly'} = $object->getReadOnly(); - } - if (null !== $object->getBindOptions()) { - $data->{'BindOptions'} = json_decode($this->serializer->normalize($object->getBindOptions(), 'raw', $context)); - } - if (null !== $object->getVolumeOptions()) { - $data->{'VolumeOptions'} = json_decode($this->serializer->normalize($object->getVolumeOptions(), 'raw', $context)); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerSpecMountVolumeOptionsNormalizer.php b/generated/Normalizer/ContainerSpecMountVolumeOptionsNormalizer.php deleted file mode 100644 index 8ce905ffe..000000000 --- a/generated/Normalizer/ContainerSpecMountVolumeOptionsNormalizer.php +++ /dev/null @@ -1,89 +0,0 @@ -setNoCopy($data->{'NoCopy'}); - } - if (property_exists($data, 'Labels')) { - $value = $data->{'Labels'}; - if (is_object($data->{'Labels'})) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Labels'} as $key => $value_1) { - $values[$key] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Labels'})) { - $value = $data->{'Labels'}; - } - $object->setLabels($value); - } - if (property_exists($data, 'DriverConfig')) { - $object->setDriverConfig($this->serializer->denormalize($data->{'DriverConfig'}, 'Docker\\API\\Model\\Driver', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getNoCopy()) { - $data->{'NoCopy'} = $object->getNoCopy(); - } - $value = $object->getLabels(); - if (is_object($object->getLabels())) { - $values = new \stdClass(); - foreach ($object->getLabels() as $key => $value_1) { - $values->{$key} = $value_1; - } - $value = $values; - } - if (is_null($object->getLabels())) { - $value = $object->getLabels(); - } - $data->{'Labels'} = $value; - if (null !== $object->getDriverConfig()) { - $data->{'DriverConfig'} = json_decode($this->serializer->normalize($object->getDriverConfig(), 'raw', $context)); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerSpecNormalizer.php b/generated/Normalizer/ContainerSpecNormalizer.php deleted file mode 100644 index 50616bec1..000000000 --- a/generated/Normalizer/ContainerSpecNormalizer.php +++ /dev/null @@ -1,205 +0,0 @@ -setImage($data->{'Image'}); - } - if (property_exists($data, 'Labels')) { - $value = $data->{'Labels'}; - if (is_object($data->{'Labels'})) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Labels'} as $key => $value_1) { - $values[$key] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Labels'})) { - $value = $data->{'Labels'}; - } - $object->setLabels($value); - } - if (property_exists($data, 'Command')) { - $value_2 = $data->{'Command'}; - if (is_array($data->{'Command'})) { - $values_1 = []; - foreach ($data->{'Command'} as $value_3) { - $values_1[] = $value_3; - } - $value_2 = $values_1; - } - if (is_null($data->{'Command'})) { - $value_2 = $data->{'Command'}; - } - $object->setCommand($value_2); - } - if (property_exists($data, 'Args')) { - $value_4 = $data->{'Args'}; - if (is_array($data->{'Args'})) { - $values_2 = []; - foreach ($data->{'Args'} as $value_5) { - $values_2[] = $value_5; - } - $value_4 = $values_2; - } - if (is_null($data->{'Args'})) { - $value_4 = $data->{'Args'}; - } - $object->setArgs($value_4); - } - if (property_exists($data, 'Env')) { - $value_6 = $data->{'Env'}; - if (is_array($data->{'Env'})) { - $values_3 = []; - foreach ($data->{'Env'} as $value_7) { - $values_3[] = $value_7; - } - $value_6 = $values_3; - } - if (is_null($data->{'Env'})) { - $value_6 = $data->{'Env'}; - } - $object->setEnv($value_6); - } - if (property_exists($data, 'Dir')) { - $object->setDir($data->{'Dir'}); - } - if (property_exists($data, 'User')) { - $object->setUser($data->{'User'}); - } - if (property_exists($data, 'Mounts')) { - $value_8 = $data->{'Mounts'}; - if (is_array($data->{'Mounts'})) { - $values_4 = []; - foreach ($data->{'Mounts'} as $value_9) { - $values_4[] = $this->serializer->denormalize($value_9, 'Docker\\API\\Model\\ContainerSpecMount', 'raw', $context); - } - $value_8 = $values_4; - } - if (is_null($data->{'Mounts'})) { - $value_8 = $data->{'Mounts'}; - } - $object->setMounts($value_8); - } - if (property_exists($data, 'StopGracePeriod')) { - $object->setStopGracePeriod($data->{'StopGracePeriod'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getImage()) { - $data->{'Image'} = $object->getImage(); - } - $value = $object->getLabels(); - if (is_object($object->getLabels())) { - $values = new \stdClass(); - foreach ($object->getLabels() as $key => $value_1) { - $values->{$key} = $value_1; - } - $value = $values; - } - if (is_null($object->getLabels())) { - $value = $object->getLabels(); - } - $data->{'Labels'} = $value; - $value_2 = $object->getCommand(); - if (is_array($object->getCommand())) { - $values_1 = []; - foreach ($object->getCommand() as $value_3) { - $values_1[] = $value_3; - } - $value_2 = $values_1; - } - if (is_null($object->getCommand())) { - $value_2 = $object->getCommand(); - } - $data->{'Command'} = $value_2; - $value_4 = $object->getArgs(); - if (is_array($object->getArgs())) { - $values_2 = []; - foreach ($object->getArgs() as $value_5) { - $values_2[] = $value_5; - } - $value_4 = $values_2; - } - if (is_null($object->getArgs())) { - $value_4 = $object->getArgs(); - } - $data->{'Args'} = $value_4; - $value_6 = $object->getEnv(); - if (is_array($object->getEnv())) { - $values_3 = []; - foreach ($object->getEnv() as $value_7) { - $values_3[] = $value_7; - } - $value_6 = $values_3; - } - if (is_null($object->getEnv())) { - $value_6 = $object->getEnv(); - } - $data->{'Env'} = $value_6; - if (null !== $object->getDir()) { - $data->{'Dir'} = $object->getDir(); - } - if (null !== $object->getUser()) { - $data->{'User'} = $object->getUser(); - } - $value_8 = $object->getMounts(); - if (is_array($object->getMounts())) { - $values_4 = []; - foreach ($object->getMounts() as $value_9) { - $values_4[] = $value_9; - } - $value_8 = $values_4; - } - if (is_null($object->getMounts())) { - $value_8 = $object->getMounts(); - } - $data->{'Mounts'} = $value_8; - if (null !== $object->getStopGracePeriod()) { - $data->{'StopGracePeriod'} = $object->getStopGracePeriod(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerStateNormalizer.php b/generated/Normalizer/ContainerStateNormalizer.php deleted file mode 100644 index c58acbd73..000000000 --- a/generated/Normalizer/ContainerStateNormalizer.php +++ /dev/null @@ -1,105 +0,0 @@ -setError($data->{'Error'}); - } - if (property_exists($data, 'ExitCode')) { - $object->setExitCode($data->{'ExitCode'}); - } - if (property_exists($data, 'FinishedAt')) { - $object->setFinishedAt($data->{'FinishedAt'}); - } - if (property_exists($data, 'OOMKilled')) { - $object->setOOMKilled($data->{'OOMKilled'}); - } - if (property_exists($data, 'Paused')) { - $object->setPaused($data->{'Paused'}); - } - if (property_exists($data, 'Pid')) { - $object->setPid($data->{'Pid'}); - } - if (property_exists($data, 'Restarting')) { - $object->setRestarting($data->{'Restarting'}); - } - if (property_exists($data, 'Running')) { - $object->setRunning($data->{'Running'}); - } - if (property_exists($data, 'StartedAt')) { - $object->setStartedAt($data->{'StartedAt'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getError()) { - $data->{'Error'} = $object->getError(); - } - if (null !== $object->getExitCode()) { - $data->{'ExitCode'} = $object->getExitCode(); - } - if (null !== $object->getFinishedAt()) { - $data->{'FinishedAt'} = $object->getFinishedAt(); - } - if (null !== $object->getOOMKilled()) { - $data->{'OOMKilled'} = $object->getOOMKilled(); - } - if (null !== $object->getPaused()) { - $data->{'Paused'} = $object->getPaused(); - } - if (null !== $object->getPid()) { - $data->{'Pid'} = $object->getPid(); - } - if (null !== $object->getRestarting()) { - $data->{'Restarting'} = $object->getRestarting(); - } - if (null !== $object->getRunning()) { - $data->{'Running'} = $object->getRunning(); - } - if (null !== $object->getStartedAt()) { - $data->{'StartedAt'} = $object->getStartedAt(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerStatusNormalizer.php b/generated/Normalizer/ContainerStatusNormalizer.php deleted file mode 100644 index 275e458d1..000000000 --- a/generated/Normalizer/ContainerStatusNormalizer.php +++ /dev/null @@ -1,69 +0,0 @@ -setContainerID($data->{'ContainerID'}); - } - if (property_exists($data, 'PID')) { - $object->setPID($data->{'PID'}); - } - if (property_exists($data, 'ExitCode')) { - $object->setExitCode($data->{'ExitCode'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getContainerID()) { - $data->{'ContainerID'} = $object->getContainerID(); - } - if (null !== $object->getPID()) { - $data->{'PID'} = $object->getPID(); - } - if (null !== $object->getExitCode()) { - $data->{'ExitCode'} = $object->getExitCode(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerSummaryItemHostConfigNormalizer.php b/generated/Normalizer/ContainerSummaryItemHostConfigNormalizer.php new file mode 100644 index 000000000..7facec1e5 --- /dev/null +++ b/generated/Normalizer/ContainerSummaryItemHostConfigNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainerSummaryItemHostConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerSummaryItemHostConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryItemHostConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerSummaryItemHostConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] !== null) { + $object->setNetworkMode($data['NetworkMode']); + } + elseif (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] === null) { + $object->setNetworkMode(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('networkMode') && null !== $object->getNetworkMode()) { + $data['NetworkMode'] = $object->getNetworkMode(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerSummaryItemHostConfig::class => false]; + } + } +} else { + class ContainerSummaryItemHostConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerSummaryItemHostConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryItemHostConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerSummaryItemHostConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] !== null) { + $object->setNetworkMode($data['NetworkMode']); + } + elseif (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] === null) { + $object->setNetworkMode(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('networkMode') && null !== $object->getNetworkMode()) { + $data['NetworkMode'] = $object->getNetworkMode(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerSummaryItemHostConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainerSummaryItemNetworkSettingsNormalizer.php b/generated/Normalizer/ContainerSummaryItemNetworkSettingsNormalizer.php new file mode 100644 index 000000000..2ab5af7a1 --- /dev/null +++ b/generated/Normalizer/ContainerSummaryItemNetworkSettingsNormalizer.php @@ -0,0 +1,134 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainerSummaryItemNetworkSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerSummaryItemNetworkSettings::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryItemNetworkSettings::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerSummaryItemNetworkSettings(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Networks'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \Docker\API\Model\EndpointSettings::class, 'json', $context); + } + $object->setNetworks($values); + } + elseif (\array_key_exists('Networks', $data) && $data['Networks'] === null) { + $object->setNetworks(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('networks') && null !== $object->getNetworks()) { + $values = []; + foreach ($object->getNetworks() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Networks'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerSummaryItemNetworkSettings::class => false]; + } + } +} else { + class ContainerSummaryItemNetworkSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerSummaryItemNetworkSettings::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryItemNetworkSettings::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerSummaryItemNetworkSettings(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Networks'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \Docker\API\Model\EndpointSettings::class, 'json', $context); + } + $object->setNetworks($values); + } + elseif (\array_key_exists('Networks', $data) && $data['Networks'] === null) { + $object->setNetworks(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('networks') && null !== $object->getNetworks()) { + $values = []; + foreach ($object->getNetworks() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Networks'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerSummaryItemNetworkSettings::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainerSummaryItemNormalizer.php b/generated/Normalizer/ContainerSummaryItemNormalizer.php new file mode 100644 index 000000000..2ce251bff --- /dev/null +++ b/generated/Normalizer/ContainerSummaryItemNormalizer.php @@ -0,0 +1,434 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainerSummaryItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerSummaryItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerSummaryItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('Names', $data) && $data['Names'] !== null) { + $values = []; + foreach ($data['Names'] as $value) { + $values[] = $value; + } + $object->setNames($values); + } + elseif (\array_key_exists('Names', $data) && $data['Names'] === null) { + $object->setNames(null); + } + if (\array_key_exists('Image', $data) && $data['Image'] !== null) { + $object->setImage($data['Image']); + } + elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { + $object->setImage(null); + } + if (\array_key_exists('ImageID', $data) && $data['ImageID'] !== null) { + $object->setImageID($data['ImageID']); + } + elseif (\array_key_exists('ImageID', $data) && $data['ImageID'] === null) { + $object->setImageID(null); + } + if (\array_key_exists('Command', $data) && $data['Command'] !== null) { + $object->setCommand($data['Command']); + } + elseif (\array_key_exists('Command', $data) && $data['Command'] === null) { + $object->setCommand(null); + } + if (\array_key_exists('Created', $data) && $data['Created'] !== null) { + $object->setCreated($data['Created']); + } + elseif (\array_key_exists('Created', $data) && $data['Created'] === null) { + $object->setCreated(null); + } + if (\array_key_exists('Ports', $data) && $data['Ports'] !== null) { + $values_1 = []; + foreach ($data['Ports'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\Port::class, 'json', $context); + } + $object->setPorts($values_1); + } + elseif (\array_key_exists('Ports', $data) && $data['Ports'] === null) { + $object->setPorts(null); + } + if (\array_key_exists('SizeRw', $data) && $data['SizeRw'] !== null) { + $object->setSizeRw($data['SizeRw']); + } + elseif (\array_key_exists('SizeRw', $data) && $data['SizeRw'] === null) { + $object->setSizeRw(null); + } + if (\array_key_exists('SizeRootFs', $data) && $data['SizeRootFs'] !== null) { + $object->setSizeRootFs($data['SizeRootFs']); + } + elseif (\array_key_exists('SizeRootFs', $data) && $data['SizeRootFs'] === null) { + $object->setSizeRootFs(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value_2) { + $values_2[$key] = $value_2; + } + $object->setLabels($values_2); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('State', $data) && $data['State'] !== null) { + $object->setState($data['State']); + } + elseif (\array_key_exists('State', $data) && $data['State'] === null) { + $object->setState(null); + } + if (\array_key_exists('Status', $data) && $data['Status'] !== null) { + $object->setStatus($data['Status']); + } + elseif (\array_key_exists('Status', $data) && $data['Status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('HostConfig', $data) && $data['HostConfig'] !== null) { + $object->setHostConfig($this->denormalizer->denormalize($data['HostConfig'], \Docker\API\Model\ContainerSummaryItemHostConfig::class, 'json', $context)); + } + elseif (\array_key_exists('HostConfig', $data) && $data['HostConfig'] === null) { + $object->setHostConfig(null); + } + if (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] !== null) { + $object->setNetworkSettings($this->denormalizer->denormalize($data['NetworkSettings'], \Docker\API\Model\ContainerSummaryItemNetworkSettings::class, 'json', $context)); + } + elseif (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] === null) { + $object->setNetworkSettings(null); + } + if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { + $values_3 = []; + foreach ($data['Mounts'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\MountPoint::class, 'json', $context); + } + $object->setMounts($values_3); + } + elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { + $object->setMounts(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['Id'] = $object->getId(); + } + if ($object->isInitialized('names') && null !== $object->getNames()) { + $values = []; + foreach ($object->getNames() as $value) { + $values[] = $value; + } + $data['Names'] = $values; + } + if ($object->isInitialized('image') && null !== $object->getImage()) { + $data['Image'] = $object->getImage(); + } + if ($object->isInitialized('imageID') && null !== $object->getImageID()) { + $data['ImageID'] = $object->getImageID(); + } + if ($object->isInitialized('command') && null !== $object->getCommand()) { + $data['Command'] = $object->getCommand(); + } + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['Created'] = $object->getCreated(); + } + if ($object->isInitialized('ports') && null !== $object->getPorts()) { + $values_1 = []; + foreach ($object->getPorts() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Ports'] = $values_1; + } + if ($object->isInitialized('sizeRw') && null !== $object->getSizeRw()) { + $data['SizeRw'] = $object->getSizeRw(); + } + if ($object->isInitialized('sizeRootFs') && null !== $object->getSizeRootFs()) { + $data['SizeRootFs'] = $object->getSizeRootFs(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_2 = []; + foreach ($object->getLabels() as $key => $value_2) { + $values_2[$key] = $value_2; + } + $data['Labels'] = $values_2; + } + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['State'] = $object->getState(); + } + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['Status'] = $object->getStatus(); + } + if ($object->isInitialized('hostConfig') && null !== $object->getHostConfig()) { + $data['HostConfig'] = $this->normalizer->normalize($object->getHostConfig(), 'json', $context); + } + if ($object->isInitialized('networkSettings') && null !== $object->getNetworkSettings()) { + $data['NetworkSettings'] = $this->normalizer->normalize($object->getNetworkSettings(), 'json', $context); + } + if ($object->isInitialized('mounts') && null !== $object->getMounts()) { + $values_3 = []; + foreach ($object->getMounts() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['Mounts'] = $values_3; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerSummaryItem::class => false]; + } + } +} else { + class ContainerSummaryItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerSummaryItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerSummaryItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('Names', $data) && $data['Names'] !== null) { + $values = []; + foreach ($data['Names'] as $value) { + $values[] = $value; + } + $object->setNames($values); + } + elseif (\array_key_exists('Names', $data) && $data['Names'] === null) { + $object->setNames(null); + } + if (\array_key_exists('Image', $data) && $data['Image'] !== null) { + $object->setImage($data['Image']); + } + elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { + $object->setImage(null); + } + if (\array_key_exists('ImageID', $data) && $data['ImageID'] !== null) { + $object->setImageID($data['ImageID']); + } + elseif (\array_key_exists('ImageID', $data) && $data['ImageID'] === null) { + $object->setImageID(null); + } + if (\array_key_exists('Command', $data) && $data['Command'] !== null) { + $object->setCommand($data['Command']); + } + elseif (\array_key_exists('Command', $data) && $data['Command'] === null) { + $object->setCommand(null); + } + if (\array_key_exists('Created', $data) && $data['Created'] !== null) { + $object->setCreated($data['Created']); + } + elseif (\array_key_exists('Created', $data) && $data['Created'] === null) { + $object->setCreated(null); + } + if (\array_key_exists('Ports', $data) && $data['Ports'] !== null) { + $values_1 = []; + foreach ($data['Ports'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\Port::class, 'json', $context); + } + $object->setPorts($values_1); + } + elseif (\array_key_exists('Ports', $data) && $data['Ports'] === null) { + $object->setPorts(null); + } + if (\array_key_exists('SizeRw', $data) && $data['SizeRw'] !== null) { + $object->setSizeRw($data['SizeRw']); + } + elseif (\array_key_exists('SizeRw', $data) && $data['SizeRw'] === null) { + $object->setSizeRw(null); + } + if (\array_key_exists('SizeRootFs', $data) && $data['SizeRootFs'] !== null) { + $object->setSizeRootFs($data['SizeRootFs']); + } + elseif (\array_key_exists('SizeRootFs', $data) && $data['SizeRootFs'] === null) { + $object->setSizeRootFs(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value_2) { + $values_2[$key] = $value_2; + } + $object->setLabels($values_2); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('State', $data) && $data['State'] !== null) { + $object->setState($data['State']); + } + elseif (\array_key_exists('State', $data) && $data['State'] === null) { + $object->setState(null); + } + if (\array_key_exists('Status', $data) && $data['Status'] !== null) { + $object->setStatus($data['Status']); + } + elseif (\array_key_exists('Status', $data) && $data['Status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('HostConfig', $data) && $data['HostConfig'] !== null) { + $object->setHostConfig($this->denormalizer->denormalize($data['HostConfig'], \Docker\API\Model\ContainerSummaryItemHostConfig::class, 'json', $context)); + } + elseif (\array_key_exists('HostConfig', $data) && $data['HostConfig'] === null) { + $object->setHostConfig(null); + } + if (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] !== null) { + $object->setNetworkSettings($this->denormalizer->denormalize($data['NetworkSettings'], \Docker\API\Model\ContainerSummaryItemNetworkSettings::class, 'json', $context)); + } + elseif (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] === null) { + $object->setNetworkSettings(null); + } + if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { + $values_3 = []; + foreach ($data['Mounts'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\MountPoint::class, 'json', $context); + } + $object->setMounts($values_3); + } + elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { + $object->setMounts(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['Id'] = $object->getId(); + } + if ($object->isInitialized('names') && null !== $object->getNames()) { + $values = []; + foreach ($object->getNames() as $value) { + $values[] = $value; + } + $data['Names'] = $values; + } + if ($object->isInitialized('image') && null !== $object->getImage()) { + $data['Image'] = $object->getImage(); + } + if ($object->isInitialized('imageID') && null !== $object->getImageID()) { + $data['ImageID'] = $object->getImageID(); + } + if ($object->isInitialized('command') && null !== $object->getCommand()) { + $data['Command'] = $object->getCommand(); + } + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['Created'] = $object->getCreated(); + } + if ($object->isInitialized('ports') && null !== $object->getPorts()) { + $values_1 = []; + foreach ($object->getPorts() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Ports'] = $values_1; + } + if ($object->isInitialized('sizeRw') && null !== $object->getSizeRw()) { + $data['SizeRw'] = $object->getSizeRw(); + } + if ($object->isInitialized('sizeRootFs') && null !== $object->getSizeRootFs()) { + $data['SizeRootFs'] = $object->getSizeRootFs(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_2 = []; + foreach ($object->getLabels() as $key => $value_2) { + $values_2[$key] = $value_2; + } + $data['Labels'] = $values_2; + } + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['State'] = $object->getState(); + } + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['Status'] = $object->getStatus(); + } + if ($object->isInitialized('hostConfig') && null !== $object->getHostConfig()) { + $data['HostConfig'] = $this->normalizer->normalize($object->getHostConfig(), 'json', $context); + } + if ($object->isInitialized('networkSettings') && null !== $object->getNetworkSettings()) { + $data['NetworkSettings'] = $this->normalizer->normalize($object->getNetworkSettings(), 'json', $context); + } + if ($object->isInitialized('mounts') && null !== $object->getMounts()) { + $values_3 = []; + foreach ($object->getMounts() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['Mounts'] = $values_3; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerSummaryItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainerTopNormalizer.php b/generated/Normalizer/ContainerTopNormalizer.php deleted file mode 100644 index 36e6e0273..000000000 --- a/generated/Normalizer/ContainerTopNormalizer.php +++ /dev/null @@ -1,125 +0,0 @@ -{'Titles'}; - if (is_array($data->{'Titles'})) { - $values = []; - foreach ($data->{'Titles'} as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Titles'})) { - $value = $data->{'Titles'}; - } - $object->setTitles($value); - } - if (property_exists($data, 'Processes')) { - $value_2 = $data->{'Processes'}; - if (is_array($data->{'Processes'})) { - $values_1 = []; - foreach ($data->{'Processes'} as $value_3) { - $value_4 = $value_3; - if (is_array($value_3)) { - $values_2 = []; - foreach ($value_3 as $value_5) { - $values_2[] = $value_5; - } - $value_4 = $values_2; - } - if (is_null($value_3)) { - $value_4 = $value_3; - } - $values_1[] = $value_4; - } - $value_2 = $values_1; - } - if (is_null($data->{'Processes'})) { - $value_2 = $data->{'Processes'}; - } - $object->setProcesses($value_2); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - $value = $object->getTitles(); - if (is_array($object->getTitles())) { - $values = []; - foreach ($object->getTitles() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getTitles())) { - $value = $object->getTitles(); - } - $data->{'Titles'} = $value; - $value_2 = $object->getProcesses(); - if (is_array($object->getProcesses())) { - $values_1 = []; - foreach ($object->getProcesses() as $value_3) { - $value_4 = $value_3; - if (is_array($value_3)) { - $values_2 = []; - foreach ($value_3 as $value_5) { - $values_2[] = $value_5; - } - $value_4 = $values_2; - } - if (is_null($value_3)) { - $value_4 = $value_3; - } - $values_1[] = $value_4; - } - $value_2 = $values_1; - } - if (is_null($object->getProcesses())) { - $value_2 = $object->getProcesses(); - } - $data->{'Processes'} = $value_2; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerUpdateResultNormalizer.php b/generated/Normalizer/ContainerUpdateResultNormalizer.php deleted file mode 100644 index 5c93640c6..000000000 --- a/generated/Normalizer/ContainerUpdateResultNormalizer.php +++ /dev/null @@ -1,77 +0,0 @@ -{'Warnings'}; - if (is_array($data->{'Warnings'})) { - $values = []; - foreach ($data->{'Warnings'} as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Warnings'})) { - $value = $data->{'Warnings'}; - } - $object->setWarnings($value); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - $value = $object->getWarnings(); - if (is_array($object->getWarnings())) { - $values = []; - foreach ($object->getWarnings() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getWarnings())) { - $value = $object->getWarnings(); - } - $data->{'Warnings'} = $value; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainerWaitNormalizer.php b/generated/Normalizer/ContainerWaitNormalizer.php deleted file mode 100644 index c41af2265..000000000 --- a/generated/Normalizer/ContainerWaitNormalizer.php +++ /dev/null @@ -1,57 +0,0 @@ -setStatusCode($data->{'StatusCode'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getStatusCode()) { - $data->{'StatusCode'} = $object->getStatusCode(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ContainersCreatePostBodyNetworkingConfigNormalizer.php b/generated/Normalizer/ContainersCreatePostBodyNetworkingConfigNormalizer.php new file mode 100644 index 000000000..1bface653 --- /dev/null +++ b/generated/Normalizer/ContainersCreatePostBodyNetworkingConfigNormalizer.php @@ -0,0 +1,134 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainersCreatePostBodyNetworkingConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('EndpointsConfig', $data) && $data['EndpointsConfig'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['EndpointsConfig'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \Docker\API\Model\EndpointSettings::class, 'json', $context); + } + $object->setEndpointsConfig($values); + } + elseif (\array_key_exists('EndpointsConfig', $data) && $data['EndpointsConfig'] === null) { + $object->setEndpointsConfig(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('endpointsConfig') && null !== $object->getEndpointsConfig()) { + $values = []; + foreach ($object->getEndpointsConfig() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); + } + $data['EndpointsConfig'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class => false]; + } + } +} else { + class ContainersCreatePostBodyNetworkingConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('EndpointsConfig', $data) && $data['EndpointsConfig'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['EndpointsConfig'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \Docker\API\Model\EndpointSettings::class, 'json', $context); + } + $object->setEndpointsConfig($values); + } + elseif (\array_key_exists('EndpointsConfig', $data) && $data['EndpointsConfig'] === null) { + $object->setEndpointsConfig(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('endpointsConfig') && null !== $object->getEndpointsConfig()) { + $values = []; + foreach ($object->getEndpointsConfig() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); + } + $data['EndpointsConfig'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersCreatePostBodyNormalizer.php b/generated/Normalizer/ContainersCreatePostBodyNormalizer.php new file mode 100644 index 000000000..174498b7f --- /dev/null +++ b/generated/Normalizer/ContainersCreatePostBodyNormalizer.php @@ -0,0 +1,746 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainersCreatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersCreatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersCreatePostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersCreatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Hostname', $data) && $data['Hostname'] !== null) { + $object->setHostname($data['Hostname']); + } + elseif (\array_key_exists('Hostname', $data) && $data['Hostname'] === null) { + $object->setHostname(null); + } + if (\array_key_exists('Domainname', $data) && $data['Domainname'] !== null) { + $object->setDomainname($data['Domainname']); + } + elseif (\array_key_exists('Domainname', $data) && $data['Domainname'] === null) { + $object->setDomainname(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($data['User']); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + if (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] !== null) { + $object->setAttachStdin($data['AttachStdin']); + } + elseif (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] === null) { + $object->setAttachStdin(null); + } + if (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] !== null) { + $object->setAttachStdout($data['AttachStdout']); + } + elseif (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] === null) { + $object->setAttachStdout(null); + } + if (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] !== null) { + $object->setAttachStderr($data['AttachStderr']); + } + elseif (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] === null) { + $object->setAttachStderr(null); + } + if (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['ExposedPorts'] as $key => $value) { + $values[$key] = $value; + } + $object->setExposedPorts($values); + } + elseif (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] === null) { + $object->setExposedPorts(null); + } + if (\array_key_exists('Tty', $data) && $data['Tty'] !== null) { + $object->setTty($data['Tty']); + } + elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { + $object->setTty(null); + } + if (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] !== null) { + $object->setOpenStdin($data['OpenStdin']); + } + elseif (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] === null) { + $object->setOpenStdin(null); + } + if (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] !== null) { + $object->setStdinOnce($data['StdinOnce']); + } + elseif (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] === null) { + $object->setStdinOnce(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values_1 = []; + foreach ($data['Env'] as $value_1) { + $values_1[] = $value_1; + } + $object->setEnv($values_1); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { + $value_2 = $data['Cmd']; + if (is_array($data['Cmd']) && $this->isOnlyNumericKeys($data['Cmd'])) { + $values_2 = []; + foreach ($data['Cmd'] as $value_3) { + $values_2[] = $value_3; + } + $value_2 = $values_2; + } elseif (is_string($data['Cmd'])) { + $value_2 = $data['Cmd']; + } + $object->setCmd($value_2); + } + elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { + $object->setCmd(null); + } + if (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] !== null) { + $object->setHealthcheck($this->denormalizer->denormalize($data['Healthcheck'], \Docker\API\Model\ConfigHealthcheck::class, 'json', $context)); + } + elseif (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] === null) { + $object->setHealthcheck(null); + } + if (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] !== null) { + $object->setArgsEscaped($data['ArgsEscaped']); + } + elseif (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] === null) { + $object->setArgsEscaped(null); + } + if (\array_key_exists('Image', $data) && $data['Image'] !== null) { + $object->setImage($data['Image']); + } + elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { + $object->setImage(null); + } + if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { + $object->setVolumes($this->denormalizer->denormalize($data['Volumes'], \Docker\API\Model\ConfigVolumes::class, 'json', $context)); + } + elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { + $object->setVolumes(null); + } + if (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] !== null) { + $object->setWorkingDir($data['WorkingDir']); + } + elseif (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] === null) { + $object->setWorkingDir(null); + } + if (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] !== null) { + $value_4 = $data['Entrypoint']; + if (is_array($data['Entrypoint']) && $this->isOnlyNumericKeys($data['Entrypoint'])) { + $values_3 = []; + foreach ($data['Entrypoint'] as $value_5) { + $values_3[] = $value_5; + } + $value_4 = $values_3; + } elseif (is_string($data['Entrypoint'])) { + $value_4 = $data['Entrypoint']; + } + $object->setEntrypoint($value_4); + } + elseif (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] === null) { + $object->setEntrypoint(null); + } + if (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] !== null) { + $object->setNetworkDisabled($data['NetworkDisabled']); + } + elseif (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] === null) { + $object->setNetworkDisabled(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + if (\array_key_exists('OnBuild', $data) && $data['OnBuild'] !== null) { + $values_4 = []; + foreach ($data['OnBuild'] as $value_6) { + $values_4[] = $value_6; + } + $object->setOnBuild($values_4); + } + elseif (\array_key_exists('OnBuild', $data) && $data['OnBuild'] === null) { + $object->setOnBuild(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_5 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_1 => $value_7) { + $values_5[$key_1] = $value_7; + } + $object->setLabels($values_5); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('StopSignal', $data) && $data['StopSignal'] !== null) { + $object->setStopSignal($data['StopSignal']); + } + elseif (\array_key_exists('StopSignal', $data) && $data['StopSignal'] === null) { + $object->setStopSignal(null); + } + if (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] !== null) { + $object->setStopTimeout($data['StopTimeout']); + } + elseif (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] === null) { + $object->setStopTimeout(null); + } + if (\array_key_exists('Shell', $data) && $data['Shell'] !== null) { + $values_6 = []; + foreach ($data['Shell'] as $value_8) { + $values_6[] = $value_8; + } + $object->setShell($values_6); + } + elseif (\array_key_exists('Shell', $data) && $data['Shell'] === null) { + $object->setShell(null); + } + if (\array_key_exists('HostConfig', $data) && $data['HostConfig'] !== null) { + $object->setHostConfig($this->denormalizer->denormalize($data['HostConfig'], \Docker\API\Model\HostConfig::class, 'json', $context)); + } + elseif (\array_key_exists('HostConfig', $data) && $data['HostConfig'] === null) { + $object->setHostConfig(null); + } + if (\array_key_exists('NetworkingConfig', $data) && $data['NetworkingConfig'] !== null) { + $object->setNetworkingConfig($this->denormalizer->denormalize($data['NetworkingConfig'], \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class, 'json', $context)); + } + elseif (\array_key_exists('NetworkingConfig', $data) && $data['NetworkingConfig'] === null) { + $object->setNetworkingConfig(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('hostname') && null !== $object->getHostname()) { + $data['Hostname'] = $object->getHostname(); + } + if ($object->isInitialized('domainname') && null !== $object->getDomainname()) { + $data['Domainname'] = $object->getDomainname(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $object->getUser(); + } + if ($object->isInitialized('attachStdin') && null !== $object->getAttachStdin()) { + $data['AttachStdin'] = $object->getAttachStdin(); + } + if ($object->isInitialized('attachStdout') && null !== $object->getAttachStdout()) { + $data['AttachStdout'] = $object->getAttachStdout(); + } + if ($object->isInitialized('attachStderr') && null !== $object->getAttachStderr()) { + $data['AttachStderr'] = $object->getAttachStderr(); + } + if ($object->isInitialized('exposedPorts') && null !== $object->getExposedPorts()) { + $values = []; + foreach ($object->getExposedPorts() as $key => $value) { + $values[$key] = $value; + } + $data['ExposedPorts'] = $values; + } + if ($object->isInitialized('tty') && null !== $object->getTty()) { + $data['Tty'] = $object->getTty(); + } + if ($object->isInitialized('openStdin') && null !== $object->getOpenStdin()) { + $data['OpenStdin'] = $object->getOpenStdin(); + } + if ($object->isInitialized('stdinOnce') && null !== $object->getStdinOnce()) { + $data['StdinOnce'] = $object->getStdinOnce(); + } + if ($object->isInitialized('env') && null !== $object->getEnv()) { + $values_1 = []; + foreach ($object->getEnv() as $value_1) { + $values_1[] = $value_1; + } + $data['Env'] = $values_1; + } + if ($object->isInitialized('cmd') && null !== $object->getCmd()) { + $value_2 = $object->getCmd(); + if (is_array($object->getCmd())) { + $values_2 = []; + foreach ($object->getCmd() as $value_3) { + $values_2[] = $value_3; + } + $value_2 = $values_2; + } elseif (is_string($object->getCmd())) { + $value_2 = $object->getCmd(); + } + $data['Cmd'] = $value_2; + } + if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) { + $data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context); + } + if ($object->isInitialized('argsEscaped') && null !== $object->getArgsEscaped()) { + $data['ArgsEscaped'] = $object->getArgsEscaped(); + } + if ($object->isInitialized('image') && null !== $object->getImage()) { + $data['Image'] = $object->getImage(); + } + if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { + $data['Volumes'] = $this->normalizer->normalize($object->getVolumes(), 'json', $context); + } + if ($object->isInitialized('workingDir') && null !== $object->getWorkingDir()) { + $data['WorkingDir'] = $object->getWorkingDir(); + } + if ($object->isInitialized('entrypoint') && null !== $object->getEntrypoint()) { + $value_4 = $object->getEntrypoint(); + if (is_array($object->getEntrypoint())) { + $values_3 = []; + foreach ($object->getEntrypoint() as $value_5) { + $values_3[] = $value_5; + } + $value_4 = $values_3; + } elseif (is_string($object->getEntrypoint())) { + $value_4 = $object->getEntrypoint(); + } + $data['Entrypoint'] = $value_4; + } + if ($object->isInitialized('networkDisabled') && null !== $object->getNetworkDisabled()) { + $data['NetworkDisabled'] = $object->getNetworkDisabled(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + if ($object->isInitialized('onBuild') && null !== $object->getOnBuild()) { + $values_4 = []; + foreach ($object->getOnBuild() as $value_6) { + $values_4[] = $value_6; + } + $data['OnBuild'] = $values_4; + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_5 = []; + foreach ($object->getLabels() as $key_1 => $value_7) { + $values_5[$key_1] = $value_7; + } + $data['Labels'] = $values_5; + } + if ($object->isInitialized('stopSignal') && null !== $object->getStopSignal()) { + $data['StopSignal'] = $object->getStopSignal(); + } + if ($object->isInitialized('stopTimeout') && null !== $object->getStopTimeout()) { + $data['StopTimeout'] = $object->getStopTimeout(); + } + if ($object->isInitialized('shell') && null !== $object->getShell()) { + $values_6 = []; + foreach ($object->getShell() as $value_8) { + $values_6[] = $value_8; + } + $data['Shell'] = $values_6; + } + if ($object->isInitialized('hostConfig') && null !== $object->getHostConfig()) { + $data['HostConfig'] = $this->normalizer->normalize($object->getHostConfig(), 'json', $context); + } + if ($object->isInitialized('networkingConfig') && null !== $object->getNetworkingConfig()) { + $data['NetworkingConfig'] = $this->normalizer->normalize($object->getNetworkingConfig(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersCreatePostBody::class => false]; + } + } +} else { + class ContainersCreatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersCreatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersCreatePostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersCreatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Hostname', $data) && $data['Hostname'] !== null) { + $object->setHostname($data['Hostname']); + } + elseif (\array_key_exists('Hostname', $data) && $data['Hostname'] === null) { + $object->setHostname(null); + } + if (\array_key_exists('Domainname', $data) && $data['Domainname'] !== null) { + $object->setDomainname($data['Domainname']); + } + elseif (\array_key_exists('Domainname', $data) && $data['Domainname'] === null) { + $object->setDomainname(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($data['User']); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + if (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] !== null) { + $object->setAttachStdin($data['AttachStdin']); + } + elseif (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] === null) { + $object->setAttachStdin(null); + } + if (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] !== null) { + $object->setAttachStdout($data['AttachStdout']); + } + elseif (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] === null) { + $object->setAttachStdout(null); + } + if (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] !== null) { + $object->setAttachStderr($data['AttachStderr']); + } + elseif (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] === null) { + $object->setAttachStderr(null); + } + if (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['ExposedPorts'] as $key => $value) { + $values[$key] = $value; + } + $object->setExposedPorts($values); + } + elseif (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] === null) { + $object->setExposedPorts(null); + } + if (\array_key_exists('Tty', $data) && $data['Tty'] !== null) { + $object->setTty($data['Tty']); + } + elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { + $object->setTty(null); + } + if (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] !== null) { + $object->setOpenStdin($data['OpenStdin']); + } + elseif (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] === null) { + $object->setOpenStdin(null); + } + if (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] !== null) { + $object->setStdinOnce($data['StdinOnce']); + } + elseif (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] === null) { + $object->setStdinOnce(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values_1 = []; + foreach ($data['Env'] as $value_1) { + $values_1[] = $value_1; + } + $object->setEnv($values_1); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { + $value_2 = $data['Cmd']; + if (is_array($data['Cmd']) && $this->isOnlyNumericKeys($data['Cmd'])) { + $values_2 = []; + foreach ($data['Cmd'] as $value_3) { + $values_2[] = $value_3; + } + $value_2 = $values_2; + } elseif (is_string($data['Cmd'])) { + $value_2 = $data['Cmd']; + } + $object->setCmd($value_2); + } + elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { + $object->setCmd(null); + } + if (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] !== null) { + $object->setHealthcheck($this->denormalizer->denormalize($data['Healthcheck'], \Docker\API\Model\ConfigHealthcheck::class, 'json', $context)); + } + elseif (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] === null) { + $object->setHealthcheck(null); + } + if (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] !== null) { + $object->setArgsEscaped($data['ArgsEscaped']); + } + elseif (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] === null) { + $object->setArgsEscaped(null); + } + if (\array_key_exists('Image', $data) && $data['Image'] !== null) { + $object->setImage($data['Image']); + } + elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { + $object->setImage(null); + } + if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { + $object->setVolumes($this->denormalizer->denormalize($data['Volumes'], \Docker\API\Model\ConfigVolumes::class, 'json', $context)); + } + elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { + $object->setVolumes(null); + } + if (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] !== null) { + $object->setWorkingDir($data['WorkingDir']); + } + elseif (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] === null) { + $object->setWorkingDir(null); + } + if (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] !== null) { + $value_4 = $data['Entrypoint']; + if (is_array($data['Entrypoint']) && $this->isOnlyNumericKeys($data['Entrypoint'])) { + $values_3 = []; + foreach ($data['Entrypoint'] as $value_5) { + $values_3[] = $value_5; + } + $value_4 = $values_3; + } elseif (is_string($data['Entrypoint'])) { + $value_4 = $data['Entrypoint']; + } + $object->setEntrypoint($value_4); + } + elseif (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] === null) { + $object->setEntrypoint(null); + } + if (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] !== null) { + $object->setNetworkDisabled($data['NetworkDisabled']); + } + elseif (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] === null) { + $object->setNetworkDisabled(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + if (\array_key_exists('OnBuild', $data) && $data['OnBuild'] !== null) { + $values_4 = []; + foreach ($data['OnBuild'] as $value_6) { + $values_4[] = $value_6; + } + $object->setOnBuild($values_4); + } + elseif (\array_key_exists('OnBuild', $data) && $data['OnBuild'] === null) { + $object->setOnBuild(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_5 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_1 => $value_7) { + $values_5[$key_1] = $value_7; + } + $object->setLabels($values_5); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('StopSignal', $data) && $data['StopSignal'] !== null) { + $object->setStopSignal($data['StopSignal']); + } + elseif (\array_key_exists('StopSignal', $data) && $data['StopSignal'] === null) { + $object->setStopSignal(null); + } + if (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] !== null) { + $object->setStopTimeout($data['StopTimeout']); + } + elseif (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] === null) { + $object->setStopTimeout(null); + } + if (\array_key_exists('Shell', $data) && $data['Shell'] !== null) { + $values_6 = []; + foreach ($data['Shell'] as $value_8) { + $values_6[] = $value_8; + } + $object->setShell($values_6); + } + elseif (\array_key_exists('Shell', $data) && $data['Shell'] === null) { + $object->setShell(null); + } + if (\array_key_exists('HostConfig', $data) && $data['HostConfig'] !== null) { + $object->setHostConfig($this->denormalizer->denormalize($data['HostConfig'], \Docker\API\Model\HostConfig::class, 'json', $context)); + } + elseif (\array_key_exists('HostConfig', $data) && $data['HostConfig'] === null) { + $object->setHostConfig(null); + } + if (\array_key_exists('NetworkingConfig', $data) && $data['NetworkingConfig'] !== null) { + $object->setNetworkingConfig($this->denormalizer->denormalize($data['NetworkingConfig'], \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class, 'json', $context)); + } + elseif (\array_key_exists('NetworkingConfig', $data) && $data['NetworkingConfig'] === null) { + $object->setNetworkingConfig(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('hostname') && null !== $object->getHostname()) { + $data['Hostname'] = $object->getHostname(); + } + if ($object->isInitialized('domainname') && null !== $object->getDomainname()) { + $data['Domainname'] = $object->getDomainname(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $object->getUser(); + } + if ($object->isInitialized('attachStdin') && null !== $object->getAttachStdin()) { + $data['AttachStdin'] = $object->getAttachStdin(); + } + if ($object->isInitialized('attachStdout') && null !== $object->getAttachStdout()) { + $data['AttachStdout'] = $object->getAttachStdout(); + } + if ($object->isInitialized('attachStderr') && null !== $object->getAttachStderr()) { + $data['AttachStderr'] = $object->getAttachStderr(); + } + if ($object->isInitialized('exposedPorts') && null !== $object->getExposedPorts()) { + $values = []; + foreach ($object->getExposedPorts() as $key => $value) { + $values[$key] = $value; + } + $data['ExposedPorts'] = $values; + } + if ($object->isInitialized('tty') && null !== $object->getTty()) { + $data['Tty'] = $object->getTty(); + } + if ($object->isInitialized('openStdin') && null !== $object->getOpenStdin()) { + $data['OpenStdin'] = $object->getOpenStdin(); + } + if ($object->isInitialized('stdinOnce') && null !== $object->getStdinOnce()) { + $data['StdinOnce'] = $object->getStdinOnce(); + } + if ($object->isInitialized('env') && null !== $object->getEnv()) { + $values_1 = []; + foreach ($object->getEnv() as $value_1) { + $values_1[] = $value_1; + } + $data['Env'] = $values_1; + } + if ($object->isInitialized('cmd') && null !== $object->getCmd()) { + $value_2 = $object->getCmd(); + if (is_array($object->getCmd())) { + $values_2 = []; + foreach ($object->getCmd() as $value_3) { + $values_2[] = $value_3; + } + $value_2 = $values_2; + } elseif (is_string($object->getCmd())) { + $value_2 = $object->getCmd(); + } + $data['Cmd'] = $value_2; + } + if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) { + $data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context); + } + if ($object->isInitialized('argsEscaped') && null !== $object->getArgsEscaped()) { + $data['ArgsEscaped'] = $object->getArgsEscaped(); + } + if ($object->isInitialized('image') && null !== $object->getImage()) { + $data['Image'] = $object->getImage(); + } + if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { + $data['Volumes'] = $this->normalizer->normalize($object->getVolumes(), 'json', $context); + } + if ($object->isInitialized('workingDir') && null !== $object->getWorkingDir()) { + $data['WorkingDir'] = $object->getWorkingDir(); + } + if ($object->isInitialized('entrypoint') && null !== $object->getEntrypoint()) { + $value_4 = $object->getEntrypoint(); + if (is_array($object->getEntrypoint())) { + $values_3 = []; + foreach ($object->getEntrypoint() as $value_5) { + $values_3[] = $value_5; + } + $value_4 = $values_3; + } elseif (is_string($object->getEntrypoint())) { + $value_4 = $object->getEntrypoint(); + } + $data['Entrypoint'] = $value_4; + } + if ($object->isInitialized('networkDisabled') && null !== $object->getNetworkDisabled()) { + $data['NetworkDisabled'] = $object->getNetworkDisabled(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + if ($object->isInitialized('onBuild') && null !== $object->getOnBuild()) { + $values_4 = []; + foreach ($object->getOnBuild() as $value_6) { + $values_4[] = $value_6; + } + $data['OnBuild'] = $values_4; + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_5 = []; + foreach ($object->getLabels() as $key_1 => $value_7) { + $values_5[$key_1] = $value_7; + } + $data['Labels'] = $values_5; + } + if ($object->isInitialized('stopSignal') && null !== $object->getStopSignal()) { + $data['StopSignal'] = $object->getStopSignal(); + } + if ($object->isInitialized('stopTimeout') && null !== $object->getStopTimeout()) { + $data['StopTimeout'] = $object->getStopTimeout(); + } + if ($object->isInitialized('shell') && null !== $object->getShell()) { + $values_6 = []; + foreach ($object->getShell() as $value_8) { + $values_6[] = $value_8; + } + $data['Shell'] = $values_6; + } + if ($object->isInitialized('hostConfig') && null !== $object->getHostConfig()) { + $data['HostConfig'] = $this->normalizer->normalize($object->getHostConfig(), 'json', $context); + } + if ($object->isInitialized('networkingConfig') && null !== $object->getNetworkingConfig()) { + $data['NetworkingConfig'] = $this->normalizer->normalize($object->getNetworkingConfig(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersCreatePostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersCreatePostResponse201Normalizer.php b/generated/Normalizer/ContainersCreatePostResponse201Normalizer.php new file mode 100644 index 000000000..8e32ec876 --- /dev/null +++ b/generated/Normalizer/ContainersCreatePostResponse201Normalizer.php @@ -0,0 +1,144 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainersCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersCreatePostResponse201::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersCreatePostResponse201::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersCreatePostResponse201(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('Warnings', $data) && $data['Warnings'] !== null) { + $values = []; + foreach ($data['Warnings'] as $value) { + $values[] = $value; + } + $object->setWarnings($values); + } + elseif (\array_key_exists('Warnings', $data) && $data['Warnings'] === null) { + $object->setWarnings(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Id'] = $object->getId(); + $values = []; + foreach ($object->getWarnings() as $value) { + $values[] = $value; + } + $data['Warnings'] = $values; + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersCreatePostResponse201::class => false]; + } + } +} else { + class ContainersCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersCreatePostResponse201::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersCreatePostResponse201::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersCreatePostResponse201(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('Warnings', $data) && $data['Warnings'] !== null) { + $values = []; + foreach ($data['Warnings'] as $value) { + $values[] = $value; + } + $object->setWarnings($values); + } + elseif (\array_key_exists('Warnings', $data) && $data['Warnings'] === null) { + $object->setWarnings(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Id'] = $object->getId(); + $values = []; + foreach ($object->getWarnings() as $value) { + $values[] = $value; + } + $data['Warnings'] = $values; + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersCreatePostResponse201::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersIdChangesGetResponse200ItemNormalizer.php b/generated/Normalizer/ContainersIdChangesGetResponse200ItemNormalizer.php new file mode 100644 index 000000000..0ea30e3a6 --- /dev/null +++ b/generated/Normalizer/ContainersIdChangesGetResponse200ItemNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainersIdChangesGetResponse200ItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdChangesGetResponse200Item::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdChangesGetResponse200Item::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdChangesGetResponse200Item(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Path', $data) && $data['Path'] !== null) { + $object->setPath($data['Path']); + } + elseif (\array_key_exists('Path', $data) && $data['Path'] === null) { + $object->setPath(null); + } + if (\array_key_exists('Kind', $data) && $data['Kind'] !== null) { + $object->setKind($data['Kind']); + } + elseif (\array_key_exists('Kind', $data) && $data['Kind'] === null) { + $object->setKind(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('path') && null !== $object->getPath()) { + $data['Path'] = $object->getPath(); + } + if ($object->isInitialized('kind') && null !== $object->getKind()) { + $data['Kind'] = $object->getKind(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdChangesGetResponse200Item::class => false]; + } + } +} else { + class ContainersIdChangesGetResponse200ItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdChangesGetResponse200Item::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdChangesGetResponse200Item::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdChangesGetResponse200Item(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Path', $data) && $data['Path'] !== null) { + $object->setPath($data['Path']); + } + elseif (\array_key_exists('Path', $data) && $data['Path'] === null) { + $object->setPath(null); + } + if (\array_key_exists('Kind', $data) && $data['Kind'] !== null) { + $object->setKind($data['Kind']); + } + elseif (\array_key_exists('Kind', $data) && $data['Kind'] === null) { + $object->setKind(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('path') && null !== $object->getPath()) { + $data['Path'] = $object->getPath(); + } + if ($object->isInitialized('kind') && null !== $object->getKind()) { + $data['Kind'] = $object->getKind(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdChangesGetResponse200Item::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersIdExecPostBodyNormalizer.php b/generated/Normalizer/ContainersIdExecPostBodyNormalizer.php new file mode 100644 index 000000000..50f078982 --- /dev/null +++ b/generated/Normalizer/ContainersIdExecPostBodyNormalizer.php @@ -0,0 +1,294 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainersIdExecPostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdExecPostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdExecPostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdExecPostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] !== null) { + $object->setAttachStdin($data['AttachStdin']); + } + elseif (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] === null) { + $object->setAttachStdin(null); + } + if (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] !== null) { + $object->setAttachStdout($data['AttachStdout']); + } + elseif (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] === null) { + $object->setAttachStdout(null); + } + if (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] !== null) { + $object->setAttachStderr($data['AttachStderr']); + } + elseif (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] === null) { + $object->setAttachStderr(null); + } + if (\array_key_exists('DetachKeys', $data) && $data['DetachKeys'] !== null) { + $object->setDetachKeys($data['DetachKeys']); + } + elseif (\array_key_exists('DetachKeys', $data) && $data['DetachKeys'] === null) { + $object->setDetachKeys(null); + } + if (\array_key_exists('Tty', $data) && $data['Tty'] !== null) { + $object->setTty($data['Tty']); + } + elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { + $object->setTty(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values = []; + foreach ($data['Env'] as $value) { + $values[] = $value; + } + $object->setEnv($values); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { + $values_1 = []; + foreach ($data['Cmd'] as $value_1) { + $values_1[] = $value_1; + } + $object->setCmd($values_1); + } + elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { + $object->setCmd(null); + } + if (\array_key_exists('Privileged', $data) && $data['Privileged'] !== null) { + $object->setPrivileged($data['Privileged']); + } + elseif (\array_key_exists('Privileged', $data) && $data['Privileged'] === null) { + $object->setPrivileged(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($data['User']); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('attachStdin') && null !== $object->getAttachStdin()) { + $data['AttachStdin'] = $object->getAttachStdin(); + } + if ($object->isInitialized('attachStdout') && null !== $object->getAttachStdout()) { + $data['AttachStdout'] = $object->getAttachStdout(); + } + if ($object->isInitialized('attachStderr') && null !== $object->getAttachStderr()) { + $data['AttachStderr'] = $object->getAttachStderr(); + } + if ($object->isInitialized('detachKeys') && null !== $object->getDetachKeys()) { + $data['DetachKeys'] = $object->getDetachKeys(); + } + if ($object->isInitialized('tty') && null !== $object->getTty()) { + $data['Tty'] = $object->getTty(); + } + if ($object->isInitialized('env') && null !== $object->getEnv()) { + $values = []; + foreach ($object->getEnv() as $value) { + $values[] = $value; + } + $data['Env'] = $values; + } + if ($object->isInitialized('cmd') && null !== $object->getCmd()) { + $values_1 = []; + foreach ($object->getCmd() as $value_1) { + $values_1[] = $value_1; + } + $data['Cmd'] = $values_1; + } + if ($object->isInitialized('privileged') && null !== $object->getPrivileged()) { + $data['Privileged'] = $object->getPrivileged(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $object->getUser(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdExecPostBody::class => false]; + } + } +} else { + class ContainersIdExecPostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdExecPostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdExecPostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdExecPostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] !== null) { + $object->setAttachStdin($data['AttachStdin']); + } + elseif (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] === null) { + $object->setAttachStdin(null); + } + if (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] !== null) { + $object->setAttachStdout($data['AttachStdout']); + } + elseif (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] === null) { + $object->setAttachStdout(null); + } + if (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] !== null) { + $object->setAttachStderr($data['AttachStderr']); + } + elseif (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] === null) { + $object->setAttachStderr(null); + } + if (\array_key_exists('DetachKeys', $data) && $data['DetachKeys'] !== null) { + $object->setDetachKeys($data['DetachKeys']); + } + elseif (\array_key_exists('DetachKeys', $data) && $data['DetachKeys'] === null) { + $object->setDetachKeys(null); + } + if (\array_key_exists('Tty', $data) && $data['Tty'] !== null) { + $object->setTty($data['Tty']); + } + elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { + $object->setTty(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values = []; + foreach ($data['Env'] as $value) { + $values[] = $value; + } + $object->setEnv($values); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { + $values_1 = []; + foreach ($data['Cmd'] as $value_1) { + $values_1[] = $value_1; + } + $object->setCmd($values_1); + } + elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { + $object->setCmd(null); + } + if (\array_key_exists('Privileged', $data) && $data['Privileged'] !== null) { + $object->setPrivileged($data['Privileged']); + } + elseif (\array_key_exists('Privileged', $data) && $data['Privileged'] === null) { + $object->setPrivileged(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($data['User']); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('attachStdin') && null !== $object->getAttachStdin()) { + $data['AttachStdin'] = $object->getAttachStdin(); + } + if ($object->isInitialized('attachStdout') && null !== $object->getAttachStdout()) { + $data['AttachStdout'] = $object->getAttachStdout(); + } + if ($object->isInitialized('attachStderr') && null !== $object->getAttachStderr()) { + $data['AttachStderr'] = $object->getAttachStderr(); + } + if ($object->isInitialized('detachKeys') && null !== $object->getDetachKeys()) { + $data['DetachKeys'] = $object->getDetachKeys(); + } + if ($object->isInitialized('tty') && null !== $object->getTty()) { + $data['Tty'] = $object->getTty(); + } + if ($object->isInitialized('env') && null !== $object->getEnv()) { + $values = []; + foreach ($object->getEnv() as $value) { + $values[] = $value; + } + $data['Env'] = $values; + } + if ($object->isInitialized('cmd') && null !== $object->getCmd()) { + $values_1 = []; + foreach ($object->getCmd() as $value_1) { + $values_1[] = $value_1; + } + $data['Cmd'] = $values_1; + } + if ($object->isInitialized('privileged') && null !== $object->getPrivileged()) { + $data['Privileged'] = $object->getPrivileged(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $object->getUser(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdExecPostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersIdJsonGetResponse200Normalizer.php b/generated/Normalizer/ContainersIdJsonGetResponse200Normalizer.php new file mode 100644 index 000000000..c2728feda --- /dev/null +++ b/generated/Normalizer/ContainersIdJsonGetResponse200Normalizer.php @@ -0,0 +1,582 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainersIdJsonGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdJsonGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdJsonGetResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdJsonGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('Created', $data) && $data['Created'] !== null) { + $object->setCreated($data['Created']); + } + elseif (\array_key_exists('Created', $data) && $data['Created'] === null) { + $object->setCreated(null); + } + if (\array_key_exists('Path', $data) && $data['Path'] !== null) { + $object->setPath($data['Path']); + } + elseif (\array_key_exists('Path', $data) && $data['Path'] === null) { + $object->setPath(null); + } + if (\array_key_exists('Args', $data) && $data['Args'] !== null) { + $values = []; + foreach ($data['Args'] as $value) { + $values[] = $value; + } + $object->setArgs($values); + } + elseif (\array_key_exists('Args', $data) && $data['Args'] === null) { + $object->setArgs(null); + } + if (\array_key_exists('State', $data) && $data['State'] !== null) { + $object->setState($this->denormalizer->denormalize($data['State'], \Docker\API\Model\ContainersIdJsonGetResponse200State::class, 'json', $context)); + } + elseif (\array_key_exists('State', $data) && $data['State'] === null) { + $object->setState(null); + } + if (\array_key_exists('Image', $data) && $data['Image'] !== null) { + $object->setImage($data['Image']); + } + elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { + $object->setImage(null); + } + if (\array_key_exists('ResolvConfPath', $data) && $data['ResolvConfPath'] !== null) { + $object->setResolvConfPath($data['ResolvConfPath']); + } + elseif (\array_key_exists('ResolvConfPath', $data) && $data['ResolvConfPath'] === null) { + $object->setResolvConfPath(null); + } + if (\array_key_exists('HostnamePath', $data) && $data['HostnamePath'] !== null) { + $object->setHostnamePath($data['HostnamePath']); + } + elseif (\array_key_exists('HostnamePath', $data) && $data['HostnamePath'] === null) { + $object->setHostnamePath(null); + } + if (\array_key_exists('HostsPath', $data) && $data['HostsPath'] !== null) { + $object->setHostsPath($data['HostsPath']); + } + elseif (\array_key_exists('HostsPath', $data) && $data['HostsPath'] === null) { + $object->setHostsPath(null); + } + if (\array_key_exists('LogPath', $data) && $data['LogPath'] !== null) { + $object->setLogPath($data['LogPath']); + } + elseif (\array_key_exists('LogPath', $data) && $data['LogPath'] === null) { + $object->setLogPath(null); + } + if (\array_key_exists('Node', $data) && $data['Node'] !== null) { + $object->setNode($data['Node']); + } + elseif (\array_key_exists('Node', $data) && $data['Node'] === null) { + $object->setNode(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('RestartCount', $data) && $data['RestartCount'] !== null) { + $object->setRestartCount($data['RestartCount']); + } + elseif (\array_key_exists('RestartCount', $data) && $data['RestartCount'] === null) { + $object->setRestartCount(null); + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('MountLabel', $data) && $data['MountLabel'] !== null) { + $object->setMountLabel($data['MountLabel']); + } + elseif (\array_key_exists('MountLabel', $data) && $data['MountLabel'] === null) { + $object->setMountLabel(null); + } + if (\array_key_exists('ProcessLabel', $data) && $data['ProcessLabel'] !== null) { + $object->setProcessLabel($data['ProcessLabel']); + } + elseif (\array_key_exists('ProcessLabel', $data) && $data['ProcessLabel'] === null) { + $object->setProcessLabel(null); + } + if (\array_key_exists('AppArmorProfile', $data) && $data['AppArmorProfile'] !== null) { + $object->setAppArmorProfile($data['AppArmorProfile']); + } + elseif (\array_key_exists('AppArmorProfile', $data) && $data['AppArmorProfile'] === null) { + $object->setAppArmorProfile(null); + } + if (\array_key_exists('ExecIDs', $data) && $data['ExecIDs'] !== null) { + $object->setExecIDs($data['ExecIDs']); + } + elseif (\array_key_exists('ExecIDs', $data) && $data['ExecIDs'] === null) { + $object->setExecIDs(null); + } + if (\array_key_exists('HostConfig', $data) && $data['HostConfig'] !== null) { + $object->setHostConfig($this->denormalizer->denormalize($data['HostConfig'], \Docker\API\Model\HostConfig::class, 'json', $context)); + } + elseif (\array_key_exists('HostConfig', $data) && $data['HostConfig'] === null) { + $object->setHostConfig(null); + } + if (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] !== null) { + $object->setGraphDriver($this->denormalizer->denormalize($data['GraphDriver'], \Docker\API\Model\GraphDriver::class, 'json', $context)); + } + elseif (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] === null) { + $object->setGraphDriver(null); + } + if (\array_key_exists('SizeRw', $data) && $data['SizeRw'] !== null) { + $object->setSizeRw($data['SizeRw']); + } + elseif (\array_key_exists('SizeRw', $data) && $data['SizeRw'] === null) { + $object->setSizeRw(null); + } + if (\array_key_exists('SizeRootFs', $data) && $data['SizeRootFs'] !== null) { + $object->setSizeRootFs($data['SizeRootFs']); + } + elseif (\array_key_exists('SizeRootFs', $data) && $data['SizeRootFs'] === null) { + $object->setSizeRootFs(null); + } + if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { + $values_1 = []; + foreach ($data['Mounts'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\MountPoint::class, 'json', $context); + } + $object->setMounts($values_1); + } + elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { + $object->setMounts(null); + } + if (\array_key_exists('Config', $data) && $data['Config'] !== null) { + $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\Config::class, 'json', $context)); + } + elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { + $object->setConfig(null); + } + if (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] !== null) { + $object->setNetworkSettings($this->denormalizer->denormalize($data['NetworkSettings'], \Docker\API\Model\NetworkConfig::class, 'json', $context)); + } + elseif (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] === null) { + $object->setNetworkSettings(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['Id'] = $object->getId(); + } + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['Created'] = $object->getCreated(); + } + if ($object->isInitialized('path') && null !== $object->getPath()) { + $data['Path'] = $object->getPath(); + } + if ($object->isInitialized('args') && null !== $object->getArgs()) { + $values = []; + foreach ($object->getArgs() as $value) { + $values[] = $value; + } + $data['Args'] = $values; + } + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['State'] = $this->normalizer->normalize($object->getState(), 'json', $context); + } + if ($object->isInitialized('image') && null !== $object->getImage()) { + $data['Image'] = $object->getImage(); + } + if ($object->isInitialized('resolvConfPath') && null !== $object->getResolvConfPath()) { + $data['ResolvConfPath'] = $object->getResolvConfPath(); + } + if ($object->isInitialized('hostnamePath') && null !== $object->getHostnamePath()) { + $data['HostnamePath'] = $object->getHostnamePath(); + } + if ($object->isInitialized('hostsPath') && null !== $object->getHostsPath()) { + $data['HostsPath'] = $object->getHostsPath(); + } + if ($object->isInitialized('logPath') && null !== $object->getLogPath()) { + $data['LogPath'] = $object->getLogPath(); + } + if ($object->isInitialized('node') && null !== $object->getNode()) { + $data['Node'] = $object->getNode(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('restartCount') && null !== $object->getRestartCount()) { + $data['RestartCount'] = $object->getRestartCount(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('mountLabel') && null !== $object->getMountLabel()) { + $data['MountLabel'] = $object->getMountLabel(); + } + if ($object->isInitialized('processLabel') && null !== $object->getProcessLabel()) { + $data['ProcessLabel'] = $object->getProcessLabel(); + } + if ($object->isInitialized('appArmorProfile') && null !== $object->getAppArmorProfile()) { + $data['AppArmorProfile'] = $object->getAppArmorProfile(); + } + if ($object->isInitialized('execIDs') && null !== $object->getExecIDs()) { + $data['ExecIDs'] = $object->getExecIDs(); + } + if ($object->isInitialized('hostConfig') && null !== $object->getHostConfig()) { + $data['HostConfig'] = $this->normalizer->normalize($object->getHostConfig(), 'json', $context); + } + if ($object->isInitialized('graphDriver') && null !== $object->getGraphDriver()) { + $data['GraphDriver'] = $this->normalizer->normalize($object->getGraphDriver(), 'json', $context); + } + if ($object->isInitialized('sizeRw') && null !== $object->getSizeRw()) { + $data['SizeRw'] = $object->getSizeRw(); + } + if ($object->isInitialized('sizeRootFs') && null !== $object->getSizeRootFs()) { + $data['SizeRootFs'] = $object->getSizeRootFs(); + } + if ($object->isInitialized('mounts') && null !== $object->getMounts()) { + $values_1 = []; + foreach ($object->getMounts() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Mounts'] = $values_1; + } + if ($object->isInitialized('config') && null !== $object->getConfig()) { + $data['Config'] = $this->normalizer->normalize($object->getConfig(), 'json', $context); + } + if ($object->isInitialized('networkSettings') && null !== $object->getNetworkSettings()) { + $data['NetworkSettings'] = $this->normalizer->normalize($object->getNetworkSettings(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdJsonGetResponse200::class => false]; + } + } +} else { + class ContainersIdJsonGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdJsonGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdJsonGetResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdJsonGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('Created', $data) && $data['Created'] !== null) { + $object->setCreated($data['Created']); + } + elseif (\array_key_exists('Created', $data) && $data['Created'] === null) { + $object->setCreated(null); + } + if (\array_key_exists('Path', $data) && $data['Path'] !== null) { + $object->setPath($data['Path']); + } + elseif (\array_key_exists('Path', $data) && $data['Path'] === null) { + $object->setPath(null); + } + if (\array_key_exists('Args', $data) && $data['Args'] !== null) { + $values = []; + foreach ($data['Args'] as $value) { + $values[] = $value; + } + $object->setArgs($values); + } + elseif (\array_key_exists('Args', $data) && $data['Args'] === null) { + $object->setArgs(null); + } + if (\array_key_exists('State', $data) && $data['State'] !== null) { + $object->setState($this->denormalizer->denormalize($data['State'], \Docker\API\Model\ContainersIdJsonGetResponse200State::class, 'json', $context)); + } + elseif (\array_key_exists('State', $data) && $data['State'] === null) { + $object->setState(null); + } + if (\array_key_exists('Image', $data) && $data['Image'] !== null) { + $object->setImage($data['Image']); + } + elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { + $object->setImage(null); + } + if (\array_key_exists('ResolvConfPath', $data) && $data['ResolvConfPath'] !== null) { + $object->setResolvConfPath($data['ResolvConfPath']); + } + elseif (\array_key_exists('ResolvConfPath', $data) && $data['ResolvConfPath'] === null) { + $object->setResolvConfPath(null); + } + if (\array_key_exists('HostnamePath', $data) && $data['HostnamePath'] !== null) { + $object->setHostnamePath($data['HostnamePath']); + } + elseif (\array_key_exists('HostnamePath', $data) && $data['HostnamePath'] === null) { + $object->setHostnamePath(null); + } + if (\array_key_exists('HostsPath', $data) && $data['HostsPath'] !== null) { + $object->setHostsPath($data['HostsPath']); + } + elseif (\array_key_exists('HostsPath', $data) && $data['HostsPath'] === null) { + $object->setHostsPath(null); + } + if (\array_key_exists('LogPath', $data) && $data['LogPath'] !== null) { + $object->setLogPath($data['LogPath']); + } + elseif (\array_key_exists('LogPath', $data) && $data['LogPath'] === null) { + $object->setLogPath(null); + } + if (\array_key_exists('Node', $data) && $data['Node'] !== null) { + $object->setNode($data['Node']); + } + elseif (\array_key_exists('Node', $data) && $data['Node'] === null) { + $object->setNode(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('RestartCount', $data) && $data['RestartCount'] !== null) { + $object->setRestartCount($data['RestartCount']); + } + elseif (\array_key_exists('RestartCount', $data) && $data['RestartCount'] === null) { + $object->setRestartCount(null); + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('MountLabel', $data) && $data['MountLabel'] !== null) { + $object->setMountLabel($data['MountLabel']); + } + elseif (\array_key_exists('MountLabel', $data) && $data['MountLabel'] === null) { + $object->setMountLabel(null); + } + if (\array_key_exists('ProcessLabel', $data) && $data['ProcessLabel'] !== null) { + $object->setProcessLabel($data['ProcessLabel']); + } + elseif (\array_key_exists('ProcessLabel', $data) && $data['ProcessLabel'] === null) { + $object->setProcessLabel(null); + } + if (\array_key_exists('AppArmorProfile', $data) && $data['AppArmorProfile'] !== null) { + $object->setAppArmorProfile($data['AppArmorProfile']); + } + elseif (\array_key_exists('AppArmorProfile', $data) && $data['AppArmorProfile'] === null) { + $object->setAppArmorProfile(null); + } + if (\array_key_exists('ExecIDs', $data) && $data['ExecIDs'] !== null) { + $object->setExecIDs($data['ExecIDs']); + } + elseif (\array_key_exists('ExecIDs', $data) && $data['ExecIDs'] === null) { + $object->setExecIDs(null); + } + if (\array_key_exists('HostConfig', $data) && $data['HostConfig'] !== null) { + $object->setHostConfig($this->denormalizer->denormalize($data['HostConfig'], \Docker\API\Model\HostConfig::class, 'json', $context)); + } + elseif (\array_key_exists('HostConfig', $data) && $data['HostConfig'] === null) { + $object->setHostConfig(null); + } + if (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] !== null) { + $object->setGraphDriver($this->denormalizer->denormalize($data['GraphDriver'], \Docker\API\Model\GraphDriver::class, 'json', $context)); + } + elseif (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] === null) { + $object->setGraphDriver(null); + } + if (\array_key_exists('SizeRw', $data) && $data['SizeRw'] !== null) { + $object->setSizeRw($data['SizeRw']); + } + elseif (\array_key_exists('SizeRw', $data) && $data['SizeRw'] === null) { + $object->setSizeRw(null); + } + if (\array_key_exists('SizeRootFs', $data) && $data['SizeRootFs'] !== null) { + $object->setSizeRootFs($data['SizeRootFs']); + } + elseif (\array_key_exists('SizeRootFs', $data) && $data['SizeRootFs'] === null) { + $object->setSizeRootFs(null); + } + if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { + $values_1 = []; + foreach ($data['Mounts'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\MountPoint::class, 'json', $context); + } + $object->setMounts($values_1); + } + elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { + $object->setMounts(null); + } + if (\array_key_exists('Config', $data) && $data['Config'] !== null) { + $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\Config::class, 'json', $context)); + } + elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { + $object->setConfig(null); + } + if (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] !== null) { + $object->setNetworkSettings($this->denormalizer->denormalize($data['NetworkSettings'], \Docker\API\Model\NetworkConfig::class, 'json', $context)); + } + elseif (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] === null) { + $object->setNetworkSettings(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['Id'] = $object->getId(); + } + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['Created'] = $object->getCreated(); + } + if ($object->isInitialized('path') && null !== $object->getPath()) { + $data['Path'] = $object->getPath(); + } + if ($object->isInitialized('args') && null !== $object->getArgs()) { + $values = []; + foreach ($object->getArgs() as $value) { + $values[] = $value; + } + $data['Args'] = $values; + } + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['State'] = $this->normalizer->normalize($object->getState(), 'json', $context); + } + if ($object->isInitialized('image') && null !== $object->getImage()) { + $data['Image'] = $object->getImage(); + } + if ($object->isInitialized('resolvConfPath') && null !== $object->getResolvConfPath()) { + $data['ResolvConfPath'] = $object->getResolvConfPath(); + } + if ($object->isInitialized('hostnamePath') && null !== $object->getHostnamePath()) { + $data['HostnamePath'] = $object->getHostnamePath(); + } + if ($object->isInitialized('hostsPath') && null !== $object->getHostsPath()) { + $data['HostsPath'] = $object->getHostsPath(); + } + if ($object->isInitialized('logPath') && null !== $object->getLogPath()) { + $data['LogPath'] = $object->getLogPath(); + } + if ($object->isInitialized('node') && null !== $object->getNode()) { + $data['Node'] = $object->getNode(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('restartCount') && null !== $object->getRestartCount()) { + $data['RestartCount'] = $object->getRestartCount(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('mountLabel') && null !== $object->getMountLabel()) { + $data['MountLabel'] = $object->getMountLabel(); + } + if ($object->isInitialized('processLabel') && null !== $object->getProcessLabel()) { + $data['ProcessLabel'] = $object->getProcessLabel(); + } + if ($object->isInitialized('appArmorProfile') && null !== $object->getAppArmorProfile()) { + $data['AppArmorProfile'] = $object->getAppArmorProfile(); + } + if ($object->isInitialized('execIDs') && null !== $object->getExecIDs()) { + $data['ExecIDs'] = $object->getExecIDs(); + } + if ($object->isInitialized('hostConfig') && null !== $object->getHostConfig()) { + $data['HostConfig'] = $this->normalizer->normalize($object->getHostConfig(), 'json', $context); + } + if ($object->isInitialized('graphDriver') && null !== $object->getGraphDriver()) { + $data['GraphDriver'] = $this->normalizer->normalize($object->getGraphDriver(), 'json', $context); + } + if ($object->isInitialized('sizeRw') && null !== $object->getSizeRw()) { + $data['SizeRw'] = $object->getSizeRw(); + } + if ($object->isInitialized('sizeRootFs') && null !== $object->getSizeRootFs()) { + $data['SizeRootFs'] = $object->getSizeRootFs(); + } + if ($object->isInitialized('mounts') && null !== $object->getMounts()) { + $values_1 = []; + foreach ($object->getMounts() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Mounts'] = $values_1; + } + if ($object->isInitialized('config') && null !== $object->getConfig()) { + $data['Config'] = $this->normalizer->normalize($object->getConfig(), 'json', $context); + } + if ($object->isInitialized('networkSettings') && null !== $object->getNetworkSettings()) { + $data['NetworkSettings'] = $this->normalizer->normalize($object->getNetworkSettings(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdJsonGetResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersIdJsonGetResponse200StateNormalizer.php b/generated/Normalizer/ContainersIdJsonGetResponse200StateNormalizer.php new file mode 100644 index 000000000..f7468099b --- /dev/null +++ b/generated/Normalizer/ContainersIdJsonGetResponse200StateNormalizer.php @@ -0,0 +1,298 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainersIdJsonGetResponse200StateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdJsonGetResponse200State::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdJsonGetResponse200State::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdJsonGetResponse200State(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Status', $data) && $data['Status'] !== null) { + $object->setStatus($data['Status']); + } + elseif (\array_key_exists('Status', $data) && $data['Status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('Running', $data) && $data['Running'] !== null) { + $object->setRunning($data['Running']); + } + elseif (\array_key_exists('Running', $data) && $data['Running'] === null) { + $object->setRunning(null); + } + if (\array_key_exists('Paused', $data) && $data['Paused'] !== null) { + $object->setPaused($data['Paused']); + } + elseif (\array_key_exists('Paused', $data) && $data['Paused'] === null) { + $object->setPaused(null); + } + if (\array_key_exists('Restarting', $data) && $data['Restarting'] !== null) { + $object->setRestarting($data['Restarting']); + } + elseif (\array_key_exists('Restarting', $data) && $data['Restarting'] === null) { + $object->setRestarting(null); + } + if (\array_key_exists('OOMKilled', $data) && $data['OOMKilled'] !== null) { + $object->setOOMKilled($data['OOMKilled']); + } + elseif (\array_key_exists('OOMKilled', $data) && $data['OOMKilled'] === null) { + $object->setOOMKilled(null); + } + if (\array_key_exists('Dead', $data) && $data['Dead'] !== null) { + $object->setDead($data['Dead']); + } + elseif (\array_key_exists('Dead', $data) && $data['Dead'] === null) { + $object->setDead(null); + } + if (\array_key_exists('Pid', $data) && $data['Pid'] !== null) { + $object->setPid($data['Pid']); + } + elseif (\array_key_exists('Pid', $data) && $data['Pid'] === null) { + $object->setPid(null); + } + if (\array_key_exists('ExitCode', $data) && $data['ExitCode'] !== null) { + $object->setExitCode($data['ExitCode']); + } + elseif (\array_key_exists('ExitCode', $data) && $data['ExitCode'] === null) { + $object->setExitCode(null); + } + if (\array_key_exists('Error', $data) && $data['Error'] !== null) { + $object->setError($data['Error']); + } + elseif (\array_key_exists('Error', $data) && $data['Error'] === null) { + $object->setError(null); + } + if (\array_key_exists('StartedAt', $data) && $data['StartedAt'] !== null) { + $object->setStartedAt($data['StartedAt']); + } + elseif (\array_key_exists('StartedAt', $data) && $data['StartedAt'] === null) { + $object->setStartedAt(null); + } + if (\array_key_exists('FinishedAt', $data) && $data['FinishedAt'] !== null) { + $object->setFinishedAt($data['FinishedAt']); + } + elseif (\array_key_exists('FinishedAt', $data) && $data['FinishedAt'] === null) { + $object->setFinishedAt(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['Status'] = $object->getStatus(); + } + if ($object->isInitialized('running') && null !== $object->getRunning()) { + $data['Running'] = $object->getRunning(); + } + if ($object->isInitialized('paused') && null !== $object->getPaused()) { + $data['Paused'] = $object->getPaused(); + } + if ($object->isInitialized('restarting') && null !== $object->getRestarting()) { + $data['Restarting'] = $object->getRestarting(); + } + if ($object->isInitialized('oOMKilled') && null !== $object->getOOMKilled()) { + $data['OOMKilled'] = $object->getOOMKilled(); + } + if ($object->isInitialized('dead') && null !== $object->getDead()) { + $data['Dead'] = $object->getDead(); + } + if ($object->isInitialized('pid') && null !== $object->getPid()) { + $data['Pid'] = $object->getPid(); + } + if ($object->isInitialized('exitCode') && null !== $object->getExitCode()) { + $data['ExitCode'] = $object->getExitCode(); + } + if ($object->isInitialized('error') && null !== $object->getError()) { + $data['Error'] = $object->getError(); + } + if ($object->isInitialized('startedAt') && null !== $object->getStartedAt()) { + $data['StartedAt'] = $object->getStartedAt(); + } + if ($object->isInitialized('finishedAt') && null !== $object->getFinishedAt()) { + $data['FinishedAt'] = $object->getFinishedAt(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdJsonGetResponse200State::class => false]; + } + } +} else { + class ContainersIdJsonGetResponse200StateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdJsonGetResponse200State::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdJsonGetResponse200State::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdJsonGetResponse200State(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Status', $data) && $data['Status'] !== null) { + $object->setStatus($data['Status']); + } + elseif (\array_key_exists('Status', $data) && $data['Status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('Running', $data) && $data['Running'] !== null) { + $object->setRunning($data['Running']); + } + elseif (\array_key_exists('Running', $data) && $data['Running'] === null) { + $object->setRunning(null); + } + if (\array_key_exists('Paused', $data) && $data['Paused'] !== null) { + $object->setPaused($data['Paused']); + } + elseif (\array_key_exists('Paused', $data) && $data['Paused'] === null) { + $object->setPaused(null); + } + if (\array_key_exists('Restarting', $data) && $data['Restarting'] !== null) { + $object->setRestarting($data['Restarting']); + } + elseif (\array_key_exists('Restarting', $data) && $data['Restarting'] === null) { + $object->setRestarting(null); + } + if (\array_key_exists('OOMKilled', $data) && $data['OOMKilled'] !== null) { + $object->setOOMKilled($data['OOMKilled']); + } + elseif (\array_key_exists('OOMKilled', $data) && $data['OOMKilled'] === null) { + $object->setOOMKilled(null); + } + if (\array_key_exists('Dead', $data) && $data['Dead'] !== null) { + $object->setDead($data['Dead']); + } + elseif (\array_key_exists('Dead', $data) && $data['Dead'] === null) { + $object->setDead(null); + } + if (\array_key_exists('Pid', $data) && $data['Pid'] !== null) { + $object->setPid($data['Pid']); + } + elseif (\array_key_exists('Pid', $data) && $data['Pid'] === null) { + $object->setPid(null); + } + if (\array_key_exists('ExitCode', $data) && $data['ExitCode'] !== null) { + $object->setExitCode($data['ExitCode']); + } + elseif (\array_key_exists('ExitCode', $data) && $data['ExitCode'] === null) { + $object->setExitCode(null); + } + if (\array_key_exists('Error', $data) && $data['Error'] !== null) { + $object->setError($data['Error']); + } + elseif (\array_key_exists('Error', $data) && $data['Error'] === null) { + $object->setError(null); + } + if (\array_key_exists('StartedAt', $data) && $data['StartedAt'] !== null) { + $object->setStartedAt($data['StartedAt']); + } + elseif (\array_key_exists('StartedAt', $data) && $data['StartedAt'] === null) { + $object->setStartedAt(null); + } + if (\array_key_exists('FinishedAt', $data) && $data['FinishedAt'] !== null) { + $object->setFinishedAt($data['FinishedAt']); + } + elseif (\array_key_exists('FinishedAt', $data) && $data['FinishedAt'] === null) { + $object->setFinishedAt(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['Status'] = $object->getStatus(); + } + if ($object->isInitialized('running') && null !== $object->getRunning()) { + $data['Running'] = $object->getRunning(); + } + if ($object->isInitialized('paused') && null !== $object->getPaused()) { + $data['Paused'] = $object->getPaused(); + } + if ($object->isInitialized('restarting') && null !== $object->getRestarting()) { + $data['Restarting'] = $object->getRestarting(); + } + if ($object->isInitialized('oOMKilled') && null !== $object->getOOMKilled()) { + $data['OOMKilled'] = $object->getOOMKilled(); + } + if ($object->isInitialized('dead') && null !== $object->getDead()) { + $data['Dead'] = $object->getDead(); + } + if ($object->isInitialized('pid') && null !== $object->getPid()) { + $data['Pid'] = $object->getPid(); + } + if ($object->isInitialized('exitCode') && null !== $object->getExitCode()) { + $data['ExitCode'] = $object->getExitCode(); + } + if ($object->isInitialized('error') && null !== $object->getError()) { + $data['Error'] = $object->getError(); + } + if ($object->isInitialized('startedAt') && null !== $object->getStartedAt()) { + $data['StartedAt'] = $object->getStartedAt(); + } + if ($object->isInitialized('finishedAt') && null !== $object->getFinishedAt()) { + $data['FinishedAt'] = $object->getFinishedAt(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdJsonGetResponse200State::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersIdTopGetResponse200Normalizer.php b/generated/Normalizer/ContainersIdTopGetResponse200Normalizer.php new file mode 100644 index 000000000..888d5d60e --- /dev/null +++ b/generated/Normalizer/ContainersIdTopGetResponse200Normalizer.php @@ -0,0 +1,184 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainersIdTopGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdTopGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdTopGetResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdTopGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Titles', $data) && $data['Titles'] !== null) { + $values = []; + foreach ($data['Titles'] as $value) { + $values[] = $value; + } + $object->setTitles($values); + } + elseif (\array_key_exists('Titles', $data) && $data['Titles'] === null) { + $object->setTitles(null); + } + if (\array_key_exists('Processes', $data) && $data['Processes'] !== null) { + $values_1 = []; + foreach ($data['Processes'] as $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $value_2; + } + $values_1[] = $values_2; + } + $object->setProcesses($values_1); + } + elseif (\array_key_exists('Processes', $data) && $data['Processes'] === null) { + $object->setProcesses(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('titles') && null !== $object->getTitles()) { + $values = []; + foreach ($object->getTitles() as $value) { + $values[] = $value; + } + $data['Titles'] = $values; + } + if ($object->isInitialized('processes') && null !== $object->getProcesses()) { + $values_1 = []; + foreach ($object->getProcesses() as $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $value_2; + } + $values_1[] = $values_2; + } + $data['Processes'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdTopGetResponse200::class => false]; + } + } +} else { + class ContainersIdTopGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdTopGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdTopGetResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdTopGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Titles', $data) && $data['Titles'] !== null) { + $values = []; + foreach ($data['Titles'] as $value) { + $values[] = $value; + } + $object->setTitles($values); + } + elseif (\array_key_exists('Titles', $data) && $data['Titles'] === null) { + $object->setTitles(null); + } + if (\array_key_exists('Processes', $data) && $data['Processes'] !== null) { + $values_1 = []; + foreach ($data['Processes'] as $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $value_2; + } + $values_1[] = $values_2; + } + $object->setProcesses($values_1); + } + elseif (\array_key_exists('Processes', $data) && $data['Processes'] === null) { + $object->setProcesses(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('titles') && null !== $object->getTitles()) { + $values = []; + foreach ($object->getTitles() as $value) { + $values[] = $value; + } + $data['Titles'] = $values; + } + if ($object->isInitialized('processes') && null !== $object->getProcesses()) { + $values_1 = []; + foreach ($object->getProcesses() as $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $value_2; + } + $values_1[] = $values_2; + } + $data['Processes'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdTopGetResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersIdUpdatePostBodyNormalizer.php b/generated/Normalizer/ContainersIdUpdatePostBodyNormalizer.php new file mode 100644 index 000000000..853d962fd --- /dev/null +++ b/generated/Normalizer/ContainersIdUpdatePostBodyNormalizer.php @@ -0,0 +1,752 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainersIdUpdatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdUpdatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdUpdatePostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdUpdatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('CpuShares', $data) && $data['CpuShares'] !== null) { + $object->setCpuShares($data['CpuShares']); + } + elseif (\array_key_exists('CpuShares', $data) && $data['CpuShares'] === null) { + $object->setCpuShares(null); + } + if (\array_key_exists('Memory', $data) && $data['Memory'] !== null) { + $object->setMemory($data['Memory']); + } + elseif (\array_key_exists('Memory', $data) && $data['Memory'] === null) { + $object->setMemory(null); + } + if (\array_key_exists('CgroupParent', $data) && $data['CgroupParent'] !== null) { + $object->setCgroupParent($data['CgroupParent']); + } + elseif (\array_key_exists('CgroupParent', $data) && $data['CgroupParent'] === null) { + $object->setCgroupParent(null); + } + if (\array_key_exists('BlkioWeight', $data) && $data['BlkioWeight'] !== null) { + $object->setBlkioWeight($data['BlkioWeight']); + } + elseif (\array_key_exists('BlkioWeight', $data) && $data['BlkioWeight'] === null) { + $object->setBlkioWeight(null); + } + if (\array_key_exists('BlkioWeightDevice', $data) && $data['BlkioWeightDevice'] !== null) { + $values = []; + foreach ($data['BlkioWeightDevice'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class, 'json', $context); + } + $object->setBlkioWeightDevice($values); + } + elseif (\array_key_exists('BlkioWeightDevice', $data) && $data['BlkioWeightDevice'] === null) { + $object->setBlkioWeightDevice(null); + } + if (\array_key_exists('BlkioDeviceReadBps', $data) && $data['BlkioDeviceReadBps'] !== null) { + $values_1 = []; + foreach ($data['BlkioDeviceReadBps'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceReadBps($values_1); + } + elseif (\array_key_exists('BlkioDeviceReadBps', $data) && $data['BlkioDeviceReadBps'] === null) { + $object->setBlkioDeviceReadBps(null); + } + if (\array_key_exists('BlkioDeviceWriteBps', $data) && $data['BlkioDeviceWriteBps'] !== null) { + $values_2 = []; + foreach ($data['BlkioDeviceWriteBps'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceWriteBps($values_2); + } + elseif (\array_key_exists('BlkioDeviceWriteBps', $data) && $data['BlkioDeviceWriteBps'] === null) { + $object->setBlkioDeviceWriteBps(null); + } + if (\array_key_exists('BlkioDeviceReadIOps', $data) && $data['BlkioDeviceReadIOps'] !== null) { + $values_3 = []; + foreach ($data['BlkioDeviceReadIOps'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceReadIOps($values_3); + } + elseif (\array_key_exists('BlkioDeviceReadIOps', $data) && $data['BlkioDeviceReadIOps'] === null) { + $object->setBlkioDeviceReadIOps(null); + } + if (\array_key_exists('BlkioDeviceWriteIOps', $data) && $data['BlkioDeviceWriteIOps'] !== null) { + $values_4 = []; + foreach ($data['BlkioDeviceWriteIOps'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceWriteIOps($values_4); + } + elseif (\array_key_exists('BlkioDeviceWriteIOps', $data) && $data['BlkioDeviceWriteIOps'] === null) { + $object->setBlkioDeviceWriteIOps(null); + } + if (\array_key_exists('CpuPeriod', $data) && $data['CpuPeriod'] !== null) { + $object->setCpuPeriod($data['CpuPeriod']); + } + elseif (\array_key_exists('CpuPeriod', $data) && $data['CpuPeriod'] === null) { + $object->setCpuPeriod(null); + } + if (\array_key_exists('CpuQuota', $data) && $data['CpuQuota'] !== null) { + $object->setCpuQuota($data['CpuQuota']); + } + elseif (\array_key_exists('CpuQuota', $data) && $data['CpuQuota'] === null) { + $object->setCpuQuota(null); + } + if (\array_key_exists('CpuRealtimePeriod', $data) && $data['CpuRealtimePeriod'] !== null) { + $object->setCpuRealtimePeriod($data['CpuRealtimePeriod']); + } + elseif (\array_key_exists('CpuRealtimePeriod', $data) && $data['CpuRealtimePeriod'] === null) { + $object->setCpuRealtimePeriod(null); + } + if (\array_key_exists('CpuRealtimeRuntime', $data) && $data['CpuRealtimeRuntime'] !== null) { + $object->setCpuRealtimeRuntime($data['CpuRealtimeRuntime']); + } + elseif (\array_key_exists('CpuRealtimeRuntime', $data) && $data['CpuRealtimeRuntime'] === null) { + $object->setCpuRealtimeRuntime(null); + } + if (\array_key_exists('CpusetCpus', $data) && $data['CpusetCpus'] !== null) { + $object->setCpusetCpus($data['CpusetCpus']); + } + elseif (\array_key_exists('CpusetCpus', $data) && $data['CpusetCpus'] === null) { + $object->setCpusetCpus(null); + } + if (\array_key_exists('CpusetMems', $data) && $data['CpusetMems'] !== null) { + $object->setCpusetMems($data['CpusetMems']); + } + elseif (\array_key_exists('CpusetMems', $data) && $data['CpusetMems'] === null) { + $object->setCpusetMems(null); + } + if (\array_key_exists('Devices', $data) && $data['Devices'] !== null) { + $values_5 = []; + foreach ($data['Devices'] as $value_5) { + $values_5[] = $this->denormalizer->denormalize($value_5, \Docker\API\Model\DeviceMapping::class, 'json', $context); + } + $object->setDevices($values_5); + } + elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { + $object->setDevices(null); + } + if (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] !== null) { + $object->setDiskQuota($data['DiskQuota']); + } + elseif (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] === null) { + $object->setDiskQuota(null); + } + if (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] !== null) { + $object->setKernelMemory($data['KernelMemory']); + } + elseif (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] === null) { + $object->setKernelMemory(null); + } + if (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] !== null) { + $object->setMemoryReservation($data['MemoryReservation']); + } + elseif (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] === null) { + $object->setMemoryReservation(null); + } + if (\array_key_exists('MemorySwap', $data) && $data['MemorySwap'] !== null) { + $object->setMemorySwap($data['MemorySwap']); + } + elseif (\array_key_exists('MemorySwap', $data) && $data['MemorySwap'] === null) { + $object->setMemorySwap(null); + } + if (\array_key_exists('MemorySwappiness', $data) && $data['MemorySwappiness'] !== null) { + $object->setMemorySwappiness($data['MemorySwappiness']); + } + elseif (\array_key_exists('MemorySwappiness', $data) && $data['MemorySwappiness'] === null) { + $object->setMemorySwappiness(null); + } + if (\array_key_exists('NanoCpus', $data) && $data['NanoCpus'] !== null) { + $object->setNanoCpus($data['NanoCpus']); + } + elseif (\array_key_exists('NanoCpus', $data) && $data['NanoCpus'] === null) { + $object->setNanoCpus(null); + } + if (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] !== null) { + $object->setOomKillDisable($data['OomKillDisable']); + } + elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { + $object->setOomKillDisable(null); + } + if (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] !== null) { + $object->setPidsLimit($data['PidsLimit']); + } + elseif (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] === null) { + $object->setPidsLimit(null); + } + if (\array_key_exists('Ulimits', $data) && $data['Ulimits'] !== null) { + $values_6 = []; + foreach ($data['Ulimits'] as $value_6) { + $values_6[] = $this->denormalizer->denormalize($value_6, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); + } + $object->setUlimits($values_6); + } + elseif (\array_key_exists('Ulimits', $data) && $data['Ulimits'] === null) { + $object->setUlimits(null); + } + if (\array_key_exists('CpuCount', $data) && $data['CpuCount'] !== null) { + $object->setCpuCount($data['CpuCount']); + } + elseif (\array_key_exists('CpuCount', $data) && $data['CpuCount'] === null) { + $object->setCpuCount(null); + } + if (\array_key_exists('CpuPercent', $data) && $data['CpuPercent'] !== null) { + $object->setCpuPercent($data['CpuPercent']); + } + elseif (\array_key_exists('CpuPercent', $data) && $data['CpuPercent'] === null) { + $object->setCpuPercent(null); + } + if (\array_key_exists('IOMaximumIOps', $data) && $data['IOMaximumIOps'] !== null) { + $object->setIOMaximumIOps($data['IOMaximumIOps']); + } + elseif (\array_key_exists('IOMaximumIOps', $data) && $data['IOMaximumIOps'] === null) { + $object->setIOMaximumIOps(null); + } + if (\array_key_exists('IOMaximumBandwidth', $data) && $data['IOMaximumBandwidth'] !== null) { + $object->setIOMaximumBandwidth($data['IOMaximumBandwidth']); + } + elseif (\array_key_exists('IOMaximumBandwidth', $data) && $data['IOMaximumBandwidth'] === null) { + $object->setIOMaximumBandwidth(null); + } + if (\array_key_exists('RestartPolicy', $data) && $data['RestartPolicy'] !== null) { + $object->setRestartPolicy($this->denormalizer->denormalize($data['RestartPolicy'], \Docker\API\Model\RestartPolicy::class, 'json', $context)); + } + elseif (\array_key_exists('RestartPolicy', $data) && $data['RestartPolicy'] === null) { + $object->setRestartPolicy(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('cpuShares') && null !== $object->getCpuShares()) { + $data['CpuShares'] = $object->getCpuShares(); + } + if ($object->isInitialized('memory') && null !== $object->getMemory()) { + $data['Memory'] = $object->getMemory(); + } + if ($object->isInitialized('cgroupParent') && null !== $object->getCgroupParent()) { + $data['CgroupParent'] = $object->getCgroupParent(); + } + if ($object->isInitialized('blkioWeight') && null !== $object->getBlkioWeight()) { + $data['BlkioWeight'] = $object->getBlkioWeight(); + } + if ($object->isInitialized('blkioWeightDevice') && null !== $object->getBlkioWeightDevice()) { + $values = []; + foreach ($object->getBlkioWeightDevice() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['BlkioWeightDevice'] = $values; + } + if ($object->isInitialized('blkioDeviceReadBps') && null !== $object->getBlkioDeviceReadBps()) { + $values_1 = []; + foreach ($object->getBlkioDeviceReadBps() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['BlkioDeviceReadBps'] = $values_1; + } + if ($object->isInitialized('blkioDeviceWriteBps') && null !== $object->getBlkioDeviceWriteBps()) { + $values_2 = []; + foreach ($object->getBlkioDeviceWriteBps() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['BlkioDeviceWriteBps'] = $values_2; + } + if ($object->isInitialized('blkioDeviceReadIOps') && null !== $object->getBlkioDeviceReadIOps()) { + $values_3 = []; + foreach ($object->getBlkioDeviceReadIOps() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['BlkioDeviceReadIOps'] = $values_3; + } + if ($object->isInitialized('blkioDeviceWriteIOps') && null !== $object->getBlkioDeviceWriteIOps()) { + $values_4 = []; + foreach ($object->getBlkioDeviceWriteIOps() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['BlkioDeviceWriteIOps'] = $values_4; + } + if ($object->isInitialized('cpuPeriod') && null !== $object->getCpuPeriod()) { + $data['CpuPeriod'] = $object->getCpuPeriod(); + } + if ($object->isInitialized('cpuQuota') && null !== $object->getCpuQuota()) { + $data['CpuQuota'] = $object->getCpuQuota(); + } + if ($object->isInitialized('cpuRealtimePeriod') && null !== $object->getCpuRealtimePeriod()) { + $data['CpuRealtimePeriod'] = $object->getCpuRealtimePeriod(); + } + if ($object->isInitialized('cpuRealtimeRuntime') && null !== $object->getCpuRealtimeRuntime()) { + $data['CpuRealtimeRuntime'] = $object->getCpuRealtimeRuntime(); + } + if ($object->isInitialized('cpusetCpus') && null !== $object->getCpusetCpus()) { + $data['CpusetCpus'] = $object->getCpusetCpus(); + } + if ($object->isInitialized('cpusetMems') && null !== $object->getCpusetMems()) { + $data['CpusetMems'] = $object->getCpusetMems(); + } + if ($object->isInitialized('devices') && null !== $object->getDevices()) { + $values_5 = []; + foreach ($object->getDevices() as $value_5) { + $values_5[] = $this->normalizer->normalize($value_5, 'json', $context); + } + $data['Devices'] = $values_5; + } + if ($object->isInitialized('diskQuota') && null !== $object->getDiskQuota()) { + $data['DiskQuota'] = $object->getDiskQuota(); + } + if ($object->isInitialized('kernelMemory') && null !== $object->getKernelMemory()) { + $data['KernelMemory'] = $object->getKernelMemory(); + } + if ($object->isInitialized('memoryReservation') && null !== $object->getMemoryReservation()) { + $data['MemoryReservation'] = $object->getMemoryReservation(); + } + if ($object->isInitialized('memorySwap') && null !== $object->getMemorySwap()) { + $data['MemorySwap'] = $object->getMemorySwap(); + } + if ($object->isInitialized('memorySwappiness') && null !== $object->getMemorySwappiness()) { + $data['MemorySwappiness'] = $object->getMemorySwappiness(); + } + if ($object->isInitialized('nanoCpus') && null !== $object->getNanoCpus()) { + $data['NanoCpus'] = $object->getNanoCpus(); + } + if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { + $data['OomKillDisable'] = $object->getOomKillDisable(); + } + if ($object->isInitialized('pidsLimit') && null !== $object->getPidsLimit()) { + $data['PidsLimit'] = $object->getPidsLimit(); + } + if ($object->isInitialized('ulimits') && null !== $object->getUlimits()) { + $values_6 = []; + foreach ($object->getUlimits() as $value_6) { + $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + } + $data['Ulimits'] = $values_6; + } + if ($object->isInitialized('cpuCount') && null !== $object->getCpuCount()) { + $data['CpuCount'] = $object->getCpuCount(); + } + if ($object->isInitialized('cpuPercent') && null !== $object->getCpuPercent()) { + $data['CpuPercent'] = $object->getCpuPercent(); + } + if ($object->isInitialized('iOMaximumIOps') && null !== $object->getIOMaximumIOps()) { + $data['IOMaximumIOps'] = $object->getIOMaximumIOps(); + } + if ($object->isInitialized('iOMaximumBandwidth') && null !== $object->getIOMaximumBandwidth()) { + $data['IOMaximumBandwidth'] = $object->getIOMaximumBandwidth(); + } + if ($object->isInitialized('restartPolicy') && null !== $object->getRestartPolicy()) { + $data['RestartPolicy'] = $this->normalizer->normalize($object->getRestartPolicy(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdUpdatePostBody::class => false]; + } + } +} else { + class ContainersIdUpdatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdUpdatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdUpdatePostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdUpdatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('CpuShares', $data) && $data['CpuShares'] !== null) { + $object->setCpuShares($data['CpuShares']); + } + elseif (\array_key_exists('CpuShares', $data) && $data['CpuShares'] === null) { + $object->setCpuShares(null); + } + if (\array_key_exists('Memory', $data) && $data['Memory'] !== null) { + $object->setMemory($data['Memory']); + } + elseif (\array_key_exists('Memory', $data) && $data['Memory'] === null) { + $object->setMemory(null); + } + if (\array_key_exists('CgroupParent', $data) && $data['CgroupParent'] !== null) { + $object->setCgroupParent($data['CgroupParent']); + } + elseif (\array_key_exists('CgroupParent', $data) && $data['CgroupParent'] === null) { + $object->setCgroupParent(null); + } + if (\array_key_exists('BlkioWeight', $data) && $data['BlkioWeight'] !== null) { + $object->setBlkioWeight($data['BlkioWeight']); + } + elseif (\array_key_exists('BlkioWeight', $data) && $data['BlkioWeight'] === null) { + $object->setBlkioWeight(null); + } + if (\array_key_exists('BlkioWeightDevice', $data) && $data['BlkioWeightDevice'] !== null) { + $values = []; + foreach ($data['BlkioWeightDevice'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class, 'json', $context); + } + $object->setBlkioWeightDevice($values); + } + elseif (\array_key_exists('BlkioWeightDevice', $data) && $data['BlkioWeightDevice'] === null) { + $object->setBlkioWeightDevice(null); + } + if (\array_key_exists('BlkioDeviceReadBps', $data) && $data['BlkioDeviceReadBps'] !== null) { + $values_1 = []; + foreach ($data['BlkioDeviceReadBps'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceReadBps($values_1); + } + elseif (\array_key_exists('BlkioDeviceReadBps', $data) && $data['BlkioDeviceReadBps'] === null) { + $object->setBlkioDeviceReadBps(null); + } + if (\array_key_exists('BlkioDeviceWriteBps', $data) && $data['BlkioDeviceWriteBps'] !== null) { + $values_2 = []; + foreach ($data['BlkioDeviceWriteBps'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceWriteBps($values_2); + } + elseif (\array_key_exists('BlkioDeviceWriteBps', $data) && $data['BlkioDeviceWriteBps'] === null) { + $object->setBlkioDeviceWriteBps(null); + } + if (\array_key_exists('BlkioDeviceReadIOps', $data) && $data['BlkioDeviceReadIOps'] !== null) { + $values_3 = []; + foreach ($data['BlkioDeviceReadIOps'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceReadIOps($values_3); + } + elseif (\array_key_exists('BlkioDeviceReadIOps', $data) && $data['BlkioDeviceReadIOps'] === null) { + $object->setBlkioDeviceReadIOps(null); + } + if (\array_key_exists('BlkioDeviceWriteIOps', $data) && $data['BlkioDeviceWriteIOps'] !== null) { + $values_4 = []; + foreach ($data['BlkioDeviceWriteIOps'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceWriteIOps($values_4); + } + elseif (\array_key_exists('BlkioDeviceWriteIOps', $data) && $data['BlkioDeviceWriteIOps'] === null) { + $object->setBlkioDeviceWriteIOps(null); + } + if (\array_key_exists('CpuPeriod', $data) && $data['CpuPeriod'] !== null) { + $object->setCpuPeriod($data['CpuPeriod']); + } + elseif (\array_key_exists('CpuPeriod', $data) && $data['CpuPeriod'] === null) { + $object->setCpuPeriod(null); + } + if (\array_key_exists('CpuQuota', $data) && $data['CpuQuota'] !== null) { + $object->setCpuQuota($data['CpuQuota']); + } + elseif (\array_key_exists('CpuQuota', $data) && $data['CpuQuota'] === null) { + $object->setCpuQuota(null); + } + if (\array_key_exists('CpuRealtimePeriod', $data) && $data['CpuRealtimePeriod'] !== null) { + $object->setCpuRealtimePeriod($data['CpuRealtimePeriod']); + } + elseif (\array_key_exists('CpuRealtimePeriod', $data) && $data['CpuRealtimePeriod'] === null) { + $object->setCpuRealtimePeriod(null); + } + if (\array_key_exists('CpuRealtimeRuntime', $data) && $data['CpuRealtimeRuntime'] !== null) { + $object->setCpuRealtimeRuntime($data['CpuRealtimeRuntime']); + } + elseif (\array_key_exists('CpuRealtimeRuntime', $data) && $data['CpuRealtimeRuntime'] === null) { + $object->setCpuRealtimeRuntime(null); + } + if (\array_key_exists('CpusetCpus', $data) && $data['CpusetCpus'] !== null) { + $object->setCpusetCpus($data['CpusetCpus']); + } + elseif (\array_key_exists('CpusetCpus', $data) && $data['CpusetCpus'] === null) { + $object->setCpusetCpus(null); + } + if (\array_key_exists('CpusetMems', $data) && $data['CpusetMems'] !== null) { + $object->setCpusetMems($data['CpusetMems']); + } + elseif (\array_key_exists('CpusetMems', $data) && $data['CpusetMems'] === null) { + $object->setCpusetMems(null); + } + if (\array_key_exists('Devices', $data) && $data['Devices'] !== null) { + $values_5 = []; + foreach ($data['Devices'] as $value_5) { + $values_5[] = $this->denormalizer->denormalize($value_5, \Docker\API\Model\DeviceMapping::class, 'json', $context); + } + $object->setDevices($values_5); + } + elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { + $object->setDevices(null); + } + if (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] !== null) { + $object->setDiskQuota($data['DiskQuota']); + } + elseif (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] === null) { + $object->setDiskQuota(null); + } + if (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] !== null) { + $object->setKernelMemory($data['KernelMemory']); + } + elseif (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] === null) { + $object->setKernelMemory(null); + } + if (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] !== null) { + $object->setMemoryReservation($data['MemoryReservation']); + } + elseif (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] === null) { + $object->setMemoryReservation(null); + } + if (\array_key_exists('MemorySwap', $data) && $data['MemorySwap'] !== null) { + $object->setMemorySwap($data['MemorySwap']); + } + elseif (\array_key_exists('MemorySwap', $data) && $data['MemorySwap'] === null) { + $object->setMemorySwap(null); + } + if (\array_key_exists('MemorySwappiness', $data) && $data['MemorySwappiness'] !== null) { + $object->setMemorySwappiness($data['MemorySwappiness']); + } + elseif (\array_key_exists('MemorySwappiness', $data) && $data['MemorySwappiness'] === null) { + $object->setMemorySwappiness(null); + } + if (\array_key_exists('NanoCpus', $data) && $data['NanoCpus'] !== null) { + $object->setNanoCpus($data['NanoCpus']); + } + elseif (\array_key_exists('NanoCpus', $data) && $data['NanoCpus'] === null) { + $object->setNanoCpus(null); + } + if (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] !== null) { + $object->setOomKillDisable($data['OomKillDisable']); + } + elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { + $object->setOomKillDisable(null); + } + if (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] !== null) { + $object->setPidsLimit($data['PidsLimit']); + } + elseif (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] === null) { + $object->setPidsLimit(null); + } + if (\array_key_exists('Ulimits', $data) && $data['Ulimits'] !== null) { + $values_6 = []; + foreach ($data['Ulimits'] as $value_6) { + $values_6[] = $this->denormalizer->denormalize($value_6, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); + } + $object->setUlimits($values_6); + } + elseif (\array_key_exists('Ulimits', $data) && $data['Ulimits'] === null) { + $object->setUlimits(null); + } + if (\array_key_exists('CpuCount', $data) && $data['CpuCount'] !== null) { + $object->setCpuCount($data['CpuCount']); + } + elseif (\array_key_exists('CpuCount', $data) && $data['CpuCount'] === null) { + $object->setCpuCount(null); + } + if (\array_key_exists('CpuPercent', $data) && $data['CpuPercent'] !== null) { + $object->setCpuPercent($data['CpuPercent']); + } + elseif (\array_key_exists('CpuPercent', $data) && $data['CpuPercent'] === null) { + $object->setCpuPercent(null); + } + if (\array_key_exists('IOMaximumIOps', $data) && $data['IOMaximumIOps'] !== null) { + $object->setIOMaximumIOps($data['IOMaximumIOps']); + } + elseif (\array_key_exists('IOMaximumIOps', $data) && $data['IOMaximumIOps'] === null) { + $object->setIOMaximumIOps(null); + } + if (\array_key_exists('IOMaximumBandwidth', $data) && $data['IOMaximumBandwidth'] !== null) { + $object->setIOMaximumBandwidth($data['IOMaximumBandwidth']); + } + elseif (\array_key_exists('IOMaximumBandwidth', $data) && $data['IOMaximumBandwidth'] === null) { + $object->setIOMaximumBandwidth(null); + } + if (\array_key_exists('RestartPolicy', $data) && $data['RestartPolicy'] !== null) { + $object->setRestartPolicy($this->denormalizer->denormalize($data['RestartPolicy'], \Docker\API\Model\RestartPolicy::class, 'json', $context)); + } + elseif (\array_key_exists('RestartPolicy', $data) && $data['RestartPolicy'] === null) { + $object->setRestartPolicy(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('cpuShares') && null !== $object->getCpuShares()) { + $data['CpuShares'] = $object->getCpuShares(); + } + if ($object->isInitialized('memory') && null !== $object->getMemory()) { + $data['Memory'] = $object->getMemory(); + } + if ($object->isInitialized('cgroupParent') && null !== $object->getCgroupParent()) { + $data['CgroupParent'] = $object->getCgroupParent(); + } + if ($object->isInitialized('blkioWeight') && null !== $object->getBlkioWeight()) { + $data['BlkioWeight'] = $object->getBlkioWeight(); + } + if ($object->isInitialized('blkioWeightDevice') && null !== $object->getBlkioWeightDevice()) { + $values = []; + foreach ($object->getBlkioWeightDevice() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['BlkioWeightDevice'] = $values; + } + if ($object->isInitialized('blkioDeviceReadBps') && null !== $object->getBlkioDeviceReadBps()) { + $values_1 = []; + foreach ($object->getBlkioDeviceReadBps() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['BlkioDeviceReadBps'] = $values_1; + } + if ($object->isInitialized('blkioDeviceWriteBps') && null !== $object->getBlkioDeviceWriteBps()) { + $values_2 = []; + foreach ($object->getBlkioDeviceWriteBps() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['BlkioDeviceWriteBps'] = $values_2; + } + if ($object->isInitialized('blkioDeviceReadIOps') && null !== $object->getBlkioDeviceReadIOps()) { + $values_3 = []; + foreach ($object->getBlkioDeviceReadIOps() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['BlkioDeviceReadIOps'] = $values_3; + } + if ($object->isInitialized('blkioDeviceWriteIOps') && null !== $object->getBlkioDeviceWriteIOps()) { + $values_4 = []; + foreach ($object->getBlkioDeviceWriteIOps() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['BlkioDeviceWriteIOps'] = $values_4; + } + if ($object->isInitialized('cpuPeriod') && null !== $object->getCpuPeriod()) { + $data['CpuPeriod'] = $object->getCpuPeriod(); + } + if ($object->isInitialized('cpuQuota') && null !== $object->getCpuQuota()) { + $data['CpuQuota'] = $object->getCpuQuota(); + } + if ($object->isInitialized('cpuRealtimePeriod') && null !== $object->getCpuRealtimePeriod()) { + $data['CpuRealtimePeriod'] = $object->getCpuRealtimePeriod(); + } + if ($object->isInitialized('cpuRealtimeRuntime') && null !== $object->getCpuRealtimeRuntime()) { + $data['CpuRealtimeRuntime'] = $object->getCpuRealtimeRuntime(); + } + if ($object->isInitialized('cpusetCpus') && null !== $object->getCpusetCpus()) { + $data['CpusetCpus'] = $object->getCpusetCpus(); + } + if ($object->isInitialized('cpusetMems') && null !== $object->getCpusetMems()) { + $data['CpusetMems'] = $object->getCpusetMems(); + } + if ($object->isInitialized('devices') && null !== $object->getDevices()) { + $values_5 = []; + foreach ($object->getDevices() as $value_5) { + $values_5[] = $this->normalizer->normalize($value_5, 'json', $context); + } + $data['Devices'] = $values_5; + } + if ($object->isInitialized('diskQuota') && null !== $object->getDiskQuota()) { + $data['DiskQuota'] = $object->getDiskQuota(); + } + if ($object->isInitialized('kernelMemory') && null !== $object->getKernelMemory()) { + $data['KernelMemory'] = $object->getKernelMemory(); + } + if ($object->isInitialized('memoryReservation') && null !== $object->getMemoryReservation()) { + $data['MemoryReservation'] = $object->getMemoryReservation(); + } + if ($object->isInitialized('memorySwap') && null !== $object->getMemorySwap()) { + $data['MemorySwap'] = $object->getMemorySwap(); + } + if ($object->isInitialized('memorySwappiness') && null !== $object->getMemorySwappiness()) { + $data['MemorySwappiness'] = $object->getMemorySwappiness(); + } + if ($object->isInitialized('nanoCpus') && null !== $object->getNanoCpus()) { + $data['NanoCpus'] = $object->getNanoCpus(); + } + if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { + $data['OomKillDisable'] = $object->getOomKillDisable(); + } + if ($object->isInitialized('pidsLimit') && null !== $object->getPidsLimit()) { + $data['PidsLimit'] = $object->getPidsLimit(); + } + if ($object->isInitialized('ulimits') && null !== $object->getUlimits()) { + $values_6 = []; + foreach ($object->getUlimits() as $value_6) { + $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + } + $data['Ulimits'] = $values_6; + } + if ($object->isInitialized('cpuCount') && null !== $object->getCpuCount()) { + $data['CpuCount'] = $object->getCpuCount(); + } + if ($object->isInitialized('cpuPercent') && null !== $object->getCpuPercent()) { + $data['CpuPercent'] = $object->getCpuPercent(); + } + if ($object->isInitialized('iOMaximumIOps') && null !== $object->getIOMaximumIOps()) { + $data['IOMaximumIOps'] = $object->getIOMaximumIOps(); + } + if ($object->isInitialized('iOMaximumBandwidth') && null !== $object->getIOMaximumBandwidth()) { + $data['IOMaximumBandwidth'] = $object->getIOMaximumBandwidth(); + } + if ($object->isInitialized('restartPolicy') && null !== $object->getRestartPolicy()) { + $data['RestartPolicy'] = $this->normalizer->normalize($object->getRestartPolicy(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdUpdatePostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersIdUpdatePostResponse200Normalizer.php b/generated/Normalizer/ContainersIdUpdatePostResponse200Normalizer.php new file mode 100644 index 000000000..30d5afe8e --- /dev/null +++ b/generated/Normalizer/ContainersIdUpdatePostResponse200Normalizer.php @@ -0,0 +1,134 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainersIdUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdUpdatePostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdUpdatePostResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdUpdatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Warnings', $data) && $data['Warnings'] !== null) { + $values = []; + foreach ($data['Warnings'] as $value) { + $values[] = $value; + } + $object->setWarnings($values); + } + elseif (\array_key_exists('Warnings', $data) && $data['Warnings'] === null) { + $object->setWarnings(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { + $values = []; + foreach ($object->getWarnings() as $value) { + $values[] = $value; + } + $data['Warnings'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdUpdatePostResponse200::class => false]; + } + } +} else { + class ContainersIdUpdatePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdUpdatePostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdUpdatePostResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdUpdatePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Warnings', $data) && $data['Warnings'] !== null) { + $values = []; + foreach ($data['Warnings'] as $value) { + $values[] = $value; + } + $object->setWarnings($values); + } + elseif (\array_key_exists('Warnings', $data) && $data['Warnings'] === null) { + $object->setWarnings(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { + $values = []; + foreach ($object->getWarnings() as $value) { + $values[] = $value; + } + $data['Warnings'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdUpdatePostResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersIdWaitPostResponse200Normalizer.php b/generated/Normalizer/ContainersIdWaitPostResponse200Normalizer.php new file mode 100644 index 000000000..be9828c5d --- /dev/null +++ b/generated/Normalizer/ContainersIdWaitPostResponse200Normalizer.php @@ -0,0 +1,114 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainersIdWaitPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdWaitPostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdWaitPostResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdWaitPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('StatusCode', $data) && $data['StatusCode'] !== null) { + $object->setStatusCode($data['StatusCode']); + } + elseif (\array_key_exists('StatusCode', $data) && $data['StatusCode'] === null) { + $object->setStatusCode(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['StatusCode'] = $object->getStatusCode(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdWaitPostResponse200::class => false]; + } + } +} else { + class ContainersIdWaitPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersIdWaitPostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdWaitPostResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersIdWaitPostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('StatusCode', $data) && $data['StatusCode'] !== null) { + $object->setStatusCode($data['StatusCode']); + } + elseif (\array_key_exists('StatusCode', $data) && $data['StatusCode'] === null) { + $object->setStatusCode(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['StatusCode'] = $object->getStatusCode(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersIdWaitPostResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersPrunePostResponse200Normalizer.php b/generated/Normalizer/ContainersPrunePostResponse200Normalizer.php new file mode 100644 index 000000000..8eb1abd05 --- /dev/null +++ b/generated/Normalizer/ContainersPrunePostResponse200Normalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainersPrunePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersPrunePostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersPrunePostResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersPrunePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ContainersDeleted', $data) && $data['ContainersDeleted'] !== null) { + $values = []; + foreach ($data['ContainersDeleted'] as $value) { + $values[] = $value; + } + $object->setContainersDeleted($values); + } + elseif (\array_key_exists('ContainersDeleted', $data) && $data['ContainersDeleted'] === null) { + $object->setContainersDeleted(null); + } + if (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] !== null) { + $object->setSpaceReclaimed($data['SpaceReclaimed']); + } + elseif (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] === null) { + $object->setSpaceReclaimed(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('containersDeleted') && null !== $object->getContainersDeleted()) { + $values = []; + foreach ($object->getContainersDeleted() as $value) { + $values[] = $value; + } + $data['ContainersDeleted'] = $values; + } + if ($object->isInitialized('spaceReclaimed') && null !== $object->getSpaceReclaimed()) { + $data['SpaceReclaimed'] = $object->getSpaceReclaimed(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersPrunePostResponse200::class => false]; + } + } +} else { + class ContainersPrunePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainersPrunePostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainersPrunePostResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainersPrunePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ContainersDeleted', $data) && $data['ContainersDeleted'] !== null) { + $values = []; + foreach ($data['ContainersDeleted'] as $value) { + $values[] = $value; + } + $object->setContainersDeleted($values); + } + elseif (\array_key_exists('ContainersDeleted', $data) && $data['ContainersDeleted'] === null) { + $object->setContainersDeleted(null); + } + if (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] !== null) { + $object->setSpaceReclaimed($data['SpaceReclaimed']); + } + elseif (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] === null) { + $object->setSpaceReclaimed(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('containersDeleted') && null !== $object->getContainersDeleted()) { + $values = []; + foreach ($object->getContainersDeleted() as $value) { + $values[] = $value; + } + $data['ContainersDeleted'] = $values; + } + if ($object->isInitialized('spaceReclaimed') && null !== $object->getSpaceReclaimed()) { + $data['SpaceReclaimed'] = $object->getSpaceReclaimed(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainersPrunePostResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/CreateImageInfoNormalizer.php b/generated/Normalizer/CreateImageInfoNormalizer.php index 23db4defb..ff81d1fe8 100644 --- a/generated/Normalizer/CreateImageInfoNormalizer.php +++ b/generated/Normalizer/CreateImageInfoNormalizer.php @@ -2,80 +2,171 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class CreateImageInfoNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\CreateImageInfo') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\CreateImageInfo) { - return true; - } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class CreateImageInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $object = new \Docker\API\Model\CreateImageInfo(); - if (property_exists($data, 'id')) { - $object->setId($data->{'id'}); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\CreateImageInfo::class; } - if (property_exists($data, 'error')) { - $object->setError($data->{'error'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\CreateImageInfo::class; } - if (property_exists($data, 'status')) { - $object->setStatus($data->{'status'}); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\CreateImageInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && $data['error'] !== null) { + $object->setError($data['error']); + } + elseif (\array_key_exists('error', $data) && $data['error'] === null) { + $object->setError(null); + } + if (\array_key_exists('status', $data) && $data['status'] !== null) { + $object->setStatus($data['status']); + } + elseif (\array_key_exists('status', $data) && $data['status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('progress', $data) && $data['progress'] !== null) { + $object->setProgress($data['progress']); + } + elseif (\array_key_exists('progress', $data) && $data['progress'] === null) { + $object->setProgress(null); + } + if (\array_key_exists('progressDetail', $data) && $data['progressDetail'] !== null) { + $object->setProgressDetail($this->denormalizer->denormalize($data['progressDetail'], \Docker\API\Model\ProgressDetail::class, 'json', $context)); + } + elseif (\array_key_exists('progressDetail', $data) && $data['progressDetail'] === null) { + $object->setProgressDetail(null); + } + return $object; } - if (property_exists($data, 'progress')) { - $object->setProgress($data->{'progress'}); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('error') && null !== $object->getError()) { + $data['error'] = $object->getError(); + } + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['status'] = $object->getStatus(); + } + if ($object->isInitialized('progress') && null !== $object->getProgress()) { + $data['progress'] = $object->getProgress(); + } + if ($object->isInitialized('progressDetail') && null !== $object->getProgressDetail()) { + $data['progressDetail'] = $this->normalizer->normalize($object->getProgressDetail(), 'json', $context); + } + return $data; } - if (property_exists($data, 'progressDetail')) { - $object->setProgressDetail($this->serializer->denormalize($data->{'progressDetail'}, 'Docker\\API\\Model\\ProgressDetail', 'raw', $context)); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\CreateImageInfo::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class CreateImageInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getId()) { - $data->{'id'} = $object->getId(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\CreateImageInfo::class; } - if (null !== $object->getError()) { - $data->{'error'} = $object->getError(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\CreateImageInfo::class; } - if (null !== $object->getStatus()) { - $data->{'status'} = $object->getStatus(); + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\CreateImageInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && $data['error'] !== null) { + $object->setError($data['error']); + } + elseif (\array_key_exists('error', $data) && $data['error'] === null) { + $object->setError(null); + } + if (\array_key_exists('status', $data) && $data['status'] !== null) { + $object->setStatus($data['status']); + } + elseif (\array_key_exists('status', $data) && $data['status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('progress', $data) && $data['progress'] !== null) { + $object->setProgress($data['progress']); + } + elseif (\array_key_exists('progress', $data) && $data['progress'] === null) { + $object->setProgress(null); + } + if (\array_key_exists('progressDetail', $data) && $data['progressDetail'] !== null) { + $object->setProgressDetail($this->denormalizer->denormalize($data['progressDetail'], \Docker\API\Model\ProgressDetail::class, 'json', $context)); + } + elseif (\array_key_exists('progressDetail', $data) && $data['progressDetail'] === null) { + $object->setProgressDetail(null); + } + return $object; } - if (null !== $object->getProgress()) { - $data->{'progress'} = $object->getProgress(); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('error') && null !== $object->getError()) { + $data['error'] = $object->getError(); + } + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['status'] = $object->getStatus(); + } + if ($object->isInitialized('progress') && null !== $object->getProgress()) { + $data['progress'] = $object->getProgress(); + } + if ($object->isInitialized('progressDetail') && null !== $object->getProgressDetail()) { + $data['progressDetail'] = $this->normalizer->normalize($object->getProgressDetail(), 'json', $context); + } + return $data; } - if (null !== $object->getProgressDetail()) { - $data->{'progressDetail'} = json_decode($this->serializer->normalize($object->getProgressDetail(), 'raw', $context)); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\CreateImageInfo::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/DeviceMappingNormalizer.php b/generated/Normalizer/DeviceMappingNormalizer.php new file mode 100644 index 000000000..ddd4ec9c3 --- /dev/null +++ b/generated/Normalizer/DeviceMappingNormalizer.php @@ -0,0 +1,154 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class DeviceMappingNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\DeviceMapping::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\DeviceMapping::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\DeviceMapping(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('PathOnHost', $data) && $data['PathOnHost'] !== null) { + $object->setPathOnHost($data['PathOnHost']); + } + elseif (\array_key_exists('PathOnHost', $data) && $data['PathOnHost'] === null) { + $object->setPathOnHost(null); + } + if (\array_key_exists('PathInContainer', $data) && $data['PathInContainer'] !== null) { + $object->setPathInContainer($data['PathInContainer']); + } + elseif (\array_key_exists('PathInContainer', $data) && $data['PathInContainer'] === null) { + $object->setPathInContainer(null); + } + if (\array_key_exists('CgroupPermissions', $data) && $data['CgroupPermissions'] !== null) { + $object->setCgroupPermissions($data['CgroupPermissions']); + } + elseif (\array_key_exists('CgroupPermissions', $data) && $data['CgroupPermissions'] === null) { + $object->setCgroupPermissions(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('pathOnHost') && null !== $object->getPathOnHost()) { + $data['PathOnHost'] = $object->getPathOnHost(); + } + if ($object->isInitialized('pathInContainer') && null !== $object->getPathInContainer()) { + $data['PathInContainer'] = $object->getPathInContainer(); + } + if ($object->isInitialized('cgroupPermissions') && null !== $object->getCgroupPermissions()) { + $data['CgroupPermissions'] = $object->getCgroupPermissions(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\DeviceMapping::class => false]; + } + } +} else { + class DeviceMappingNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\DeviceMapping::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\DeviceMapping::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\DeviceMapping(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('PathOnHost', $data) && $data['PathOnHost'] !== null) { + $object->setPathOnHost($data['PathOnHost']); + } + elseif (\array_key_exists('PathOnHost', $data) && $data['PathOnHost'] === null) { + $object->setPathOnHost(null); + } + if (\array_key_exists('PathInContainer', $data) && $data['PathInContainer'] !== null) { + $object->setPathInContainer($data['PathInContainer']); + } + elseif (\array_key_exists('PathInContainer', $data) && $data['PathInContainer'] === null) { + $object->setPathInContainer(null); + } + if (\array_key_exists('CgroupPermissions', $data) && $data['CgroupPermissions'] !== null) { + $object->setCgroupPermissions($data['CgroupPermissions']); + } + elseif (\array_key_exists('CgroupPermissions', $data) && $data['CgroupPermissions'] === null) { + $object->setCgroupPermissions(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('pathOnHost') && null !== $object->getPathOnHost()) { + $data['PathOnHost'] = $object->getPathOnHost(); + } + if ($object->isInitialized('pathInContainer') && null !== $object->getPathInContainer()) { + $data['PathInContainer'] = $object->getPathInContainer(); + } + if ($object->isInitialized('cgroupPermissions') && null !== $object->getCgroupPermissions()) { + $data['CgroupPermissions'] = $object->getCgroupPermissions(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\DeviceMapping::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/DeviceNormalizer.php b/generated/Normalizer/DeviceNormalizer.php deleted file mode 100644 index 9443be2e2..000000000 --- a/generated/Normalizer/DeviceNormalizer.php +++ /dev/null @@ -1,69 +0,0 @@ -setPathOnHost($data->{'PathOnHost'}); - } - if (property_exists($data, 'PathInContainer')) { - $object->setPathInContainer($data->{'PathInContainer'}); - } - if (property_exists($data, 'CgroupPermissions')) { - $object->setCgroupPermissions($data->{'CgroupPermissions'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getPathOnHost()) { - $data->{'PathOnHost'} = $object->getPathOnHost(); - } - if (null !== $object->getPathInContainer()) { - $data->{'PathInContainer'} = $object->getPathInContainer(); - } - if (null !== $object->getCgroupPermissions()) { - $data->{'CgroupPermissions'} = $object->getCgroupPermissions(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/DeviceRateNormalizer.php b/generated/Normalizer/DeviceRateNormalizer.php deleted file mode 100644 index ae9ef7600..000000000 --- a/generated/Normalizer/DeviceRateNormalizer.php +++ /dev/null @@ -1,77 +0,0 @@ -setPath($data->{'Path'}); - } - if (property_exists($data, 'Rate')) { - $value = $data->{'Rate'}; - if (is_int($data->{'Rate'})) { - $value = $data->{'Rate'}; - } - if (is_string($data->{'Rate'})) { - $value = $data->{'Rate'}; - } - $object->setRate($value); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getPath()) { - $data->{'Path'} = $object->getPath(); - } - if (null !== $object->getRate()) { - $value = $object->getRate(); - if (is_int($object->getRate())) { - $value = $object->getRate(); - } - if (is_string($object->getRate())) { - $value = $object->getRate(); - } - $data->{'Rate'} = $value; - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/DeviceWeightNormalizer.php b/generated/Normalizer/DeviceWeightNormalizer.php deleted file mode 100644 index 4e874a77c..000000000 --- a/generated/Normalizer/DeviceWeightNormalizer.php +++ /dev/null @@ -1,63 +0,0 @@ -setPath($data->{'Path'}); - } - if (property_exists($data, 'Weight')) { - $object->setWeight($data->{'Weight'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getPath()) { - $data->{'Path'} = $object->getPath(); - } - if (null !== $object->getWeight()) { - $data->{'Weight'} = $object->getWeight(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/DriverNormalizer.php b/generated/Normalizer/DriverNormalizer.php deleted file mode 100644 index e3e6da15a..000000000 --- a/generated/Normalizer/DriverNormalizer.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($data->{'Name'}); - } - if (property_exists($data, 'Options')) { - $value = $data->{'Options'}; - if (is_object($data->{'Options'})) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Options'} as $key => $value_1) { - $values[$key] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Options'})) { - $value = $data->{'Options'}; - } - $object->setOptions($value); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - $value = $object->getOptions(); - if (is_object($object->getOptions())) { - $values = new \stdClass(); - foreach ($object->getOptions() as $key => $value_1) { - $values->{$key} = $value_1; - } - $value = $values; - } - if (is_null($object->getOptions())) { - $value = $object->getOptions(); - } - $data->{'Options'} = $value; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/EndpointConfigNormalizer.php b/generated/Normalizer/EndpointConfigNormalizer.php deleted file mode 100644 index 6026f2dc1..000000000 --- a/generated/Normalizer/EndpointConfigNormalizer.php +++ /dev/null @@ -1,63 +0,0 @@ -setIPv4Address($data->{'IPv4Address'}); - } - if (property_exists($data, 'IPv6Address')) { - $object->setIPv6Address($data->{'IPv6Address'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getIPv4Address()) { - $data->{'IPv4Address'} = $object->getIPv4Address(); - } - if (null !== $object->getIPv6Address()) { - $data->{'IPv6Address'} = $object->getIPv6Address(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/EndpointIPAMConfigNormalizer.php b/generated/Normalizer/EndpointIPAMConfigNormalizer.php deleted file mode 100644 index bee62c1ac..000000000 --- a/generated/Normalizer/EndpointIPAMConfigNormalizer.php +++ /dev/null @@ -1,77 +0,0 @@ -setIPv4Address($data->{'IPv4Address'}); - } - if (property_exists($data, 'IPv6Address')) { - $object->setIPv6Address($data->{'IPv6Address'}); - } - if (property_exists($data, 'LinkLocalIPs')) { - $values = []; - foreach ($data->{'LinkLocalIPs'} as $value) { - $values[] = $value; - } - $object->setLinkLocalIPs($values); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getIPv4Address()) { - $data->{'IPv4Address'} = $object->getIPv4Address(); - } - if (null !== $object->getIPv6Address()) { - $data->{'IPv6Address'} = $object->getIPv6Address(); - } - if (null !== $object->getLinkLocalIPs()) { - $values = []; - foreach ($object->getLinkLocalIPs() as $value) { - $values[] = $value; - } - $data->{'LinkLocalIPs'} = $values; - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/EndpointNormalizer.php b/generated/Normalizer/EndpointNormalizer.php deleted file mode 100644 index 9e9a3d74b..000000000 --- a/generated/Normalizer/EndpointNormalizer.php +++ /dev/null @@ -1,109 +0,0 @@ -setSpec($this->serializer->denormalize($data->{'Spec'}, 'Docker\\API\\Model\\EndpointSpec', 'raw', $context)); - } - if (property_exists($data, 'ExposedPorts')) { - $value = $data->{'ExposedPorts'}; - if (is_array($data->{'ExposedPorts'})) { - $values = []; - foreach ($data->{'ExposedPorts'} as $value_1) { - $values[] = $this->serializer->denormalize($value_1, 'Docker\\API\\Model\\PortConfig', 'raw', $context); - } - $value = $values; - } - if (is_null($data->{'ExposedPorts'})) { - $value = $data->{'ExposedPorts'}; - } - $object->setExposedPorts($value); - } - if (property_exists($data, 'VirtualIPs')) { - $value_2 = $data->{'VirtualIPs'}; - if (is_array($data->{'VirtualIPs'})) { - $values_1 = []; - foreach ($data->{'VirtualIPs'} as $value_3) { - $values_1[] = $this->serializer->denormalize($value_3, 'Docker\\API\\Model\\EndpointVirtualIP', 'raw', $context); - } - $value_2 = $values_1; - } - if (is_null($data->{'VirtualIPs'})) { - $value_2 = $data->{'VirtualIPs'}; - } - $object->setVirtualIPs($value_2); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getSpec()) { - $data->{'Spec'} = json_decode($this->serializer->normalize($object->getSpec(), 'raw', $context)); - } - $value = $object->getExposedPorts(); - if (is_array($object->getExposedPorts())) { - $values = []; - foreach ($object->getExposedPorts() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getExposedPorts())) { - $value = $object->getExposedPorts(); - } - $data->{'ExposedPorts'} = $value; - $value_2 = $object->getVirtualIPs(); - if (is_array($object->getVirtualIPs())) { - $values_1 = []; - foreach ($object->getVirtualIPs() as $value_3) { - $values_1[] = $value_3; - } - $value_2 = $values_1; - } - if (is_null($object->getVirtualIPs())) { - $value_2 = $object->getVirtualIPs(); - } - $data->{'VirtualIPs'} = $value_2; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/EndpointPortConfigNormalizer.php b/generated/Normalizer/EndpointPortConfigNormalizer.php new file mode 100644 index 000000000..0a800c0ce --- /dev/null +++ b/generated/Normalizer/EndpointPortConfigNormalizer.php @@ -0,0 +1,172 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class EndpointPortConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\EndpointPortConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\EndpointPortConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\EndpointPortConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Protocol', $data) && $data['Protocol'] !== null) { + $object->setProtocol($data['Protocol']); + } + elseif (\array_key_exists('Protocol', $data) && $data['Protocol'] === null) { + $object->setProtocol(null); + } + if (\array_key_exists('TargetPort', $data) && $data['TargetPort'] !== null) { + $object->setTargetPort($data['TargetPort']); + } + elseif (\array_key_exists('TargetPort', $data) && $data['TargetPort'] === null) { + $object->setTargetPort(null); + } + if (\array_key_exists('PublishedPort', $data) && $data['PublishedPort'] !== null) { + $object->setPublishedPort($data['PublishedPort']); + } + elseif (\array_key_exists('PublishedPort', $data) && $data['PublishedPort'] === null) { + $object->setPublishedPort(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('protocol') && null !== $object->getProtocol()) { + $data['Protocol'] = $object->getProtocol(); + } + if ($object->isInitialized('targetPort') && null !== $object->getTargetPort()) { + $data['TargetPort'] = $object->getTargetPort(); + } + if ($object->isInitialized('publishedPort') && null !== $object->getPublishedPort()) { + $data['PublishedPort'] = $object->getPublishedPort(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\EndpointPortConfig::class => false]; + } + } +} else { + class EndpointPortConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\EndpointPortConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\EndpointPortConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\EndpointPortConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Protocol', $data) && $data['Protocol'] !== null) { + $object->setProtocol($data['Protocol']); + } + elseif (\array_key_exists('Protocol', $data) && $data['Protocol'] === null) { + $object->setProtocol(null); + } + if (\array_key_exists('TargetPort', $data) && $data['TargetPort'] !== null) { + $object->setTargetPort($data['TargetPort']); + } + elseif (\array_key_exists('TargetPort', $data) && $data['TargetPort'] === null) { + $object->setTargetPort(null); + } + if (\array_key_exists('PublishedPort', $data) && $data['PublishedPort'] !== null) { + $object->setPublishedPort($data['PublishedPort']); + } + elseif (\array_key_exists('PublishedPort', $data) && $data['PublishedPort'] === null) { + $object->setPublishedPort(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('protocol') && null !== $object->getProtocol()) { + $data['Protocol'] = $object->getProtocol(); + } + if ($object->isInitialized('targetPort') && null !== $object->getTargetPort()) { + $data['TargetPort'] = $object->getTargetPort(); + } + if ($object->isInitialized('publishedPort') && null !== $object->getPublishedPort()) { + $data['PublishedPort'] = $object->getPublishedPort(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\EndpointPortConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/EndpointSettingsIPAMConfigNormalizer.php b/generated/Normalizer/EndpointSettingsIPAMConfigNormalizer.php new file mode 100644 index 000000000..74f55f9a5 --- /dev/null +++ b/generated/Normalizer/EndpointSettingsIPAMConfigNormalizer.php @@ -0,0 +1,170 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class EndpointSettingsIPAMConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\EndpointSettingsIPAMConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\EndpointSettingsIPAMConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\EndpointSettingsIPAMConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('IPv4Address', $data) && $data['IPv4Address'] !== null) { + $object->setIPv4Address($data['IPv4Address']); + } + elseif (\array_key_exists('IPv4Address', $data) && $data['IPv4Address'] === null) { + $object->setIPv4Address(null); + } + if (\array_key_exists('IPv6Address', $data) && $data['IPv6Address'] !== null) { + $object->setIPv6Address($data['IPv6Address']); + } + elseif (\array_key_exists('IPv6Address', $data) && $data['IPv6Address'] === null) { + $object->setIPv6Address(null); + } + if (\array_key_exists('LinkLocalIPs', $data) && $data['LinkLocalIPs'] !== null) { + $values = []; + foreach ($data['LinkLocalIPs'] as $value) { + $values[] = $value; + } + $object->setLinkLocalIPs($values); + } + elseif (\array_key_exists('LinkLocalIPs', $data) && $data['LinkLocalIPs'] === null) { + $object->setLinkLocalIPs(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iPv4Address') && null !== $object->getIPv4Address()) { + $data['IPv4Address'] = $object->getIPv4Address(); + } + if ($object->isInitialized('iPv6Address') && null !== $object->getIPv6Address()) { + $data['IPv6Address'] = $object->getIPv6Address(); + } + if ($object->isInitialized('linkLocalIPs') && null !== $object->getLinkLocalIPs()) { + $values = []; + foreach ($object->getLinkLocalIPs() as $value) { + $values[] = $value; + } + $data['LinkLocalIPs'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\EndpointSettingsIPAMConfig::class => false]; + } + } +} else { + class EndpointSettingsIPAMConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\EndpointSettingsIPAMConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\EndpointSettingsIPAMConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\EndpointSettingsIPAMConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('IPv4Address', $data) && $data['IPv4Address'] !== null) { + $object->setIPv4Address($data['IPv4Address']); + } + elseif (\array_key_exists('IPv4Address', $data) && $data['IPv4Address'] === null) { + $object->setIPv4Address(null); + } + if (\array_key_exists('IPv6Address', $data) && $data['IPv6Address'] !== null) { + $object->setIPv6Address($data['IPv6Address']); + } + elseif (\array_key_exists('IPv6Address', $data) && $data['IPv6Address'] === null) { + $object->setIPv6Address(null); + } + if (\array_key_exists('LinkLocalIPs', $data) && $data['LinkLocalIPs'] !== null) { + $values = []; + foreach ($data['LinkLocalIPs'] as $value) { + $values[] = $value; + } + $object->setLinkLocalIPs($values); + } + elseif (\array_key_exists('LinkLocalIPs', $data) && $data['LinkLocalIPs'] === null) { + $object->setLinkLocalIPs(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iPv4Address') && null !== $object->getIPv4Address()) { + $data['IPv4Address'] = $object->getIPv4Address(); + } + if ($object->isInitialized('iPv6Address') && null !== $object->getIPv6Address()) { + $data['IPv6Address'] = $object->getIPv6Address(); + } + if ($object->isInitialized('linkLocalIPs') && null !== $object->getLinkLocalIPs()) { + $values = []; + foreach ($object->getLinkLocalIPs() as $value) { + $values[] = $value; + } + $data['LinkLocalIPs'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\EndpointSettingsIPAMConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/EndpointSettingsNormalizer.php b/generated/Normalizer/EndpointSettingsNormalizer.php index 463f151fd..2082d85c6 100644 --- a/generated/Normalizer/EndpointSettingsNormalizer.php +++ b/generated/Normalizer/EndpointSettingsNormalizer.php @@ -2,138 +2,347 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class EndpointSettingsNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\EndpointSettings') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class EndpointSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($data instanceof \Docker\API\Model\EndpointSettings) { - return true; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\EndpointSettings::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\EndpointSettings(); - if (property_exists($data, 'IPAMConfig')) { - $object->setIPAMConfig($this->serializer->denormalize($data->{'IPAMConfig'}, 'Docker\\API\\Model\\EndpointIPAMConfig', 'raw', $context)); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\EndpointSettings::class; } - if (property_exists($data, 'Links')) { - $values = []; - foreach ($data->{'Links'} as $value) { - $values[] = $value; + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $object->setLinks($values); - } - if (property_exists($data, 'Aliases')) { - $values_1 = []; - foreach ($data->{'Aliases'} as $value_1) { - $values_1[] = $value_1; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object->setAliases($values_1); - } - if (property_exists($data, 'NetworkID')) { - $object->setNetworkID($data->{'NetworkID'}); - } - if (property_exists($data, 'EndpointID')) { - $object->setEndpointID($data->{'EndpointID'}); - } - if (property_exists($data, 'Gateway')) { - $object->setGateway($data->{'Gateway'}); - } - if (property_exists($data, 'IPAddress')) { - $object->setIPAddress($data->{'IPAddress'}); - } - if (property_exists($data, 'IPPrefixLen')) { - $object->setIPPrefixLen($data->{'IPPrefixLen'}); - } - if (property_exists($data, 'IPv6Gateway')) { - $object->setIPv6Gateway($data->{'IPv6Gateway'}); - } - if (property_exists($data, 'GlobalIPv6Address')) { - $object->setGlobalIPv6Address($data->{'GlobalIPv6Address'}); + $object = new \Docker\API\Model\EndpointSettings(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('IPAMConfig', $data) && $data['IPAMConfig'] !== null) { + $object->setIPAMConfig($this->denormalizer->denormalize($data['IPAMConfig'], \Docker\API\Model\EndpointSettingsIPAMConfig::class, 'json', $context)); + } + elseif (\array_key_exists('IPAMConfig', $data) && $data['IPAMConfig'] === null) { + $object->setIPAMConfig(null); + } + if (\array_key_exists('Links', $data) && $data['Links'] !== null) { + $values = []; + foreach ($data['Links'] as $value) { + $values[] = $value; + } + $object->setLinks($values); + } + elseif (\array_key_exists('Links', $data) && $data['Links'] === null) { + $object->setLinks(null); + } + if (\array_key_exists('Aliases', $data) && $data['Aliases'] !== null) { + $values_1 = []; + foreach ($data['Aliases'] as $value_1) { + $values_1[] = $value_1; + } + $object->setAliases($values_1); + } + elseif (\array_key_exists('Aliases', $data) && $data['Aliases'] === null) { + $object->setAliases(null); + } + if (\array_key_exists('NetworkID', $data) && $data['NetworkID'] !== null) { + $object->setNetworkID($data['NetworkID']); + } + elseif (\array_key_exists('NetworkID', $data) && $data['NetworkID'] === null) { + $object->setNetworkID(null); + } + if (\array_key_exists('EndpointID', $data) && $data['EndpointID'] !== null) { + $object->setEndpointID($data['EndpointID']); + } + elseif (\array_key_exists('EndpointID', $data) && $data['EndpointID'] === null) { + $object->setEndpointID(null); + } + if (\array_key_exists('Gateway', $data) && $data['Gateway'] !== null) { + $object->setGateway($data['Gateway']); + } + elseif (\array_key_exists('Gateway', $data) && $data['Gateway'] === null) { + $object->setGateway(null); + } + if (\array_key_exists('IPAddress', $data) && $data['IPAddress'] !== null) { + $object->setIPAddress($data['IPAddress']); + } + elseif (\array_key_exists('IPAddress', $data) && $data['IPAddress'] === null) { + $object->setIPAddress(null); + } + if (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] !== null) { + $object->setIPPrefixLen($data['IPPrefixLen']); + } + elseif (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] === null) { + $object->setIPPrefixLen(null); + } + if (\array_key_exists('IPv6Gateway', $data) && $data['IPv6Gateway'] !== null) { + $object->setIPv6Gateway($data['IPv6Gateway']); + } + elseif (\array_key_exists('IPv6Gateway', $data) && $data['IPv6Gateway'] === null) { + $object->setIPv6Gateway(null); + } + if (\array_key_exists('GlobalIPv6Address', $data) && $data['GlobalIPv6Address'] !== null) { + $object->setGlobalIPv6Address($data['GlobalIPv6Address']); + } + elseif (\array_key_exists('GlobalIPv6Address', $data) && $data['GlobalIPv6Address'] === null) { + $object->setGlobalIPv6Address(null); + } + if (\array_key_exists('GlobalIPv6PrefixLen', $data) && $data['GlobalIPv6PrefixLen'] !== null) { + $object->setGlobalIPv6PrefixLen($data['GlobalIPv6PrefixLen']); + } + elseif (\array_key_exists('GlobalIPv6PrefixLen', $data) && $data['GlobalIPv6PrefixLen'] === null) { + $object->setGlobalIPv6PrefixLen(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + return $object; } - if (property_exists($data, 'GlobalIPv6PrefixLen')) { - $object->setGlobalIPv6PrefixLen($data->{'GlobalIPv6PrefixLen'}); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iPAMConfig') && null !== $object->getIPAMConfig()) { + $data['IPAMConfig'] = $this->normalizer->normalize($object->getIPAMConfig(), 'json', $context); + } + if ($object->isInitialized('links') && null !== $object->getLinks()) { + $values = []; + foreach ($object->getLinks() as $value) { + $values[] = $value; + } + $data['Links'] = $values; + } + if ($object->isInitialized('aliases') && null !== $object->getAliases()) { + $values_1 = []; + foreach ($object->getAliases() as $value_1) { + $values_1[] = $value_1; + } + $data['Aliases'] = $values_1; + } + if ($object->isInitialized('networkID') && null !== $object->getNetworkID()) { + $data['NetworkID'] = $object->getNetworkID(); + } + if ($object->isInitialized('endpointID') && null !== $object->getEndpointID()) { + $data['EndpointID'] = $object->getEndpointID(); + } + if ($object->isInitialized('gateway') && null !== $object->getGateway()) { + $data['Gateway'] = $object->getGateway(); + } + if ($object->isInitialized('iPAddress') && null !== $object->getIPAddress()) { + $data['IPAddress'] = $object->getIPAddress(); + } + if ($object->isInitialized('iPPrefixLen') && null !== $object->getIPPrefixLen()) { + $data['IPPrefixLen'] = $object->getIPPrefixLen(); + } + if ($object->isInitialized('iPv6Gateway') && null !== $object->getIPv6Gateway()) { + $data['IPv6Gateway'] = $object->getIPv6Gateway(); + } + if ($object->isInitialized('globalIPv6Address') && null !== $object->getGlobalIPv6Address()) { + $data['GlobalIPv6Address'] = $object->getGlobalIPv6Address(); + } + if ($object->isInitialized('globalIPv6PrefixLen') && null !== $object->getGlobalIPv6PrefixLen()) { + $data['GlobalIPv6PrefixLen'] = $object->getGlobalIPv6PrefixLen(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + return $data; } - if (property_exists($data, 'MacAddress')) { - $object->setMacAddress($data->{'MacAddress'}); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\EndpointSettings::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class EndpointSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getIPAMConfig()) { - $data->{'IPAMConfig'} = json_decode($this->serializer->normalize($object->getIPAMConfig(), 'raw', $context)); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\EndpointSettings::class; } - if (null !== $object->getLinks()) { - $values = []; - foreach ($object->getLinks() as $value) { - $values[] = $value; - } - $data->{'Links'} = $values; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\EndpointSettings::class; } - if (null !== $object->getAliases()) { - $values_1 = []; - foreach ($object->getAliases() as $value_1) { - $values_1[] = $value_1; + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $data->{'Aliases'} = $values_1; - } - if (null !== $object->getNetworkID()) { - $data->{'NetworkID'} = $object->getNetworkID(); - } - if (null !== $object->getEndpointID()) { - $data->{'EndpointID'} = $object->getEndpointID(); - } - if (null !== $object->getGateway()) { - $data->{'Gateway'} = $object->getGateway(); - } - if (null !== $object->getIPAddress()) { - $data->{'IPAddress'} = $object->getIPAddress(); - } - if (null !== $object->getIPPrefixLen()) { - $data->{'IPPrefixLen'} = $object->getIPPrefixLen(); - } - if (null !== $object->getIPv6Gateway()) { - $data->{'IPv6Gateway'} = $object->getIPv6Gateway(); - } - if (null !== $object->getGlobalIPv6Address()) { - $data->{'GlobalIPv6Address'} = $object->getGlobalIPv6Address(); + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\EndpointSettings(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('IPAMConfig', $data) && $data['IPAMConfig'] !== null) { + $object->setIPAMConfig($this->denormalizer->denormalize($data['IPAMConfig'], \Docker\API\Model\EndpointSettingsIPAMConfig::class, 'json', $context)); + } + elseif (\array_key_exists('IPAMConfig', $data) && $data['IPAMConfig'] === null) { + $object->setIPAMConfig(null); + } + if (\array_key_exists('Links', $data) && $data['Links'] !== null) { + $values = []; + foreach ($data['Links'] as $value) { + $values[] = $value; + } + $object->setLinks($values); + } + elseif (\array_key_exists('Links', $data) && $data['Links'] === null) { + $object->setLinks(null); + } + if (\array_key_exists('Aliases', $data) && $data['Aliases'] !== null) { + $values_1 = []; + foreach ($data['Aliases'] as $value_1) { + $values_1[] = $value_1; + } + $object->setAliases($values_1); + } + elseif (\array_key_exists('Aliases', $data) && $data['Aliases'] === null) { + $object->setAliases(null); + } + if (\array_key_exists('NetworkID', $data) && $data['NetworkID'] !== null) { + $object->setNetworkID($data['NetworkID']); + } + elseif (\array_key_exists('NetworkID', $data) && $data['NetworkID'] === null) { + $object->setNetworkID(null); + } + if (\array_key_exists('EndpointID', $data) && $data['EndpointID'] !== null) { + $object->setEndpointID($data['EndpointID']); + } + elseif (\array_key_exists('EndpointID', $data) && $data['EndpointID'] === null) { + $object->setEndpointID(null); + } + if (\array_key_exists('Gateway', $data) && $data['Gateway'] !== null) { + $object->setGateway($data['Gateway']); + } + elseif (\array_key_exists('Gateway', $data) && $data['Gateway'] === null) { + $object->setGateway(null); + } + if (\array_key_exists('IPAddress', $data) && $data['IPAddress'] !== null) { + $object->setIPAddress($data['IPAddress']); + } + elseif (\array_key_exists('IPAddress', $data) && $data['IPAddress'] === null) { + $object->setIPAddress(null); + } + if (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] !== null) { + $object->setIPPrefixLen($data['IPPrefixLen']); + } + elseif (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] === null) { + $object->setIPPrefixLen(null); + } + if (\array_key_exists('IPv6Gateway', $data) && $data['IPv6Gateway'] !== null) { + $object->setIPv6Gateway($data['IPv6Gateway']); + } + elseif (\array_key_exists('IPv6Gateway', $data) && $data['IPv6Gateway'] === null) { + $object->setIPv6Gateway(null); + } + if (\array_key_exists('GlobalIPv6Address', $data) && $data['GlobalIPv6Address'] !== null) { + $object->setGlobalIPv6Address($data['GlobalIPv6Address']); + } + elseif (\array_key_exists('GlobalIPv6Address', $data) && $data['GlobalIPv6Address'] === null) { + $object->setGlobalIPv6Address(null); + } + if (\array_key_exists('GlobalIPv6PrefixLen', $data) && $data['GlobalIPv6PrefixLen'] !== null) { + $object->setGlobalIPv6PrefixLen($data['GlobalIPv6PrefixLen']); + } + elseif (\array_key_exists('GlobalIPv6PrefixLen', $data) && $data['GlobalIPv6PrefixLen'] === null) { + $object->setGlobalIPv6PrefixLen(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + return $object; } - if (null !== $object->getGlobalIPv6PrefixLen()) { - $data->{'GlobalIPv6PrefixLen'} = $object->getGlobalIPv6PrefixLen(); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iPAMConfig') && null !== $object->getIPAMConfig()) { + $data['IPAMConfig'] = $this->normalizer->normalize($object->getIPAMConfig(), 'json', $context); + } + if ($object->isInitialized('links') && null !== $object->getLinks()) { + $values = []; + foreach ($object->getLinks() as $value) { + $values[] = $value; + } + $data['Links'] = $values; + } + if ($object->isInitialized('aliases') && null !== $object->getAliases()) { + $values_1 = []; + foreach ($object->getAliases() as $value_1) { + $values_1[] = $value_1; + } + $data['Aliases'] = $values_1; + } + if ($object->isInitialized('networkID') && null !== $object->getNetworkID()) { + $data['NetworkID'] = $object->getNetworkID(); + } + if ($object->isInitialized('endpointID') && null !== $object->getEndpointID()) { + $data['EndpointID'] = $object->getEndpointID(); + } + if ($object->isInitialized('gateway') && null !== $object->getGateway()) { + $data['Gateway'] = $object->getGateway(); + } + if ($object->isInitialized('iPAddress') && null !== $object->getIPAddress()) { + $data['IPAddress'] = $object->getIPAddress(); + } + if ($object->isInitialized('iPPrefixLen') && null !== $object->getIPPrefixLen()) { + $data['IPPrefixLen'] = $object->getIPPrefixLen(); + } + if ($object->isInitialized('iPv6Gateway') && null !== $object->getIPv6Gateway()) { + $data['IPv6Gateway'] = $object->getIPv6Gateway(); + } + if ($object->isInitialized('globalIPv6Address') && null !== $object->getGlobalIPv6Address()) { + $data['GlobalIPv6Address'] = $object->getGlobalIPv6Address(); + } + if ($object->isInitialized('globalIPv6PrefixLen') && null !== $object->getGlobalIPv6PrefixLen()) { + $data['GlobalIPv6PrefixLen'] = $object->getGlobalIPv6PrefixLen(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + return $data; } - if (null !== $object->getMacAddress()) { - $data->{'MacAddress'} = $object->getMacAddress(); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\EndpointSettings::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/EndpointSpecNormalizer.php b/generated/Normalizer/EndpointSpecNormalizer.php index 502c2f422..39e89190c 100644 --- a/generated/Normalizer/EndpointSpecNormalizer.php +++ b/generated/Normalizer/EndpointSpecNormalizer.php @@ -2,82 +2,151 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class EndpointSpecNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\EndpointSpec') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class EndpointSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($data instanceof \Docker\API\Model\EndpointSpec) { - return true; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\EndpointSpec::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\EndpointSpec(); - if (property_exists($data, 'Mode')) { - $object->setMode($data->{'Mode'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\EndpointSpec::class; } - if (property_exists($data, 'Ports')) { - $value = $data->{'Ports'}; - if (is_array($data->{'Ports'})) { + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\EndpointSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($data['Mode']); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + if (\array_key_exists('Ports', $data) && $data['Ports'] !== null) { $values = []; - foreach ($data->{'Ports'} as $value_1) { - $values[] = $this->serializer->denormalize($value_1, 'Docker\\API\\Model\\PortConfig', 'raw', $context); + foreach ($data['Ports'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\EndpointPortConfig::class, 'json', $context); } - $value = $values; + $object->setPorts($values); } - if (is_null($data->{'Ports'})) { - $value = $data->{'Ports'}; + elseif (\array_key_exists('Ports', $data) && $data['Ports'] === null) { + $object->setPorts(null); } - $object->setPorts($value); + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $object->getMode(); + } + if ($object->isInitialized('ports') && null !== $object->getPorts()) { + $values = []; + foreach ($object->getPorts() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Ports'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\EndpointSpec::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class EndpointSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getMode()) { - $data->{'Mode'} = $object->getMode(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\EndpointSpec::class; } - $value = $object->getPorts(); - if (is_array($object->getPorts())) { - $values = []; - foreach ($object->getPorts() as $value_1) { - $values[] = $value_1; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\EndpointSpec::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\EndpointSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($data['Mode']); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); } - $value = $values; + if (\array_key_exists('Ports', $data) && $data['Ports'] !== null) { + $values = []; + foreach ($data['Ports'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\EndpointPortConfig::class, 'json', $context); + } + $object->setPorts($values); + } + elseif (\array_key_exists('Ports', $data) && $data['Ports'] === null) { + $object->setPorts(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $object->getMode(); + } + if ($object->isInitialized('ports') && null !== $object->getPorts()) { + $values = []; + foreach ($object->getPorts() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Ports'] = $values; + } + return $data; } - if (is_null($object->getPorts())) { - $value = $object->getPorts(); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\EndpointSpec::class => false]; } - $data->{'Ports'} = $value; - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/EndpointVirtualIPNormalizer.php b/generated/Normalizer/EndpointVirtualIPNormalizer.php deleted file mode 100644 index a31932f22..000000000 --- a/generated/Normalizer/EndpointVirtualIPNormalizer.php +++ /dev/null @@ -1,63 +0,0 @@ -setNetworkID($data->{'NetworkID'}); - } - if (property_exists($data, 'Addr')) { - $object->setAddr($data->{'Addr'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getNetworkID()) { - $data->{'NetworkID'} = $object->getNetworkID(); - } - if (null !== $object->getAddr()) { - $data->{'Addr'} = $object->getAddr(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ErrorDetailNormalizer.php b/generated/Normalizer/ErrorDetailNormalizer.php index 5e120407e..6ef462f06 100644 --- a/generated/Normalizer/ErrorDetailNormalizer.php +++ b/generated/Normalizer/ErrorDetailNormalizer.php @@ -2,62 +2,135 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class ErrorDetailNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ErrorDetailNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($type !== 'Docker\\API\\Model\\ErrorDetail') { - return false; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ErrorDetail::class; } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\ErrorDetail) { - return true; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ErrorDetail::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\ErrorDetail(); - if (property_exists($data, 'code')) { - $object->setCode($data->{'code'}); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ErrorDetail(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('code', $data) && $data['code'] !== null) { + $object->setCode($data['code']); + } + elseif (\array_key_exists('code', $data) && $data['code'] === null) { + $object->setCode(null); + } + if (\array_key_exists('message', $data) && $data['message'] !== null) { + $object->setMessage($data['message']); + } + elseif (\array_key_exists('message', $data) && $data['message'] === null) { + $object->setMessage(null); + } + return $object; } - if (property_exists($data, 'message')) { - $object->setMessage($data->{'message'}); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('code') && null !== $object->getCode()) { + $data['code'] = $object->getCode(); + } + if ($object->isInitialized('message') && null !== $object->getMessage()) { + $data['message'] = $object->getMessage(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ErrorDetail::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class ErrorDetailNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getCode()) { - $data->{'code'} = $object->getCode(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ErrorDetail::class; } - if (null !== $object->getMessage()) { - $data->{'message'} = $object->getMessage(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ErrorDetail::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ErrorDetail(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('code', $data) && $data['code'] !== null) { + $object->setCode($data['code']); + } + elseif (\array_key_exists('code', $data) && $data['code'] === null) { + $object->setCode(null); + } + if (\array_key_exists('message', $data) && $data['message'] !== null) { + $object->setMessage($data['message']); + } + elseif (\array_key_exists('message', $data) && $data['message'] === null) { + $object->setMessage(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('code') && null !== $object->getCode()) { + $data['code'] = $object->getCode(); + } + if ($object->isInitialized('message') && null !== $object->getMessage()) { + $data['message'] = $object->getMessage(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ErrorDetail::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/ErrorResponseNormalizer.php b/generated/Normalizer/ErrorResponseNormalizer.php new file mode 100644 index 000000000..df1e78ffc --- /dev/null +++ b/generated/Normalizer/ErrorResponseNormalizer.php @@ -0,0 +1,114 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ErrorResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ErrorResponse::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ErrorResponse::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ErrorResponse(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('message', $data) && $data['message'] !== null) { + $object->setMessage($data['message']); + } + elseif (\array_key_exists('message', $data) && $data['message'] === null) { + $object->setMessage(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['message'] = $object->getMessage(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ErrorResponse::class => false]; + } + } +} else { + class ErrorResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ErrorResponse::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ErrorResponse::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ErrorResponse(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('message', $data) && $data['message'] !== null) { + $object->setMessage($data['message']); + } + elseif (\array_key_exists('message', $data) && $data['message'] === null) { + $object->setMessage(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['message'] = $object->getMessage(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ErrorResponse::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/EventNormalizer.php b/generated/Normalizer/EventNormalizer.php deleted file mode 100644 index 79c8f6533..000000000 --- a/generated/Normalizer/EventNormalizer.php +++ /dev/null @@ -1,81 +0,0 @@ -setStatus($data->{'status'}); - } - if (property_exists($data, 'id')) { - $object->setId($data->{'id'}); - } - if (property_exists($data, 'from')) { - $object->setFrom($data->{'from'}); - } - if (property_exists($data, 'time')) { - $object->setTime($data->{'time'}); - } - if (property_exists($data, 'timeNano')) { - $object->setTimeNano($data->{'timeNano'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getStatus()) { - $data->{'status'} = $object->getStatus(); - } - if (null !== $object->getId()) { - $data->{'id'} = $object->getId(); - } - if (null !== $object->getFrom()) { - $data->{'from'} = $object->getFrom(); - } - if (null !== $object->getTime()) { - $data->{'time'} = $object->getTime(); - } - if (null !== $object->getTimeNano()) { - $data->{'timeNano'} = $object->getTimeNano(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/EventsGetResponse200ActorNormalizer.php b/generated/Normalizer/EventsGetResponse200ActorNormalizer.php new file mode 100644 index 000000000..1db7f19f2 --- /dev/null +++ b/generated/Normalizer/EventsGetResponse200ActorNormalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class EventsGetResponse200ActorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\EventsGetResponse200Actor::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\EventsGetResponse200Actor::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\EventsGetResponse200Actor(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Attributes', $data) && $data['Attributes'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Attributes'] as $key => $value) { + $values[$key] = $value; + } + $object->setAttributes($values); + } + elseif (\array_key_exists('Attributes', $data) && $data['Attributes'] === null) { + $object->setAttributes(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('attributes') && null !== $object->getAttributes()) { + $values = []; + foreach ($object->getAttributes() as $key => $value) { + $values[$key] = $value; + } + $data['Attributes'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\EventsGetResponse200Actor::class => false]; + } + } +} else { + class EventsGetResponse200ActorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\EventsGetResponse200Actor::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\EventsGetResponse200Actor::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\EventsGetResponse200Actor(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Attributes', $data) && $data['Attributes'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Attributes'] as $key => $value) { + $values[$key] = $value; + } + $object->setAttributes($values); + } + elseif (\array_key_exists('Attributes', $data) && $data['Attributes'] === null) { + $object->setAttributes(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('attributes') && null !== $object->getAttributes()) { + $values = []; + foreach ($object->getAttributes() as $key => $value) { + $values[$key] = $value; + } + $data['Attributes'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\EventsGetResponse200Actor::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/EventsGetResponse200Normalizer.php b/generated/Normalizer/EventsGetResponse200Normalizer.php new file mode 100644 index 000000000..a1ef6f723 --- /dev/null +++ b/generated/Normalizer/EventsGetResponse200Normalizer.php @@ -0,0 +1,190 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class EventsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\EventsGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\EventsGetResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\EventsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Action', $data) && $data['Action'] !== null) { + $object->setAction($data['Action']); + } + elseif (\array_key_exists('Action', $data) && $data['Action'] === null) { + $object->setAction(null); + } + if (\array_key_exists('Actor', $data) && $data['Actor'] !== null) { + $object->setActor($this->denormalizer->denormalize($data['Actor'], \Docker\API\Model\EventsGetResponse200Actor::class, 'json', $context)); + } + elseif (\array_key_exists('Actor', $data) && $data['Actor'] === null) { + $object->setActor(null); + } + if (\array_key_exists('time', $data) && $data['time'] !== null) { + $object->setTime($data['time']); + } + elseif (\array_key_exists('time', $data) && $data['time'] === null) { + $object->setTime(null); + } + if (\array_key_exists('timeNano', $data) && $data['timeNano'] !== null) { + $object->setTimeNano($data['timeNano']); + } + elseif (\array_key_exists('timeNano', $data) && $data['timeNano'] === null) { + $object->setTimeNano(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('action') && null !== $object->getAction()) { + $data['Action'] = $object->getAction(); + } + if ($object->isInitialized('actor') && null !== $object->getActor()) { + $data['Actor'] = $this->normalizer->normalize($object->getActor(), 'json', $context); + } + if ($object->isInitialized('time') && null !== $object->getTime()) { + $data['time'] = $object->getTime(); + } + if ($object->isInitialized('timeNano') && null !== $object->getTimeNano()) { + $data['timeNano'] = $object->getTimeNano(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\EventsGetResponse200::class => false]; + } + } +} else { + class EventsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\EventsGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\EventsGetResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\EventsGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Action', $data) && $data['Action'] !== null) { + $object->setAction($data['Action']); + } + elseif (\array_key_exists('Action', $data) && $data['Action'] === null) { + $object->setAction(null); + } + if (\array_key_exists('Actor', $data) && $data['Actor'] !== null) { + $object->setActor($this->denormalizer->denormalize($data['Actor'], \Docker\API\Model\EventsGetResponse200Actor::class, 'json', $context)); + } + elseif (\array_key_exists('Actor', $data) && $data['Actor'] === null) { + $object->setActor(null); + } + if (\array_key_exists('time', $data) && $data['time'] !== null) { + $object->setTime($data['time']); + } + elseif (\array_key_exists('time', $data) && $data['time'] === null) { + $object->setTime(null); + } + if (\array_key_exists('timeNano', $data) && $data['timeNano'] !== null) { + $object->setTimeNano($data['timeNano']); + } + elseif (\array_key_exists('timeNano', $data) && $data['timeNano'] === null) { + $object->setTimeNano(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('action') && null !== $object->getAction()) { + $data['Action'] = $object->getAction(); + } + if ($object->isInitialized('actor') && null !== $object->getActor()) { + $data['Actor'] = $this->normalizer->normalize($object->getActor(), 'json', $context); + } + if ($object->isInitialized('time') && null !== $object->getTime()) { + $data['time'] = $object->getTime(); + } + if ($object->isInitialized('timeNano') && null !== $object->getTimeNano()) { + $data['timeNano'] = $object->getTimeNano(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\EventsGetResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ExecCommandNormalizer.php b/generated/Normalizer/ExecCommandNormalizer.php deleted file mode 100644 index 2b9c35b9f..000000000 --- a/generated/Normalizer/ExecCommandNormalizer.php +++ /dev/null @@ -1,105 +0,0 @@ -setID($data->{'ID'}); - } - if (property_exists($data, 'Running')) { - $object->setRunning($data->{'Running'}); - } - if (property_exists($data, 'ExitCode')) { - $object->setExitCode($data->{'ExitCode'}); - } - if (property_exists($data, 'ProcessConfig')) { - $object->setProcessConfig($this->serializer->denormalize($data->{'ProcessConfig'}, 'Docker\\API\\Model\\ProcessConfig', 'raw', $context)); - } - if (property_exists($data, 'OpenStdin')) { - $object->setOpenStdin($data->{'OpenStdin'}); - } - if (property_exists($data, 'OpenStderr')) { - $object->setOpenStderr($data->{'OpenStderr'}); - } - if (property_exists($data, 'OpenStdout')) { - $object->setOpenStdout($data->{'OpenStdout'}); - } - if (property_exists($data, 'Container')) { - $object->setContainer($this->serializer->denormalize($data->{'Container'}, 'Docker\\API\\Model\\Container', 'raw', $context)); - } - if (property_exists($data, 'DetachKeys')) { - $object->setDetachKeys($data->{'DetachKeys'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getID()) { - $data->{'ID'} = $object->getID(); - } - if (null !== $object->getRunning()) { - $data->{'Running'} = $object->getRunning(); - } - if (null !== $object->getExitCode()) { - $data->{'ExitCode'} = $object->getExitCode(); - } - if (null !== $object->getProcessConfig()) { - $data->{'ProcessConfig'} = json_decode($this->serializer->normalize($object->getProcessConfig(), 'raw', $context)); - } - if (null !== $object->getOpenStdin()) { - $data->{'OpenStdin'} = $object->getOpenStdin(); - } - if (null !== $object->getOpenStderr()) { - $data->{'OpenStderr'} = $object->getOpenStderr(); - } - if (null !== $object->getOpenStdout()) { - $data->{'OpenStdout'} = $object->getOpenStdout(); - } - if (null !== $object->getContainer()) { - $data->{'Container'} = json_decode($this->serializer->normalize($object->getContainer(), 'raw', $context)); - } - if (null !== $object->getDetachKeys()) { - $data->{'DetachKeys'} = $object->getDetachKeys(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ExecConfigNormalizer.php b/generated/Normalizer/ExecConfigNormalizer.php deleted file mode 100644 index 93f74abc0..000000000 --- a/generated/Normalizer/ExecConfigNormalizer.php +++ /dev/null @@ -1,107 +0,0 @@ -setAttachStdin($data->{'AttachStdin'}); - } - if (property_exists($data, 'AttachStdout')) { - $object->setAttachStdout($data->{'AttachStdout'}); - } - if (property_exists($data, 'AttachStderr')) { - $object->setAttachStderr($data->{'AttachStderr'}); - } - if (property_exists($data, 'Tty')) { - $object->setTty($data->{'Tty'}); - } - if (property_exists($data, 'Cmd')) { - $value = $data->{'Cmd'}; - if (is_array($data->{'Cmd'})) { - $values = []; - foreach ($data->{'Cmd'} as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Cmd'})) { - $value = $data->{'Cmd'}; - } - $object->setCmd($value); - } - if (property_exists($data, 'DetachKeys')) { - $object->setDetachKeys($data->{'DetachKeys'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getAttachStdin()) { - $data->{'AttachStdin'} = $object->getAttachStdin(); - } - if (null !== $object->getAttachStdout()) { - $data->{'AttachStdout'} = $object->getAttachStdout(); - } - if (null !== $object->getAttachStderr()) { - $data->{'AttachStderr'} = $object->getAttachStderr(); - } - if (null !== $object->getTty()) { - $data->{'Tty'} = $object->getTty(); - } - $value = $object->getCmd(); - if (is_array($object->getCmd())) { - $values = []; - foreach ($object->getCmd() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getCmd())) { - $value = $object->getCmd(); - } - $data->{'Cmd'} = $value; - if (null !== $object->getDetachKeys()) { - $data->{'DetachKeys'} = $object->getDetachKeys(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ExecCreateResultNormalizer.php b/generated/Normalizer/ExecCreateResultNormalizer.php deleted file mode 100644 index c58b63c5b..000000000 --- a/generated/Normalizer/ExecCreateResultNormalizer.php +++ /dev/null @@ -1,83 +0,0 @@ -setId($data->{'Id'}); - } - if (property_exists($data, 'Warnings')) { - $value = $data->{'Warnings'}; - if (is_array($data->{'Warnings'})) { - $values = []; - foreach ($data->{'Warnings'} as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Warnings'})) { - $value = $data->{'Warnings'}; - } - $object->setWarnings($value); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getId()) { - $data->{'Id'} = $object->getId(); - } - $value = $object->getWarnings(); - if (is_array($object->getWarnings())) { - $values = []; - foreach ($object->getWarnings() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getWarnings())) { - $value = $object->getWarnings(); - } - $data->{'Warnings'} = $value; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ExecIdJsonGetResponse200Normalizer.php b/generated/Normalizer/ExecIdJsonGetResponse200Normalizer.php new file mode 100644 index 000000000..63298a926 --- /dev/null +++ b/generated/Normalizer/ExecIdJsonGetResponse200Normalizer.php @@ -0,0 +1,262 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ExecIdJsonGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ExecIdJsonGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ExecIdJsonGetResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ExecIdJsonGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Running', $data) && $data['Running'] !== null) { + $object->setRunning($data['Running']); + } + elseif (\array_key_exists('Running', $data) && $data['Running'] === null) { + $object->setRunning(null); + } + if (\array_key_exists('ExitCode', $data) && $data['ExitCode'] !== null) { + $object->setExitCode($data['ExitCode']); + } + elseif (\array_key_exists('ExitCode', $data) && $data['ExitCode'] === null) { + $object->setExitCode(null); + } + if (\array_key_exists('ProcessConfig', $data) && $data['ProcessConfig'] !== null) { + $object->setProcessConfig($this->denormalizer->denormalize($data['ProcessConfig'], \Docker\API\Model\ProcessConfig::class, 'json', $context)); + } + elseif (\array_key_exists('ProcessConfig', $data) && $data['ProcessConfig'] === null) { + $object->setProcessConfig(null); + } + if (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] !== null) { + $object->setOpenStdin($data['OpenStdin']); + } + elseif (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] === null) { + $object->setOpenStdin(null); + } + if (\array_key_exists('OpenStderr', $data) && $data['OpenStderr'] !== null) { + $object->setOpenStderr($data['OpenStderr']); + } + elseif (\array_key_exists('OpenStderr', $data) && $data['OpenStderr'] === null) { + $object->setOpenStderr(null); + } + if (\array_key_exists('OpenStdout', $data) && $data['OpenStdout'] !== null) { + $object->setOpenStdout($data['OpenStdout']); + } + elseif (\array_key_exists('OpenStdout', $data) && $data['OpenStdout'] === null) { + $object->setOpenStdout(null); + } + if (\array_key_exists('ContainerID', $data) && $data['ContainerID'] !== null) { + $object->setContainerID($data['ContainerID']); + } + elseif (\array_key_exists('ContainerID', $data) && $data['ContainerID'] === null) { + $object->setContainerID(null); + } + if (\array_key_exists('Pid', $data) && $data['Pid'] !== null) { + $object->setPid($data['Pid']); + } + elseif (\array_key_exists('Pid', $data) && $data['Pid'] === null) { + $object->setPid(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('running') && null !== $object->getRunning()) { + $data['Running'] = $object->getRunning(); + } + if ($object->isInitialized('exitCode') && null !== $object->getExitCode()) { + $data['ExitCode'] = $object->getExitCode(); + } + if ($object->isInitialized('processConfig') && null !== $object->getProcessConfig()) { + $data['ProcessConfig'] = $this->normalizer->normalize($object->getProcessConfig(), 'json', $context); + } + if ($object->isInitialized('openStdin') && null !== $object->getOpenStdin()) { + $data['OpenStdin'] = $object->getOpenStdin(); + } + if ($object->isInitialized('openStderr') && null !== $object->getOpenStderr()) { + $data['OpenStderr'] = $object->getOpenStderr(); + } + if ($object->isInitialized('openStdout') && null !== $object->getOpenStdout()) { + $data['OpenStdout'] = $object->getOpenStdout(); + } + if ($object->isInitialized('containerID') && null !== $object->getContainerID()) { + $data['ContainerID'] = $object->getContainerID(); + } + if ($object->isInitialized('pid') && null !== $object->getPid()) { + $data['Pid'] = $object->getPid(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ExecIdJsonGetResponse200::class => false]; + } + } +} else { + class ExecIdJsonGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ExecIdJsonGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ExecIdJsonGetResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ExecIdJsonGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Running', $data) && $data['Running'] !== null) { + $object->setRunning($data['Running']); + } + elseif (\array_key_exists('Running', $data) && $data['Running'] === null) { + $object->setRunning(null); + } + if (\array_key_exists('ExitCode', $data) && $data['ExitCode'] !== null) { + $object->setExitCode($data['ExitCode']); + } + elseif (\array_key_exists('ExitCode', $data) && $data['ExitCode'] === null) { + $object->setExitCode(null); + } + if (\array_key_exists('ProcessConfig', $data) && $data['ProcessConfig'] !== null) { + $object->setProcessConfig($this->denormalizer->denormalize($data['ProcessConfig'], \Docker\API\Model\ProcessConfig::class, 'json', $context)); + } + elseif (\array_key_exists('ProcessConfig', $data) && $data['ProcessConfig'] === null) { + $object->setProcessConfig(null); + } + if (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] !== null) { + $object->setOpenStdin($data['OpenStdin']); + } + elseif (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] === null) { + $object->setOpenStdin(null); + } + if (\array_key_exists('OpenStderr', $data) && $data['OpenStderr'] !== null) { + $object->setOpenStderr($data['OpenStderr']); + } + elseif (\array_key_exists('OpenStderr', $data) && $data['OpenStderr'] === null) { + $object->setOpenStderr(null); + } + if (\array_key_exists('OpenStdout', $data) && $data['OpenStdout'] !== null) { + $object->setOpenStdout($data['OpenStdout']); + } + elseif (\array_key_exists('OpenStdout', $data) && $data['OpenStdout'] === null) { + $object->setOpenStdout(null); + } + if (\array_key_exists('ContainerID', $data) && $data['ContainerID'] !== null) { + $object->setContainerID($data['ContainerID']); + } + elseif (\array_key_exists('ContainerID', $data) && $data['ContainerID'] === null) { + $object->setContainerID(null); + } + if (\array_key_exists('Pid', $data) && $data['Pid'] !== null) { + $object->setPid($data['Pid']); + } + elseif (\array_key_exists('Pid', $data) && $data['Pid'] === null) { + $object->setPid(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('running') && null !== $object->getRunning()) { + $data['Running'] = $object->getRunning(); + } + if ($object->isInitialized('exitCode') && null !== $object->getExitCode()) { + $data['ExitCode'] = $object->getExitCode(); + } + if ($object->isInitialized('processConfig') && null !== $object->getProcessConfig()) { + $data['ProcessConfig'] = $this->normalizer->normalize($object->getProcessConfig(), 'json', $context); + } + if ($object->isInitialized('openStdin') && null !== $object->getOpenStdin()) { + $data['OpenStdin'] = $object->getOpenStdin(); + } + if ($object->isInitialized('openStderr') && null !== $object->getOpenStderr()) { + $data['OpenStderr'] = $object->getOpenStderr(); + } + if ($object->isInitialized('openStdout') && null !== $object->getOpenStdout()) { + $data['OpenStdout'] = $object->getOpenStdout(); + } + if ($object->isInitialized('containerID') && null !== $object->getContainerID()) { + $data['ContainerID'] = $object->getContainerID(); + } + if ($object->isInitialized('pid') && null !== $object->getPid()) { + $data['Pid'] = $object->getPid(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ExecIdJsonGetResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ExecIdStartPostBodyNormalizer.php b/generated/Normalizer/ExecIdStartPostBodyNormalizer.php new file mode 100644 index 000000000..8bc510dd1 --- /dev/null +++ b/generated/Normalizer/ExecIdStartPostBodyNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ExecIdStartPostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ExecIdStartPostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ExecIdStartPostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ExecIdStartPostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Detach', $data) && $data['Detach'] !== null) { + $object->setDetach($data['Detach']); + } + elseif (\array_key_exists('Detach', $data) && $data['Detach'] === null) { + $object->setDetach(null); + } + if (\array_key_exists('Tty', $data) && $data['Tty'] !== null) { + $object->setTty($data['Tty']); + } + elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { + $object->setTty(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('detach') && null !== $object->getDetach()) { + $data['Detach'] = $object->getDetach(); + } + if ($object->isInitialized('tty') && null !== $object->getTty()) { + $data['Tty'] = $object->getTty(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ExecIdStartPostBody::class => false]; + } + } +} else { + class ExecIdStartPostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ExecIdStartPostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ExecIdStartPostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ExecIdStartPostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Detach', $data) && $data['Detach'] !== null) { + $object->setDetach($data['Detach']); + } + elseif (\array_key_exists('Detach', $data) && $data['Detach'] === null) { + $object->setDetach(null); + } + if (\array_key_exists('Tty', $data) && $data['Tty'] !== null) { + $object->setTty($data['Tty']); + } + elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { + $object->setTty(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('detach') && null !== $object->getDetach()) { + $data['Detach'] = $object->getDetach(); + } + if ($object->isInitialized('tty') && null !== $object->getTty()) { + $data['Tty'] = $object->getTty(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ExecIdStartPostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ExecStartConfigNormalizer.php b/generated/Normalizer/ExecStartConfigNormalizer.php deleted file mode 100644 index 39ae094b9..000000000 --- a/generated/Normalizer/ExecStartConfigNormalizer.php +++ /dev/null @@ -1,63 +0,0 @@ -setDetach($data->{'Detach'}); - } - if (property_exists($data, 'Tty')) { - $object->setTty($data->{'Tty'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getDetach()) { - $data->{'Detach'} = $object->getDetach(); - } - if (null !== $object->getTty()) { - $data->{'Tty'} = $object->getTty(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/GlobalServiceNormalizer.php b/generated/Normalizer/GlobalServiceNormalizer.php deleted file mode 100644 index 9892f17f6..000000000 --- a/generated/Normalizer/GlobalServiceNormalizer.php +++ /dev/null @@ -1,51 +0,0 @@ -= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class GraphDriverNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($type !== 'Docker\\API\\Model\\GraphDriver') { - return false; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\GraphDriver::class; } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\GraphDriver) { - return true; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\GraphDriver::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\GraphDriver(); - if (property_exists($data, 'Name')) { - $object->setName($data->{'Name'}); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\GraphDriver(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Data', $data) && $data['Data'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Data'] as $key => $value) { + $values[$key] = $value; + } + $object->setData($values); + } + elseif (\array_key_exists('Data', $data) && $data['Data'] === null) { + $object->setData(null); + } + return $object; } - if (property_exists($data, 'Data')) { - $object->setData($data->{'Data'}); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('data') && null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $key => $value) { + $values[$key] = $value; + } + $data['Data'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\GraphDriver::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class GraphDriverNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\GraphDriver::class; } - if (null !== $object->getData()) { - $data->{'Data'} = $object->getData(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\GraphDriver::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\GraphDriver(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Data', $data) && $data['Data'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Data'] as $key => $value) { + $values[$key] = $value; + } + $object->setData($values); + } + elseif (\array_key_exists('Data', $data) && $data['Data'] === null) { + $object->setData(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('data') && null !== $object->getData()) { + $values = []; + foreach ($object->getData() as $key => $value) { + $values[$key] = $value; + } + $data['Data'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\GraphDriver::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/HostConfigLogConfigNormalizer.php b/generated/Normalizer/HostConfigLogConfigNormalizer.php new file mode 100644 index 000000000..f792e5ace --- /dev/null +++ b/generated/Normalizer/HostConfigLogConfigNormalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class HostConfigLogConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\HostConfigLogConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\HostConfigLogConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\HostConfigLogConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Config', $data) && $data['Config'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Config'] as $key => $value) { + $values[$key] = $value; + } + $object->setConfig($values); + } + elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { + $object->setConfig(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('config') && null !== $object->getConfig()) { + $values = []; + foreach ($object->getConfig() as $key => $value) { + $values[$key] = $value; + } + $data['Config'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\HostConfigLogConfig::class => false]; + } + } +} else { + class HostConfigLogConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\HostConfigLogConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\HostConfigLogConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\HostConfigLogConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Config', $data) && $data['Config'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Config'] as $key => $value) { + $values[$key] = $value; + } + $object->setConfig($values); + } + elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { + $object->setConfig(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('config') && null !== $object->getConfig()) { + $values = []; + foreach ($object->getConfig() as $key => $value) { + $values[$key] = $value; + } + $data['Config'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\HostConfigLogConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/HostConfigNormalizer.php b/generated/Normalizer/HostConfigNormalizer.php index 2fc6bf2bb..c971fbd2b 100644 --- a/generated/Normalizer/HostConfigNormalizer.php +++ b/generated/Normalizer/HostConfigNormalizer.php @@ -2,826 +2,1635 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class HostConfigNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class HostConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($type !== 'Docker\\API\\Model\\HostConfig') { - return false; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\HostConfig::class; } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\HostConfig) { - return true; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\HostConfig::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\HostConfig(); - if (property_exists($data, 'Binds')) { - $value = $data->{'Binds'}; - if (is_array($data->{'Binds'})) { + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\HostConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('CpuShares', $data) && $data['CpuShares'] !== null) { + $object->setCpuShares($data['CpuShares']); + } + elseif (\array_key_exists('CpuShares', $data) && $data['CpuShares'] === null) { + $object->setCpuShares(null); + } + if (\array_key_exists('Memory', $data) && $data['Memory'] !== null) { + $object->setMemory($data['Memory']); + } + elseif (\array_key_exists('Memory', $data) && $data['Memory'] === null) { + $object->setMemory(null); + } + if (\array_key_exists('CgroupParent', $data) && $data['CgroupParent'] !== null) { + $object->setCgroupParent($data['CgroupParent']); + } + elseif (\array_key_exists('CgroupParent', $data) && $data['CgroupParent'] === null) { + $object->setCgroupParent(null); + } + if (\array_key_exists('BlkioWeight', $data) && $data['BlkioWeight'] !== null) { + $object->setBlkioWeight($data['BlkioWeight']); + } + elseif (\array_key_exists('BlkioWeight', $data) && $data['BlkioWeight'] === null) { + $object->setBlkioWeight(null); + } + if (\array_key_exists('BlkioWeightDevice', $data) && $data['BlkioWeightDevice'] !== null) { $values = []; - foreach ($data->{'Binds'} as $value_1) { - $values[] = $value_1; + foreach ($data['BlkioWeightDevice'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class, 'json', $context); } - $value = $values; + $object->setBlkioWeightDevice($values); } - if (is_null($data->{'Binds'})) { - $value = $data->{'Binds'}; + elseif (\array_key_exists('BlkioWeightDevice', $data) && $data['BlkioWeightDevice'] === null) { + $object->setBlkioWeightDevice(null); } - $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; + if (\array_key_exists('BlkioDeviceReadBps', $data) && $data['BlkioDeviceReadBps'] !== null) { + $values_1 = []; + foreach ($data['BlkioDeviceReadBps'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ThrottleDevice::class, 'json', $context); } - $value_2 = $values_1; + $object->setBlkioDeviceReadBps($values_1); } - if (is_null($data->{'Tmpfs'})) { - $value_2 = $data->{'Tmpfs'}; + elseif (\array_key_exists('BlkioDeviceReadBps', $data) && $data['BlkioDeviceReadBps'] === null) { + $object->setBlkioDeviceReadBps(null); } - $object->setTmpfs($value_2); - } - if (property_exists($data, 'Links')) { - $value_4 = $data->{'Links'}; - if (is_array($data->{'Links'})) { + if (\array_key_exists('BlkioDeviceWriteBps', $data) && $data['BlkioDeviceWriteBps'] !== null) { $values_2 = []; - foreach ($data->{'Links'} as $value_5) { - $values_2[] = $value_5; + foreach ($data['BlkioDeviceWriteBps'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\ThrottleDevice::class, 'json', $context); } - $value_4 = $values_2; + $object->setBlkioDeviceWriteBps($values_2); } - if (is_null($data->{'Links'})) { - $value_4 = $data->{'Links'}; + elseif (\array_key_exists('BlkioDeviceWriteBps', $data) && $data['BlkioDeviceWriteBps'] === null) { + $object->setBlkioDeviceWriteBps(null); } - $object->setLinks($value_4); - } - if (property_exists($data, 'LxcConf')) { - $value_6 = $data->{'LxcConf'}; - if (is_object($data->{'LxcConf'})) { - $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'LxcConf'} as $key_1 => $value_7) { - $values_3[$key_1] = $value_7; + if (\array_key_exists('BlkioDeviceReadIOps', $data) && $data['BlkioDeviceReadIOps'] !== null) { + $values_3 = []; + foreach ($data['BlkioDeviceReadIOps'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\ThrottleDevice::class, 'json', $context); } - $value_6 = $values_3; + $object->setBlkioDeviceReadIOps($values_3); } - if (is_null($data->{'LxcConf'})) { - $value_6 = $data->{'LxcConf'}; + elseif (\array_key_exists('BlkioDeviceReadIOps', $data) && $data['BlkioDeviceReadIOps'] === null) { + $object->setBlkioDeviceReadIOps(null); } - $object->setLxcConf($value_6); - } - if (property_exists($data, 'Memory')) { - $object->setMemory($data->{'Memory'}); - } - 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'}); - } - if (property_exists($data, 'CpusetMems')) { - $object->setCpusetMems($data->{'CpusetMems'}); - } - if (property_exists($data, 'MaximumIOps')) { - $object->setMaximumIOps($data->{'MaximumIOps'}); - } - if (property_exists($data, 'MaximumIOBps')) { - $object->setMaximumIOBps($data->{'MaximumIOBps'}); - } - if (property_exists($data, 'BlkioWeight')) { - $object->setBlkioWeight($data->{'BlkioWeight'}); - } - if (property_exists($data, 'BlkioWeightDevice')) { - $value_8 = $data->{'BlkioWeightDevice'}; - if (is_array($data->{'BlkioWeightDevice'})) { + if (\array_key_exists('BlkioDeviceWriteIOps', $data) && $data['BlkioDeviceWriteIOps'] !== null) { $values_4 = []; - foreach ($data->{'BlkioWeightDevice'} as $value_9) { - $values_4[] = $this->serializer->denormalize($value_9, 'Docker\\API\\Model\\DeviceWeight', 'raw', $context); + foreach ($data['BlkioDeviceWriteIOps'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \Docker\API\Model\ThrottleDevice::class, 'json', $context); } - $value_8 = $values_4; + $object->setBlkioDeviceWriteIOps($values_4); } - if (is_null($data->{'BlkioWeightDevice'})) { - $value_8 = $data->{'BlkioWeightDevice'}; + elseif (\array_key_exists('BlkioDeviceWriteIOps', $data) && $data['BlkioDeviceWriteIOps'] === null) { + $object->setBlkioDeviceWriteIOps(null); } - $object->setBlkioWeightDevice($value_8); - } - if (property_exists($data, 'BlkioDeviceReadBps')) { - $value_10 = $data->{'BlkioDeviceReadBps'}; - if (is_array($data->{'BlkioDeviceReadBps'})) { + if (\array_key_exists('CpuPeriod', $data) && $data['CpuPeriod'] !== null) { + $object->setCpuPeriod($data['CpuPeriod']); + } + elseif (\array_key_exists('CpuPeriod', $data) && $data['CpuPeriod'] === null) { + $object->setCpuPeriod(null); + } + if (\array_key_exists('CpuQuota', $data) && $data['CpuQuota'] !== null) { + $object->setCpuQuota($data['CpuQuota']); + } + elseif (\array_key_exists('CpuQuota', $data) && $data['CpuQuota'] === null) { + $object->setCpuQuota(null); + } + if (\array_key_exists('CpuRealtimePeriod', $data) && $data['CpuRealtimePeriod'] !== null) { + $object->setCpuRealtimePeriod($data['CpuRealtimePeriod']); + } + elseif (\array_key_exists('CpuRealtimePeriod', $data) && $data['CpuRealtimePeriod'] === null) { + $object->setCpuRealtimePeriod(null); + } + if (\array_key_exists('CpuRealtimeRuntime', $data) && $data['CpuRealtimeRuntime'] !== null) { + $object->setCpuRealtimeRuntime($data['CpuRealtimeRuntime']); + } + elseif (\array_key_exists('CpuRealtimeRuntime', $data) && $data['CpuRealtimeRuntime'] === null) { + $object->setCpuRealtimeRuntime(null); + } + if (\array_key_exists('CpusetCpus', $data) && $data['CpusetCpus'] !== null) { + $object->setCpusetCpus($data['CpusetCpus']); + } + elseif (\array_key_exists('CpusetCpus', $data) && $data['CpusetCpus'] === null) { + $object->setCpusetCpus(null); + } + if (\array_key_exists('CpusetMems', $data) && $data['CpusetMems'] !== null) { + $object->setCpusetMems($data['CpusetMems']); + } + elseif (\array_key_exists('CpusetMems', $data) && $data['CpusetMems'] === null) { + $object->setCpusetMems(null); + } + if (\array_key_exists('Devices', $data) && $data['Devices'] !== null) { $values_5 = []; - foreach ($data->{'BlkioDeviceReadBps'} as $value_11) { - $values_5[] = $this->serializer->denormalize($value_11, 'Docker\\API\\Model\\DeviceRate', 'raw', $context); + foreach ($data['Devices'] as $value_5) { + $values_5[] = $this->denormalizer->denormalize($value_5, \Docker\API\Model\DeviceMapping::class, 'json', $context); } - $value_10 = $values_5; + $object->setDevices($values_5); } - if (is_null($data->{'BlkioDeviceReadBps'})) { - $value_10 = $data->{'BlkioDeviceReadBps'}; + elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { + $object->setDevices(null); } - $object->setBlkioDeviceReadBps($value_10); - } - if (property_exists($data, 'BlkioDeviceReadIOps')) { - $value_12 = $data->{'BlkioDeviceReadIOps'}; - if (is_array($data->{'BlkioDeviceReadIOps'})) { + if (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] !== null) { + $object->setDiskQuota($data['DiskQuota']); + } + elseif (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] === null) { + $object->setDiskQuota(null); + } + if (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] !== null) { + $object->setKernelMemory($data['KernelMemory']); + } + elseif (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] === null) { + $object->setKernelMemory(null); + } + if (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] !== null) { + $object->setMemoryReservation($data['MemoryReservation']); + } + elseif (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] === null) { + $object->setMemoryReservation(null); + } + if (\array_key_exists('MemorySwap', $data) && $data['MemorySwap'] !== null) { + $object->setMemorySwap($data['MemorySwap']); + } + elseif (\array_key_exists('MemorySwap', $data) && $data['MemorySwap'] === null) { + $object->setMemorySwap(null); + } + if (\array_key_exists('MemorySwappiness', $data) && $data['MemorySwappiness'] !== null) { + $object->setMemorySwappiness($data['MemorySwappiness']); + } + elseif (\array_key_exists('MemorySwappiness', $data) && $data['MemorySwappiness'] === null) { + $object->setMemorySwappiness(null); + } + if (\array_key_exists('NanoCpus', $data) && $data['NanoCpus'] !== null) { + $object->setNanoCpus($data['NanoCpus']); + } + elseif (\array_key_exists('NanoCpus', $data) && $data['NanoCpus'] === null) { + $object->setNanoCpus(null); + } + if (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] !== null) { + $object->setOomKillDisable($data['OomKillDisable']); + } + elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { + $object->setOomKillDisable(null); + } + if (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] !== null) { + $object->setPidsLimit($data['PidsLimit']); + } + elseif (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] === null) { + $object->setPidsLimit(null); + } + if (\array_key_exists('Ulimits', $data) && $data['Ulimits'] !== null) { $values_6 = []; - foreach ($data->{'BlkioDeviceReadIOps'} as $value_13) { - $values_6[] = $this->serializer->denormalize($value_13, 'Docker\\API\\Model\\DeviceRate', 'raw', $context); + foreach ($data['Ulimits'] as $value_6) { + $values_6[] = $this->denormalizer->denormalize($value_6, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); } - $value_12 = $values_6; + $object->setUlimits($values_6); } - if (is_null($data->{'BlkioDeviceReadIOps'})) { - $value_12 = $data->{'BlkioDeviceReadIOps'}; + elseif (\array_key_exists('Ulimits', $data) && $data['Ulimits'] === null) { + $object->setUlimits(null); } - $object->setBlkioDeviceReadIOps($value_12); - } - if (property_exists($data, 'BlkioDeviceWriteBps')) { - $value_14 = $data->{'BlkioDeviceWriteBps'}; - if (is_array($data->{'BlkioDeviceWriteBps'})) { + if (\array_key_exists('CpuCount', $data) && $data['CpuCount'] !== null) { + $object->setCpuCount($data['CpuCount']); + } + elseif (\array_key_exists('CpuCount', $data) && $data['CpuCount'] === null) { + $object->setCpuCount(null); + } + if (\array_key_exists('CpuPercent', $data) && $data['CpuPercent'] !== null) { + $object->setCpuPercent($data['CpuPercent']); + } + elseif (\array_key_exists('CpuPercent', $data) && $data['CpuPercent'] === null) { + $object->setCpuPercent(null); + } + if (\array_key_exists('IOMaximumIOps', $data) && $data['IOMaximumIOps'] !== null) { + $object->setIOMaximumIOps($data['IOMaximumIOps']); + } + elseif (\array_key_exists('IOMaximumIOps', $data) && $data['IOMaximumIOps'] === null) { + $object->setIOMaximumIOps(null); + } + if (\array_key_exists('IOMaximumBandwidth', $data) && $data['IOMaximumBandwidth'] !== null) { + $object->setIOMaximumBandwidth($data['IOMaximumBandwidth']); + } + elseif (\array_key_exists('IOMaximumBandwidth', $data) && $data['IOMaximumBandwidth'] === null) { + $object->setIOMaximumBandwidth(null); + } + if (\array_key_exists('Binds', $data) && $data['Binds'] !== null) { $values_7 = []; - foreach ($data->{'BlkioDeviceWriteBps'} as $value_15) { - $values_7[] = $this->serializer->denormalize($value_15, 'Docker\\API\\Model\\DeviceRate', 'raw', $context); + foreach ($data['Binds'] as $value_7) { + $values_7[] = $value_7; } - $value_14 = $values_7; + $object->setBinds($values_7); } - if (is_null($data->{'BlkioDeviceWriteBps'})) { - $value_14 = $data->{'BlkioDeviceWriteBps'}; + elseif (\array_key_exists('Binds', $data) && $data['Binds'] === null) { + $object->setBinds(null); } - $object->setBlkioDeviceWriteBps($value_14); - } - if (property_exists($data, 'BlkioDeviceWriteIOps')) { - $value_16 = $data->{'BlkioDeviceWriteIOps'}; - if (is_array($data->{'BlkioDeviceWriteIOps'})) { - $values_8 = []; - foreach ($data->{'BlkioDeviceWriteIOps'} as $value_17) { - $values_8[] = $this->serializer->denormalize($value_17, 'Docker\\API\\Model\\DeviceRate', 'raw', $context); + if (\array_key_exists('ContainerIDFile', $data) && $data['ContainerIDFile'] !== null) { + $object->setContainerIDFile($data['ContainerIDFile']); + } + elseif (\array_key_exists('ContainerIDFile', $data) && $data['ContainerIDFile'] === null) { + $object->setContainerIDFile(null); + } + if (\array_key_exists('LogConfig', $data) && $data['LogConfig'] !== null) { + $object->setLogConfig($this->denormalizer->denormalize($data['LogConfig'], \Docker\API\Model\HostConfigLogConfig::class, 'json', $context)); + } + elseif (\array_key_exists('LogConfig', $data) && $data['LogConfig'] === null) { + $object->setLogConfig(null); + } + if (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] !== null) { + $object->setNetworkMode($data['NetworkMode']); + } + elseif (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] === null) { + $object->setNetworkMode(null); + } + if (\array_key_exists('PortBindings', $data) && $data['PortBindings'] !== null) { + $values_8 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['PortBindings'] as $key => $value_8) { + $values_8[$key] = $this->denormalizer->denormalize($value_8, \Docker\API\Model\HostConfigPortBindingsItem::class, 'json', $context); } - $value_16 = $values_8; + $object->setPortBindings($values_8); } - if (is_null($data->{'BlkioDeviceWriteIOps'})) { - $value_16 = $data->{'BlkioDeviceWriteIOps'}; + elseif (\array_key_exists('PortBindings', $data) && $data['PortBindings'] === null) { + $object->setPortBindings(null); } - $object->setBlkioDeviceWriteIOps($value_16); - } - if (property_exists($data, 'MemorySwappiness')) { - $object->setMemorySwappiness($data->{'MemorySwappiness'}); - } - if (property_exists($data, 'OomKillDisable')) { - $object->setOomKillDisable($data->{'OomKillDisable'}); - } - if (property_exists($data, 'OomScoreAdj')) { - $object->setOomScoreAdj($data->{'OomScoreAdj'}); - } - if (property_exists($data, 'PidsLimit')) { - $object->setPidsLimit($data->{'PidsLimit'}); - } - if (property_exists($data, 'PortBindings')) { - $value_18 = $data->{'PortBindings'}; - if (is_object($data->{'PortBindings'})) { - $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->denormalize($value_21, 'Docker\\API\\Model\\PortBinding', 'raw', $context); - } - $value_20 = $values_10; - } - if (is_null($value_19)) { - $value_20 = $value_19; - } - $values_9[$key_2] = $value_20; - } - $value_18 = $values_9; - } - if (is_null($data->{'PortBindings'})) { - $value_18 = $data->{'PortBindings'}; - } - $object->setPortBindings($value_18); - } - if (property_exists($data, 'PublishAllPorts')) { - $object->setPublishAllPorts($data->{'PublishAllPorts'}); - } - if (property_exists($data, 'Privileged')) { - $object->setPrivileged($data->{'Privileged'}); - } - if (property_exists($data, 'ReadonlyRootfs')) { - $object->setReadonlyRootfs($data->{'ReadonlyRootfs'}); - } - if (property_exists($data, 'Sysctls')) { - $value_22 = $data->{'Sysctls'}; - if (is_object($data->{'Sysctls'})) { - $values_11 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Sysctls'} as $key_3 => $value_23) { - $values_11[$key_3] = $value_23; + if (\array_key_exists('RestartPolicy', $data) && $data['RestartPolicy'] !== null) { + $object->setRestartPolicy($this->denormalizer->denormalize($data['RestartPolicy'], \Docker\API\Model\RestartPolicy::class, 'json', $context)); + } + elseif (\array_key_exists('RestartPolicy', $data) && $data['RestartPolicy'] === null) { + $object->setRestartPolicy(null); + } + if (\array_key_exists('AutoRemove', $data) && $data['AutoRemove'] !== null) { + $object->setAutoRemove($data['AutoRemove']); + } + elseif (\array_key_exists('AutoRemove', $data) && $data['AutoRemove'] === null) { + $object->setAutoRemove(null); + } + if (\array_key_exists('VolumeDriver', $data) && $data['VolumeDriver'] !== null) { + $object->setVolumeDriver($data['VolumeDriver']); + } + elseif (\array_key_exists('VolumeDriver', $data) && $data['VolumeDriver'] === null) { + $object->setVolumeDriver(null); + } + if (\array_key_exists('VolumesFrom', $data) && $data['VolumesFrom'] !== null) { + $values_9 = []; + foreach ($data['VolumesFrom'] as $value_9) { + $values_9[] = $value_9; } - $value_22 = $values_11; + $object->setVolumesFrom($values_9); } - if (is_null($data->{'Sysctls'})) { - $value_22 = $data->{'Sysctls'}; + elseif (\array_key_exists('VolumesFrom', $data) && $data['VolumesFrom'] === null) { + $object->setVolumesFrom(null); } - $object->setSysctls($value_22); - } - if (property_exists($data, 'StorageOpt')) { - $value_24 = $data->{'StorageOpt'}; - if (is_object($data->{'StorageOpt'})) { - $values_12 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'StorageOpt'} as $key_4 => $value_25) { - $values_12[$key_4] = $value_25; + if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { + $values_10 = []; + foreach ($data['Mounts'] as $value_10) { + $values_10[] = $this->denormalizer->denormalize($value_10, \Docker\API\Model\Mount::class, 'json', $context); } - $value_24 = $values_12; + $object->setMounts($values_10); } - if (is_null($data->{'StorageOpt'})) { - $value_24 = $data->{'StorageOpt'}; + elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { + $object->setMounts(null); } - $object->setStorageOpt($value_24); - } - if (property_exists($data, 'Dns')) { - $value_26 = $data->{'Dns'}; - if (is_array($data->{'Dns'})) { + if (\array_key_exists('CapAdd', $data) && $data['CapAdd'] !== null) { + $values_11 = []; + foreach ($data['CapAdd'] as $value_11) { + $values_11[] = $value_11; + } + $object->setCapAdd($values_11); + } + elseif (\array_key_exists('CapAdd', $data) && $data['CapAdd'] === null) { + $object->setCapAdd(null); + } + if (\array_key_exists('CapDrop', $data) && $data['CapDrop'] !== null) { + $values_12 = []; + foreach ($data['CapDrop'] as $value_12) { + $values_12[] = $value_12; + } + $object->setCapDrop($values_12); + } + elseif (\array_key_exists('CapDrop', $data) && $data['CapDrop'] === null) { + $object->setCapDrop(null); + } + if (\array_key_exists('Dns', $data) && $data['Dns'] !== null) { $values_13 = []; - foreach ($data->{'Dns'} as $value_27) { - $values_13[] = $value_27; + foreach ($data['Dns'] as $value_13) { + $values_13[] = $value_13; } - $value_26 = $values_13; + $object->setDns($values_13); } - if (is_null($data->{'Dns'})) { - $value_26 = $data->{'Dns'}; + elseif (\array_key_exists('Dns', $data) && $data['Dns'] === null) { + $object->setDns(null); } - $object->setDns($value_26); - } - if (property_exists($data, 'DnsOptions')) { - $value_28 = $data->{'DnsOptions'}; - if (is_array($data->{'DnsOptions'})) { + if (\array_key_exists('DnsOptions', $data) && $data['DnsOptions'] !== null) { $values_14 = []; - foreach ($data->{'DnsOptions'} as $value_29) { - $values_14[] = $value_29; + foreach ($data['DnsOptions'] as $value_14) { + $values_14[] = $value_14; } - $value_28 = $values_14; + $object->setDnsOptions($values_14); } - if (is_null($data->{'DnsOptions'})) { - $value_28 = $data->{'DnsOptions'}; + elseif (\array_key_exists('DnsOptions', $data) && $data['DnsOptions'] === null) { + $object->setDnsOptions(null); } - $object->setDnsOptions($value_28); - } - if (property_exists($data, 'DnsSearch')) { - $value_30 = $data->{'DnsSearch'}; - if (is_array($data->{'DnsSearch'})) { + if (\array_key_exists('DnsSearch', $data) && $data['DnsSearch'] !== null) { $values_15 = []; - foreach ($data->{'DnsSearch'} as $value_31) { - $values_15[] = $value_31; + foreach ($data['DnsSearch'] as $value_15) { + $values_15[] = $value_15; } - $value_30 = $values_15; + $object->setDnsSearch($values_15); } - if (is_null($data->{'DnsSearch'})) { - $value_30 = $data->{'DnsSearch'}; + elseif (\array_key_exists('DnsSearch', $data) && $data['DnsSearch'] === null) { + $object->setDnsSearch(null); } - $object->setDnsSearch($value_30); - } - if (property_exists($data, 'ExtraHosts')) { - $value_32 = $data->{'ExtraHosts'}; - if (is_array($data->{'ExtraHosts'})) { + if (\array_key_exists('ExtraHosts', $data) && $data['ExtraHosts'] !== null) { $values_16 = []; - foreach ($data->{'ExtraHosts'} as $value_33) { - $values_16[] = $value_33; + foreach ($data['ExtraHosts'] as $value_16) { + $values_16[] = $value_16; } - $value_32 = $values_16; + $object->setExtraHosts($values_16); } - if (is_null($data->{'ExtraHosts'})) { - $value_32 = $data->{'ExtraHosts'}; + elseif (\array_key_exists('ExtraHosts', $data) && $data['ExtraHosts'] === null) { + $object->setExtraHosts(null); } - $object->setExtraHosts($value_32); - } - if (property_exists($data, 'VolumesFrom')) { - $value_34 = $data->{'VolumesFrom'}; - if (is_array($data->{'VolumesFrom'})) { + if (\array_key_exists('GroupAdd', $data) && $data['GroupAdd'] !== null) { $values_17 = []; - foreach ($data->{'VolumesFrom'} as $value_35) { - $values_17[] = $value_35; + foreach ($data['GroupAdd'] as $value_17) { + $values_17[] = $value_17; } - $value_34 = $values_17; + $object->setGroupAdd($values_17); } - if (is_null($data->{'VolumesFrom'})) { - $value_34 = $data->{'VolumesFrom'}; + elseif (\array_key_exists('GroupAdd', $data) && $data['GroupAdd'] === null) { + $object->setGroupAdd(null); } - $object->setVolumesFrom($value_34); - } - if (property_exists($data, 'CapAdd')) { - $value_36 = $data->{'CapAdd'}; - if (is_array($data->{'CapAdd'})) { + if (\array_key_exists('IpcMode', $data) && $data['IpcMode'] !== null) { + $object->setIpcMode($data['IpcMode']); + } + elseif (\array_key_exists('IpcMode', $data) && $data['IpcMode'] === null) { + $object->setIpcMode(null); + } + if (\array_key_exists('Cgroup', $data) && $data['Cgroup'] !== null) { + $object->setCgroup($data['Cgroup']); + } + elseif (\array_key_exists('Cgroup', $data) && $data['Cgroup'] === null) { + $object->setCgroup(null); + } + if (\array_key_exists('Links', $data) && $data['Links'] !== null) { $values_18 = []; - foreach ($data->{'CapAdd'} as $value_37) { - $values_18[] = $value_37; + foreach ($data['Links'] as $value_18) { + $values_18[] = $value_18; } - $value_36 = $values_18; + $object->setLinks($values_18); } - if (is_null($data->{'CapAdd'})) { - $value_36 = $data->{'CapAdd'}; + elseif (\array_key_exists('Links', $data) && $data['Links'] === null) { + $object->setLinks(null); } - $object->setCapAdd($value_36); - } - if (property_exists($data, 'CapDrop')) { - $value_38 = $data->{'CapDrop'}; - if (is_array($data->{'CapDrop'})) { + if (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] !== null) { + $object->setOomScoreAdj($data['OomScoreAdj']); + } + elseif (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] === null) { + $object->setOomScoreAdj(null); + } + if (\array_key_exists('PidMode', $data) && $data['PidMode'] !== null) { + $object->setPidMode($data['PidMode']); + } + elseif (\array_key_exists('PidMode', $data) && $data['PidMode'] === null) { + $object->setPidMode(null); + } + if (\array_key_exists('Privileged', $data) && $data['Privileged'] !== null) { + $object->setPrivileged($data['Privileged']); + } + elseif (\array_key_exists('Privileged', $data) && $data['Privileged'] === null) { + $object->setPrivileged(null); + } + if (\array_key_exists('PublishAllPorts', $data) && $data['PublishAllPorts'] !== null) { + $object->setPublishAllPorts($data['PublishAllPorts']); + } + elseif (\array_key_exists('PublishAllPorts', $data) && $data['PublishAllPorts'] === null) { + $object->setPublishAllPorts(null); + } + if (\array_key_exists('ReadonlyRootfs', $data) && $data['ReadonlyRootfs'] !== null) { + $object->setReadonlyRootfs($data['ReadonlyRootfs']); + } + elseif (\array_key_exists('ReadonlyRootfs', $data) && $data['ReadonlyRootfs'] === null) { + $object->setReadonlyRootfs(null); + } + if (\array_key_exists('SecurityOpt', $data) && $data['SecurityOpt'] !== null) { $values_19 = []; - foreach ($data->{'CapDrop'} as $value_39) { - $values_19[] = $value_39; + foreach ($data['SecurityOpt'] as $value_19) { + $values_19[] = $value_19; } - $value_38 = $values_19; + $object->setSecurityOpt($values_19); } - if (is_null($data->{'CapDrop'})) { - $value_38 = $data->{'CapDrop'}; + elseif (\array_key_exists('SecurityOpt', $data) && $data['SecurityOpt'] === null) { + $object->setSecurityOpt(null); } - $object->setCapDrop($value_38); - } - if (property_exists($data, 'GroupAdd')) { - $value_40 = $data->{'GroupAdd'}; - if (is_array($data->{'GroupAdd'})) { - $values_20 = []; - foreach ($data->{'GroupAdd'} as $value_41) { - $values_20[] = $value_41; + if (\array_key_exists('StorageOpt', $data) && $data['StorageOpt'] !== null) { + $values_20 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['StorageOpt'] as $key_1 => $value_20) { + $values_20[$key_1] = $value_20; } - $value_40 = $values_20; + $object->setStorageOpt($values_20); } - if (is_null($data->{'GroupAdd'})) { - $value_40 = $data->{'GroupAdd'}; + elseif (\array_key_exists('StorageOpt', $data) && $data['StorageOpt'] === null) { + $object->setStorageOpt(null); } - $object->setGroupAdd($value_40); - } - if (property_exists($data, 'RestartPolicy')) { - $object->setRestartPolicy($this->serializer->denormalize($data->{'RestartPolicy'}, 'Docker\\API\\Model\\RestartPolicy', 'raw', $context)); - } - if (property_exists($data, 'UsernsMode')) { - $object->setUsernsMode($data->{'UsernsMode'}); - } - if (property_exists($data, 'NetworkMode')) { - $object->setNetworkMode($data->{'NetworkMode'}); + if (\array_key_exists('Tmpfs', $data) && $data['Tmpfs'] !== null) { + $values_21 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Tmpfs'] as $key_2 => $value_21) { + $values_21[$key_2] = $value_21; + } + $object->setTmpfs($values_21); + } + elseif (\array_key_exists('Tmpfs', $data) && $data['Tmpfs'] === null) { + $object->setTmpfs(null); + } + if (\array_key_exists('UTSMode', $data) && $data['UTSMode'] !== null) { + $object->setUTSMode($data['UTSMode']); + } + elseif (\array_key_exists('UTSMode', $data) && $data['UTSMode'] === null) { + $object->setUTSMode(null); + } + if (\array_key_exists('UsernsMode', $data) && $data['UsernsMode'] !== null) { + $object->setUsernsMode($data['UsernsMode']); + } + elseif (\array_key_exists('UsernsMode', $data) && $data['UsernsMode'] === null) { + $object->setUsernsMode(null); + } + if (\array_key_exists('ShmSize', $data) && $data['ShmSize'] !== null) { + $object->setShmSize($data['ShmSize']); + } + elseif (\array_key_exists('ShmSize', $data) && $data['ShmSize'] === null) { + $object->setShmSize(null); + } + if (\array_key_exists('Sysctls', $data) && $data['Sysctls'] !== null) { + $values_22 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Sysctls'] as $key_3 => $value_22) { + $values_22[$key_3] = $value_22; + } + $object->setSysctls($values_22); + } + elseif (\array_key_exists('Sysctls', $data) && $data['Sysctls'] === null) { + $object->setSysctls(null); + } + if (\array_key_exists('Runtime', $data) && $data['Runtime'] !== null) { + $object->setRuntime($data['Runtime']); + } + elseif (\array_key_exists('Runtime', $data) && $data['Runtime'] === null) { + $object->setRuntime(null); + } + if (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] !== null) { + $values_23 = []; + foreach ($data['ConsoleSize'] as $value_23) { + $values_23[] = $value_23; + } + $object->setConsoleSize($values_23); + } + elseif (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] === null) { + $object->setConsoleSize(null); + } + if (\array_key_exists('Isolation', $data) && $data['Isolation'] !== null) { + $object->setIsolation($data['Isolation']); + } + elseif (\array_key_exists('Isolation', $data) && $data['Isolation'] === null) { + $object->setIsolation(null); + } + return $object; } - if (property_exists($data, 'Devices')) { - $value_42 = $data->{'Devices'}; - if (is_array($data->{'Devices'})) { + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('cpuShares') && null !== $object->getCpuShares()) { + $data['CpuShares'] = $object->getCpuShares(); + } + if ($object->isInitialized('memory') && null !== $object->getMemory()) { + $data['Memory'] = $object->getMemory(); + } + if ($object->isInitialized('cgroupParent') && null !== $object->getCgroupParent()) { + $data['CgroupParent'] = $object->getCgroupParent(); + } + if ($object->isInitialized('blkioWeight') && null !== $object->getBlkioWeight()) { + $data['BlkioWeight'] = $object->getBlkioWeight(); + } + if ($object->isInitialized('blkioWeightDevice') && null !== $object->getBlkioWeightDevice()) { + $values = []; + foreach ($object->getBlkioWeightDevice() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['BlkioWeightDevice'] = $values; + } + if ($object->isInitialized('blkioDeviceReadBps') && null !== $object->getBlkioDeviceReadBps()) { + $values_1 = []; + foreach ($object->getBlkioDeviceReadBps() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['BlkioDeviceReadBps'] = $values_1; + } + if ($object->isInitialized('blkioDeviceWriteBps') && null !== $object->getBlkioDeviceWriteBps()) { + $values_2 = []; + foreach ($object->getBlkioDeviceWriteBps() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['BlkioDeviceWriteBps'] = $values_2; + } + if ($object->isInitialized('blkioDeviceReadIOps') && null !== $object->getBlkioDeviceReadIOps()) { + $values_3 = []; + foreach ($object->getBlkioDeviceReadIOps() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['BlkioDeviceReadIOps'] = $values_3; + } + if ($object->isInitialized('blkioDeviceWriteIOps') && null !== $object->getBlkioDeviceWriteIOps()) { + $values_4 = []; + foreach ($object->getBlkioDeviceWriteIOps() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['BlkioDeviceWriteIOps'] = $values_4; + } + if ($object->isInitialized('cpuPeriod') && null !== $object->getCpuPeriod()) { + $data['CpuPeriod'] = $object->getCpuPeriod(); + } + if ($object->isInitialized('cpuQuota') && null !== $object->getCpuQuota()) { + $data['CpuQuota'] = $object->getCpuQuota(); + } + if ($object->isInitialized('cpuRealtimePeriod') && null !== $object->getCpuRealtimePeriod()) { + $data['CpuRealtimePeriod'] = $object->getCpuRealtimePeriod(); + } + if ($object->isInitialized('cpuRealtimeRuntime') && null !== $object->getCpuRealtimeRuntime()) { + $data['CpuRealtimeRuntime'] = $object->getCpuRealtimeRuntime(); + } + if ($object->isInitialized('cpusetCpus') && null !== $object->getCpusetCpus()) { + $data['CpusetCpus'] = $object->getCpusetCpus(); + } + if ($object->isInitialized('cpusetMems') && null !== $object->getCpusetMems()) { + $data['CpusetMems'] = $object->getCpusetMems(); + } + if ($object->isInitialized('devices') && null !== $object->getDevices()) { + $values_5 = []; + foreach ($object->getDevices() as $value_5) { + $values_5[] = $this->normalizer->normalize($value_5, 'json', $context); + } + $data['Devices'] = $values_5; + } + if ($object->isInitialized('diskQuota') && null !== $object->getDiskQuota()) { + $data['DiskQuota'] = $object->getDiskQuota(); + } + if ($object->isInitialized('kernelMemory') && null !== $object->getKernelMemory()) { + $data['KernelMemory'] = $object->getKernelMemory(); + } + if ($object->isInitialized('memoryReservation') && null !== $object->getMemoryReservation()) { + $data['MemoryReservation'] = $object->getMemoryReservation(); + } + if ($object->isInitialized('memorySwap') && null !== $object->getMemorySwap()) { + $data['MemorySwap'] = $object->getMemorySwap(); + } + if ($object->isInitialized('memorySwappiness') && null !== $object->getMemorySwappiness()) { + $data['MemorySwappiness'] = $object->getMemorySwappiness(); + } + if ($object->isInitialized('nanoCpus') && null !== $object->getNanoCpus()) { + $data['NanoCpus'] = $object->getNanoCpus(); + } + if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { + $data['OomKillDisable'] = $object->getOomKillDisable(); + } + if ($object->isInitialized('pidsLimit') && null !== $object->getPidsLimit()) { + $data['PidsLimit'] = $object->getPidsLimit(); + } + if ($object->isInitialized('ulimits') && null !== $object->getUlimits()) { + $values_6 = []; + foreach ($object->getUlimits() as $value_6) { + $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + } + $data['Ulimits'] = $values_6; + } + if ($object->isInitialized('cpuCount') && null !== $object->getCpuCount()) { + $data['CpuCount'] = $object->getCpuCount(); + } + if ($object->isInitialized('cpuPercent') && null !== $object->getCpuPercent()) { + $data['CpuPercent'] = $object->getCpuPercent(); + } + if ($object->isInitialized('iOMaximumIOps') && null !== $object->getIOMaximumIOps()) { + $data['IOMaximumIOps'] = $object->getIOMaximumIOps(); + } + if ($object->isInitialized('iOMaximumBandwidth') && null !== $object->getIOMaximumBandwidth()) { + $data['IOMaximumBandwidth'] = $object->getIOMaximumBandwidth(); + } + if ($object->isInitialized('binds') && null !== $object->getBinds()) { + $values_7 = []; + foreach ($object->getBinds() as $value_7) { + $values_7[] = $value_7; + } + $data['Binds'] = $values_7; + } + if ($object->isInitialized('containerIDFile') && null !== $object->getContainerIDFile()) { + $data['ContainerIDFile'] = $object->getContainerIDFile(); + } + if ($object->isInitialized('logConfig') && null !== $object->getLogConfig()) { + $data['LogConfig'] = $this->normalizer->normalize($object->getLogConfig(), 'json', $context); + } + if ($object->isInitialized('networkMode') && null !== $object->getNetworkMode()) { + $data['NetworkMode'] = $object->getNetworkMode(); + } + if ($object->isInitialized('portBindings') && null !== $object->getPortBindings()) { + $values_8 = []; + foreach ($object->getPortBindings() as $key => $value_8) { + $values_8[$key] = $this->normalizer->normalize($value_8, 'json', $context); + } + $data['PortBindings'] = $values_8; + } + if ($object->isInitialized('restartPolicy') && null !== $object->getRestartPolicy()) { + $data['RestartPolicy'] = $this->normalizer->normalize($object->getRestartPolicy(), 'json', $context); + } + if ($object->isInitialized('autoRemove') && null !== $object->getAutoRemove()) { + $data['AutoRemove'] = $object->getAutoRemove(); + } + if ($object->isInitialized('volumeDriver') && null !== $object->getVolumeDriver()) { + $data['VolumeDriver'] = $object->getVolumeDriver(); + } + if ($object->isInitialized('volumesFrom') && null !== $object->getVolumesFrom()) { + $values_9 = []; + foreach ($object->getVolumesFrom() as $value_9) { + $values_9[] = $value_9; + } + $data['VolumesFrom'] = $values_9; + } + if ($object->isInitialized('mounts') && null !== $object->getMounts()) { + $values_10 = []; + foreach ($object->getMounts() as $value_10) { + $values_10[] = $this->normalizer->normalize($value_10, 'json', $context); + } + $data['Mounts'] = $values_10; + } + if ($object->isInitialized('capAdd') && null !== $object->getCapAdd()) { + $values_11 = []; + foreach ($object->getCapAdd() as $value_11) { + $values_11[] = $value_11; + } + $data['CapAdd'] = $values_11; + } + if ($object->isInitialized('capDrop') && null !== $object->getCapDrop()) { + $values_12 = []; + foreach ($object->getCapDrop() as $value_12) { + $values_12[] = $value_12; + } + $data['CapDrop'] = $values_12; + } + if ($object->isInitialized('dns') && null !== $object->getDns()) { + $values_13 = []; + foreach ($object->getDns() as $value_13) { + $values_13[] = $value_13; + } + $data['Dns'] = $values_13; + } + if ($object->isInitialized('dnsOptions') && null !== $object->getDnsOptions()) { + $values_14 = []; + foreach ($object->getDnsOptions() as $value_14) { + $values_14[] = $value_14; + } + $data['DnsOptions'] = $values_14; + } + if ($object->isInitialized('dnsSearch') && null !== $object->getDnsSearch()) { + $values_15 = []; + foreach ($object->getDnsSearch() as $value_15) { + $values_15[] = $value_15; + } + $data['DnsSearch'] = $values_15; + } + if ($object->isInitialized('extraHosts') && null !== $object->getExtraHosts()) { + $values_16 = []; + foreach ($object->getExtraHosts() as $value_16) { + $values_16[] = $value_16; + } + $data['ExtraHosts'] = $values_16; + } + if ($object->isInitialized('groupAdd') && null !== $object->getGroupAdd()) { + $values_17 = []; + foreach ($object->getGroupAdd() as $value_17) { + $values_17[] = $value_17; + } + $data['GroupAdd'] = $values_17; + } + if ($object->isInitialized('ipcMode') && null !== $object->getIpcMode()) { + $data['IpcMode'] = $object->getIpcMode(); + } + if ($object->isInitialized('cgroup') && null !== $object->getCgroup()) { + $data['Cgroup'] = $object->getCgroup(); + } + if ($object->isInitialized('links') && null !== $object->getLinks()) { + $values_18 = []; + foreach ($object->getLinks() as $value_18) { + $values_18[] = $value_18; + } + $data['Links'] = $values_18; + } + if ($object->isInitialized('oomScoreAdj') && null !== $object->getOomScoreAdj()) { + $data['OomScoreAdj'] = $object->getOomScoreAdj(); + } + if ($object->isInitialized('pidMode') && null !== $object->getPidMode()) { + $data['PidMode'] = $object->getPidMode(); + } + if ($object->isInitialized('privileged') && null !== $object->getPrivileged()) { + $data['Privileged'] = $object->getPrivileged(); + } + if ($object->isInitialized('publishAllPorts') && null !== $object->getPublishAllPorts()) { + $data['PublishAllPorts'] = $object->getPublishAllPorts(); + } + if ($object->isInitialized('readonlyRootfs') && null !== $object->getReadonlyRootfs()) { + $data['ReadonlyRootfs'] = $object->getReadonlyRootfs(); + } + if ($object->isInitialized('securityOpt') && null !== $object->getSecurityOpt()) { + $values_19 = []; + foreach ($object->getSecurityOpt() as $value_19) { + $values_19[] = $value_19; + } + $data['SecurityOpt'] = $values_19; + } + if ($object->isInitialized('storageOpt') && null !== $object->getStorageOpt()) { + $values_20 = []; + foreach ($object->getStorageOpt() as $key_1 => $value_20) { + $values_20[$key_1] = $value_20; + } + $data['StorageOpt'] = $values_20; + } + if ($object->isInitialized('tmpfs') && null !== $object->getTmpfs()) { $values_21 = []; - foreach ($data->{'Devices'} as $value_43) { - $values_21[] = $this->serializer->denormalize($value_43, 'Docker\\API\\Model\\Device', 'raw', $context); + foreach ($object->getTmpfs() as $key_2 => $value_21) { + $values_21[$key_2] = $value_21; } - $value_42 = $values_21; + $data['Tmpfs'] = $values_21; } - if (is_null($data->{'Devices'})) { - $value_42 = $data->{'Devices'}; + if ($object->isInitialized('uTSMode') && null !== $object->getUTSMode()) { + $data['UTSMode'] = $object->getUTSMode(); } - $object->setDevices($value_42); - } - if (property_exists($data, 'Ulimits')) { - $value_44 = $data->{'Ulimits'}; - if (is_array($data->{'Ulimits'})) { + if ($object->isInitialized('usernsMode') && null !== $object->getUsernsMode()) { + $data['UsernsMode'] = $object->getUsernsMode(); + } + if ($object->isInitialized('shmSize') && null !== $object->getShmSize()) { + $data['ShmSize'] = $object->getShmSize(); + } + if ($object->isInitialized('sysctls') && null !== $object->getSysctls()) { $values_22 = []; - foreach ($data->{'Ulimits'} as $value_45) { - $values_22[] = $this->serializer->denormalize($value_45, 'Docker\\API\\Model\\Ulimit', 'raw', $context); + foreach ($object->getSysctls() as $key_3 => $value_22) { + $values_22[$key_3] = $value_22; } - $value_44 = $values_22; + $data['Sysctls'] = $values_22; } - if (is_null($data->{'Ulimits'})) { - $value_44 = $data->{'Ulimits'}; + if ($object->isInitialized('runtime') && null !== $object->getRuntime()) { + $data['Runtime'] = $object->getRuntime(); } - $object->setUlimits($value_44); - } - if (property_exists($data, 'SecurityOpt')) { - $value_46 = $data->{'SecurityOpt'}; - if (is_array($data->{'SecurityOpt'})) { + if ($object->isInitialized('consoleSize') && null !== $object->getConsoleSize()) { $values_23 = []; - foreach ($data->{'SecurityOpt'} as $value_47) { - $values_23[] = $value_47; + foreach ($object->getConsoleSize() as $value_23) { + $values_23[] = $value_23; } - $value_46 = $values_23; + $data['ConsoleSize'] = $values_23; } - if (is_null($data->{'SecurityOpt'})) { - $value_46 = $data->{'SecurityOpt'}; + if ($object->isInitialized('isolation') && null !== $object->getIsolation()) { + $data['Isolation'] = $object->getIsolation(); } - $object->setSecurityOpt($value_46); + return $data; } - if (property_exists($data, 'LogConfig')) { - $object->setLogConfig($this->serializer->denormalize($data->{'LogConfig'}, 'Docker\\API\\Model\\LogConfig', 'raw', $context)); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\HostConfig::class => false]; } - if (property_exists($data, 'CgroupParent')) { - $object->setCgroupParent($data->{'CgroupParent'}); - } - if (property_exists($data, 'VolumeDriver')) { - $object->setVolumeDriver($data->{'VolumeDriver'}); + } +} else { + class HostConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\HostConfig::class; } - if (property_exists($data, 'ShmSize')) { - $object->setShmSize($data->{'ShmSize'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\HostConfig::class; } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - $value = $object->getBinds(); - if (is_array($object->getBinds())) { - $values = []; - foreach ($object->getBinds() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getBinds())) { - $value = $object->getBinds(); - } - $data->{'Binds'} = $value; - $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_4 = $object->getLinks(); - } - $data->{'Links'} = $value_4; - $value_6 = $object->getLxcConf(); - if (is_object($object->getLxcConf())) { - $values_3 = new \stdClass(); - foreach ($object->getLxcConf() as $key_1 => $value_7) { - $values_3->{$key_1} = $value_7; - } - $value_6 = $values_3; - } - if (is_null($object->getLxcConf())) { - $value_6 = $object->getLxcConf(); - } - $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(); - } - if (null !== $object->getCpusetMems()) { - $data->{'CpusetMems'} = $object->getCpusetMems(); - } - if (null !== $object->getMaximumIOps()) { - $data->{'MaximumIOps'} = $object->getMaximumIOps(); - } - if (null !== $object->getMaximumIOBps()) { - $data->{'MaximumIOBps'} = $object->getMaximumIOBps(); - } - if (null !== $object->getBlkioWeight()) { - $data->{'BlkioWeight'} = $object->getBlkioWeight(); - } - $value_8 = $object->getBlkioWeightDevice(); - if (is_array($object->getBlkioWeightDevice())) { - $values_4 = []; - foreach ($object->getBlkioWeightDevice() as $value_9) { - $values_4[] = $value_9; + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $value_8 = $values_4; - } - if (is_null($object->getBlkioWeightDevice())) { - $value_8 = $object->getBlkioWeightDevice(); - } - $data->{'BlkioWeightDevice'} = $value_8; - $value_10 = $object->getBlkioDeviceReadBps(); - if (is_array($object->getBlkioDeviceReadBps())) { - $values_5 = []; - foreach ($object->getBlkioDeviceReadBps() as $value_11) { - $values_5[] = $value_11; - } - $value_10 = $values_5; - } - if (is_null($object->getBlkioDeviceReadBps())) { - $value_10 = $object->getBlkioDeviceReadBps(); - } - $data->{'BlkioDeviceReadBps'} = $value_10; - $value_12 = $object->getBlkioDeviceReadIOps(); - if (is_array($object->getBlkioDeviceReadIOps())) { - $values_6 = []; - foreach ($object->getBlkioDeviceReadIOps() as $value_13) { - $values_6[] = $value_13; - } - $value_12 = $values_6; - } - if (is_null($object->getBlkioDeviceReadIOps())) { - $value_12 = $object->getBlkioDeviceReadIOps(); - } - $data->{'BlkioDeviceReadIOps'} = $value_12; - $value_14 = $object->getBlkioDeviceWriteBps(); - if (is_array($object->getBlkioDeviceWriteBps())) { - $values_7 = []; - foreach ($object->getBlkioDeviceWriteBps() as $value_15) { - $values_7[] = $value_15; - } - $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[] = $value_17; - } - $value_16 = $values_8; - } - if (is_null($object->getBlkioDeviceWriteIOps())) { - $value_16 = $object->getBlkioDeviceWriteIOps(); - } - $data->{'BlkioDeviceWriteIOps'} = $value_16; - if (null !== $object->getMemorySwappiness()) { - $data->{'MemorySwappiness'} = $object->getMemorySwappiness(); - } - if (null !== $object->getOomKillDisable()) { - $data->{'OomKillDisable'} = $object->getOomKillDisable(); - } - if (null !== $object->getOomScoreAdj()) { - $data->{'OomScoreAdj'} = $object->getOomScoreAdj(); - } - if (null !== $object->getPidsLimit()) { - $data->{'PidsLimit'} = $object->getPidsLimit(); - } - $value_18 = $object->getPortBindings(); - if (is_object($object->getPortBindings())) { - $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[] = $value_21; - } - $value_20 = $values_10; - } - if (is_null($value_19)) { - $value_20 = $value_19; - } - $values_9->{$key_2} = $value_20; - } - $value_18 = $values_9; - } - if (is_null($object->getPortBindings())) { - $value_18 = $object->getPortBindings(); - } - $data->{'PortBindings'} = $value_18; - if (null !== $object->getPublishAllPorts()) { - $data->{'PublishAllPorts'} = $object->getPublishAllPorts(); - } - if (null !== $object->getPrivileged()) { - $data->{'Privileged'} = $object->getPrivileged(); - } - if (null !== $object->getReadonlyRootfs()) { - $data->{'ReadonlyRootfs'} = $object->getReadonlyRootfs(); - } - $value_22 = $object->getSysctls(); - if (is_object($object->getSysctls())) { - $values_11 = new \stdClass(); - foreach ($object->getSysctls() as $key_3 => $value_23) { - $values_11->{$key_3} = $value_23; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); } - $value_22 = $values_11; - } - if (is_null($object->getSysctls())) { - $value_22 = $object->getSysctls(); - } - $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->getStorageOpt())) { - $value_24 = $object->getStorageOpt(); - } - $data->{'StorageOpt'} = $value_24; - $value_26 = $object->getDns(); - if (is_array($object->getDns())) { - $values_13 = []; - foreach ($object->getDns() as $value_27) { - $values_13[] = $value_27; - } - $value_26 = $values_13; - } - if (is_null($object->getDns())) { - $value_26 = $object->getDns(); - } - $data->{'Dns'} = $value_26; - $value_28 = $object->getDnsOptions(); - if (is_array($object->getDnsOptions())) { - $values_14 = []; - foreach ($object->getDnsOptions() as $value_29) { - $values_14[] = $value_29; - } - $value_28 = $values_14; - } - if (is_null($object->getDnsOptions())) { - $value_28 = $object->getDnsOptions(); - } - $data->{'DnsOptions'} = $value_28; - $value_30 = $object->getDnsSearch(); - if (is_array($object->getDnsSearch())) { - $values_15 = []; - foreach ($object->getDnsSearch() as $value_31) { - $values_15[] = $value_31; - } - $value_30 = $values_15; - } - if (is_null($object->getDnsSearch())) { - $value_30 = $object->getDnsSearch(); - } - $data->{'DnsSearch'} = $value_30; - $value_32 = $object->getExtraHosts(); - if (is_array($object->getExtraHosts())) { - $values_16 = []; - foreach ($object->getExtraHosts() as $value_33) { - $values_16[] = $value_33; - } - $value_32 = $values_16; - } - if (is_null($object->getExtraHosts())) { - $value_32 = $object->getExtraHosts(); - } - $data->{'ExtraHosts'} = $value_32; - $value_34 = $object->getVolumesFrom(); - if (is_array($object->getVolumesFrom())) { - $values_17 = []; - foreach ($object->getVolumesFrom() as $value_35) { - $values_17[] = $value_35; - } - $value_34 = $values_17; - } - if (is_null($object->getVolumesFrom())) { - $value_34 = $object->getVolumesFrom(); - } - $data->{'VolumesFrom'} = $value_34; - $value_36 = $object->getCapAdd(); - if (is_array($object->getCapAdd())) { - $values_18 = []; - foreach ($object->getCapAdd() as $value_37) { - $values_18[] = $value_37; - } - $value_36 = $values_18; - } - if (is_null($object->getCapAdd())) { - $value_36 = $object->getCapAdd(); - } - $data->{'CapAdd'} = $value_36; - $value_38 = $object->getCapDrop(); - if (is_array($object->getCapDrop())) { - $values_19 = []; - 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_40 = $object->getGroupAdd(); - } - $data->{'GroupAdd'} = $value_40; - if (null !== $object->getRestartPolicy()) { - $data->{'RestartPolicy'} = json_decode($this->serializer->normalize($object->getRestartPolicy(), 'raw', $context)); - } - if (null !== $object->getUsernsMode()) { - $data->{'UsernsMode'} = $object->getUsernsMode(); - } - if (null !== $object->getNetworkMode()) { - $data->{'NetworkMode'} = $object->getNetworkMode(); - } - $value_42 = $object->getDevices(); - if (is_array($object->getDevices())) { - $values_21 = []; - foreach ($object->getDevices() as $value_43) { - $values_21[] = $this->serializer->normalize($value_43, 'raw', $context); + $object = new \Docker\API\Model\HostConfig(); + if (null === $data || false === \is_array($data)) { + return $object; } - $value_42 = $values_21; - } - if (is_null($object->getDevices())) { - $value_42 = $object->getDevices(); - } - $data->{'Devices'} = $value_42; - $value_44 = $object->getUlimits(); - if (is_array($object->getUlimits())) { - $values_22 = []; - foreach ($object->getUlimits() as $value_45) { - $values_22[] = $this->serializer->normalize($value_45, 'raw', $context); - } - $value_44 = $values_22; - } - if (is_null($object->getUlimits())) { - $value_44 = $object->getUlimits(); - } - $data->{'Ulimits'} = $value_44; - $value_46 = $object->getSecurityOpt(); - if (is_array($object->getSecurityOpt())) { - $values_23 = []; - foreach ($object->getSecurityOpt() as $value_47) { - $values_23[] = $value_47; - } - $value_46 = $values_23; - } - if (is_null($object->getSecurityOpt())) { - $value_46 = $object->getSecurityOpt(); - } - $data->{'SecurityOpt'} = $value_46; - if (null !== $object->getLogConfig()) { - $data->{'LogConfig'} = json_decode($this->serializer->normalize($object->getLogConfig(), 'raw', $context)); - } - if (null !== $object->getCgroupParent()) { - $data->{'CgroupParent'} = $object->getCgroupParent(); + if (\array_key_exists('CpuShares', $data) && $data['CpuShares'] !== null) { + $object->setCpuShares($data['CpuShares']); + } + elseif (\array_key_exists('CpuShares', $data) && $data['CpuShares'] === null) { + $object->setCpuShares(null); + } + if (\array_key_exists('Memory', $data) && $data['Memory'] !== null) { + $object->setMemory($data['Memory']); + } + elseif (\array_key_exists('Memory', $data) && $data['Memory'] === null) { + $object->setMemory(null); + } + if (\array_key_exists('CgroupParent', $data) && $data['CgroupParent'] !== null) { + $object->setCgroupParent($data['CgroupParent']); + } + elseif (\array_key_exists('CgroupParent', $data) && $data['CgroupParent'] === null) { + $object->setCgroupParent(null); + } + if (\array_key_exists('BlkioWeight', $data) && $data['BlkioWeight'] !== null) { + $object->setBlkioWeight($data['BlkioWeight']); + } + elseif (\array_key_exists('BlkioWeight', $data) && $data['BlkioWeight'] === null) { + $object->setBlkioWeight(null); + } + if (\array_key_exists('BlkioWeightDevice', $data) && $data['BlkioWeightDevice'] !== null) { + $values = []; + foreach ($data['BlkioWeightDevice'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class, 'json', $context); + } + $object->setBlkioWeightDevice($values); + } + elseif (\array_key_exists('BlkioWeightDevice', $data) && $data['BlkioWeightDevice'] === null) { + $object->setBlkioWeightDevice(null); + } + if (\array_key_exists('BlkioDeviceReadBps', $data) && $data['BlkioDeviceReadBps'] !== null) { + $values_1 = []; + foreach ($data['BlkioDeviceReadBps'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceReadBps($values_1); + } + elseif (\array_key_exists('BlkioDeviceReadBps', $data) && $data['BlkioDeviceReadBps'] === null) { + $object->setBlkioDeviceReadBps(null); + } + if (\array_key_exists('BlkioDeviceWriteBps', $data) && $data['BlkioDeviceWriteBps'] !== null) { + $values_2 = []; + foreach ($data['BlkioDeviceWriteBps'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceWriteBps($values_2); + } + elseif (\array_key_exists('BlkioDeviceWriteBps', $data) && $data['BlkioDeviceWriteBps'] === null) { + $object->setBlkioDeviceWriteBps(null); + } + if (\array_key_exists('BlkioDeviceReadIOps', $data) && $data['BlkioDeviceReadIOps'] !== null) { + $values_3 = []; + foreach ($data['BlkioDeviceReadIOps'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceReadIOps($values_3); + } + elseif (\array_key_exists('BlkioDeviceReadIOps', $data) && $data['BlkioDeviceReadIOps'] === null) { + $object->setBlkioDeviceReadIOps(null); + } + if (\array_key_exists('BlkioDeviceWriteIOps', $data) && $data['BlkioDeviceWriteIOps'] !== null) { + $values_4 = []; + foreach ($data['BlkioDeviceWriteIOps'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceWriteIOps($values_4); + } + elseif (\array_key_exists('BlkioDeviceWriteIOps', $data) && $data['BlkioDeviceWriteIOps'] === null) { + $object->setBlkioDeviceWriteIOps(null); + } + if (\array_key_exists('CpuPeriod', $data) && $data['CpuPeriod'] !== null) { + $object->setCpuPeriod($data['CpuPeriod']); + } + elseif (\array_key_exists('CpuPeriod', $data) && $data['CpuPeriod'] === null) { + $object->setCpuPeriod(null); + } + if (\array_key_exists('CpuQuota', $data) && $data['CpuQuota'] !== null) { + $object->setCpuQuota($data['CpuQuota']); + } + elseif (\array_key_exists('CpuQuota', $data) && $data['CpuQuota'] === null) { + $object->setCpuQuota(null); + } + if (\array_key_exists('CpuRealtimePeriod', $data) && $data['CpuRealtimePeriod'] !== null) { + $object->setCpuRealtimePeriod($data['CpuRealtimePeriod']); + } + elseif (\array_key_exists('CpuRealtimePeriod', $data) && $data['CpuRealtimePeriod'] === null) { + $object->setCpuRealtimePeriod(null); + } + if (\array_key_exists('CpuRealtimeRuntime', $data) && $data['CpuRealtimeRuntime'] !== null) { + $object->setCpuRealtimeRuntime($data['CpuRealtimeRuntime']); + } + elseif (\array_key_exists('CpuRealtimeRuntime', $data) && $data['CpuRealtimeRuntime'] === null) { + $object->setCpuRealtimeRuntime(null); + } + if (\array_key_exists('CpusetCpus', $data) && $data['CpusetCpus'] !== null) { + $object->setCpusetCpus($data['CpusetCpus']); + } + elseif (\array_key_exists('CpusetCpus', $data) && $data['CpusetCpus'] === null) { + $object->setCpusetCpus(null); + } + if (\array_key_exists('CpusetMems', $data) && $data['CpusetMems'] !== null) { + $object->setCpusetMems($data['CpusetMems']); + } + elseif (\array_key_exists('CpusetMems', $data) && $data['CpusetMems'] === null) { + $object->setCpusetMems(null); + } + if (\array_key_exists('Devices', $data) && $data['Devices'] !== null) { + $values_5 = []; + foreach ($data['Devices'] as $value_5) { + $values_5[] = $this->denormalizer->denormalize($value_5, \Docker\API\Model\DeviceMapping::class, 'json', $context); + } + $object->setDevices($values_5); + } + elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { + $object->setDevices(null); + } + if (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] !== null) { + $object->setDiskQuota($data['DiskQuota']); + } + elseif (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] === null) { + $object->setDiskQuota(null); + } + if (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] !== null) { + $object->setKernelMemory($data['KernelMemory']); + } + elseif (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] === null) { + $object->setKernelMemory(null); + } + if (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] !== null) { + $object->setMemoryReservation($data['MemoryReservation']); + } + elseif (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] === null) { + $object->setMemoryReservation(null); + } + if (\array_key_exists('MemorySwap', $data) && $data['MemorySwap'] !== null) { + $object->setMemorySwap($data['MemorySwap']); + } + elseif (\array_key_exists('MemorySwap', $data) && $data['MemorySwap'] === null) { + $object->setMemorySwap(null); + } + if (\array_key_exists('MemorySwappiness', $data) && $data['MemorySwappiness'] !== null) { + $object->setMemorySwappiness($data['MemorySwappiness']); + } + elseif (\array_key_exists('MemorySwappiness', $data) && $data['MemorySwappiness'] === null) { + $object->setMemorySwappiness(null); + } + if (\array_key_exists('NanoCpus', $data) && $data['NanoCpus'] !== null) { + $object->setNanoCpus($data['NanoCpus']); + } + elseif (\array_key_exists('NanoCpus', $data) && $data['NanoCpus'] === null) { + $object->setNanoCpus(null); + } + if (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] !== null) { + $object->setOomKillDisable($data['OomKillDisable']); + } + elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { + $object->setOomKillDisable(null); + } + if (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] !== null) { + $object->setPidsLimit($data['PidsLimit']); + } + elseif (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] === null) { + $object->setPidsLimit(null); + } + if (\array_key_exists('Ulimits', $data) && $data['Ulimits'] !== null) { + $values_6 = []; + foreach ($data['Ulimits'] as $value_6) { + $values_6[] = $this->denormalizer->denormalize($value_6, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); + } + $object->setUlimits($values_6); + } + elseif (\array_key_exists('Ulimits', $data) && $data['Ulimits'] === null) { + $object->setUlimits(null); + } + if (\array_key_exists('CpuCount', $data) && $data['CpuCount'] !== null) { + $object->setCpuCount($data['CpuCount']); + } + elseif (\array_key_exists('CpuCount', $data) && $data['CpuCount'] === null) { + $object->setCpuCount(null); + } + if (\array_key_exists('CpuPercent', $data) && $data['CpuPercent'] !== null) { + $object->setCpuPercent($data['CpuPercent']); + } + elseif (\array_key_exists('CpuPercent', $data) && $data['CpuPercent'] === null) { + $object->setCpuPercent(null); + } + if (\array_key_exists('IOMaximumIOps', $data) && $data['IOMaximumIOps'] !== null) { + $object->setIOMaximumIOps($data['IOMaximumIOps']); + } + elseif (\array_key_exists('IOMaximumIOps', $data) && $data['IOMaximumIOps'] === null) { + $object->setIOMaximumIOps(null); + } + if (\array_key_exists('IOMaximumBandwidth', $data) && $data['IOMaximumBandwidth'] !== null) { + $object->setIOMaximumBandwidth($data['IOMaximumBandwidth']); + } + elseif (\array_key_exists('IOMaximumBandwidth', $data) && $data['IOMaximumBandwidth'] === null) { + $object->setIOMaximumBandwidth(null); + } + if (\array_key_exists('Binds', $data) && $data['Binds'] !== null) { + $values_7 = []; + foreach ($data['Binds'] as $value_7) { + $values_7[] = $value_7; + } + $object->setBinds($values_7); + } + elseif (\array_key_exists('Binds', $data) && $data['Binds'] === null) { + $object->setBinds(null); + } + if (\array_key_exists('ContainerIDFile', $data) && $data['ContainerIDFile'] !== null) { + $object->setContainerIDFile($data['ContainerIDFile']); + } + elseif (\array_key_exists('ContainerIDFile', $data) && $data['ContainerIDFile'] === null) { + $object->setContainerIDFile(null); + } + if (\array_key_exists('LogConfig', $data) && $data['LogConfig'] !== null) { + $object->setLogConfig($this->denormalizer->denormalize($data['LogConfig'], \Docker\API\Model\HostConfigLogConfig::class, 'json', $context)); + } + elseif (\array_key_exists('LogConfig', $data) && $data['LogConfig'] === null) { + $object->setLogConfig(null); + } + if (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] !== null) { + $object->setNetworkMode($data['NetworkMode']); + } + elseif (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] === null) { + $object->setNetworkMode(null); + } + if (\array_key_exists('PortBindings', $data) && $data['PortBindings'] !== null) { + $values_8 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['PortBindings'] as $key => $value_8) { + $values_8[$key] = $this->denormalizer->denormalize($value_8, \Docker\API\Model\HostConfigPortBindingsItem::class, 'json', $context); + } + $object->setPortBindings($values_8); + } + elseif (\array_key_exists('PortBindings', $data) && $data['PortBindings'] === null) { + $object->setPortBindings(null); + } + if (\array_key_exists('RestartPolicy', $data) && $data['RestartPolicy'] !== null) { + $object->setRestartPolicy($this->denormalizer->denormalize($data['RestartPolicy'], \Docker\API\Model\RestartPolicy::class, 'json', $context)); + } + elseif (\array_key_exists('RestartPolicy', $data) && $data['RestartPolicy'] === null) { + $object->setRestartPolicy(null); + } + if (\array_key_exists('AutoRemove', $data) && $data['AutoRemove'] !== null) { + $object->setAutoRemove($data['AutoRemove']); + } + elseif (\array_key_exists('AutoRemove', $data) && $data['AutoRemove'] === null) { + $object->setAutoRemove(null); + } + if (\array_key_exists('VolumeDriver', $data) && $data['VolumeDriver'] !== null) { + $object->setVolumeDriver($data['VolumeDriver']); + } + elseif (\array_key_exists('VolumeDriver', $data) && $data['VolumeDriver'] === null) { + $object->setVolumeDriver(null); + } + if (\array_key_exists('VolumesFrom', $data) && $data['VolumesFrom'] !== null) { + $values_9 = []; + foreach ($data['VolumesFrom'] as $value_9) { + $values_9[] = $value_9; + } + $object->setVolumesFrom($values_9); + } + elseif (\array_key_exists('VolumesFrom', $data) && $data['VolumesFrom'] === null) { + $object->setVolumesFrom(null); + } + if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { + $values_10 = []; + foreach ($data['Mounts'] as $value_10) { + $values_10[] = $this->denormalizer->denormalize($value_10, \Docker\API\Model\Mount::class, 'json', $context); + } + $object->setMounts($values_10); + } + elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { + $object->setMounts(null); + } + if (\array_key_exists('CapAdd', $data) && $data['CapAdd'] !== null) { + $values_11 = []; + foreach ($data['CapAdd'] as $value_11) { + $values_11[] = $value_11; + } + $object->setCapAdd($values_11); + } + elseif (\array_key_exists('CapAdd', $data) && $data['CapAdd'] === null) { + $object->setCapAdd(null); + } + if (\array_key_exists('CapDrop', $data) && $data['CapDrop'] !== null) { + $values_12 = []; + foreach ($data['CapDrop'] as $value_12) { + $values_12[] = $value_12; + } + $object->setCapDrop($values_12); + } + elseif (\array_key_exists('CapDrop', $data) && $data['CapDrop'] === null) { + $object->setCapDrop(null); + } + if (\array_key_exists('Dns', $data) && $data['Dns'] !== null) { + $values_13 = []; + foreach ($data['Dns'] as $value_13) { + $values_13[] = $value_13; + } + $object->setDns($values_13); + } + elseif (\array_key_exists('Dns', $data) && $data['Dns'] === null) { + $object->setDns(null); + } + if (\array_key_exists('DnsOptions', $data) && $data['DnsOptions'] !== null) { + $values_14 = []; + foreach ($data['DnsOptions'] as $value_14) { + $values_14[] = $value_14; + } + $object->setDnsOptions($values_14); + } + elseif (\array_key_exists('DnsOptions', $data) && $data['DnsOptions'] === null) { + $object->setDnsOptions(null); + } + if (\array_key_exists('DnsSearch', $data) && $data['DnsSearch'] !== null) { + $values_15 = []; + foreach ($data['DnsSearch'] as $value_15) { + $values_15[] = $value_15; + } + $object->setDnsSearch($values_15); + } + elseif (\array_key_exists('DnsSearch', $data) && $data['DnsSearch'] === null) { + $object->setDnsSearch(null); + } + if (\array_key_exists('ExtraHosts', $data) && $data['ExtraHosts'] !== null) { + $values_16 = []; + foreach ($data['ExtraHosts'] as $value_16) { + $values_16[] = $value_16; + } + $object->setExtraHosts($values_16); + } + elseif (\array_key_exists('ExtraHosts', $data) && $data['ExtraHosts'] === null) { + $object->setExtraHosts(null); + } + if (\array_key_exists('GroupAdd', $data) && $data['GroupAdd'] !== null) { + $values_17 = []; + foreach ($data['GroupAdd'] as $value_17) { + $values_17[] = $value_17; + } + $object->setGroupAdd($values_17); + } + elseif (\array_key_exists('GroupAdd', $data) && $data['GroupAdd'] === null) { + $object->setGroupAdd(null); + } + if (\array_key_exists('IpcMode', $data) && $data['IpcMode'] !== null) { + $object->setIpcMode($data['IpcMode']); + } + elseif (\array_key_exists('IpcMode', $data) && $data['IpcMode'] === null) { + $object->setIpcMode(null); + } + if (\array_key_exists('Cgroup', $data) && $data['Cgroup'] !== null) { + $object->setCgroup($data['Cgroup']); + } + elseif (\array_key_exists('Cgroup', $data) && $data['Cgroup'] === null) { + $object->setCgroup(null); + } + if (\array_key_exists('Links', $data) && $data['Links'] !== null) { + $values_18 = []; + foreach ($data['Links'] as $value_18) { + $values_18[] = $value_18; + } + $object->setLinks($values_18); + } + elseif (\array_key_exists('Links', $data) && $data['Links'] === null) { + $object->setLinks(null); + } + if (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] !== null) { + $object->setOomScoreAdj($data['OomScoreAdj']); + } + elseif (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] === null) { + $object->setOomScoreAdj(null); + } + if (\array_key_exists('PidMode', $data) && $data['PidMode'] !== null) { + $object->setPidMode($data['PidMode']); + } + elseif (\array_key_exists('PidMode', $data) && $data['PidMode'] === null) { + $object->setPidMode(null); + } + if (\array_key_exists('Privileged', $data) && $data['Privileged'] !== null) { + $object->setPrivileged($data['Privileged']); + } + elseif (\array_key_exists('Privileged', $data) && $data['Privileged'] === null) { + $object->setPrivileged(null); + } + if (\array_key_exists('PublishAllPorts', $data) && $data['PublishAllPorts'] !== null) { + $object->setPublishAllPorts($data['PublishAllPorts']); + } + elseif (\array_key_exists('PublishAllPorts', $data) && $data['PublishAllPorts'] === null) { + $object->setPublishAllPorts(null); + } + if (\array_key_exists('ReadonlyRootfs', $data) && $data['ReadonlyRootfs'] !== null) { + $object->setReadonlyRootfs($data['ReadonlyRootfs']); + } + elseif (\array_key_exists('ReadonlyRootfs', $data) && $data['ReadonlyRootfs'] === null) { + $object->setReadonlyRootfs(null); + } + if (\array_key_exists('SecurityOpt', $data) && $data['SecurityOpt'] !== null) { + $values_19 = []; + foreach ($data['SecurityOpt'] as $value_19) { + $values_19[] = $value_19; + } + $object->setSecurityOpt($values_19); + } + elseif (\array_key_exists('SecurityOpt', $data) && $data['SecurityOpt'] === null) { + $object->setSecurityOpt(null); + } + if (\array_key_exists('StorageOpt', $data) && $data['StorageOpt'] !== null) { + $values_20 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['StorageOpt'] as $key_1 => $value_20) { + $values_20[$key_1] = $value_20; + } + $object->setStorageOpt($values_20); + } + elseif (\array_key_exists('StorageOpt', $data) && $data['StorageOpt'] === null) { + $object->setStorageOpt(null); + } + if (\array_key_exists('Tmpfs', $data) && $data['Tmpfs'] !== null) { + $values_21 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Tmpfs'] as $key_2 => $value_21) { + $values_21[$key_2] = $value_21; + } + $object->setTmpfs($values_21); + } + elseif (\array_key_exists('Tmpfs', $data) && $data['Tmpfs'] === null) { + $object->setTmpfs(null); + } + if (\array_key_exists('UTSMode', $data) && $data['UTSMode'] !== null) { + $object->setUTSMode($data['UTSMode']); + } + elseif (\array_key_exists('UTSMode', $data) && $data['UTSMode'] === null) { + $object->setUTSMode(null); + } + if (\array_key_exists('UsernsMode', $data) && $data['UsernsMode'] !== null) { + $object->setUsernsMode($data['UsernsMode']); + } + elseif (\array_key_exists('UsernsMode', $data) && $data['UsernsMode'] === null) { + $object->setUsernsMode(null); + } + if (\array_key_exists('ShmSize', $data) && $data['ShmSize'] !== null) { + $object->setShmSize($data['ShmSize']); + } + elseif (\array_key_exists('ShmSize', $data) && $data['ShmSize'] === null) { + $object->setShmSize(null); + } + if (\array_key_exists('Sysctls', $data) && $data['Sysctls'] !== null) { + $values_22 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Sysctls'] as $key_3 => $value_22) { + $values_22[$key_3] = $value_22; + } + $object->setSysctls($values_22); + } + elseif (\array_key_exists('Sysctls', $data) && $data['Sysctls'] === null) { + $object->setSysctls(null); + } + if (\array_key_exists('Runtime', $data) && $data['Runtime'] !== null) { + $object->setRuntime($data['Runtime']); + } + elseif (\array_key_exists('Runtime', $data) && $data['Runtime'] === null) { + $object->setRuntime(null); + } + if (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] !== null) { + $values_23 = []; + foreach ($data['ConsoleSize'] as $value_23) { + $values_23[] = $value_23; + } + $object->setConsoleSize($values_23); + } + elseif (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] === null) { + $object->setConsoleSize(null); + } + if (\array_key_exists('Isolation', $data) && $data['Isolation'] !== null) { + $object->setIsolation($data['Isolation']); + } + elseif (\array_key_exists('Isolation', $data) && $data['Isolation'] === null) { + $object->setIsolation(null); + } + return $object; } - if (null !== $object->getVolumeDriver()) { - $data->{'VolumeDriver'} = $object->getVolumeDriver(); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('cpuShares') && null !== $object->getCpuShares()) { + $data['CpuShares'] = $object->getCpuShares(); + } + if ($object->isInitialized('memory') && null !== $object->getMemory()) { + $data['Memory'] = $object->getMemory(); + } + if ($object->isInitialized('cgroupParent') && null !== $object->getCgroupParent()) { + $data['CgroupParent'] = $object->getCgroupParent(); + } + if ($object->isInitialized('blkioWeight') && null !== $object->getBlkioWeight()) { + $data['BlkioWeight'] = $object->getBlkioWeight(); + } + if ($object->isInitialized('blkioWeightDevice') && null !== $object->getBlkioWeightDevice()) { + $values = []; + foreach ($object->getBlkioWeightDevice() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['BlkioWeightDevice'] = $values; + } + if ($object->isInitialized('blkioDeviceReadBps') && null !== $object->getBlkioDeviceReadBps()) { + $values_1 = []; + foreach ($object->getBlkioDeviceReadBps() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['BlkioDeviceReadBps'] = $values_1; + } + if ($object->isInitialized('blkioDeviceWriteBps') && null !== $object->getBlkioDeviceWriteBps()) { + $values_2 = []; + foreach ($object->getBlkioDeviceWriteBps() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['BlkioDeviceWriteBps'] = $values_2; + } + if ($object->isInitialized('blkioDeviceReadIOps') && null !== $object->getBlkioDeviceReadIOps()) { + $values_3 = []; + foreach ($object->getBlkioDeviceReadIOps() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['BlkioDeviceReadIOps'] = $values_3; + } + if ($object->isInitialized('blkioDeviceWriteIOps') && null !== $object->getBlkioDeviceWriteIOps()) { + $values_4 = []; + foreach ($object->getBlkioDeviceWriteIOps() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['BlkioDeviceWriteIOps'] = $values_4; + } + if ($object->isInitialized('cpuPeriod') && null !== $object->getCpuPeriod()) { + $data['CpuPeriod'] = $object->getCpuPeriod(); + } + if ($object->isInitialized('cpuQuota') && null !== $object->getCpuQuota()) { + $data['CpuQuota'] = $object->getCpuQuota(); + } + if ($object->isInitialized('cpuRealtimePeriod') && null !== $object->getCpuRealtimePeriod()) { + $data['CpuRealtimePeriod'] = $object->getCpuRealtimePeriod(); + } + if ($object->isInitialized('cpuRealtimeRuntime') && null !== $object->getCpuRealtimeRuntime()) { + $data['CpuRealtimeRuntime'] = $object->getCpuRealtimeRuntime(); + } + if ($object->isInitialized('cpusetCpus') && null !== $object->getCpusetCpus()) { + $data['CpusetCpus'] = $object->getCpusetCpus(); + } + if ($object->isInitialized('cpusetMems') && null !== $object->getCpusetMems()) { + $data['CpusetMems'] = $object->getCpusetMems(); + } + if ($object->isInitialized('devices') && null !== $object->getDevices()) { + $values_5 = []; + foreach ($object->getDevices() as $value_5) { + $values_5[] = $this->normalizer->normalize($value_5, 'json', $context); + } + $data['Devices'] = $values_5; + } + if ($object->isInitialized('diskQuota') && null !== $object->getDiskQuota()) { + $data['DiskQuota'] = $object->getDiskQuota(); + } + if ($object->isInitialized('kernelMemory') && null !== $object->getKernelMemory()) { + $data['KernelMemory'] = $object->getKernelMemory(); + } + if ($object->isInitialized('memoryReservation') && null !== $object->getMemoryReservation()) { + $data['MemoryReservation'] = $object->getMemoryReservation(); + } + if ($object->isInitialized('memorySwap') && null !== $object->getMemorySwap()) { + $data['MemorySwap'] = $object->getMemorySwap(); + } + if ($object->isInitialized('memorySwappiness') && null !== $object->getMemorySwappiness()) { + $data['MemorySwappiness'] = $object->getMemorySwappiness(); + } + if ($object->isInitialized('nanoCpus') && null !== $object->getNanoCpus()) { + $data['NanoCpus'] = $object->getNanoCpus(); + } + if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { + $data['OomKillDisable'] = $object->getOomKillDisable(); + } + if ($object->isInitialized('pidsLimit') && null !== $object->getPidsLimit()) { + $data['PidsLimit'] = $object->getPidsLimit(); + } + if ($object->isInitialized('ulimits') && null !== $object->getUlimits()) { + $values_6 = []; + foreach ($object->getUlimits() as $value_6) { + $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + } + $data['Ulimits'] = $values_6; + } + if ($object->isInitialized('cpuCount') && null !== $object->getCpuCount()) { + $data['CpuCount'] = $object->getCpuCount(); + } + if ($object->isInitialized('cpuPercent') && null !== $object->getCpuPercent()) { + $data['CpuPercent'] = $object->getCpuPercent(); + } + if ($object->isInitialized('iOMaximumIOps') && null !== $object->getIOMaximumIOps()) { + $data['IOMaximumIOps'] = $object->getIOMaximumIOps(); + } + if ($object->isInitialized('iOMaximumBandwidth') && null !== $object->getIOMaximumBandwidth()) { + $data['IOMaximumBandwidth'] = $object->getIOMaximumBandwidth(); + } + if ($object->isInitialized('binds') && null !== $object->getBinds()) { + $values_7 = []; + foreach ($object->getBinds() as $value_7) { + $values_7[] = $value_7; + } + $data['Binds'] = $values_7; + } + if ($object->isInitialized('containerIDFile') && null !== $object->getContainerIDFile()) { + $data['ContainerIDFile'] = $object->getContainerIDFile(); + } + if ($object->isInitialized('logConfig') && null !== $object->getLogConfig()) { + $data['LogConfig'] = $this->normalizer->normalize($object->getLogConfig(), 'json', $context); + } + if ($object->isInitialized('networkMode') && null !== $object->getNetworkMode()) { + $data['NetworkMode'] = $object->getNetworkMode(); + } + if ($object->isInitialized('portBindings') && null !== $object->getPortBindings()) { + $values_8 = []; + foreach ($object->getPortBindings() as $key => $value_8) { + $values_8[$key] = $this->normalizer->normalize($value_8, 'json', $context); + } + $data['PortBindings'] = $values_8; + } + if ($object->isInitialized('restartPolicy') && null !== $object->getRestartPolicy()) { + $data['RestartPolicy'] = $this->normalizer->normalize($object->getRestartPolicy(), 'json', $context); + } + if ($object->isInitialized('autoRemove') && null !== $object->getAutoRemove()) { + $data['AutoRemove'] = $object->getAutoRemove(); + } + if ($object->isInitialized('volumeDriver') && null !== $object->getVolumeDriver()) { + $data['VolumeDriver'] = $object->getVolumeDriver(); + } + if ($object->isInitialized('volumesFrom') && null !== $object->getVolumesFrom()) { + $values_9 = []; + foreach ($object->getVolumesFrom() as $value_9) { + $values_9[] = $value_9; + } + $data['VolumesFrom'] = $values_9; + } + if ($object->isInitialized('mounts') && null !== $object->getMounts()) { + $values_10 = []; + foreach ($object->getMounts() as $value_10) { + $values_10[] = $this->normalizer->normalize($value_10, 'json', $context); + } + $data['Mounts'] = $values_10; + } + if ($object->isInitialized('capAdd') && null !== $object->getCapAdd()) { + $values_11 = []; + foreach ($object->getCapAdd() as $value_11) { + $values_11[] = $value_11; + } + $data['CapAdd'] = $values_11; + } + if ($object->isInitialized('capDrop') && null !== $object->getCapDrop()) { + $values_12 = []; + foreach ($object->getCapDrop() as $value_12) { + $values_12[] = $value_12; + } + $data['CapDrop'] = $values_12; + } + if ($object->isInitialized('dns') && null !== $object->getDns()) { + $values_13 = []; + foreach ($object->getDns() as $value_13) { + $values_13[] = $value_13; + } + $data['Dns'] = $values_13; + } + if ($object->isInitialized('dnsOptions') && null !== $object->getDnsOptions()) { + $values_14 = []; + foreach ($object->getDnsOptions() as $value_14) { + $values_14[] = $value_14; + } + $data['DnsOptions'] = $values_14; + } + if ($object->isInitialized('dnsSearch') && null !== $object->getDnsSearch()) { + $values_15 = []; + foreach ($object->getDnsSearch() as $value_15) { + $values_15[] = $value_15; + } + $data['DnsSearch'] = $values_15; + } + if ($object->isInitialized('extraHosts') && null !== $object->getExtraHosts()) { + $values_16 = []; + foreach ($object->getExtraHosts() as $value_16) { + $values_16[] = $value_16; + } + $data['ExtraHosts'] = $values_16; + } + if ($object->isInitialized('groupAdd') && null !== $object->getGroupAdd()) { + $values_17 = []; + foreach ($object->getGroupAdd() as $value_17) { + $values_17[] = $value_17; + } + $data['GroupAdd'] = $values_17; + } + if ($object->isInitialized('ipcMode') && null !== $object->getIpcMode()) { + $data['IpcMode'] = $object->getIpcMode(); + } + if ($object->isInitialized('cgroup') && null !== $object->getCgroup()) { + $data['Cgroup'] = $object->getCgroup(); + } + if ($object->isInitialized('links') && null !== $object->getLinks()) { + $values_18 = []; + foreach ($object->getLinks() as $value_18) { + $values_18[] = $value_18; + } + $data['Links'] = $values_18; + } + if ($object->isInitialized('oomScoreAdj') && null !== $object->getOomScoreAdj()) { + $data['OomScoreAdj'] = $object->getOomScoreAdj(); + } + if ($object->isInitialized('pidMode') && null !== $object->getPidMode()) { + $data['PidMode'] = $object->getPidMode(); + } + if ($object->isInitialized('privileged') && null !== $object->getPrivileged()) { + $data['Privileged'] = $object->getPrivileged(); + } + if ($object->isInitialized('publishAllPorts') && null !== $object->getPublishAllPorts()) { + $data['PublishAllPorts'] = $object->getPublishAllPorts(); + } + if ($object->isInitialized('readonlyRootfs') && null !== $object->getReadonlyRootfs()) { + $data['ReadonlyRootfs'] = $object->getReadonlyRootfs(); + } + if ($object->isInitialized('securityOpt') && null !== $object->getSecurityOpt()) { + $values_19 = []; + foreach ($object->getSecurityOpt() as $value_19) { + $values_19[] = $value_19; + } + $data['SecurityOpt'] = $values_19; + } + if ($object->isInitialized('storageOpt') && null !== $object->getStorageOpt()) { + $values_20 = []; + foreach ($object->getStorageOpt() as $key_1 => $value_20) { + $values_20[$key_1] = $value_20; + } + $data['StorageOpt'] = $values_20; + } + if ($object->isInitialized('tmpfs') && null !== $object->getTmpfs()) { + $values_21 = []; + foreach ($object->getTmpfs() as $key_2 => $value_21) { + $values_21[$key_2] = $value_21; + } + $data['Tmpfs'] = $values_21; + } + if ($object->isInitialized('uTSMode') && null !== $object->getUTSMode()) { + $data['UTSMode'] = $object->getUTSMode(); + } + if ($object->isInitialized('usernsMode') && null !== $object->getUsernsMode()) { + $data['UsernsMode'] = $object->getUsernsMode(); + } + if ($object->isInitialized('shmSize') && null !== $object->getShmSize()) { + $data['ShmSize'] = $object->getShmSize(); + } + if ($object->isInitialized('sysctls') && null !== $object->getSysctls()) { + $values_22 = []; + foreach ($object->getSysctls() as $key_3 => $value_22) { + $values_22[$key_3] = $value_22; + } + $data['Sysctls'] = $values_22; + } + if ($object->isInitialized('runtime') && null !== $object->getRuntime()) { + $data['Runtime'] = $object->getRuntime(); + } + if ($object->isInitialized('consoleSize') && null !== $object->getConsoleSize()) { + $values_23 = []; + foreach ($object->getConsoleSize() as $value_23) { + $values_23[] = $value_23; + } + $data['ConsoleSize'] = $values_23; + } + if ($object->isInitialized('isolation') && null !== $object->getIsolation()) { + $data['Isolation'] = $object->getIsolation(); + } + return $data; } - if (null !== $object->getShmSize()) { - $data->{'ShmSize'} = $object->getShmSize(); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\HostConfig::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/HostConfigPortBindingsItemNormalizer.php b/generated/Normalizer/HostConfigPortBindingsItemNormalizer.php new file mode 100644 index 000000000..fea68518d --- /dev/null +++ b/generated/Normalizer/HostConfigPortBindingsItemNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class HostConfigPortBindingsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\HostConfigPortBindingsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\HostConfigPortBindingsItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\HostConfigPortBindingsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('HostIp', $data) && $data['HostIp'] !== null) { + $object->setHostIp($data['HostIp']); + } + elseif (\array_key_exists('HostIp', $data) && $data['HostIp'] === null) { + $object->setHostIp(null); + } + if (\array_key_exists('HostPort', $data) && $data['HostPort'] !== null) { + $object->setHostPort($data['HostPort']); + } + elseif (\array_key_exists('HostPort', $data) && $data['HostPort'] === null) { + $object->setHostPort(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('hostIp') && null !== $object->getHostIp()) { + $data['HostIp'] = $object->getHostIp(); + } + if ($object->isInitialized('hostPort') && null !== $object->getHostPort()) { + $data['HostPort'] = $object->getHostPort(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\HostConfigPortBindingsItem::class => false]; + } + } +} else { + class HostConfigPortBindingsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\HostConfigPortBindingsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\HostConfigPortBindingsItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\HostConfigPortBindingsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('HostIp', $data) && $data['HostIp'] !== null) { + $object->setHostIp($data['HostIp']); + } + elseif (\array_key_exists('HostIp', $data) && $data['HostIp'] === null) { + $object->setHostIp(null); + } + if (\array_key_exists('HostPort', $data) && $data['HostPort'] !== null) { + $object->setHostPort($data['HostPort']); + } + elseif (\array_key_exists('HostPort', $data) && $data['HostPort'] === null) { + $object->setHostPort(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('hostIp') && null !== $object->getHostIp()) { + $data['HostIp'] = $object->getHostIp(); + } + if ($object->isInitialized('hostPort') && null !== $object->getHostPort()) { + $data['HostPort'] = $object->getHostPort(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\HostConfigPortBindingsItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/IPAMConfigNormalizer.php b/generated/Normalizer/IPAMConfigNormalizer.php deleted file mode 100644 index f9fcaad45..000000000 --- a/generated/Normalizer/IPAMConfigNormalizer.php +++ /dev/null @@ -1,69 +0,0 @@ -setSubnet($data->{'Subnet'}); - } - if (property_exists($data, 'IPRange')) { - $object->setIPRange($data->{'IPRange'}); - } - if (property_exists($data, 'Gateway')) { - $object->setGateway($data->{'Gateway'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getSubnet()) { - $data->{'Subnet'} = $object->getSubnet(); - } - if (null !== $object->getIPRange()) { - $data->{'IPRange'} = $object->getIPRange(); - } - if (null !== $object->getGateway()) { - $data->{'Gateway'} = $object->getGateway(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/IPAMNormalizer.php b/generated/Normalizer/IPAMNormalizer.php index 87eef1f52..58c6c7c3d 100644 --- a/generated/Normalizer/IPAMNormalizer.php +++ b/generated/Normalizer/IPAMNormalizer.php @@ -2,108 +2,217 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class IPAMNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class IPAMNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($type !== 'Docker\\API\\Model\\IPAM') { - return false; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\IPAM::class; } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\IPAM) { - return true; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\IPAM::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\IPAM(); - if (property_exists($data, 'Driver')) { - $object->setDriver($data->{'Driver'}); - } - if (property_exists($data, 'Config')) { - $value = $data->{'Config'}; - if (is_array($data->{'Config'})) { + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\IPAM(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('Config', $data) && $data['Config'] !== null) { $values = []; - foreach ($data->{'Config'} as $value_1) { - $values[] = $this->serializer->denormalize($value_1, 'Docker\\API\\Model\\IPAMConfig', 'raw', $context); + foreach ($data['Config'] as $value) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value as $key => $value_1) { + $values_1[$key] = $value_1; + } + $values[] = $values_1; + } + $object->setConfig($values); + } + elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { + $object->setConfig(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values_2 = []; + foreach ($data['Options'] as $value_2) { + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value_2 as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $values_2[] = $values_3; } - $value = $values; + $object->setOptions($values_2); } - if (is_null($data->{'Config'})) { - $value = $data->{'Config'}; + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); } - $object->setConfig($value); + return $object; } - if (property_exists($data, 'Options')) { - $value_2 = $data->{'Options'}; - if (is_object($data->{'Options'})) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Options'} as $key => $value_3) { - $values_1[$key] = $value_3; + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('config') && null !== $object->getConfig()) { + $values = []; + foreach ($object->getConfig() as $value) { + $values_1 = []; + foreach ($value as $key => $value_1) { + $values_1[$key] = $value_1; + } + $values[] = $values_1; } - $value_2 = $values_1; + $data['Config'] = $values; } - if (is_null($data->{'Options'})) { - $value_2 = $data->{'Options'}; + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values_2 = []; + foreach ($object->getOptions() as $value_2) { + $values_3 = []; + foreach ($value_2 as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $values_2[] = $values_3; + } + $data['Options'] = $values_2; } - $object->setOptions($value_2); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\IPAM::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class IPAMNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getDriver()) { - $data->{'Driver'} = $object->getDriver(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\IPAM::class; } - $value = $object->getConfig(); - if (is_array($object->getConfig())) { - $values = []; - foreach ($object->getConfig() as $value_1) { - $values[] = $value_1; - } - $value = $values; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\IPAM::class; } - if (is_null($object->getConfig())) { - $value = $object->getConfig(); + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\IPAM(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('Config', $data) && $data['Config'] !== null) { + $values = []; + foreach ($data['Config'] as $value) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value as $key => $value_1) { + $values_1[$key] = $value_1; + } + $values[] = $values_1; + } + $object->setConfig($values); + } + elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { + $object->setConfig(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values_2 = []; + foreach ($data['Options'] as $value_2) { + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value_2 as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $values_2[] = $values_3; + } + $object->setOptions($values_2); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; } - $data->{'Config'} = $value; - $value_2 = $object->getOptions(); - if (is_object($object->getOptions())) { - $values_1 = new \stdClass(); - foreach ($object->getOptions() as $key => $value_3) { - $values_1->{$key} = $value_3; - } - $value_2 = $values_1; + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('config') && null !== $object->getConfig()) { + $values = []; + foreach ($object->getConfig() as $value) { + $values_1 = []; + foreach ($value as $key => $value_1) { + $values_1[$key] = $value_1; + } + $values[] = $values_1; + } + $data['Config'] = $values; + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values_2 = []; + foreach ($object->getOptions() as $value_2) { + $values_3 = []; + foreach ($value_2 as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $values_2[] = $values_3; + } + $data['Options'] = $values_2; + } + return $data; } - if (is_null($object->getOptions())) { - $value_2 = $object->getOptions(); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\IPAM::class => false]; } - $data->{'Options'} = $value_2; - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/IdResponseNormalizer.php b/generated/Normalizer/IdResponseNormalizer.php new file mode 100644 index 000000000..e26599891 --- /dev/null +++ b/generated/Normalizer/IdResponseNormalizer.php @@ -0,0 +1,114 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class IdResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\IdResponse::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\IdResponse::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\IdResponse(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Id'] = $object->getId(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\IdResponse::class => false]; + } + } +} else { + class IdResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\IdResponse::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\IdResponse::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\IdResponse(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Id'] = $object->getId(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\IdResponse::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ImageDeleteResponseNormalizer.php b/generated/Normalizer/ImageDeleteResponseNormalizer.php new file mode 100644 index 000000000..606a518da --- /dev/null +++ b/generated/Normalizer/ImageDeleteResponseNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ImageDeleteResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageDeleteResponse::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageDeleteResponse::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageDeleteResponse(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Untagged', $data) && $data['Untagged'] !== null) { + $object->setUntagged($data['Untagged']); + } + elseif (\array_key_exists('Untagged', $data) && $data['Untagged'] === null) { + $object->setUntagged(null); + } + if (\array_key_exists('Deleted', $data) && $data['Deleted'] !== null) { + $object->setDeleted($data['Deleted']); + } + elseif (\array_key_exists('Deleted', $data) && $data['Deleted'] === null) { + $object->setDeleted(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('untagged') && null !== $object->getUntagged()) { + $data['Untagged'] = $object->getUntagged(); + } + if ($object->isInitialized('deleted') && null !== $object->getDeleted()) { + $data['Deleted'] = $object->getDeleted(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageDeleteResponse::class => false]; + } + } +} else { + class ImageDeleteResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageDeleteResponse::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageDeleteResponse::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageDeleteResponse(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Untagged', $data) && $data['Untagged'] !== null) { + $object->setUntagged($data['Untagged']); + } + elseif (\array_key_exists('Untagged', $data) && $data['Untagged'] === null) { + $object->setUntagged(null); + } + if (\array_key_exists('Deleted', $data) && $data['Deleted'] !== null) { + $object->setDeleted($data['Deleted']); + } + elseif (\array_key_exists('Deleted', $data) && $data['Deleted'] === null) { + $object->setDeleted(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('untagged') && null !== $object->getUntagged()) { + $data['Untagged'] = $object->getUntagged(); + } + if ($object->isInitialized('deleted') && null !== $object->getDeleted()) { + $data['Deleted'] = $object->getDeleted(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageDeleteResponse::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ImageHistoryItemNormalizer.php b/generated/Normalizer/ImageHistoryItemNormalizer.php deleted file mode 100644 index b4df6ec75..000000000 --- a/generated/Normalizer/ImageHistoryItemNormalizer.php +++ /dev/null @@ -1,107 +0,0 @@ -setId($data->{'Id'}); - } - if (property_exists($data, 'Created')) { - $object->setCreated($data->{'Created'}); - } - if (property_exists($data, 'CreatedBy')) { - $object->setCreatedBy($data->{'CreatedBy'}); - } - if (property_exists($data, 'Tags')) { - $value = $data->{'Tags'}; - if (is_array($data->{'Tags'})) { - $values = []; - foreach ($data->{'Tags'} as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Tags'})) { - $value = $data->{'Tags'}; - } - $object->setTags($value); - } - if (property_exists($data, 'Size')) { - $object->setSize($data->{'Size'}); - } - if (property_exists($data, 'Comment')) { - $object->setComment($data->{'Comment'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getId()) { - $data->{'Id'} = $object->getId(); - } - if (null !== $object->getCreated()) { - $data->{'Created'} = $object->getCreated(); - } - if (null !== $object->getCreatedBy()) { - $data->{'CreatedBy'} = $object->getCreatedBy(); - } - $value = $object->getTags(); - if (is_array($object->getTags())) { - $values = []; - foreach ($object->getTags() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getTags())) { - $value = $object->getTags(); - } - $data->{'Tags'} = $value; - if (null !== $object->getSize()) { - $data->{'Size'} = $object->getSize(); - } - if (null !== $object->getComment()) { - $data->{'Comment'} = $object->getComment(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ImageItemNormalizer.php b/generated/Normalizer/ImageItemNormalizer.php deleted file mode 100644 index c1ca6f139..000000000 --- a/generated/Normalizer/ImageItemNormalizer.php +++ /dev/null @@ -1,159 +0,0 @@ -{'RepoTags'}; - if (is_array($data->{'RepoTags'})) { - $values = []; - foreach ($data->{'RepoTags'} as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($data->{'RepoTags'})) { - $value = $data->{'RepoTags'}; - } - $object->setRepoTags($value); - } - if (property_exists($data, 'Id')) { - $object->setId($data->{'Id'}); - } - if (property_exists($data, 'ParentId')) { - $object->setParentId($data->{'ParentId'}); - } - if (property_exists($data, 'Created')) { - $object->setCreated($data->{'Created'}); - } - if (property_exists($data, 'Size')) { - $object->setSize($data->{'Size'}); - } - if (property_exists($data, 'VirtualSize')) { - $object->setVirtualSize($data->{'VirtualSize'}); - } - if (property_exists($data, 'Labels')) { - $value_2 = $data->{'Labels'}; - if (is_object($data->{'Labels'})) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Labels'} as $key => $value_3) { - $values_1[$key] = $value_3; - } - $value_2 = $values_1; - } - if (is_null($data->{'Labels'})) { - $value_2 = $data->{'Labels'}; - } - $object->setLabels($value_2); - } - if (property_exists($data, 'RepoDigests')) { - $value_4 = $data->{'RepoDigests'}; - if (is_array($data->{'RepoDigests'})) { - $values_2 = []; - foreach ($data->{'RepoDigests'} as $value_5) { - $values_2[] = $value_5; - } - $value_4 = $values_2; - } - if (is_null($data->{'RepoDigests'})) { - $value_4 = $data->{'RepoDigests'}; - } - $object->setRepoDigests($value_4); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - $value = $object->getRepoTags(); - if (is_array($object->getRepoTags())) { - $values = []; - foreach ($object->getRepoTags() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getRepoTags())) { - $value = $object->getRepoTags(); - } - $data->{'RepoTags'} = $value; - if (null !== $object->getId()) { - $data->{'Id'} = $object->getId(); - } - if (null !== $object->getParentId()) { - $data->{'ParentId'} = $object->getParentId(); - } - if (null !== $object->getCreated()) { - $data->{'Created'} = $object->getCreated(); - } - if (null !== $object->getSize()) { - $data->{'Size'} = $object->getSize(); - } - if (null !== $object->getVirtualSize()) { - $data->{'VirtualSize'} = $object->getVirtualSize(); - } - $value_2 = $object->getLabels(); - if (is_object($object->getLabels())) { - $values_1 = new \stdClass(); - foreach ($object->getLabels() as $key => $value_3) { - $values_1->{$key} = $value_3; - } - $value_2 = $values_1; - } - if (is_null($object->getLabels())) { - $value_2 = $object->getLabels(); - } - $data->{'Labels'} = $value_2; - $value_4 = $object->getRepoDigests(); - if (is_array($object->getRepoDigests())) { - $values_2 = []; - foreach ($object->getRepoDigests() as $value_5) { - $values_2[] = $value_5; - } - $value_4 = $values_2; - } - if (is_null($object->getRepoDigests())) { - $value_4 = $object->getRepoDigests(); - } - $data->{'RepoDigests'} = $value_4; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ImageNormalizer.php b/generated/Normalizer/ImageNormalizer.php index 5a093583f..59705261b 100644 --- a/generated/Normalizer/ImageNormalizer.php +++ b/generated/Normalizer/ImageNormalizer.php @@ -2,186 +2,437 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class ImageNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\Image') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\Image) { - return true; - } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $object = new \Docker\API\Model\Image(); - if (property_exists($data, 'Id')) { - $object->setId($data->{'Id'}); - } - if (property_exists($data, 'Container')) { - $object->setContainer($data->{'Container'}); - } - if (property_exists($data, 'Comment')) { - $object->setComment($data->{'Comment'}); - } - if (property_exists($data, 'Os')) { - $object->setOs($data->{'Os'}); - } - if (property_exists($data, 'Architecture')) { - $object->setArchitecture($data->{'Architecture'}); - } - if (property_exists($data, 'Parent')) { - $object->setParent($data->{'Parent'}); - } - if (property_exists($data, 'ContainerConfig')) { - $object->setContainerConfig($this->serializer->denormalize($data->{'ContainerConfig'}, 'Docker\\API\\Model\\ContainerConfig', 'raw', $context)); - } - if (property_exists($data, 'DockerVersion')) { - $object->setDockerVersion($data->{'DockerVersion'}); - } - if (property_exists($data, 'VirtualSize')) { - $object->setVirtualSize($data->{'VirtualSize'}); - } - if (property_exists($data, 'Size')) { - $object->setSize($data->{'Size'}); - } - if (property_exists($data, 'Author')) { - $object->setAuthor($data->{'Author'}); - } - if (property_exists($data, 'Created')) { - $object->setCreated($data->{'Created'}); - } - if (property_exists($data, 'GraphDriver')) { - $object->setGraphDriver($this->serializer->denormalize($data->{'GraphDriver'}, 'Docker\\API\\Model\\GraphDriver', 'raw', $context)); - } - if (property_exists($data, 'RepoDigests')) { - $value = $data->{'RepoDigests'}; - if (is_array($data->{'RepoDigests'})) { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Image::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Image::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Image(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('RepoTags', $data) && $data['RepoTags'] !== null) { $values = []; - foreach ($data->{'RepoDigests'} as $value_1) { - $values[] = $value_1; + foreach ($data['RepoTags'] as $value) { + $values[] = $value; + } + $object->setRepoTags($values); + } + elseif (\array_key_exists('RepoTags', $data) && $data['RepoTags'] === null) { + $object->setRepoTags(null); + } + if (\array_key_exists('RepoDigests', $data) && $data['RepoDigests'] !== null) { + $values_1 = []; + foreach ($data['RepoDigests'] as $value_1) { + $values_1[] = $value_1; } - $value = $values; + $object->setRepoDigests($values_1); + } + elseif (\array_key_exists('RepoDigests', $data) && $data['RepoDigests'] === null) { + $object->setRepoDigests(null); + } + if (\array_key_exists('Parent', $data) && $data['Parent'] !== null) { + $object->setParent($data['Parent']); + } + elseif (\array_key_exists('Parent', $data) && $data['Parent'] === null) { + $object->setParent(null); } - if (is_null($data->{'RepoDigests'})) { - $value = $data->{'RepoDigests'}; + if (\array_key_exists('Comment', $data) && $data['Comment'] !== null) { + $object->setComment($data['Comment']); } - $object->setRepoDigests($value); + elseif (\array_key_exists('Comment', $data) && $data['Comment'] === null) { + $object->setComment(null); + } + if (\array_key_exists('Created', $data) && $data['Created'] !== null) { + $object->setCreated($data['Created']); + } + elseif (\array_key_exists('Created', $data) && $data['Created'] === null) { + $object->setCreated(null); + } + if (\array_key_exists('Container', $data) && $data['Container'] !== null) { + $object->setContainer($data['Container']); + } + elseif (\array_key_exists('Container', $data) && $data['Container'] === null) { + $object->setContainer(null); + } + if (\array_key_exists('ContainerConfig', $data) && $data['ContainerConfig'] !== null) { + $object->setContainerConfig($this->denormalizer->denormalize($data['ContainerConfig'], \Docker\API\Model\Config::class, 'json', $context)); + } + elseif (\array_key_exists('ContainerConfig', $data) && $data['ContainerConfig'] === null) { + $object->setContainerConfig(null); + } + if (\array_key_exists('DockerVersion', $data) && $data['DockerVersion'] !== null) { + $object->setDockerVersion($data['DockerVersion']); + } + elseif (\array_key_exists('DockerVersion', $data) && $data['DockerVersion'] === null) { + $object->setDockerVersion(null); + } + if (\array_key_exists('Author', $data) && $data['Author'] !== null) { + $object->setAuthor($data['Author']); + } + elseif (\array_key_exists('Author', $data) && $data['Author'] === null) { + $object->setAuthor(null); + } + if (\array_key_exists('Config', $data) && $data['Config'] !== null) { + $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\Config::class, 'json', $context)); + } + elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { + $object->setConfig(null); + } + if (\array_key_exists('Architecture', $data) && $data['Architecture'] !== null) { + $object->setArchitecture($data['Architecture']); + } + elseif (\array_key_exists('Architecture', $data) && $data['Architecture'] === null) { + $object->setArchitecture(null); + } + if (\array_key_exists('Os', $data) && $data['Os'] !== null) { + $object->setOs($data['Os']); + } + elseif (\array_key_exists('Os', $data) && $data['Os'] === null) { + $object->setOs(null); + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($data['Size']); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + if (\array_key_exists('VirtualSize', $data) && $data['VirtualSize'] !== null) { + $object->setVirtualSize($data['VirtualSize']); + } + elseif (\array_key_exists('VirtualSize', $data) && $data['VirtualSize'] === null) { + $object->setVirtualSize(null); + } + if (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] !== null) { + $object->setGraphDriver($this->denormalizer->denormalize($data['GraphDriver'], \Docker\API\Model\GraphDriver::class, 'json', $context)); + } + elseif (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] === null) { + $object->setGraphDriver(null); + } + if (\array_key_exists('RootFS', $data) && $data['RootFS'] !== null) { + $object->setRootFS($this->denormalizer->denormalize($data['RootFS'], \Docker\API\Model\ImageRootFS::class, 'json', $context)); + } + elseif (\array_key_exists('RootFS', $data) && $data['RootFS'] === null) { + $object->setRootFS(null); + } + return $object; } - if (property_exists($data, 'RepoTags')) { - $value_2 = $data->{'RepoTags'}; - if (is_array($data->{'RepoTags'})) { + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['Id'] = $object->getId(); + } + if ($object->isInitialized('repoTags') && null !== $object->getRepoTags()) { + $values = []; + foreach ($object->getRepoTags() as $value) { + $values[] = $value; + } + $data['RepoTags'] = $values; + } + if ($object->isInitialized('repoDigests') && null !== $object->getRepoDigests()) { $values_1 = []; - foreach ($data->{'RepoTags'} as $value_3) { - $values_1[] = $value_3; + foreach ($object->getRepoDigests() as $value_1) { + $values_1[] = $value_1; } - $value_2 = $values_1; + $data['RepoDigests'] = $values_1; + } + if ($object->isInitialized('parent') && null !== $object->getParent()) { + $data['Parent'] = $object->getParent(); + } + if ($object->isInitialized('comment') && null !== $object->getComment()) { + $data['Comment'] = $object->getComment(); + } + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['Created'] = $object->getCreated(); + } + if ($object->isInitialized('container') && null !== $object->getContainer()) { + $data['Container'] = $object->getContainer(); + } + if ($object->isInitialized('containerConfig') && null !== $object->getContainerConfig()) { + $data['ContainerConfig'] = $this->normalizer->normalize($object->getContainerConfig(), 'json', $context); + } + if ($object->isInitialized('dockerVersion') && null !== $object->getDockerVersion()) { + $data['DockerVersion'] = $object->getDockerVersion(); + } + if ($object->isInitialized('author') && null !== $object->getAuthor()) { + $data['Author'] = $object->getAuthor(); + } + if ($object->isInitialized('config') && null !== $object->getConfig()) { + $data['Config'] = $this->normalizer->normalize($object->getConfig(), 'json', $context); + } + if ($object->isInitialized('architecture') && null !== $object->getArchitecture()) { + $data['Architecture'] = $object->getArchitecture(); + } + if ($object->isInitialized('os') && null !== $object->getOs()) { + $data['Os'] = $object->getOs(); + } + if ($object->isInitialized('size') && null !== $object->getSize()) { + $data['Size'] = $object->getSize(); + } + if ($object->isInitialized('virtualSize') && null !== $object->getVirtualSize()) { + $data['VirtualSize'] = $object->getVirtualSize(); } - if (is_null($data->{'RepoTags'})) { - $value_2 = $data->{'RepoTags'}; + if ($object->isInitialized('graphDriver') && null !== $object->getGraphDriver()) { + $data['GraphDriver'] = $this->normalizer->normalize($object->getGraphDriver(), 'json', $context); } - $object->setRepoTags($value_2); + if ($object->isInitialized('rootFS') && null !== $object->getRootFS()) { + $data['RootFS'] = $this->normalizer->normalize($object->getRootFS(), 'json', $context); + } + return $data; } - if (property_exists($data, 'Config')) { - $object->setConfig($this->serializer->denormalize($data->{'Config'}, 'Docker\\API\\Model\\ContainerConfig', 'raw', $context)); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Image::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class ImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getId()) { - $data->{'Id'} = $object->getId(); - } - if (null !== $object->getContainer()) { - $data->{'Container'} = $object->getContainer(); - } - if (null !== $object->getComment()) { - $data->{'Comment'} = $object->getComment(); - } - if (null !== $object->getOs()) { - $data->{'Os'} = $object->getOs(); - } - if (null !== $object->getArchitecture()) { - $data->{'Architecture'} = $object->getArchitecture(); - } - if (null !== $object->getParent()) { - $data->{'Parent'} = $object->getParent(); - } - if (null !== $object->getContainerConfig()) { - $data->{'ContainerConfig'} = json_decode($this->serializer->normalize($object->getContainerConfig(), 'raw', $context)); - } - if (null !== $object->getDockerVersion()) { - $data->{'DockerVersion'} = $object->getDockerVersion(); - } - if (null !== $object->getVirtualSize()) { - $data->{'VirtualSize'} = $object->getVirtualSize(); - } - if (null !== $object->getSize()) { - $data->{'Size'} = $object->getSize(); - } - if (null !== $object->getAuthor()) { - $data->{'Author'} = $object->getAuthor(); - } - if (null !== $object->getCreated()) { - $data->{'Created'} = $object->getCreated(); - } - if (null !== $object->getGraphDriver()) { - $data->{'GraphDriver'} = json_decode($this->serializer->normalize($object->getGraphDriver(), 'raw', $context)); - } - $value = $object->getRepoDigests(); - if (is_array($object->getRepoDigests())) { - $values = []; - foreach ($object->getRepoDigests() as $value_1) { - $values[] = $value_1; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Image::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Image::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $value = $values; - } - if (is_null($object->getRepoDigests())) { - $value = $object->getRepoDigests(); - } - $data->{'RepoDigests'} = $value; - $value_2 = $object->getRepoTags(); - if (is_array($object->getRepoTags())) { - $values_1 = []; - foreach ($object->getRepoTags() as $value_3) { - $values_1[] = $value_3; - } - $value_2 = $values_1; - } - if (is_null($object->getRepoTags())) { - $value_2 = $object->getRepoTags(); + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Image(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('RepoTags', $data) && $data['RepoTags'] !== null) { + $values = []; + foreach ($data['RepoTags'] as $value) { + $values[] = $value; + } + $object->setRepoTags($values); + } + elseif (\array_key_exists('RepoTags', $data) && $data['RepoTags'] === null) { + $object->setRepoTags(null); + } + if (\array_key_exists('RepoDigests', $data) && $data['RepoDigests'] !== null) { + $values_1 = []; + foreach ($data['RepoDigests'] as $value_1) { + $values_1[] = $value_1; + } + $object->setRepoDigests($values_1); + } + elseif (\array_key_exists('RepoDigests', $data) && $data['RepoDigests'] === null) { + $object->setRepoDigests(null); + } + if (\array_key_exists('Parent', $data) && $data['Parent'] !== null) { + $object->setParent($data['Parent']); + } + elseif (\array_key_exists('Parent', $data) && $data['Parent'] === null) { + $object->setParent(null); + } + if (\array_key_exists('Comment', $data) && $data['Comment'] !== null) { + $object->setComment($data['Comment']); + } + elseif (\array_key_exists('Comment', $data) && $data['Comment'] === null) { + $object->setComment(null); + } + if (\array_key_exists('Created', $data) && $data['Created'] !== null) { + $object->setCreated($data['Created']); + } + elseif (\array_key_exists('Created', $data) && $data['Created'] === null) { + $object->setCreated(null); + } + if (\array_key_exists('Container', $data) && $data['Container'] !== null) { + $object->setContainer($data['Container']); + } + elseif (\array_key_exists('Container', $data) && $data['Container'] === null) { + $object->setContainer(null); + } + if (\array_key_exists('ContainerConfig', $data) && $data['ContainerConfig'] !== null) { + $object->setContainerConfig($this->denormalizer->denormalize($data['ContainerConfig'], \Docker\API\Model\Config::class, 'json', $context)); + } + elseif (\array_key_exists('ContainerConfig', $data) && $data['ContainerConfig'] === null) { + $object->setContainerConfig(null); + } + if (\array_key_exists('DockerVersion', $data) && $data['DockerVersion'] !== null) { + $object->setDockerVersion($data['DockerVersion']); + } + elseif (\array_key_exists('DockerVersion', $data) && $data['DockerVersion'] === null) { + $object->setDockerVersion(null); + } + if (\array_key_exists('Author', $data) && $data['Author'] !== null) { + $object->setAuthor($data['Author']); + } + elseif (\array_key_exists('Author', $data) && $data['Author'] === null) { + $object->setAuthor(null); + } + if (\array_key_exists('Config', $data) && $data['Config'] !== null) { + $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\Config::class, 'json', $context)); + } + elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { + $object->setConfig(null); + } + if (\array_key_exists('Architecture', $data) && $data['Architecture'] !== null) { + $object->setArchitecture($data['Architecture']); + } + elseif (\array_key_exists('Architecture', $data) && $data['Architecture'] === null) { + $object->setArchitecture(null); + } + if (\array_key_exists('Os', $data) && $data['Os'] !== null) { + $object->setOs($data['Os']); + } + elseif (\array_key_exists('Os', $data) && $data['Os'] === null) { + $object->setOs(null); + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($data['Size']); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + if (\array_key_exists('VirtualSize', $data) && $data['VirtualSize'] !== null) { + $object->setVirtualSize($data['VirtualSize']); + } + elseif (\array_key_exists('VirtualSize', $data) && $data['VirtualSize'] === null) { + $object->setVirtualSize(null); + } + if (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] !== null) { + $object->setGraphDriver($this->denormalizer->denormalize($data['GraphDriver'], \Docker\API\Model\GraphDriver::class, 'json', $context)); + } + elseif (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] === null) { + $object->setGraphDriver(null); + } + if (\array_key_exists('RootFS', $data) && $data['RootFS'] !== null) { + $object->setRootFS($this->denormalizer->denormalize($data['RootFS'], \Docker\API\Model\ImageRootFS::class, 'json', $context)); + } + elseif (\array_key_exists('RootFS', $data) && $data['RootFS'] === null) { + $object->setRootFS(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['Id'] = $object->getId(); + } + if ($object->isInitialized('repoTags') && null !== $object->getRepoTags()) { + $values = []; + foreach ($object->getRepoTags() as $value) { + $values[] = $value; + } + $data['RepoTags'] = $values; + } + if ($object->isInitialized('repoDigests') && null !== $object->getRepoDigests()) { + $values_1 = []; + foreach ($object->getRepoDigests() as $value_1) { + $values_1[] = $value_1; + } + $data['RepoDigests'] = $values_1; + } + if ($object->isInitialized('parent') && null !== $object->getParent()) { + $data['Parent'] = $object->getParent(); + } + if ($object->isInitialized('comment') && null !== $object->getComment()) { + $data['Comment'] = $object->getComment(); + } + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['Created'] = $object->getCreated(); + } + if ($object->isInitialized('container') && null !== $object->getContainer()) { + $data['Container'] = $object->getContainer(); + } + if ($object->isInitialized('containerConfig') && null !== $object->getContainerConfig()) { + $data['ContainerConfig'] = $this->normalizer->normalize($object->getContainerConfig(), 'json', $context); + } + if ($object->isInitialized('dockerVersion') && null !== $object->getDockerVersion()) { + $data['DockerVersion'] = $object->getDockerVersion(); + } + if ($object->isInitialized('author') && null !== $object->getAuthor()) { + $data['Author'] = $object->getAuthor(); + } + if ($object->isInitialized('config') && null !== $object->getConfig()) { + $data['Config'] = $this->normalizer->normalize($object->getConfig(), 'json', $context); + } + if ($object->isInitialized('architecture') && null !== $object->getArchitecture()) { + $data['Architecture'] = $object->getArchitecture(); + } + if ($object->isInitialized('os') && null !== $object->getOs()) { + $data['Os'] = $object->getOs(); + } + if ($object->isInitialized('size') && null !== $object->getSize()) { + $data['Size'] = $object->getSize(); + } + if ($object->isInitialized('virtualSize') && null !== $object->getVirtualSize()) { + $data['VirtualSize'] = $object->getVirtualSize(); + } + if ($object->isInitialized('graphDriver') && null !== $object->getGraphDriver()) { + $data['GraphDriver'] = $this->normalizer->normalize($object->getGraphDriver(), 'json', $context); + } + if ($object->isInitialized('rootFS') && null !== $object->getRootFS()) { + $data['RootFS'] = $this->normalizer->normalize($object->getRootFS(), 'json', $context); + } + return $data; } - $data->{'RepoTags'} = $value_2; - if (null !== $object->getConfig()) { - $data->{'Config'} = json_decode($this->serializer->normalize($object->getConfig(), 'raw', $context)); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Image::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/ImageRootFSNormalizer.php b/generated/Normalizer/ImageRootFSNormalizer.php new file mode 100644 index 000000000..646c54d0a --- /dev/null +++ b/generated/Normalizer/ImageRootFSNormalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ImageRootFSNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageRootFS::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageRootFS::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageRootFS(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Layers', $data) && $data['Layers'] !== null) { + $values = []; + foreach ($data['Layers'] as $value) { + $values[] = $value; + } + $object->setLayers($values); + } + elseif (\array_key_exists('Layers', $data) && $data['Layers'] === null) { + $object->setLayers(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('layers') && null !== $object->getLayers()) { + $values = []; + foreach ($object->getLayers() as $value) { + $values[] = $value; + } + $data['Layers'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageRootFS::class => false]; + } + } +} else { + class ImageRootFSNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageRootFS::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageRootFS::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageRootFS(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Layers', $data) && $data['Layers'] !== null) { + $values = []; + foreach ($data['Layers'] as $value) { + $values[] = $value; + } + $object->setLayers($values); + } + elseif (\array_key_exists('Layers', $data) && $data['Layers'] === null) { + $object->setLayers(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('layers') && null !== $object->getLayers()) { + $values = []; + foreach ($object->getLayers() as $value) { + $values[] = $value; + } + $data['Layers'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageRootFS::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ImageSearchResultNormalizer.php b/generated/Normalizer/ImageSearchResultNormalizer.php deleted file mode 100644 index 7d18e63ec..000000000 --- a/generated/Normalizer/ImageSearchResultNormalizer.php +++ /dev/null @@ -1,81 +0,0 @@ -setDescription($data->{'description'}); - } - if (property_exists($data, 'is_official')) { - $object->setIsOfficial($data->{'is_official'}); - } - if (property_exists($data, 'is_automated')) { - $object->setIsAutomated($data->{'is_automated'}); - } - if (property_exists($data, 'name')) { - $object->setName($data->{'name'}); - } - if (property_exists($data, 'star_count')) { - $object->setStarCount($data->{'star_count'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getDescription()) { - $data->{'description'} = $object->getDescription(); - } - if (null !== $object->getIsOfficial()) { - $data->{'is_official'} = $object->getIsOfficial(); - } - if (null !== $object->getIsAutomated()) { - $data->{'is_automated'} = $object->getIsAutomated(); - } - if (null !== $object->getName()) { - $data->{'name'} = $object->getName(); - } - if (null !== $object->getStarCount()) { - $data->{'star_count'} = $object->getStarCount(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ImageSummaryNormalizer.php b/generated/Normalizer/ImageSummaryNormalizer.php new file mode 100644 index 000000000..5d5cb2e8d --- /dev/null +++ b/generated/Normalizer/ImageSummaryNormalizer.php @@ -0,0 +1,288 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ImageSummaryNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageSummary::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageSummary::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageSummary(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('ParentId', $data) && $data['ParentId'] !== null) { + $object->setParentId($data['ParentId']); + } + elseif (\array_key_exists('ParentId', $data) && $data['ParentId'] === null) { + $object->setParentId(null); + } + if (\array_key_exists('RepoTags', $data) && $data['RepoTags'] !== null) { + $values = []; + foreach ($data['RepoTags'] as $value) { + $values[] = $value; + } + $object->setRepoTags($values); + } + elseif (\array_key_exists('RepoTags', $data) && $data['RepoTags'] === null) { + $object->setRepoTags(null); + } + if (\array_key_exists('RepoDigests', $data) && $data['RepoDigests'] !== null) { + $values_1 = []; + foreach ($data['RepoDigests'] as $value_1) { + $values_1[] = $value_1; + } + $object->setRepoDigests($values_1); + } + elseif (\array_key_exists('RepoDigests', $data) && $data['RepoDigests'] === null) { + $object->setRepoDigests(null); + } + if (\array_key_exists('Created', $data) && $data['Created'] !== null) { + $object->setCreated($data['Created']); + } + elseif (\array_key_exists('Created', $data) && $data['Created'] === null) { + $object->setCreated(null); + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($data['Size']); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + if (\array_key_exists('SharedSize', $data) && $data['SharedSize'] !== null) { + $object->setSharedSize($data['SharedSize']); + } + elseif (\array_key_exists('SharedSize', $data) && $data['SharedSize'] === null) { + $object->setSharedSize(null); + } + if (\array_key_exists('VirtualSize', $data) && $data['VirtualSize'] !== null) { + $object->setVirtualSize($data['VirtualSize']); + } + elseif (\array_key_exists('VirtualSize', $data) && $data['VirtualSize'] === null) { + $object->setVirtualSize(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value_2) { + $values_2[$key] = $value_2; + } + $object->setLabels($values_2); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { + $object->setContainers($data['Containers']); + } + elseif (\array_key_exists('Containers', $data) && $data['Containers'] === null) { + $object->setContainers(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Id'] = $object->getId(); + $data['ParentId'] = $object->getParentId(); + $values = []; + foreach ($object->getRepoTags() as $value) { + $values[] = $value; + } + $data['RepoTags'] = $values; + $values_1 = []; + foreach ($object->getRepoDigests() as $value_1) { + $values_1[] = $value_1; + } + $data['RepoDigests'] = $values_1; + $data['Created'] = $object->getCreated(); + $data['Size'] = $object->getSize(); + $data['SharedSize'] = $object->getSharedSize(); + $data['VirtualSize'] = $object->getVirtualSize(); + $values_2 = []; + foreach ($object->getLabels() as $key => $value_2) { + $values_2[$key] = $value_2; + } + $data['Labels'] = $values_2; + $data['Containers'] = $object->getContainers(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageSummary::class => false]; + } + } +} else { + class ImageSummaryNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageSummary::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageSummary::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageSummary(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('ParentId', $data) && $data['ParentId'] !== null) { + $object->setParentId($data['ParentId']); + } + elseif (\array_key_exists('ParentId', $data) && $data['ParentId'] === null) { + $object->setParentId(null); + } + if (\array_key_exists('RepoTags', $data) && $data['RepoTags'] !== null) { + $values = []; + foreach ($data['RepoTags'] as $value) { + $values[] = $value; + } + $object->setRepoTags($values); + } + elseif (\array_key_exists('RepoTags', $data) && $data['RepoTags'] === null) { + $object->setRepoTags(null); + } + if (\array_key_exists('RepoDigests', $data) && $data['RepoDigests'] !== null) { + $values_1 = []; + foreach ($data['RepoDigests'] as $value_1) { + $values_1[] = $value_1; + } + $object->setRepoDigests($values_1); + } + elseif (\array_key_exists('RepoDigests', $data) && $data['RepoDigests'] === null) { + $object->setRepoDigests(null); + } + if (\array_key_exists('Created', $data) && $data['Created'] !== null) { + $object->setCreated($data['Created']); + } + elseif (\array_key_exists('Created', $data) && $data['Created'] === null) { + $object->setCreated(null); + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($data['Size']); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + if (\array_key_exists('SharedSize', $data) && $data['SharedSize'] !== null) { + $object->setSharedSize($data['SharedSize']); + } + elseif (\array_key_exists('SharedSize', $data) && $data['SharedSize'] === null) { + $object->setSharedSize(null); + } + if (\array_key_exists('VirtualSize', $data) && $data['VirtualSize'] !== null) { + $object->setVirtualSize($data['VirtualSize']); + } + elseif (\array_key_exists('VirtualSize', $data) && $data['VirtualSize'] === null) { + $object->setVirtualSize(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value_2) { + $values_2[$key] = $value_2; + } + $object->setLabels($values_2); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { + $object->setContainers($data['Containers']); + } + elseif (\array_key_exists('Containers', $data) && $data['Containers'] === null) { + $object->setContainers(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Id'] = $object->getId(); + $data['ParentId'] = $object->getParentId(); + $values = []; + foreach ($object->getRepoTags() as $value) { + $values[] = $value; + } + $data['RepoTags'] = $values; + $values_1 = []; + foreach ($object->getRepoDigests() as $value_1) { + $values_1[] = $value_1; + } + $data['RepoDigests'] = $values_1; + $data['Created'] = $object->getCreated(); + $data['Size'] = $object->getSize(); + $data['SharedSize'] = $object->getSharedSize(); + $data['VirtualSize'] = $object->getVirtualSize(); + $values_2 = []; + foreach ($object->getLabels() as $key => $value_2) { + $values_2[$key] = $value_2; + } + $data['Labels'] = $values_2; + $data['Containers'] = $object->getContainers(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageSummary::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ImagesNameHistoryGetResponse200ItemNormalizer.php b/generated/Normalizer/ImagesNameHistoryGetResponse200ItemNormalizer.php new file mode 100644 index 000000000..4351b8ecd --- /dev/null +++ b/generated/Normalizer/ImagesNameHistoryGetResponse200ItemNormalizer.php @@ -0,0 +1,224 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ImagesNameHistoryGetResponse200ItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImagesNameHistoryGetResponse200Item::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImagesNameHistoryGetResponse200Item::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImagesNameHistoryGetResponse200Item(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('Created', $data) && $data['Created'] !== null) { + $object->setCreated($data['Created']); + } + elseif (\array_key_exists('Created', $data) && $data['Created'] === null) { + $object->setCreated(null); + } + if (\array_key_exists('CreatedBy', $data) && $data['CreatedBy'] !== null) { + $object->setCreatedBy($data['CreatedBy']); + } + elseif (\array_key_exists('CreatedBy', $data) && $data['CreatedBy'] === null) { + $object->setCreatedBy(null); + } + if (\array_key_exists('Tags', $data) && $data['Tags'] !== null) { + $values = []; + foreach ($data['Tags'] as $value) { + $values[] = $value; + } + $object->setTags($values); + } + elseif (\array_key_exists('Tags', $data) && $data['Tags'] === null) { + $object->setTags(null); + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($data['Size']); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + if (\array_key_exists('Comment', $data) && $data['Comment'] !== null) { + $object->setComment($data['Comment']); + } + elseif (\array_key_exists('Comment', $data) && $data['Comment'] === null) { + $object->setComment(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['Id'] = $object->getId(); + } + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['Created'] = $object->getCreated(); + } + if ($object->isInitialized('createdBy') && null !== $object->getCreatedBy()) { + $data['CreatedBy'] = $object->getCreatedBy(); + } + if ($object->isInitialized('tags') && null !== $object->getTags()) { + $values = []; + foreach ($object->getTags() as $value) { + $values[] = $value; + } + $data['Tags'] = $values; + } + if ($object->isInitialized('size') && null !== $object->getSize()) { + $data['Size'] = $object->getSize(); + } + if ($object->isInitialized('comment') && null !== $object->getComment()) { + $data['Comment'] = $object->getComment(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImagesNameHistoryGetResponse200Item::class => false]; + } + } +} else { + class ImagesNameHistoryGetResponse200ItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImagesNameHistoryGetResponse200Item::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImagesNameHistoryGetResponse200Item::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImagesNameHistoryGetResponse200Item(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('Created', $data) && $data['Created'] !== null) { + $object->setCreated($data['Created']); + } + elseif (\array_key_exists('Created', $data) && $data['Created'] === null) { + $object->setCreated(null); + } + if (\array_key_exists('CreatedBy', $data) && $data['CreatedBy'] !== null) { + $object->setCreatedBy($data['CreatedBy']); + } + elseif (\array_key_exists('CreatedBy', $data) && $data['CreatedBy'] === null) { + $object->setCreatedBy(null); + } + if (\array_key_exists('Tags', $data) && $data['Tags'] !== null) { + $values = []; + foreach ($data['Tags'] as $value) { + $values[] = $value; + } + $object->setTags($values); + } + elseif (\array_key_exists('Tags', $data) && $data['Tags'] === null) { + $object->setTags(null); + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($data['Size']); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + if (\array_key_exists('Comment', $data) && $data['Comment'] !== null) { + $object->setComment($data['Comment']); + } + elseif (\array_key_exists('Comment', $data) && $data['Comment'] === null) { + $object->setComment(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['Id'] = $object->getId(); + } + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['Created'] = $object->getCreated(); + } + if ($object->isInitialized('createdBy') && null !== $object->getCreatedBy()) { + $data['CreatedBy'] = $object->getCreatedBy(); + } + if ($object->isInitialized('tags') && null !== $object->getTags()) { + $values = []; + foreach ($object->getTags() as $value) { + $values[] = $value; + } + $data['Tags'] = $values; + } + if ($object->isInitialized('size') && null !== $object->getSize()) { + $data['Size'] = $object->getSize(); + } + if ($object->isInitialized('comment') && null !== $object->getComment()) { + $data['Comment'] = $object->getComment(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImagesNameHistoryGetResponse200Item::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ImagesPrunePostResponse200Normalizer.php b/generated/Normalizer/ImagesPrunePostResponse200Normalizer.php new file mode 100644 index 000000000..16486053e --- /dev/null +++ b/generated/Normalizer/ImagesPrunePostResponse200Normalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ImagesPrunePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImagesPrunePostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImagesPrunePostResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImagesPrunePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ImagesDeleted', $data) && $data['ImagesDeleted'] !== null) { + $values = []; + foreach ($data['ImagesDeleted'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ImageDeleteResponse::class, 'json', $context); + } + $object->setImagesDeleted($values); + } + elseif (\array_key_exists('ImagesDeleted', $data) && $data['ImagesDeleted'] === null) { + $object->setImagesDeleted(null); + } + if (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] !== null) { + $object->setSpaceReclaimed($data['SpaceReclaimed']); + } + elseif (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] === null) { + $object->setSpaceReclaimed(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('imagesDeleted') && null !== $object->getImagesDeleted()) { + $values = []; + foreach ($object->getImagesDeleted() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['ImagesDeleted'] = $values; + } + if ($object->isInitialized('spaceReclaimed') && null !== $object->getSpaceReclaimed()) { + $data['SpaceReclaimed'] = $object->getSpaceReclaimed(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImagesPrunePostResponse200::class => false]; + } + } +} else { + class ImagesPrunePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImagesPrunePostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImagesPrunePostResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImagesPrunePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ImagesDeleted', $data) && $data['ImagesDeleted'] !== null) { + $values = []; + foreach ($data['ImagesDeleted'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ImageDeleteResponse::class, 'json', $context); + } + $object->setImagesDeleted($values); + } + elseif (\array_key_exists('ImagesDeleted', $data) && $data['ImagesDeleted'] === null) { + $object->setImagesDeleted(null); + } + if (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] !== null) { + $object->setSpaceReclaimed($data['SpaceReclaimed']); + } + elseif (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] === null) { + $object->setSpaceReclaimed(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('imagesDeleted') && null !== $object->getImagesDeleted()) { + $values = []; + foreach ($object->getImagesDeleted() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['ImagesDeleted'] = $values; + } + if ($object->isInitialized('spaceReclaimed') && null !== $object->getSpaceReclaimed()) { + $data['SpaceReclaimed'] = $object->getSpaceReclaimed(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImagesPrunePostResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ImagesSearchGetResponse200ItemNormalizer.php b/generated/Normalizer/ImagesSearchGetResponse200ItemNormalizer.php new file mode 100644 index 000000000..e9ac04b75 --- /dev/null +++ b/generated/Normalizer/ImagesSearchGetResponse200ItemNormalizer.php @@ -0,0 +1,190 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ImagesSearchGetResponse200ItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImagesSearchGetResponse200Item::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImagesSearchGetResponse200Item::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImagesSearchGetResponse200Item(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('description', $data) && $data['description'] !== null) { + $object->setDescription($data['description']); + } + elseif (\array_key_exists('description', $data) && $data['description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('is_official', $data) && $data['is_official'] !== null) { + $object->setIsOfficial($data['is_official']); + } + elseif (\array_key_exists('is_official', $data) && $data['is_official'] === null) { + $object->setIsOfficial(null); + } + if (\array_key_exists('is_automated', $data) && $data['is_automated'] !== null) { + $object->setIsAutomated($data['is_automated']); + } + elseif (\array_key_exists('is_automated', $data) && $data['is_automated'] === null) { + $object->setIsAutomated(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + } + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + if (\array_key_exists('star_count', $data) && $data['star_count'] !== null) { + $object->setStarCount($data['star_count']); + } + elseif (\array_key_exists('star_count', $data) && $data['star_count'] === null) { + $object->setStarCount(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('description') && null !== $object->getDescription()) { + $data['description'] = $object->getDescription(); + } + if ($object->isInitialized('isOfficial') && null !== $object->getIsOfficial()) { + $data['is_official'] = $object->getIsOfficial(); + } + if ($object->isInitialized('isAutomated') && null !== $object->getIsAutomated()) { + $data['is_automated'] = $object->getIsAutomated(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if ($object->isInitialized('starCount') && null !== $object->getStarCount()) { + $data['star_count'] = $object->getStarCount(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImagesSearchGetResponse200Item::class => false]; + } + } +} else { + class ImagesSearchGetResponse200ItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImagesSearchGetResponse200Item::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImagesSearchGetResponse200Item::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImagesSearchGetResponse200Item(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('description', $data) && $data['description'] !== null) { + $object->setDescription($data['description']); + } + elseif (\array_key_exists('description', $data) && $data['description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('is_official', $data) && $data['is_official'] !== null) { + $object->setIsOfficial($data['is_official']); + } + elseif (\array_key_exists('is_official', $data) && $data['is_official'] === null) { + $object->setIsOfficial(null); + } + if (\array_key_exists('is_automated', $data) && $data['is_automated'] !== null) { + $object->setIsAutomated($data['is_automated']); + } + elseif (\array_key_exists('is_automated', $data) && $data['is_automated'] === null) { + $object->setIsAutomated(null); + } + if (\array_key_exists('name', $data) && $data['name'] !== null) { + $object->setName($data['name']); + } + elseif (\array_key_exists('name', $data) && $data['name'] === null) { + $object->setName(null); + } + if (\array_key_exists('star_count', $data) && $data['star_count'] !== null) { + $object->setStarCount($data['star_count']); + } + elseif (\array_key_exists('star_count', $data) && $data['star_count'] === null) { + $object->setStarCount(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('description') && null !== $object->getDescription()) { + $data['description'] = $object->getDescription(); + } + if ($object->isInitialized('isOfficial') && null !== $object->getIsOfficial()) { + $data['is_official'] = $object->getIsOfficial(); + } + if ($object->isInitialized('isAutomated') && null !== $object->getIsAutomated()) { + $data['is_automated'] = $object->getIsAutomated(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['name'] = $object->getName(); + } + if ($object->isInitialized('starCount') && null !== $object->getStarCount()) { + $data['star_count'] = $object->getStarCount(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImagesSearchGetResponse200Item::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/InfoGetResponse200Normalizer.php b/generated/Normalizer/InfoGetResponse200Normalizer.php new file mode 100644 index 000000000..d8e60bd41 --- /dev/null +++ b/generated/Normalizer/InfoGetResponse200Normalizer.php @@ -0,0 +1,918 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class InfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\InfoGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\InfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Architecture', $data) && $data['Architecture'] !== null) { + $object->setArchitecture($data['Architecture']); + } + elseif (\array_key_exists('Architecture', $data) && $data['Architecture'] === null) { + $object->setArchitecture(null); + } + if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { + $object->setContainers($data['Containers']); + } + elseif (\array_key_exists('Containers', $data) && $data['Containers'] === null) { + $object->setContainers(null); + } + if (\array_key_exists('ContainersRunning', $data) && $data['ContainersRunning'] !== null) { + $object->setContainersRunning($data['ContainersRunning']); + } + elseif (\array_key_exists('ContainersRunning', $data) && $data['ContainersRunning'] === null) { + $object->setContainersRunning(null); + } + if (\array_key_exists('ContainersStopped', $data) && $data['ContainersStopped'] !== null) { + $object->setContainersStopped($data['ContainersStopped']); + } + elseif (\array_key_exists('ContainersStopped', $data) && $data['ContainersStopped'] === null) { + $object->setContainersStopped(null); + } + if (\array_key_exists('ContainersPaused', $data) && $data['ContainersPaused'] !== null) { + $object->setContainersPaused($data['ContainersPaused']); + } + elseif (\array_key_exists('ContainersPaused', $data) && $data['ContainersPaused'] === null) { + $object->setContainersPaused(null); + } + if (\array_key_exists('CpuCfsPeriod', $data) && $data['CpuCfsPeriod'] !== null) { + $object->setCpuCfsPeriod($data['CpuCfsPeriod']); + } + elseif (\array_key_exists('CpuCfsPeriod', $data) && $data['CpuCfsPeriod'] === null) { + $object->setCpuCfsPeriod(null); + } + if (\array_key_exists('CpuCfsQuota', $data) && $data['CpuCfsQuota'] !== null) { + $object->setCpuCfsQuota($data['CpuCfsQuota']); + } + elseif (\array_key_exists('CpuCfsQuota', $data) && $data['CpuCfsQuota'] === null) { + $object->setCpuCfsQuota(null); + } + if (\array_key_exists('Debug', $data) && $data['Debug'] !== null) { + $object->setDebug($data['Debug']); + } + elseif (\array_key_exists('Debug', $data) && $data['Debug'] === null) { + $object->setDebug(null); + } + if (\array_key_exists('DiscoveryBackend', $data) && $data['DiscoveryBackend'] !== null) { + $object->setDiscoveryBackend($data['DiscoveryBackend']); + } + elseif (\array_key_exists('DiscoveryBackend', $data) && $data['DiscoveryBackend'] === null) { + $object->setDiscoveryBackend(null); + } + if (\array_key_exists('DockerRootDir', $data) && $data['DockerRootDir'] !== null) { + $object->setDockerRootDir($data['DockerRootDir']); + } + elseif (\array_key_exists('DockerRootDir', $data) && $data['DockerRootDir'] === null) { + $object->setDockerRootDir(null); + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('DriverStatus', $data) && $data['DriverStatus'] !== null) { + $values = []; + foreach ($data['DriverStatus'] as $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $value_1; + } + $values[] = $values_1; + } + $object->setDriverStatus($values); + } + elseif (\array_key_exists('DriverStatus', $data) && $data['DriverStatus'] === null) { + $object->setDriverStatus(null); + } + if (\array_key_exists('SystemStatus', $data) && $data['SystemStatus'] !== null) { + $values_2 = []; + foreach ($data['SystemStatus'] as $value_2) { + $values_3 = []; + foreach ($value_2 as $value_3) { + $values_3[] = $value_3; + } + $values_2[] = $values_3; + } + $object->setSystemStatus($values_2); + } + elseif (\array_key_exists('SystemStatus', $data) && $data['SystemStatus'] === null) { + $object->setSystemStatus(null); + } + if (\array_key_exists('Plugins', $data) && $data['Plugins'] !== null) { + $object->setPlugins($this->denormalizer->denormalize($data['Plugins'], \Docker\API\Model\InfoGetResponse200Plugins::class, 'json', $context)); + } + elseif (\array_key_exists('Plugins', $data) && $data['Plugins'] === null) { + $object->setPlugins(null); + } + if (\array_key_exists('ExperimentalBuild', $data) && $data['ExperimentalBuild'] !== null) { + $object->setExperimentalBuild($data['ExperimentalBuild']); + } + elseif (\array_key_exists('ExperimentalBuild', $data) && $data['ExperimentalBuild'] === null) { + $object->setExperimentalBuild(null); + } + if (\array_key_exists('HttpProxy', $data) && $data['HttpProxy'] !== null) { + $object->setHttpProxy($data['HttpProxy']); + } + elseif (\array_key_exists('HttpProxy', $data) && $data['HttpProxy'] === null) { + $object->setHttpProxy(null); + } + if (\array_key_exists('HttpsProxy', $data) && $data['HttpsProxy'] !== null) { + $object->setHttpsProxy($data['HttpsProxy']); + } + elseif (\array_key_exists('HttpsProxy', $data) && $data['HttpsProxy'] === null) { + $object->setHttpsProxy(null); + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('IPv4Forwarding', $data) && $data['IPv4Forwarding'] !== null) { + $object->setIPv4Forwarding($data['IPv4Forwarding']); + } + elseif (\array_key_exists('IPv4Forwarding', $data) && $data['IPv4Forwarding'] === null) { + $object->setIPv4Forwarding(null); + } + if (\array_key_exists('Images', $data) && $data['Images'] !== null) { + $object->setImages($data['Images']); + } + elseif (\array_key_exists('Images', $data) && $data['Images'] === null) { + $object->setImages(null); + } + if (\array_key_exists('IndexServerAddress', $data) && $data['IndexServerAddress'] !== null) { + $object->setIndexServerAddress($data['IndexServerAddress']); + } + elseif (\array_key_exists('IndexServerAddress', $data) && $data['IndexServerAddress'] === null) { + $object->setIndexServerAddress(null); + } + if (\array_key_exists('InitPath', $data) && $data['InitPath'] !== null) { + $object->setInitPath($data['InitPath']); + } + elseif (\array_key_exists('InitPath', $data) && $data['InitPath'] === null) { + $object->setInitPath(null); + } + if (\array_key_exists('InitSha1', $data) && $data['InitSha1'] !== null) { + $object->setInitSha1($data['InitSha1']); + } + elseif (\array_key_exists('InitSha1', $data) && $data['InitSha1'] === null) { + $object->setInitSha1(null); + } + if (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] !== null) { + $object->setKernelVersion($data['KernelVersion']); + } + elseif (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] === null) { + $object->setKernelVersion(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_4 = []; + foreach ($data['Labels'] as $value_4) { + $values_4[] = $value_4; + } + $object->setLabels($values_4); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('MemTotal', $data) && $data['MemTotal'] !== null) { + $object->setMemTotal($data['MemTotal']); + } + elseif (\array_key_exists('MemTotal', $data) && $data['MemTotal'] === null) { + $object->setMemTotal(null); + } + if (\array_key_exists('MemoryLimit', $data) && $data['MemoryLimit'] !== null) { + $object->setMemoryLimit($data['MemoryLimit']); + } + elseif (\array_key_exists('MemoryLimit', $data) && $data['MemoryLimit'] === null) { + $object->setMemoryLimit(null); + } + if (\array_key_exists('NCPU', $data) && $data['NCPU'] !== null) { + $object->setNCPU($data['NCPU']); + } + elseif (\array_key_exists('NCPU', $data) && $data['NCPU'] === null) { + $object->setNCPU(null); + } + if (\array_key_exists('NEventsListener', $data) && $data['NEventsListener'] !== null) { + $object->setNEventsListener($data['NEventsListener']); + } + elseif (\array_key_exists('NEventsListener', $data) && $data['NEventsListener'] === null) { + $object->setNEventsListener(null); + } + if (\array_key_exists('NFd', $data) && $data['NFd'] !== null) { + $object->setNFd($data['NFd']); + } + elseif (\array_key_exists('NFd', $data) && $data['NFd'] === null) { + $object->setNFd(null); + } + if (\array_key_exists('NGoroutines', $data) && $data['NGoroutines'] !== null) { + $object->setNGoroutines($data['NGoroutines']); + } + elseif (\array_key_exists('NGoroutines', $data) && $data['NGoroutines'] === null) { + $object->setNGoroutines(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('NoProxy', $data) && $data['NoProxy'] !== null) { + $object->setNoProxy($data['NoProxy']); + } + elseif (\array_key_exists('NoProxy', $data) && $data['NoProxy'] === null) { + $object->setNoProxy(null); + } + if (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] !== null) { + $object->setOomKillDisable($data['OomKillDisable']); + } + elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { + $object->setOomKillDisable(null); + } + if (\array_key_exists('OSType', $data) && $data['OSType'] !== null) { + $object->setOSType($data['OSType']); + } + elseif (\array_key_exists('OSType', $data) && $data['OSType'] === null) { + $object->setOSType(null); + } + if (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] !== null) { + $object->setOomScoreAdj($data['OomScoreAdj']); + } + elseif (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] === null) { + $object->setOomScoreAdj(null); + } + if (\array_key_exists('OperatingSystem', $data) && $data['OperatingSystem'] !== null) { + $object->setOperatingSystem($data['OperatingSystem']); + } + elseif (\array_key_exists('OperatingSystem', $data) && $data['OperatingSystem'] === null) { + $object->setOperatingSystem(null); + } + if (\array_key_exists('RegistryConfig', $data) && $data['RegistryConfig'] !== null) { + $object->setRegistryConfig($this->denormalizer->denormalize($data['RegistryConfig'], \Docker\API\Model\InfoGetResponse200RegistryConfig::class, 'json', $context)); + } + elseif (\array_key_exists('RegistryConfig', $data) && $data['RegistryConfig'] === null) { + $object->setRegistryConfig(null); + } + if (\array_key_exists('SwapLimit', $data) && $data['SwapLimit'] !== null) { + $object->setSwapLimit($data['SwapLimit']); + } + elseif (\array_key_exists('SwapLimit', $data) && $data['SwapLimit'] === null) { + $object->setSwapLimit(null); + } + if (\array_key_exists('SystemTime', $data) && $data['SystemTime'] !== null) { + $object->setSystemTime($data['SystemTime']); + } + elseif (\array_key_exists('SystemTime', $data) && $data['SystemTime'] === null) { + $object->setSystemTime(null); + } + if (\array_key_exists('ServerVersion', $data) && $data['ServerVersion'] !== null) { + $object->setServerVersion($data['ServerVersion']); + } + elseif (\array_key_exists('ServerVersion', $data) && $data['ServerVersion'] === null) { + $object->setServerVersion(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('architecture') && null !== $object->getArchitecture()) { + $data['Architecture'] = $object->getArchitecture(); + } + if ($object->isInitialized('containers') && null !== $object->getContainers()) { + $data['Containers'] = $object->getContainers(); + } + if ($object->isInitialized('containersRunning') && null !== $object->getContainersRunning()) { + $data['ContainersRunning'] = $object->getContainersRunning(); + } + if ($object->isInitialized('containersStopped') && null !== $object->getContainersStopped()) { + $data['ContainersStopped'] = $object->getContainersStopped(); + } + if ($object->isInitialized('containersPaused') && null !== $object->getContainersPaused()) { + $data['ContainersPaused'] = $object->getContainersPaused(); + } + if ($object->isInitialized('cpuCfsPeriod') && null !== $object->getCpuCfsPeriod()) { + $data['CpuCfsPeriod'] = $object->getCpuCfsPeriod(); + } + if ($object->isInitialized('cpuCfsQuota') && null !== $object->getCpuCfsQuota()) { + $data['CpuCfsQuota'] = $object->getCpuCfsQuota(); + } + if ($object->isInitialized('debug') && null !== $object->getDebug()) { + $data['Debug'] = $object->getDebug(); + } + if ($object->isInitialized('discoveryBackend') && null !== $object->getDiscoveryBackend()) { + $data['DiscoveryBackend'] = $object->getDiscoveryBackend(); + } + if ($object->isInitialized('dockerRootDir') && null !== $object->getDockerRootDir()) { + $data['DockerRootDir'] = $object->getDockerRootDir(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('driverStatus') && null !== $object->getDriverStatus()) { + $values = []; + foreach ($object->getDriverStatus() as $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $value_1; + } + $values[] = $values_1; + } + $data['DriverStatus'] = $values; + } + if ($object->isInitialized('systemStatus') && null !== $object->getSystemStatus()) { + $values_2 = []; + foreach ($object->getSystemStatus() as $value_2) { + $values_3 = []; + foreach ($value_2 as $value_3) { + $values_3[] = $value_3; + } + $values_2[] = $values_3; + } + $data['SystemStatus'] = $values_2; + } + if ($object->isInitialized('plugins') && null !== $object->getPlugins()) { + $data['Plugins'] = $this->normalizer->normalize($object->getPlugins(), 'json', $context); + } + if ($object->isInitialized('experimentalBuild') && null !== $object->getExperimentalBuild()) { + $data['ExperimentalBuild'] = $object->getExperimentalBuild(); + } + if ($object->isInitialized('httpProxy') && null !== $object->getHttpProxy()) { + $data['HttpProxy'] = $object->getHttpProxy(); + } + if ($object->isInitialized('httpsProxy') && null !== $object->getHttpsProxy()) { + $data['HttpsProxy'] = $object->getHttpsProxy(); + } + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('iPv4Forwarding') && null !== $object->getIPv4Forwarding()) { + $data['IPv4Forwarding'] = $object->getIPv4Forwarding(); + } + if ($object->isInitialized('images') && null !== $object->getImages()) { + $data['Images'] = $object->getImages(); + } + if ($object->isInitialized('indexServerAddress') && null !== $object->getIndexServerAddress()) { + $data['IndexServerAddress'] = $object->getIndexServerAddress(); + } + if ($object->isInitialized('initPath') && null !== $object->getInitPath()) { + $data['InitPath'] = $object->getInitPath(); + } + if ($object->isInitialized('initSha1') && null !== $object->getInitSha1()) { + $data['InitSha1'] = $object->getInitSha1(); + } + if ($object->isInitialized('kernelVersion') && null !== $object->getKernelVersion()) { + $data['KernelVersion'] = $object->getKernelVersion(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_4 = []; + foreach ($object->getLabels() as $value_4) { + $values_4[] = $value_4; + } + $data['Labels'] = $values_4; + } + if ($object->isInitialized('memTotal') && null !== $object->getMemTotal()) { + $data['MemTotal'] = $object->getMemTotal(); + } + if ($object->isInitialized('memoryLimit') && null !== $object->getMemoryLimit()) { + $data['MemoryLimit'] = $object->getMemoryLimit(); + } + if ($object->isInitialized('nCPU') && null !== $object->getNCPU()) { + $data['NCPU'] = $object->getNCPU(); + } + if ($object->isInitialized('nEventsListener') && null !== $object->getNEventsListener()) { + $data['NEventsListener'] = $object->getNEventsListener(); + } + if ($object->isInitialized('nFd') && null !== $object->getNFd()) { + $data['NFd'] = $object->getNFd(); + } + if ($object->isInitialized('nGoroutines') && null !== $object->getNGoroutines()) { + $data['NGoroutines'] = $object->getNGoroutines(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('noProxy') && null !== $object->getNoProxy()) { + $data['NoProxy'] = $object->getNoProxy(); + } + if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { + $data['OomKillDisable'] = $object->getOomKillDisable(); + } + if ($object->isInitialized('oSType') && null !== $object->getOSType()) { + $data['OSType'] = $object->getOSType(); + } + if ($object->isInitialized('oomScoreAdj') && null !== $object->getOomScoreAdj()) { + $data['OomScoreAdj'] = $object->getOomScoreAdj(); + } + if ($object->isInitialized('operatingSystem') && null !== $object->getOperatingSystem()) { + $data['OperatingSystem'] = $object->getOperatingSystem(); + } + if ($object->isInitialized('registryConfig') && null !== $object->getRegistryConfig()) { + $data['RegistryConfig'] = $this->normalizer->normalize($object->getRegistryConfig(), 'json', $context); + } + if ($object->isInitialized('swapLimit') && null !== $object->getSwapLimit()) { + $data['SwapLimit'] = $object->getSwapLimit(); + } + if ($object->isInitialized('systemTime') && null !== $object->getSystemTime()) { + $data['SystemTime'] = $object->getSystemTime(); + } + if ($object->isInitialized('serverVersion') && null !== $object->getServerVersion()) { + $data['ServerVersion'] = $object->getServerVersion(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\InfoGetResponse200::class => false]; + } + } +} else { + class InfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\InfoGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\InfoGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Architecture', $data) && $data['Architecture'] !== null) { + $object->setArchitecture($data['Architecture']); + } + elseif (\array_key_exists('Architecture', $data) && $data['Architecture'] === null) { + $object->setArchitecture(null); + } + if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { + $object->setContainers($data['Containers']); + } + elseif (\array_key_exists('Containers', $data) && $data['Containers'] === null) { + $object->setContainers(null); + } + if (\array_key_exists('ContainersRunning', $data) && $data['ContainersRunning'] !== null) { + $object->setContainersRunning($data['ContainersRunning']); + } + elseif (\array_key_exists('ContainersRunning', $data) && $data['ContainersRunning'] === null) { + $object->setContainersRunning(null); + } + if (\array_key_exists('ContainersStopped', $data) && $data['ContainersStopped'] !== null) { + $object->setContainersStopped($data['ContainersStopped']); + } + elseif (\array_key_exists('ContainersStopped', $data) && $data['ContainersStopped'] === null) { + $object->setContainersStopped(null); + } + if (\array_key_exists('ContainersPaused', $data) && $data['ContainersPaused'] !== null) { + $object->setContainersPaused($data['ContainersPaused']); + } + elseif (\array_key_exists('ContainersPaused', $data) && $data['ContainersPaused'] === null) { + $object->setContainersPaused(null); + } + if (\array_key_exists('CpuCfsPeriod', $data) && $data['CpuCfsPeriod'] !== null) { + $object->setCpuCfsPeriod($data['CpuCfsPeriod']); + } + elseif (\array_key_exists('CpuCfsPeriod', $data) && $data['CpuCfsPeriod'] === null) { + $object->setCpuCfsPeriod(null); + } + if (\array_key_exists('CpuCfsQuota', $data) && $data['CpuCfsQuota'] !== null) { + $object->setCpuCfsQuota($data['CpuCfsQuota']); + } + elseif (\array_key_exists('CpuCfsQuota', $data) && $data['CpuCfsQuota'] === null) { + $object->setCpuCfsQuota(null); + } + if (\array_key_exists('Debug', $data) && $data['Debug'] !== null) { + $object->setDebug($data['Debug']); + } + elseif (\array_key_exists('Debug', $data) && $data['Debug'] === null) { + $object->setDebug(null); + } + if (\array_key_exists('DiscoveryBackend', $data) && $data['DiscoveryBackend'] !== null) { + $object->setDiscoveryBackend($data['DiscoveryBackend']); + } + elseif (\array_key_exists('DiscoveryBackend', $data) && $data['DiscoveryBackend'] === null) { + $object->setDiscoveryBackend(null); + } + if (\array_key_exists('DockerRootDir', $data) && $data['DockerRootDir'] !== null) { + $object->setDockerRootDir($data['DockerRootDir']); + } + elseif (\array_key_exists('DockerRootDir', $data) && $data['DockerRootDir'] === null) { + $object->setDockerRootDir(null); + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('DriverStatus', $data) && $data['DriverStatus'] !== null) { + $values = []; + foreach ($data['DriverStatus'] as $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $value_1; + } + $values[] = $values_1; + } + $object->setDriverStatus($values); + } + elseif (\array_key_exists('DriverStatus', $data) && $data['DriverStatus'] === null) { + $object->setDriverStatus(null); + } + if (\array_key_exists('SystemStatus', $data) && $data['SystemStatus'] !== null) { + $values_2 = []; + foreach ($data['SystemStatus'] as $value_2) { + $values_3 = []; + foreach ($value_2 as $value_3) { + $values_3[] = $value_3; + } + $values_2[] = $values_3; + } + $object->setSystemStatus($values_2); + } + elseif (\array_key_exists('SystemStatus', $data) && $data['SystemStatus'] === null) { + $object->setSystemStatus(null); + } + if (\array_key_exists('Plugins', $data) && $data['Plugins'] !== null) { + $object->setPlugins($this->denormalizer->denormalize($data['Plugins'], \Docker\API\Model\InfoGetResponse200Plugins::class, 'json', $context)); + } + elseif (\array_key_exists('Plugins', $data) && $data['Plugins'] === null) { + $object->setPlugins(null); + } + if (\array_key_exists('ExperimentalBuild', $data) && $data['ExperimentalBuild'] !== null) { + $object->setExperimentalBuild($data['ExperimentalBuild']); + } + elseif (\array_key_exists('ExperimentalBuild', $data) && $data['ExperimentalBuild'] === null) { + $object->setExperimentalBuild(null); + } + if (\array_key_exists('HttpProxy', $data) && $data['HttpProxy'] !== null) { + $object->setHttpProxy($data['HttpProxy']); + } + elseif (\array_key_exists('HttpProxy', $data) && $data['HttpProxy'] === null) { + $object->setHttpProxy(null); + } + if (\array_key_exists('HttpsProxy', $data) && $data['HttpsProxy'] !== null) { + $object->setHttpsProxy($data['HttpsProxy']); + } + elseif (\array_key_exists('HttpsProxy', $data) && $data['HttpsProxy'] === null) { + $object->setHttpsProxy(null); + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('IPv4Forwarding', $data) && $data['IPv4Forwarding'] !== null) { + $object->setIPv4Forwarding($data['IPv4Forwarding']); + } + elseif (\array_key_exists('IPv4Forwarding', $data) && $data['IPv4Forwarding'] === null) { + $object->setIPv4Forwarding(null); + } + if (\array_key_exists('Images', $data) && $data['Images'] !== null) { + $object->setImages($data['Images']); + } + elseif (\array_key_exists('Images', $data) && $data['Images'] === null) { + $object->setImages(null); + } + if (\array_key_exists('IndexServerAddress', $data) && $data['IndexServerAddress'] !== null) { + $object->setIndexServerAddress($data['IndexServerAddress']); + } + elseif (\array_key_exists('IndexServerAddress', $data) && $data['IndexServerAddress'] === null) { + $object->setIndexServerAddress(null); + } + if (\array_key_exists('InitPath', $data) && $data['InitPath'] !== null) { + $object->setInitPath($data['InitPath']); + } + elseif (\array_key_exists('InitPath', $data) && $data['InitPath'] === null) { + $object->setInitPath(null); + } + if (\array_key_exists('InitSha1', $data) && $data['InitSha1'] !== null) { + $object->setInitSha1($data['InitSha1']); + } + elseif (\array_key_exists('InitSha1', $data) && $data['InitSha1'] === null) { + $object->setInitSha1(null); + } + if (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] !== null) { + $object->setKernelVersion($data['KernelVersion']); + } + elseif (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] === null) { + $object->setKernelVersion(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_4 = []; + foreach ($data['Labels'] as $value_4) { + $values_4[] = $value_4; + } + $object->setLabels($values_4); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('MemTotal', $data) && $data['MemTotal'] !== null) { + $object->setMemTotal($data['MemTotal']); + } + elseif (\array_key_exists('MemTotal', $data) && $data['MemTotal'] === null) { + $object->setMemTotal(null); + } + if (\array_key_exists('MemoryLimit', $data) && $data['MemoryLimit'] !== null) { + $object->setMemoryLimit($data['MemoryLimit']); + } + elseif (\array_key_exists('MemoryLimit', $data) && $data['MemoryLimit'] === null) { + $object->setMemoryLimit(null); + } + if (\array_key_exists('NCPU', $data) && $data['NCPU'] !== null) { + $object->setNCPU($data['NCPU']); + } + elseif (\array_key_exists('NCPU', $data) && $data['NCPU'] === null) { + $object->setNCPU(null); + } + if (\array_key_exists('NEventsListener', $data) && $data['NEventsListener'] !== null) { + $object->setNEventsListener($data['NEventsListener']); + } + elseif (\array_key_exists('NEventsListener', $data) && $data['NEventsListener'] === null) { + $object->setNEventsListener(null); + } + if (\array_key_exists('NFd', $data) && $data['NFd'] !== null) { + $object->setNFd($data['NFd']); + } + elseif (\array_key_exists('NFd', $data) && $data['NFd'] === null) { + $object->setNFd(null); + } + if (\array_key_exists('NGoroutines', $data) && $data['NGoroutines'] !== null) { + $object->setNGoroutines($data['NGoroutines']); + } + elseif (\array_key_exists('NGoroutines', $data) && $data['NGoroutines'] === null) { + $object->setNGoroutines(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('NoProxy', $data) && $data['NoProxy'] !== null) { + $object->setNoProxy($data['NoProxy']); + } + elseif (\array_key_exists('NoProxy', $data) && $data['NoProxy'] === null) { + $object->setNoProxy(null); + } + if (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] !== null) { + $object->setOomKillDisable($data['OomKillDisable']); + } + elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { + $object->setOomKillDisable(null); + } + if (\array_key_exists('OSType', $data) && $data['OSType'] !== null) { + $object->setOSType($data['OSType']); + } + elseif (\array_key_exists('OSType', $data) && $data['OSType'] === null) { + $object->setOSType(null); + } + if (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] !== null) { + $object->setOomScoreAdj($data['OomScoreAdj']); + } + elseif (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] === null) { + $object->setOomScoreAdj(null); + } + if (\array_key_exists('OperatingSystem', $data) && $data['OperatingSystem'] !== null) { + $object->setOperatingSystem($data['OperatingSystem']); + } + elseif (\array_key_exists('OperatingSystem', $data) && $data['OperatingSystem'] === null) { + $object->setOperatingSystem(null); + } + if (\array_key_exists('RegistryConfig', $data) && $data['RegistryConfig'] !== null) { + $object->setRegistryConfig($this->denormalizer->denormalize($data['RegistryConfig'], \Docker\API\Model\InfoGetResponse200RegistryConfig::class, 'json', $context)); + } + elseif (\array_key_exists('RegistryConfig', $data) && $data['RegistryConfig'] === null) { + $object->setRegistryConfig(null); + } + if (\array_key_exists('SwapLimit', $data) && $data['SwapLimit'] !== null) { + $object->setSwapLimit($data['SwapLimit']); + } + elseif (\array_key_exists('SwapLimit', $data) && $data['SwapLimit'] === null) { + $object->setSwapLimit(null); + } + if (\array_key_exists('SystemTime', $data) && $data['SystemTime'] !== null) { + $object->setSystemTime($data['SystemTime']); + } + elseif (\array_key_exists('SystemTime', $data) && $data['SystemTime'] === null) { + $object->setSystemTime(null); + } + if (\array_key_exists('ServerVersion', $data) && $data['ServerVersion'] !== null) { + $object->setServerVersion($data['ServerVersion']); + } + elseif (\array_key_exists('ServerVersion', $data) && $data['ServerVersion'] === null) { + $object->setServerVersion(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('architecture') && null !== $object->getArchitecture()) { + $data['Architecture'] = $object->getArchitecture(); + } + if ($object->isInitialized('containers') && null !== $object->getContainers()) { + $data['Containers'] = $object->getContainers(); + } + if ($object->isInitialized('containersRunning') && null !== $object->getContainersRunning()) { + $data['ContainersRunning'] = $object->getContainersRunning(); + } + if ($object->isInitialized('containersStopped') && null !== $object->getContainersStopped()) { + $data['ContainersStopped'] = $object->getContainersStopped(); + } + if ($object->isInitialized('containersPaused') && null !== $object->getContainersPaused()) { + $data['ContainersPaused'] = $object->getContainersPaused(); + } + if ($object->isInitialized('cpuCfsPeriod') && null !== $object->getCpuCfsPeriod()) { + $data['CpuCfsPeriod'] = $object->getCpuCfsPeriod(); + } + if ($object->isInitialized('cpuCfsQuota') && null !== $object->getCpuCfsQuota()) { + $data['CpuCfsQuota'] = $object->getCpuCfsQuota(); + } + if ($object->isInitialized('debug') && null !== $object->getDebug()) { + $data['Debug'] = $object->getDebug(); + } + if ($object->isInitialized('discoveryBackend') && null !== $object->getDiscoveryBackend()) { + $data['DiscoveryBackend'] = $object->getDiscoveryBackend(); + } + if ($object->isInitialized('dockerRootDir') && null !== $object->getDockerRootDir()) { + $data['DockerRootDir'] = $object->getDockerRootDir(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('driverStatus') && null !== $object->getDriverStatus()) { + $values = []; + foreach ($object->getDriverStatus() as $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $value_1; + } + $values[] = $values_1; + } + $data['DriverStatus'] = $values; + } + if ($object->isInitialized('systemStatus') && null !== $object->getSystemStatus()) { + $values_2 = []; + foreach ($object->getSystemStatus() as $value_2) { + $values_3 = []; + foreach ($value_2 as $value_3) { + $values_3[] = $value_3; + } + $values_2[] = $values_3; + } + $data['SystemStatus'] = $values_2; + } + if ($object->isInitialized('plugins') && null !== $object->getPlugins()) { + $data['Plugins'] = $this->normalizer->normalize($object->getPlugins(), 'json', $context); + } + if ($object->isInitialized('experimentalBuild') && null !== $object->getExperimentalBuild()) { + $data['ExperimentalBuild'] = $object->getExperimentalBuild(); + } + if ($object->isInitialized('httpProxy') && null !== $object->getHttpProxy()) { + $data['HttpProxy'] = $object->getHttpProxy(); + } + if ($object->isInitialized('httpsProxy') && null !== $object->getHttpsProxy()) { + $data['HttpsProxy'] = $object->getHttpsProxy(); + } + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('iPv4Forwarding') && null !== $object->getIPv4Forwarding()) { + $data['IPv4Forwarding'] = $object->getIPv4Forwarding(); + } + if ($object->isInitialized('images') && null !== $object->getImages()) { + $data['Images'] = $object->getImages(); + } + if ($object->isInitialized('indexServerAddress') && null !== $object->getIndexServerAddress()) { + $data['IndexServerAddress'] = $object->getIndexServerAddress(); + } + if ($object->isInitialized('initPath') && null !== $object->getInitPath()) { + $data['InitPath'] = $object->getInitPath(); + } + if ($object->isInitialized('initSha1') && null !== $object->getInitSha1()) { + $data['InitSha1'] = $object->getInitSha1(); + } + if ($object->isInitialized('kernelVersion') && null !== $object->getKernelVersion()) { + $data['KernelVersion'] = $object->getKernelVersion(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_4 = []; + foreach ($object->getLabels() as $value_4) { + $values_4[] = $value_4; + } + $data['Labels'] = $values_4; + } + if ($object->isInitialized('memTotal') && null !== $object->getMemTotal()) { + $data['MemTotal'] = $object->getMemTotal(); + } + if ($object->isInitialized('memoryLimit') && null !== $object->getMemoryLimit()) { + $data['MemoryLimit'] = $object->getMemoryLimit(); + } + if ($object->isInitialized('nCPU') && null !== $object->getNCPU()) { + $data['NCPU'] = $object->getNCPU(); + } + if ($object->isInitialized('nEventsListener') && null !== $object->getNEventsListener()) { + $data['NEventsListener'] = $object->getNEventsListener(); + } + if ($object->isInitialized('nFd') && null !== $object->getNFd()) { + $data['NFd'] = $object->getNFd(); + } + if ($object->isInitialized('nGoroutines') && null !== $object->getNGoroutines()) { + $data['NGoroutines'] = $object->getNGoroutines(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('noProxy') && null !== $object->getNoProxy()) { + $data['NoProxy'] = $object->getNoProxy(); + } + if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { + $data['OomKillDisable'] = $object->getOomKillDisable(); + } + if ($object->isInitialized('oSType') && null !== $object->getOSType()) { + $data['OSType'] = $object->getOSType(); + } + if ($object->isInitialized('oomScoreAdj') && null !== $object->getOomScoreAdj()) { + $data['OomScoreAdj'] = $object->getOomScoreAdj(); + } + if ($object->isInitialized('operatingSystem') && null !== $object->getOperatingSystem()) { + $data['OperatingSystem'] = $object->getOperatingSystem(); + } + if ($object->isInitialized('registryConfig') && null !== $object->getRegistryConfig()) { + $data['RegistryConfig'] = $this->normalizer->normalize($object->getRegistryConfig(), 'json', $context); + } + if ($object->isInitialized('swapLimit') && null !== $object->getSwapLimit()) { + $data['SwapLimit'] = $object->getSwapLimit(); + } + if ($object->isInitialized('systemTime') && null !== $object->getSystemTime()) { + $data['SystemTime'] = $object->getSystemTime(); + } + if ($object->isInitialized('serverVersion') && null !== $object->getServerVersion()) { + $data['ServerVersion'] = $object->getServerVersion(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\InfoGetResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/InfoGetResponse200PluginsNormalizer.php b/generated/Normalizer/InfoGetResponse200PluginsNormalizer.php new file mode 100644 index 000000000..ccfbb3df7 --- /dev/null +++ b/generated/Normalizer/InfoGetResponse200PluginsNormalizer.php @@ -0,0 +1,168 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class InfoGetResponse200PluginsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\InfoGetResponse200Plugins::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200Plugins::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\InfoGetResponse200Plugins(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Volume', $data) && $data['Volume'] !== null) { + $values = []; + foreach ($data['Volume'] as $value) { + $values[] = $value; + } + $object->setVolume($values); + } + elseif (\array_key_exists('Volume', $data) && $data['Volume'] === null) { + $object->setVolume(null); + } + if (\array_key_exists('Network', $data) && $data['Network'] !== null) { + $values_1 = []; + foreach ($data['Network'] as $value_1) { + $values_1[] = $value_1; + } + $object->setNetwork($values_1); + } + elseif (\array_key_exists('Network', $data) && $data['Network'] === null) { + $object->setNetwork(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('volume') && null !== $object->getVolume()) { + $values = []; + foreach ($object->getVolume() as $value) { + $values[] = $value; + } + $data['Volume'] = $values; + } + if ($object->isInitialized('network') && null !== $object->getNetwork()) { + $values_1 = []; + foreach ($object->getNetwork() as $value_1) { + $values_1[] = $value_1; + } + $data['Network'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\InfoGetResponse200Plugins::class => false]; + } + } +} else { + class InfoGetResponse200PluginsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\InfoGetResponse200Plugins::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200Plugins::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\InfoGetResponse200Plugins(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Volume', $data) && $data['Volume'] !== null) { + $values = []; + foreach ($data['Volume'] as $value) { + $values[] = $value; + } + $object->setVolume($values); + } + elseif (\array_key_exists('Volume', $data) && $data['Volume'] === null) { + $object->setVolume(null); + } + if (\array_key_exists('Network', $data) && $data['Network'] !== null) { + $values_1 = []; + foreach ($data['Network'] as $value_1) { + $values_1[] = $value_1; + } + $object->setNetwork($values_1); + } + elseif (\array_key_exists('Network', $data) && $data['Network'] === null) { + $object->setNetwork(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('volume') && null !== $object->getVolume()) { + $values = []; + foreach ($object->getVolume() as $value) { + $values[] = $value; + } + $data['Volume'] = $values; + } + if ($object->isInitialized('network') && null !== $object->getNetwork()) { + $values_1 = []; + foreach ($object->getNetwork() as $value_1) { + $values_1[] = $value_1; + } + $data['Network'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\InfoGetResponse200Plugins::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer.php b/generated/Normalizer/InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer.php new file mode 100644 index 000000000..3f9d3d324 --- /dev/null +++ b/generated/Normalizer/InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer.php @@ -0,0 +1,188 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Mirrors', $data) && $data['Mirrors'] !== null) { + $values = []; + foreach ($data['Mirrors'] as $value) { + $values[] = $value; + } + $object->setMirrors($values); + } + elseif (\array_key_exists('Mirrors', $data) && $data['Mirrors'] === null) { + $object->setMirrors(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Official', $data) && $data['Official'] !== null) { + $object->setOfficial($data['Official']); + } + elseif (\array_key_exists('Official', $data) && $data['Official'] === null) { + $object->setOfficial(null); + } + if (\array_key_exists('Secure', $data) && $data['Secure'] !== null) { + $object->setSecure($data['Secure']); + } + elseif (\array_key_exists('Secure', $data) && $data['Secure'] === null) { + $object->setSecure(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('mirrors') && null !== $object->getMirrors()) { + $values = []; + foreach ($object->getMirrors() as $value) { + $values[] = $value; + } + $data['Mirrors'] = $values; + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('official') && null !== $object->getOfficial()) { + $data['Official'] = $object->getOfficial(); + } + if ($object->isInitialized('secure') && null !== $object->getSecure()) { + $data['Secure'] = $object->getSecure(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class => false]; + } + } +} else { + class InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Mirrors', $data) && $data['Mirrors'] !== null) { + $values = []; + foreach ($data['Mirrors'] as $value) { + $values[] = $value; + } + $object->setMirrors($values); + } + elseif (\array_key_exists('Mirrors', $data) && $data['Mirrors'] === null) { + $object->setMirrors(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Official', $data) && $data['Official'] !== null) { + $object->setOfficial($data['Official']); + } + elseif (\array_key_exists('Official', $data) && $data['Official'] === null) { + $object->setOfficial(null); + } + if (\array_key_exists('Secure', $data) && $data['Secure'] !== null) { + $object->setSecure($data['Secure']); + } + elseif (\array_key_exists('Secure', $data) && $data['Secure'] === null) { + $object->setSecure(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('mirrors') && null !== $object->getMirrors()) { + $values = []; + foreach ($object->getMirrors() as $value) { + $values[] = $value; + } + $data['Mirrors'] = $values; + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('official') && null !== $object->getOfficial()) { + $data['Official'] = $object->getOfficial(); + } + if ($object->isInitialized('secure') && null !== $object->getSecure()) { + $data['Secure'] = $object->getSecure(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/InfoGetResponse200RegistryConfigNormalizer.php b/generated/Normalizer/InfoGetResponse200RegistryConfigNormalizer.php new file mode 100644 index 000000000..cad98f2fa --- /dev/null +++ b/generated/Normalizer/InfoGetResponse200RegistryConfigNormalizer.php @@ -0,0 +1,168 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class InfoGetResponse200RegistryConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\InfoGetResponse200RegistryConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200RegistryConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\InfoGetResponse200RegistryConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('IndexConfigs', $data) && $data['IndexConfigs'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['IndexConfigs'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class, 'json', $context); + } + $object->setIndexConfigs($values); + } + elseif (\array_key_exists('IndexConfigs', $data) && $data['IndexConfigs'] === null) { + $object->setIndexConfigs(null); + } + if (\array_key_exists('InsecureRegistryCIDRs', $data) && $data['InsecureRegistryCIDRs'] !== null) { + $values_1 = []; + foreach ($data['InsecureRegistryCIDRs'] as $value_1) { + $values_1[] = $value_1; + } + $object->setInsecureRegistryCIDRs($values_1); + } + elseif (\array_key_exists('InsecureRegistryCIDRs', $data) && $data['InsecureRegistryCIDRs'] === null) { + $object->setInsecureRegistryCIDRs(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('indexConfigs') && null !== $object->getIndexConfigs()) { + $values = []; + foreach ($object->getIndexConfigs() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); + } + $data['IndexConfigs'] = $values; + } + if ($object->isInitialized('insecureRegistryCIDRs') && null !== $object->getInsecureRegistryCIDRs()) { + $values_1 = []; + foreach ($object->getInsecureRegistryCIDRs() as $value_1) { + $values_1[] = $value_1; + } + $data['InsecureRegistryCIDRs'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\InfoGetResponse200RegistryConfig::class => false]; + } + } +} else { + class InfoGetResponse200RegistryConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\InfoGetResponse200RegistryConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200RegistryConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\InfoGetResponse200RegistryConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('IndexConfigs', $data) && $data['IndexConfigs'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['IndexConfigs'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class, 'json', $context); + } + $object->setIndexConfigs($values); + } + elseif (\array_key_exists('IndexConfigs', $data) && $data['IndexConfigs'] === null) { + $object->setIndexConfigs(null); + } + if (\array_key_exists('InsecureRegistryCIDRs', $data) && $data['InsecureRegistryCIDRs'] !== null) { + $values_1 = []; + foreach ($data['InsecureRegistryCIDRs'] as $value_1) { + $values_1[] = $value_1; + } + $object->setInsecureRegistryCIDRs($values_1); + } + elseif (\array_key_exists('InsecureRegistryCIDRs', $data) && $data['InsecureRegistryCIDRs'] === null) { + $object->setInsecureRegistryCIDRs(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('indexConfigs') && null !== $object->getIndexConfigs()) { + $values = []; + foreach ($object->getIndexConfigs() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); + } + $data['IndexConfigs'] = $values; + } + if ($object->isInitialized('insecureRegistryCIDRs') && null !== $object->getInsecureRegistryCIDRs()) { + $values_1 = []; + foreach ($object->getInsecureRegistryCIDRs() as $value_1) { + $values_1[] = $value_1; + } + $data['InsecureRegistryCIDRs'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\InfoGetResponse200RegistryConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/JaneObjectNormalizer.php b/generated/Normalizer/JaneObjectNormalizer.php new file mode 100644 index 000000000..8a390e5aa --- /dev/null +++ b/generated/Normalizer/JaneObjectNormalizer.php @@ -0,0 +1,1040 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + protected $normalizers = [ + + \Docker\API\Model\Port::class => \Docker\API\Normalizer\PortNormalizer::class, + + \Docker\API\Model\MountPoint::class => \Docker\API\Normalizer\MountPointNormalizer::class, + + \Docker\API\Model\DeviceMapping::class => \Docker\API\Normalizer\DeviceMappingNormalizer::class, + + \Docker\API\Model\ThrottleDevice::class => \Docker\API\Normalizer\ThrottleDeviceNormalizer::class, + + \Docker\API\Model\Mount::class => \Docker\API\Normalizer\MountNormalizer::class, + + \Docker\API\Model\MountBindOptions::class => \Docker\API\Normalizer\MountBindOptionsNormalizer::class, + + \Docker\API\Model\MountVolumeOptions::class => \Docker\API\Normalizer\MountVolumeOptionsNormalizer::class, + + \Docker\API\Model\MountVolumeOptionsDriverConfig::class => \Docker\API\Normalizer\MountVolumeOptionsDriverConfigNormalizer::class, + + \Docker\API\Model\MountTmpfsOptions::class => \Docker\API\Normalizer\MountTmpfsOptionsNormalizer::class, + + \Docker\API\Model\RestartPolicy::class => \Docker\API\Normalizer\RestartPolicyNormalizer::class, + + \Docker\API\Model\Resources::class => \Docker\API\Normalizer\ResourcesNormalizer::class, + + \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class => \Docker\API\Normalizer\ResourcesBlkioWeightDeviceItemNormalizer::class, + + \Docker\API\Model\ResourcesUlimitsItem::class => \Docker\API\Normalizer\ResourcesUlimitsItemNormalizer::class, + + \Docker\API\Model\HostConfig::class => \Docker\API\Normalizer\HostConfigNormalizer::class, + + \Docker\API\Model\HostConfigLogConfig::class => \Docker\API\Normalizer\HostConfigLogConfigNormalizer::class, + + \Docker\API\Model\HostConfigPortBindingsItem::class => \Docker\API\Normalizer\HostConfigPortBindingsItemNormalizer::class, + + \Docker\API\Model\Config::class => \Docker\API\Normalizer\ConfigNormalizer::class, + + \Docker\API\Model\ConfigHealthcheck::class => \Docker\API\Normalizer\ConfigHealthcheckNormalizer::class, + + \Docker\API\Model\ConfigVolumes::class => \Docker\API\Normalizer\ConfigVolumesNormalizer::class, + + \Docker\API\Model\NetworkConfig::class => \Docker\API\Normalizer\NetworkConfigNormalizer::class, + + \Docker\API\Model\GraphDriver::class => \Docker\API\Normalizer\GraphDriverNormalizer::class, + + \Docker\API\Model\Image::class => \Docker\API\Normalizer\ImageNormalizer::class, + + \Docker\API\Model\ImageRootFS::class => \Docker\API\Normalizer\ImageRootFSNormalizer::class, + + \Docker\API\Model\ImageSummary::class => \Docker\API\Normalizer\ImageSummaryNormalizer::class, + + \Docker\API\Model\AuthConfig::class => \Docker\API\Normalizer\AuthConfigNormalizer::class, + + \Docker\API\Model\ProcessConfig::class => \Docker\API\Normalizer\ProcessConfigNormalizer::class, + + \Docker\API\Model\Volume::class => \Docker\API\Normalizer\VolumeNormalizer::class, + + \Docker\API\Model\VolumeUsageData::class => \Docker\API\Normalizer\VolumeUsageDataNormalizer::class, + + \Docker\API\Model\Network::class => \Docker\API\Normalizer\NetworkNormalizer::class, + + \Docker\API\Model\IPAM::class => \Docker\API\Normalizer\IPAMNormalizer::class, + + \Docker\API\Model\NetworkContainer::class => \Docker\API\Normalizer\NetworkContainerNormalizer::class, + + \Docker\API\Model\BuildInfo::class => \Docker\API\Normalizer\BuildInfoNormalizer::class, + + \Docker\API\Model\CreateImageInfo::class => \Docker\API\Normalizer\CreateImageInfoNormalizer::class, + + \Docker\API\Model\PushImageInfo::class => \Docker\API\Normalizer\PushImageInfoNormalizer::class, + + \Docker\API\Model\ErrorDetail::class => \Docker\API\Normalizer\ErrorDetailNormalizer::class, + + \Docker\API\Model\ProgressDetail::class => \Docker\API\Normalizer\ProgressDetailNormalizer::class, + + \Docker\API\Model\ErrorResponse::class => \Docker\API\Normalizer\ErrorResponseNormalizer::class, + + \Docker\API\Model\IdResponse::class => \Docker\API\Normalizer\IdResponseNormalizer::class, + + \Docker\API\Model\EndpointSettings::class => \Docker\API\Normalizer\EndpointSettingsNormalizer::class, + + \Docker\API\Model\EndpointSettingsIPAMConfig::class => \Docker\API\Normalizer\EndpointSettingsIPAMConfigNormalizer::class, + + \Docker\API\Model\PluginMount::class => \Docker\API\Normalizer\PluginMountNormalizer::class, + + \Docker\API\Model\PluginDevice::class => \Docker\API\Normalizer\PluginDeviceNormalizer::class, + + \Docker\API\Model\PluginEnv::class => \Docker\API\Normalizer\PluginEnvNormalizer::class, + + \Docker\API\Model\PluginInterfaceType::class => \Docker\API\Normalizer\PluginInterfaceTypeNormalizer::class, + + \Docker\API\Model\Plugin::class => \Docker\API\Normalizer\PluginNormalizer::class, + + \Docker\API\Model\PluginSettings::class => \Docker\API\Normalizer\PluginSettingsNormalizer::class, + + \Docker\API\Model\PluginConfig::class => \Docker\API\Normalizer\PluginConfigNormalizer::class, + + \Docker\API\Model\PluginConfigInterface::class => \Docker\API\Normalizer\PluginConfigInterfaceNormalizer::class, + + \Docker\API\Model\PluginConfigUser::class => \Docker\API\Normalizer\PluginConfigUserNormalizer::class, + + \Docker\API\Model\PluginConfigNetwork::class => \Docker\API\Normalizer\PluginConfigNetworkNormalizer::class, + + \Docker\API\Model\PluginConfigLinux::class => \Docker\API\Normalizer\PluginConfigLinuxNormalizer::class, + + \Docker\API\Model\PluginConfigArgs::class => \Docker\API\Normalizer\PluginConfigArgsNormalizer::class, + + \Docker\API\Model\PluginConfigRootfs::class => \Docker\API\Normalizer\PluginConfigRootfsNormalizer::class, + + \Docker\API\Model\NodeSpec::class => \Docker\API\Normalizer\NodeSpecNormalizer::class, + + \Docker\API\Model\Node::class => \Docker\API\Normalizer\NodeNormalizer::class, + + \Docker\API\Model\NodeVersion::class => \Docker\API\Normalizer\NodeVersionNormalizer::class, + + \Docker\API\Model\NodeDescription::class => \Docker\API\Normalizer\NodeDescriptionNormalizer::class, + + \Docker\API\Model\NodeDescriptionPlatform::class => \Docker\API\Normalizer\NodeDescriptionPlatformNormalizer::class, + + \Docker\API\Model\NodeDescriptionResources::class => \Docker\API\Normalizer\NodeDescriptionResourcesNormalizer::class, + + \Docker\API\Model\NodeDescriptionEngine::class => \Docker\API\Normalizer\NodeDescriptionEngineNormalizer::class, + + \Docker\API\Model\NodeDescriptionEnginePluginsItem::class => \Docker\API\Normalizer\NodeDescriptionEnginePluginsItemNormalizer::class, + + \Docker\API\Model\SwarmSpec::class => \Docker\API\Normalizer\SwarmSpecNormalizer::class, + + \Docker\API\Model\SwarmSpecOrchestration::class => \Docker\API\Normalizer\SwarmSpecOrchestrationNormalizer::class, + + \Docker\API\Model\SwarmSpecRaft::class => \Docker\API\Normalizer\SwarmSpecRaftNormalizer::class, + + \Docker\API\Model\SwarmSpecDispatcher::class => \Docker\API\Normalizer\SwarmSpecDispatcherNormalizer::class, + + \Docker\API\Model\SwarmSpecCAConfig::class => \Docker\API\Normalizer\SwarmSpecCAConfigNormalizer::class, + + \Docker\API\Model\SwarmSpecCAConfigExternalCAsItem::class => \Docker\API\Normalizer\SwarmSpecCAConfigExternalCAsItemNormalizer::class, + + \Docker\API\Model\SwarmSpecEncryptionConfig::class => \Docker\API\Normalizer\SwarmSpecEncryptionConfigNormalizer::class, + + \Docker\API\Model\SwarmSpecTaskDefaults::class => \Docker\API\Normalizer\SwarmSpecTaskDefaultsNormalizer::class, + + \Docker\API\Model\SwarmSpecTaskDefaultsLogDriver::class => \Docker\API\Normalizer\SwarmSpecTaskDefaultsLogDriverNormalizer::class, + + \Docker\API\Model\ClusterInfo::class => \Docker\API\Normalizer\ClusterInfoNormalizer::class, + + \Docker\API\Model\ClusterInfoVersion::class => \Docker\API\Normalizer\ClusterInfoVersionNormalizer::class, + + \Docker\API\Model\TaskSpec::class => \Docker\API\Normalizer\TaskSpecNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpec::class => \Docker\API\Normalizer\TaskSpecContainerSpecNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class => \Docker\API\Normalizer\TaskSpecContainerSpecDNSConfigNormalizer::class, + + \Docker\API\Model\TaskSpecResources::class => \Docker\API\Normalizer\TaskSpecResourcesNormalizer::class, + + \Docker\API\Model\TaskSpecResourcesLimits::class => \Docker\API\Normalizer\TaskSpecResourcesLimitsNormalizer::class, + + \Docker\API\Model\TaskSpecResourcesReservations::class => \Docker\API\Normalizer\TaskSpecResourcesReservationsNormalizer::class, + + \Docker\API\Model\TaskSpecRestartPolicy::class => \Docker\API\Normalizer\TaskSpecRestartPolicyNormalizer::class, + + \Docker\API\Model\TaskSpecPlacement::class => \Docker\API\Normalizer\TaskSpecPlacementNormalizer::class, + + \Docker\API\Model\TaskSpecNetworksItem::class => \Docker\API\Normalizer\TaskSpecNetworksItemNormalizer::class, + + \Docker\API\Model\TaskSpecLogDriver::class => \Docker\API\Normalizer\TaskSpecLogDriverNormalizer::class, + + \Docker\API\Model\Task::class => \Docker\API\Normalizer\TaskNormalizer::class, + + \Docker\API\Model\TaskVersion::class => \Docker\API\Normalizer\TaskVersionNormalizer::class, + + \Docker\API\Model\TaskStatus::class => \Docker\API\Normalizer\TaskStatusNormalizer::class, + + \Docker\API\Model\TaskStatusContainerStatus::class => \Docker\API\Normalizer\TaskStatusContainerStatusNormalizer::class, + + \Docker\API\Model\ServiceSpec::class => \Docker\API\Normalizer\ServiceSpecNormalizer::class, + + \Docker\API\Model\ServiceSpecMode::class => \Docker\API\Normalizer\ServiceSpecModeNormalizer::class, + + \Docker\API\Model\ServiceSpecModeReplicated::class => \Docker\API\Normalizer\ServiceSpecModeReplicatedNormalizer::class, + + \Docker\API\Model\ServiceSpecUpdateConfig::class => \Docker\API\Normalizer\ServiceSpecUpdateConfigNormalizer::class, + + \Docker\API\Model\ServiceSpecNetworksItem::class => \Docker\API\Normalizer\ServiceSpecNetworksItemNormalizer::class, + + \Docker\API\Model\EndpointPortConfig::class => \Docker\API\Normalizer\EndpointPortConfigNormalizer::class, + + \Docker\API\Model\EndpointSpec::class => \Docker\API\Normalizer\EndpointSpecNormalizer::class, + + \Docker\API\Model\Service::class => \Docker\API\Normalizer\ServiceNormalizer::class, + + \Docker\API\Model\ServiceVersion::class => \Docker\API\Normalizer\ServiceVersionNormalizer::class, + + \Docker\API\Model\ServiceEndpoint::class => \Docker\API\Normalizer\ServiceEndpointNormalizer::class, + + \Docker\API\Model\ServiceEndpointVirtualIPsItem::class => \Docker\API\Normalizer\ServiceEndpointVirtualIPsItemNormalizer::class, + + \Docker\API\Model\ServiceUpdateStatus::class => \Docker\API\Normalizer\ServiceUpdateStatusNormalizer::class, + + \Docker\API\Model\ImageDeleteResponse::class => \Docker\API\Normalizer\ImageDeleteResponseNormalizer::class, + + \Docker\API\Model\ServiceUpdateResponse::class => \Docker\API\Normalizer\ServiceUpdateResponseNormalizer::class, + + \Docker\API\Model\ContainerSummaryItem::class => \Docker\API\Normalizer\ContainerSummaryItemNormalizer::class, + + \Docker\API\Model\ContainerSummaryItemHostConfig::class => \Docker\API\Normalizer\ContainerSummaryItemHostConfigNormalizer::class, + + \Docker\API\Model\ContainerSummaryItemNetworkSettings::class => \Docker\API\Normalizer\ContainerSummaryItemNetworkSettingsNormalizer::class, + + \Docker\API\Model\SecretSpec::class => \Docker\API\Normalizer\SecretSpecNormalizer::class, + + \Docker\API\Model\Secret::class => \Docker\API\Normalizer\SecretNormalizer::class, + + \Docker\API\Model\SecretVersion::class => \Docker\API\Normalizer\SecretVersionNormalizer::class, + + \Docker\API\Model\ContainersCreatePostBody::class => \Docker\API\Normalizer\ContainersCreatePostBodyNormalizer::class, + + \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class => \Docker\API\Normalizer\ContainersCreatePostBodyNetworkingConfigNormalizer::class, + + \Docker\API\Model\ContainersCreatePostResponse201::class => \Docker\API\Normalizer\ContainersCreatePostResponse201Normalizer::class, + + \Docker\API\Model\ContainersIdJsonGetResponse200::class => \Docker\API\Normalizer\ContainersIdJsonGetResponse200Normalizer::class, + + \Docker\API\Model\ContainersIdJsonGetResponse200State::class => \Docker\API\Normalizer\ContainersIdJsonGetResponse200StateNormalizer::class, + + \Docker\API\Model\ContainersIdTopGetResponse200::class => \Docker\API\Normalizer\ContainersIdTopGetResponse200Normalizer::class, + + \Docker\API\Model\ContainersIdChangesGetResponse200Item::class => \Docker\API\Normalizer\ContainersIdChangesGetResponse200ItemNormalizer::class, + + \Docker\API\Model\ContainersIdUpdatePostBody::class => \Docker\API\Normalizer\ContainersIdUpdatePostBodyNormalizer::class, + + \Docker\API\Model\ContainersIdUpdatePostResponse200::class => \Docker\API\Normalizer\ContainersIdUpdatePostResponse200Normalizer::class, + + \Docker\API\Model\ContainersIdWaitPostResponse200::class => \Docker\API\Normalizer\ContainersIdWaitPostResponse200Normalizer::class, + + \Docker\API\Model\ContainersPrunePostResponse200::class => \Docker\API\Normalizer\ContainersPrunePostResponse200Normalizer::class, + + \Docker\API\Model\ImagesNameHistoryGetResponse200Item::class => \Docker\API\Normalizer\ImagesNameHistoryGetResponse200ItemNormalizer::class, + + \Docker\API\Model\ImagesSearchGetResponse200Item::class => \Docker\API\Normalizer\ImagesSearchGetResponse200ItemNormalizer::class, + + \Docker\API\Model\ImagesPrunePostResponse200::class => \Docker\API\Normalizer\ImagesPrunePostResponse200Normalizer::class, + + \Docker\API\Model\AuthPostResponse200::class => \Docker\API\Normalizer\AuthPostResponse200Normalizer::class, + + \Docker\API\Model\InfoGetResponse200::class => \Docker\API\Normalizer\InfoGetResponse200Normalizer::class, + + \Docker\API\Model\InfoGetResponse200Plugins::class => \Docker\API\Normalizer\InfoGetResponse200PluginsNormalizer::class, + + \Docker\API\Model\InfoGetResponse200RegistryConfig::class => \Docker\API\Normalizer\InfoGetResponse200RegistryConfigNormalizer::class, + + \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class => \Docker\API\Normalizer\InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer::class, + + \Docker\API\Model\VersionGetResponse200::class => \Docker\API\Normalizer\VersionGetResponse200Normalizer::class, + + \Docker\API\Model\EventsGetResponse200::class => \Docker\API\Normalizer\EventsGetResponse200Normalizer::class, + + \Docker\API\Model\EventsGetResponse200Actor::class => \Docker\API\Normalizer\EventsGetResponse200ActorNormalizer::class, + + \Docker\API\Model\SystemDfGetResponse200::class => \Docker\API\Normalizer\SystemDfGetResponse200Normalizer::class, + + \Docker\API\Model\ContainersIdExecPostBody::class => \Docker\API\Normalizer\ContainersIdExecPostBodyNormalizer::class, + + \Docker\API\Model\ExecIdStartPostBody::class => \Docker\API\Normalizer\ExecIdStartPostBodyNormalizer::class, + + \Docker\API\Model\ExecIdJsonGetResponse200::class => \Docker\API\Normalizer\ExecIdJsonGetResponse200Normalizer::class, + + \Docker\API\Model\VolumesGetResponse200::class => \Docker\API\Normalizer\VolumesGetResponse200Normalizer::class, + + \Docker\API\Model\VolumesCreatePostBody::class => \Docker\API\Normalizer\VolumesCreatePostBodyNormalizer::class, + + \Docker\API\Model\VolumesPrunePostResponse200::class => \Docker\API\Normalizer\VolumesPrunePostResponse200Normalizer::class, + + \Docker\API\Model\NetworksCreatePostBody::class => \Docker\API\Normalizer\NetworksCreatePostBodyNormalizer::class, + + \Docker\API\Model\NetworksCreatePostResponse201::class => \Docker\API\Normalizer\NetworksCreatePostResponse201Normalizer::class, + + \Docker\API\Model\NetworksIdConnectPostBody::class => \Docker\API\Normalizer\NetworksIdConnectPostBodyNormalizer::class, + + \Docker\API\Model\NetworksIdDisconnectPostBody::class => \Docker\API\Normalizer\NetworksIdDisconnectPostBodyNormalizer::class, + + \Docker\API\Model\NetworksPrunePostResponse200::class => \Docker\API\Normalizer\NetworksPrunePostResponse200Normalizer::class, + + \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class => \Docker\API\Normalizer\PluginsPrivilegesGetResponse200ItemNormalizer::class, + + \Docker\API\Model\PluginsPullPostBodyItem::class => \Docker\API\Normalizer\PluginsPullPostBodyItemNormalizer::class, + + \Docker\API\Model\SwarmGetResponse200::class => \Docker\API\Normalizer\SwarmGetResponse200Normalizer::class, + + \Docker\API\Model\SwarmGetResponse200JoinTokens::class => \Docker\API\Normalizer\SwarmGetResponse200JoinTokensNormalizer::class, + + \Docker\API\Model\SwarmInitPostBody::class => \Docker\API\Normalizer\SwarmInitPostBodyNormalizer::class, + + \Docker\API\Model\SwarmJoinPostBody::class => \Docker\API\Normalizer\SwarmJoinPostBodyNormalizer::class, + + \Docker\API\Model\SwarmUnlockkeyGetResponse200::class => \Docker\API\Normalizer\SwarmUnlockkeyGetResponse200Normalizer::class, + + \Docker\API\Model\SwarmUnlockPostBody::class => \Docker\API\Normalizer\SwarmUnlockPostBodyNormalizer::class, + + \Docker\API\Model\ServicesCreatePostBody::class => \Docker\API\Normalizer\ServicesCreatePostBodyNormalizer::class, + + \Docker\API\Model\ServicesCreatePostResponse201::class => \Docker\API\Normalizer\ServicesCreatePostResponse201Normalizer::class, + + \Docker\API\Model\ServicesIdUpdatePostBody::class => \Docker\API\Normalizer\ServicesIdUpdatePostBodyNormalizer::class, + + \Docker\API\Model\SecretsCreatePostBody::class => \Docker\API\Normalizer\SecretsCreatePostBodyNormalizer::class, + + \Docker\API\Model\SecretsCreatePostResponse201::class => \Docker\API\Normalizer\SecretsCreatePostResponse201Normalizer::class, + + \Jane\Component\JsonSchemaRuntime\Reference::class => \Docker\API\Runtime\Normalizer\ReferenceNormalizer::class, + ], $normalizersCache = []; + public function supportsDenormalization($data, $type, $format = null, array $context = []): bool + { + return array_key_exists($type, $this->normalizers); + } + public function supportsNormalization($data, $format = null, array $context = []): bool + { + return is_object($data) && array_key_exists(get_class($data), $this->normalizers); + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $normalizerClass = $this->normalizers[get_class($object)]; + $normalizer = $this->getNormalizer($normalizerClass); + return $normalizer->normalize($object, $format, $context); + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + $denormalizerClass = $this->normalizers[$type]; + $denormalizer = $this->getNormalizer($denormalizerClass); + return $denormalizer->denormalize($data, $type, $format, $context); + } + private function getNormalizer(string $normalizerClass) + { + return $this->normalizersCache[$normalizerClass] ?? $this->initNormalizer($normalizerClass); + } + private function initNormalizer(string $normalizerClass) + { + $normalizer = new $normalizerClass(); + $normalizer->setNormalizer($this->normalizer); + $normalizer->setDenormalizer($this->denormalizer); + $this->normalizersCache[$normalizerClass] = $normalizer; + return $normalizer; + } + public function getSupportedTypes(?string $format = null): array + { + return [ + + \Docker\API\Model\Port::class => false, + \Docker\API\Model\MountPoint::class => false, + \Docker\API\Model\DeviceMapping::class => false, + \Docker\API\Model\ThrottleDevice::class => false, + \Docker\API\Model\Mount::class => false, + \Docker\API\Model\MountBindOptions::class => false, + \Docker\API\Model\MountVolumeOptions::class => false, + \Docker\API\Model\MountVolumeOptionsDriverConfig::class => false, + \Docker\API\Model\MountTmpfsOptions::class => false, + \Docker\API\Model\RestartPolicy::class => false, + \Docker\API\Model\Resources::class => false, + \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class => false, + \Docker\API\Model\ResourcesUlimitsItem::class => false, + \Docker\API\Model\HostConfig::class => false, + \Docker\API\Model\HostConfigLogConfig::class => false, + \Docker\API\Model\HostConfigPortBindingsItem::class => false, + \Docker\API\Model\Config::class => false, + \Docker\API\Model\ConfigHealthcheck::class => false, + \Docker\API\Model\ConfigVolumes::class => false, + \Docker\API\Model\NetworkConfig::class => false, + \Docker\API\Model\GraphDriver::class => false, + \Docker\API\Model\Image::class => false, + \Docker\API\Model\ImageRootFS::class => false, + \Docker\API\Model\ImageSummary::class => false, + \Docker\API\Model\AuthConfig::class => false, + \Docker\API\Model\ProcessConfig::class => false, + \Docker\API\Model\Volume::class => false, + \Docker\API\Model\VolumeUsageData::class => false, + \Docker\API\Model\Network::class => false, + \Docker\API\Model\IPAM::class => false, + \Docker\API\Model\NetworkContainer::class => false, + \Docker\API\Model\BuildInfo::class => false, + \Docker\API\Model\CreateImageInfo::class => false, + \Docker\API\Model\PushImageInfo::class => false, + \Docker\API\Model\ErrorDetail::class => false, + \Docker\API\Model\ProgressDetail::class => false, + \Docker\API\Model\ErrorResponse::class => false, + \Docker\API\Model\IdResponse::class => false, + \Docker\API\Model\EndpointSettings::class => false, + \Docker\API\Model\EndpointSettingsIPAMConfig::class => false, + \Docker\API\Model\PluginMount::class => false, + \Docker\API\Model\PluginDevice::class => false, + \Docker\API\Model\PluginEnv::class => false, + \Docker\API\Model\PluginInterfaceType::class => false, + \Docker\API\Model\Plugin::class => false, + \Docker\API\Model\PluginSettings::class => false, + \Docker\API\Model\PluginConfig::class => false, + \Docker\API\Model\PluginConfigInterface::class => false, + \Docker\API\Model\PluginConfigUser::class => false, + \Docker\API\Model\PluginConfigNetwork::class => false, + \Docker\API\Model\PluginConfigLinux::class => false, + \Docker\API\Model\PluginConfigArgs::class => false, + \Docker\API\Model\PluginConfigRootfs::class => false, + \Docker\API\Model\NodeSpec::class => false, + \Docker\API\Model\Node::class => false, + \Docker\API\Model\NodeVersion::class => false, + \Docker\API\Model\NodeDescription::class => false, + \Docker\API\Model\NodeDescriptionPlatform::class => false, + \Docker\API\Model\NodeDescriptionResources::class => false, + \Docker\API\Model\NodeDescriptionEngine::class => false, + \Docker\API\Model\NodeDescriptionEnginePluginsItem::class => false, + \Docker\API\Model\SwarmSpec::class => false, + \Docker\API\Model\SwarmSpecOrchestration::class => false, + \Docker\API\Model\SwarmSpecRaft::class => false, + \Docker\API\Model\SwarmSpecDispatcher::class => false, + \Docker\API\Model\SwarmSpecCAConfig::class => false, + \Docker\API\Model\SwarmSpecCAConfigExternalCAsItem::class => false, + \Docker\API\Model\SwarmSpecEncryptionConfig::class => false, + \Docker\API\Model\SwarmSpecTaskDefaults::class => false, + \Docker\API\Model\SwarmSpecTaskDefaultsLogDriver::class => false, + \Docker\API\Model\ClusterInfo::class => false, + \Docker\API\Model\ClusterInfoVersion::class => false, + \Docker\API\Model\TaskSpec::class => false, + \Docker\API\Model\TaskSpecContainerSpec::class => false, + \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class => false, + \Docker\API\Model\TaskSpecResources::class => false, + \Docker\API\Model\TaskSpecResourcesLimits::class => false, + \Docker\API\Model\TaskSpecResourcesReservations::class => false, + \Docker\API\Model\TaskSpecRestartPolicy::class => false, + \Docker\API\Model\TaskSpecPlacement::class => false, + \Docker\API\Model\TaskSpecNetworksItem::class => false, + \Docker\API\Model\TaskSpecLogDriver::class => false, + \Docker\API\Model\Task::class => false, + \Docker\API\Model\TaskVersion::class => false, + \Docker\API\Model\TaskStatus::class => false, + \Docker\API\Model\TaskStatusContainerStatus::class => false, + \Docker\API\Model\ServiceSpec::class => false, + \Docker\API\Model\ServiceSpecMode::class => false, + \Docker\API\Model\ServiceSpecModeReplicated::class => false, + \Docker\API\Model\ServiceSpecUpdateConfig::class => false, + \Docker\API\Model\ServiceSpecNetworksItem::class => false, + \Docker\API\Model\EndpointPortConfig::class => false, + \Docker\API\Model\EndpointSpec::class => false, + \Docker\API\Model\Service::class => false, + \Docker\API\Model\ServiceVersion::class => false, + \Docker\API\Model\ServiceEndpoint::class => false, + \Docker\API\Model\ServiceEndpointVirtualIPsItem::class => false, + \Docker\API\Model\ServiceUpdateStatus::class => false, + \Docker\API\Model\ImageDeleteResponse::class => false, + \Docker\API\Model\ServiceUpdateResponse::class => false, + \Docker\API\Model\ContainerSummaryItem::class => false, + \Docker\API\Model\ContainerSummaryItemHostConfig::class => false, + \Docker\API\Model\ContainerSummaryItemNetworkSettings::class => false, + \Docker\API\Model\SecretSpec::class => false, + \Docker\API\Model\Secret::class => false, + \Docker\API\Model\SecretVersion::class => false, + \Docker\API\Model\ContainersCreatePostBody::class => false, + \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class => false, + \Docker\API\Model\ContainersCreatePostResponse201::class => false, + \Docker\API\Model\ContainersIdJsonGetResponse200::class => false, + \Docker\API\Model\ContainersIdJsonGetResponse200State::class => false, + \Docker\API\Model\ContainersIdTopGetResponse200::class => false, + \Docker\API\Model\ContainersIdChangesGetResponse200Item::class => false, + \Docker\API\Model\ContainersIdUpdatePostBody::class => false, + \Docker\API\Model\ContainersIdUpdatePostResponse200::class => false, + \Docker\API\Model\ContainersIdWaitPostResponse200::class => false, + \Docker\API\Model\ContainersPrunePostResponse200::class => false, + \Docker\API\Model\ImagesNameHistoryGetResponse200Item::class => false, + \Docker\API\Model\ImagesSearchGetResponse200Item::class => false, + \Docker\API\Model\ImagesPrunePostResponse200::class => false, + \Docker\API\Model\AuthPostResponse200::class => false, + \Docker\API\Model\InfoGetResponse200::class => false, + \Docker\API\Model\InfoGetResponse200Plugins::class => false, + \Docker\API\Model\InfoGetResponse200RegistryConfig::class => false, + \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class => false, + \Docker\API\Model\VersionGetResponse200::class => false, + \Docker\API\Model\EventsGetResponse200::class => false, + \Docker\API\Model\EventsGetResponse200Actor::class => false, + \Docker\API\Model\SystemDfGetResponse200::class => false, + \Docker\API\Model\ContainersIdExecPostBody::class => false, + \Docker\API\Model\ExecIdStartPostBody::class => false, + \Docker\API\Model\ExecIdJsonGetResponse200::class => false, + \Docker\API\Model\VolumesGetResponse200::class => false, + \Docker\API\Model\VolumesCreatePostBody::class => false, + \Docker\API\Model\VolumesPrunePostResponse200::class => false, + \Docker\API\Model\NetworksCreatePostBody::class => false, + \Docker\API\Model\NetworksCreatePostResponse201::class => false, + \Docker\API\Model\NetworksIdConnectPostBody::class => false, + \Docker\API\Model\NetworksIdDisconnectPostBody::class => false, + \Docker\API\Model\NetworksPrunePostResponse200::class => false, + \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class => false, + \Docker\API\Model\PluginsPullPostBodyItem::class => false, + \Docker\API\Model\SwarmGetResponse200::class => false, + \Docker\API\Model\SwarmGetResponse200JoinTokens::class => false, + \Docker\API\Model\SwarmInitPostBody::class => false, + \Docker\API\Model\SwarmJoinPostBody::class => false, + \Docker\API\Model\SwarmUnlockkeyGetResponse200::class => false, + \Docker\API\Model\SwarmUnlockPostBody::class => false, + \Docker\API\Model\ServicesCreatePostBody::class => false, + \Docker\API\Model\ServicesCreatePostResponse201::class => false, + \Docker\API\Model\ServicesIdUpdatePostBody::class => false, + \Docker\API\Model\SecretsCreatePostBody::class => false, + \Docker\API\Model\SecretsCreatePostResponse201::class => false, + \Jane\Component\JsonSchemaRuntime\Reference::class => false, + ]; + } + } +} else { + class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + protected $normalizers = [ + + \Docker\API\Model\Port::class => \Docker\API\Normalizer\PortNormalizer::class, + + \Docker\API\Model\MountPoint::class => \Docker\API\Normalizer\MountPointNormalizer::class, + + \Docker\API\Model\DeviceMapping::class => \Docker\API\Normalizer\DeviceMappingNormalizer::class, + + \Docker\API\Model\ThrottleDevice::class => \Docker\API\Normalizer\ThrottleDeviceNormalizer::class, + + \Docker\API\Model\Mount::class => \Docker\API\Normalizer\MountNormalizer::class, + + \Docker\API\Model\MountBindOptions::class => \Docker\API\Normalizer\MountBindOptionsNormalizer::class, + + \Docker\API\Model\MountVolumeOptions::class => \Docker\API\Normalizer\MountVolumeOptionsNormalizer::class, + + \Docker\API\Model\MountVolumeOptionsDriverConfig::class => \Docker\API\Normalizer\MountVolumeOptionsDriverConfigNormalizer::class, + + \Docker\API\Model\MountTmpfsOptions::class => \Docker\API\Normalizer\MountTmpfsOptionsNormalizer::class, + + \Docker\API\Model\RestartPolicy::class => \Docker\API\Normalizer\RestartPolicyNormalizer::class, + + \Docker\API\Model\Resources::class => \Docker\API\Normalizer\ResourcesNormalizer::class, + + \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class => \Docker\API\Normalizer\ResourcesBlkioWeightDeviceItemNormalizer::class, + + \Docker\API\Model\ResourcesUlimitsItem::class => \Docker\API\Normalizer\ResourcesUlimitsItemNormalizer::class, + + \Docker\API\Model\HostConfig::class => \Docker\API\Normalizer\HostConfigNormalizer::class, + + \Docker\API\Model\HostConfigLogConfig::class => \Docker\API\Normalizer\HostConfigLogConfigNormalizer::class, + + \Docker\API\Model\HostConfigPortBindingsItem::class => \Docker\API\Normalizer\HostConfigPortBindingsItemNormalizer::class, + + \Docker\API\Model\Config::class => \Docker\API\Normalizer\ConfigNormalizer::class, + + \Docker\API\Model\ConfigHealthcheck::class => \Docker\API\Normalizer\ConfigHealthcheckNormalizer::class, + + \Docker\API\Model\ConfigVolumes::class => \Docker\API\Normalizer\ConfigVolumesNormalizer::class, + + \Docker\API\Model\NetworkConfig::class => \Docker\API\Normalizer\NetworkConfigNormalizer::class, + + \Docker\API\Model\GraphDriver::class => \Docker\API\Normalizer\GraphDriverNormalizer::class, + + \Docker\API\Model\Image::class => \Docker\API\Normalizer\ImageNormalizer::class, + + \Docker\API\Model\ImageRootFS::class => \Docker\API\Normalizer\ImageRootFSNormalizer::class, + + \Docker\API\Model\ImageSummary::class => \Docker\API\Normalizer\ImageSummaryNormalizer::class, + + \Docker\API\Model\AuthConfig::class => \Docker\API\Normalizer\AuthConfigNormalizer::class, + + \Docker\API\Model\ProcessConfig::class => \Docker\API\Normalizer\ProcessConfigNormalizer::class, + + \Docker\API\Model\Volume::class => \Docker\API\Normalizer\VolumeNormalizer::class, + + \Docker\API\Model\VolumeUsageData::class => \Docker\API\Normalizer\VolumeUsageDataNormalizer::class, + + \Docker\API\Model\Network::class => \Docker\API\Normalizer\NetworkNormalizer::class, + + \Docker\API\Model\IPAM::class => \Docker\API\Normalizer\IPAMNormalizer::class, + + \Docker\API\Model\NetworkContainer::class => \Docker\API\Normalizer\NetworkContainerNormalizer::class, + + \Docker\API\Model\BuildInfo::class => \Docker\API\Normalizer\BuildInfoNormalizer::class, + + \Docker\API\Model\CreateImageInfo::class => \Docker\API\Normalizer\CreateImageInfoNormalizer::class, + + \Docker\API\Model\PushImageInfo::class => \Docker\API\Normalizer\PushImageInfoNormalizer::class, + + \Docker\API\Model\ErrorDetail::class => \Docker\API\Normalizer\ErrorDetailNormalizer::class, + + \Docker\API\Model\ProgressDetail::class => \Docker\API\Normalizer\ProgressDetailNormalizer::class, + + \Docker\API\Model\ErrorResponse::class => \Docker\API\Normalizer\ErrorResponseNormalizer::class, + + \Docker\API\Model\IdResponse::class => \Docker\API\Normalizer\IdResponseNormalizer::class, + + \Docker\API\Model\EndpointSettings::class => \Docker\API\Normalizer\EndpointSettingsNormalizer::class, + + \Docker\API\Model\EndpointSettingsIPAMConfig::class => \Docker\API\Normalizer\EndpointSettingsIPAMConfigNormalizer::class, + + \Docker\API\Model\PluginMount::class => \Docker\API\Normalizer\PluginMountNormalizer::class, + + \Docker\API\Model\PluginDevice::class => \Docker\API\Normalizer\PluginDeviceNormalizer::class, + + \Docker\API\Model\PluginEnv::class => \Docker\API\Normalizer\PluginEnvNormalizer::class, + + \Docker\API\Model\PluginInterfaceType::class => \Docker\API\Normalizer\PluginInterfaceTypeNormalizer::class, + + \Docker\API\Model\Plugin::class => \Docker\API\Normalizer\PluginNormalizer::class, + + \Docker\API\Model\PluginSettings::class => \Docker\API\Normalizer\PluginSettingsNormalizer::class, + + \Docker\API\Model\PluginConfig::class => \Docker\API\Normalizer\PluginConfigNormalizer::class, + + \Docker\API\Model\PluginConfigInterface::class => \Docker\API\Normalizer\PluginConfigInterfaceNormalizer::class, + + \Docker\API\Model\PluginConfigUser::class => \Docker\API\Normalizer\PluginConfigUserNormalizer::class, + + \Docker\API\Model\PluginConfigNetwork::class => \Docker\API\Normalizer\PluginConfigNetworkNormalizer::class, + + \Docker\API\Model\PluginConfigLinux::class => \Docker\API\Normalizer\PluginConfigLinuxNormalizer::class, + + \Docker\API\Model\PluginConfigArgs::class => \Docker\API\Normalizer\PluginConfigArgsNormalizer::class, + + \Docker\API\Model\PluginConfigRootfs::class => \Docker\API\Normalizer\PluginConfigRootfsNormalizer::class, + + \Docker\API\Model\NodeSpec::class => \Docker\API\Normalizer\NodeSpecNormalizer::class, + + \Docker\API\Model\Node::class => \Docker\API\Normalizer\NodeNormalizer::class, + + \Docker\API\Model\NodeVersion::class => \Docker\API\Normalizer\NodeVersionNormalizer::class, + + \Docker\API\Model\NodeDescription::class => \Docker\API\Normalizer\NodeDescriptionNormalizer::class, + + \Docker\API\Model\NodeDescriptionPlatform::class => \Docker\API\Normalizer\NodeDescriptionPlatformNormalizer::class, + + \Docker\API\Model\NodeDescriptionResources::class => \Docker\API\Normalizer\NodeDescriptionResourcesNormalizer::class, + + \Docker\API\Model\NodeDescriptionEngine::class => \Docker\API\Normalizer\NodeDescriptionEngineNormalizer::class, + + \Docker\API\Model\NodeDescriptionEnginePluginsItem::class => \Docker\API\Normalizer\NodeDescriptionEnginePluginsItemNormalizer::class, + + \Docker\API\Model\SwarmSpec::class => \Docker\API\Normalizer\SwarmSpecNormalizer::class, + + \Docker\API\Model\SwarmSpecOrchestration::class => \Docker\API\Normalizer\SwarmSpecOrchestrationNormalizer::class, + + \Docker\API\Model\SwarmSpecRaft::class => \Docker\API\Normalizer\SwarmSpecRaftNormalizer::class, + + \Docker\API\Model\SwarmSpecDispatcher::class => \Docker\API\Normalizer\SwarmSpecDispatcherNormalizer::class, + + \Docker\API\Model\SwarmSpecCAConfig::class => \Docker\API\Normalizer\SwarmSpecCAConfigNormalizer::class, + + \Docker\API\Model\SwarmSpecCAConfigExternalCAsItem::class => \Docker\API\Normalizer\SwarmSpecCAConfigExternalCAsItemNormalizer::class, + + \Docker\API\Model\SwarmSpecEncryptionConfig::class => \Docker\API\Normalizer\SwarmSpecEncryptionConfigNormalizer::class, + + \Docker\API\Model\SwarmSpecTaskDefaults::class => \Docker\API\Normalizer\SwarmSpecTaskDefaultsNormalizer::class, + + \Docker\API\Model\SwarmSpecTaskDefaultsLogDriver::class => \Docker\API\Normalizer\SwarmSpecTaskDefaultsLogDriverNormalizer::class, + + \Docker\API\Model\ClusterInfo::class => \Docker\API\Normalizer\ClusterInfoNormalizer::class, + + \Docker\API\Model\ClusterInfoVersion::class => \Docker\API\Normalizer\ClusterInfoVersionNormalizer::class, + + \Docker\API\Model\TaskSpec::class => \Docker\API\Normalizer\TaskSpecNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpec::class => \Docker\API\Normalizer\TaskSpecContainerSpecNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class => \Docker\API\Normalizer\TaskSpecContainerSpecDNSConfigNormalizer::class, + + \Docker\API\Model\TaskSpecResources::class => \Docker\API\Normalizer\TaskSpecResourcesNormalizer::class, + + \Docker\API\Model\TaskSpecResourcesLimits::class => \Docker\API\Normalizer\TaskSpecResourcesLimitsNormalizer::class, + + \Docker\API\Model\TaskSpecResourcesReservations::class => \Docker\API\Normalizer\TaskSpecResourcesReservationsNormalizer::class, + + \Docker\API\Model\TaskSpecRestartPolicy::class => \Docker\API\Normalizer\TaskSpecRestartPolicyNormalizer::class, + + \Docker\API\Model\TaskSpecPlacement::class => \Docker\API\Normalizer\TaskSpecPlacementNormalizer::class, + + \Docker\API\Model\TaskSpecNetworksItem::class => \Docker\API\Normalizer\TaskSpecNetworksItemNormalizer::class, + + \Docker\API\Model\TaskSpecLogDriver::class => \Docker\API\Normalizer\TaskSpecLogDriverNormalizer::class, + + \Docker\API\Model\Task::class => \Docker\API\Normalizer\TaskNormalizer::class, + + \Docker\API\Model\TaskVersion::class => \Docker\API\Normalizer\TaskVersionNormalizer::class, + + \Docker\API\Model\TaskStatus::class => \Docker\API\Normalizer\TaskStatusNormalizer::class, + + \Docker\API\Model\TaskStatusContainerStatus::class => \Docker\API\Normalizer\TaskStatusContainerStatusNormalizer::class, + + \Docker\API\Model\ServiceSpec::class => \Docker\API\Normalizer\ServiceSpecNormalizer::class, + + \Docker\API\Model\ServiceSpecMode::class => \Docker\API\Normalizer\ServiceSpecModeNormalizer::class, + + \Docker\API\Model\ServiceSpecModeReplicated::class => \Docker\API\Normalizer\ServiceSpecModeReplicatedNormalizer::class, + + \Docker\API\Model\ServiceSpecUpdateConfig::class => \Docker\API\Normalizer\ServiceSpecUpdateConfigNormalizer::class, + + \Docker\API\Model\ServiceSpecNetworksItem::class => \Docker\API\Normalizer\ServiceSpecNetworksItemNormalizer::class, + + \Docker\API\Model\EndpointPortConfig::class => \Docker\API\Normalizer\EndpointPortConfigNormalizer::class, + + \Docker\API\Model\EndpointSpec::class => \Docker\API\Normalizer\EndpointSpecNormalizer::class, + + \Docker\API\Model\Service::class => \Docker\API\Normalizer\ServiceNormalizer::class, + + \Docker\API\Model\ServiceVersion::class => \Docker\API\Normalizer\ServiceVersionNormalizer::class, + + \Docker\API\Model\ServiceEndpoint::class => \Docker\API\Normalizer\ServiceEndpointNormalizer::class, + + \Docker\API\Model\ServiceEndpointVirtualIPsItem::class => \Docker\API\Normalizer\ServiceEndpointVirtualIPsItemNormalizer::class, + + \Docker\API\Model\ServiceUpdateStatus::class => \Docker\API\Normalizer\ServiceUpdateStatusNormalizer::class, + + \Docker\API\Model\ImageDeleteResponse::class => \Docker\API\Normalizer\ImageDeleteResponseNormalizer::class, + + \Docker\API\Model\ServiceUpdateResponse::class => \Docker\API\Normalizer\ServiceUpdateResponseNormalizer::class, + + \Docker\API\Model\ContainerSummaryItem::class => \Docker\API\Normalizer\ContainerSummaryItemNormalizer::class, + + \Docker\API\Model\ContainerSummaryItemHostConfig::class => \Docker\API\Normalizer\ContainerSummaryItemHostConfigNormalizer::class, + + \Docker\API\Model\ContainerSummaryItemNetworkSettings::class => \Docker\API\Normalizer\ContainerSummaryItemNetworkSettingsNormalizer::class, + + \Docker\API\Model\SecretSpec::class => \Docker\API\Normalizer\SecretSpecNormalizer::class, + + \Docker\API\Model\Secret::class => \Docker\API\Normalizer\SecretNormalizer::class, + + \Docker\API\Model\SecretVersion::class => \Docker\API\Normalizer\SecretVersionNormalizer::class, + + \Docker\API\Model\ContainersCreatePostBody::class => \Docker\API\Normalizer\ContainersCreatePostBodyNormalizer::class, + + \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class => \Docker\API\Normalizer\ContainersCreatePostBodyNetworkingConfigNormalizer::class, + + \Docker\API\Model\ContainersCreatePostResponse201::class => \Docker\API\Normalizer\ContainersCreatePostResponse201Normalizer::class, + + \Docker\API\Model\ContainersIdJsonGetResponse200::class => \Docker\API\Normalizer\ContainersIdJsonGetResponse200Normalizer::class, + + \Docker\API\Model\ContainersIdJsonGetResponse200State::class => \Docker\API\Normalizer\ContainersIdJsonGetResponse200StateNormalizer::class, + + \Docker\API\Model\ContainersIdTopGetResponse200::class => \Docker\API\Normalizer\ContainersIdTopGetResponse200Normalizer::class, + + \Docker\API\Model\ContainersIdChangesGetResponse200Item::class => \Docker\API\Normalizer\ContainersIdChangesGetResponse200ItemNormalizer::class, + + \Docker\API\Model\ContainersIdUpdatePostBody::class => \Docker\API\Normalizer\ContainersIdUpdatePostBodyNormalizer::class, + + \Docker\API\Model\ContainersIdUpdatePostResponse200::class => \Docker\API\Normalizer\ContainersIdUpdatePostResponse200Normalizer::class, + + \Docker\API\Model\ContainersIdWaitPostResponse200::class => \Docker\API\Normalizer\ContainersIdWaitPostResponse200Normalizer::class, + + \Docker\API\Model\ContainersPrunePostResponse200::class => \Docker\API\Normalizer\ContainersPrunePostResponse200Normalizer::class, + + \Docker\API\Model\ImagesNameHistoryGetResponse200Item::class => \Docker\API\Normalizer\ImagesNameHistoryGetResponse200ItemNormalizer::class, + + \Docker\API\Model\ImagesSearchGetResponse200Item::class => \Docker\API\Normalizer\ImagesSearchGetResponse200ItemNormalizer::class, + + \Docker\API\Model\ImagesPrunePostResponse200::class => \Docker\API\Normalizer\ImagesPrunePostResponse200Normalizer::class, + + \Docker\API\Model\AuthPostResponse200::class => \Docker\API\Normalizer\AuthPostResponse200Normalizer::class, + + \Docker\API\Model\InfoGetResponse200::class => \Docker\API\Normalizer\InfoGetResponse200Normalizer::class, + + \Docker\API\Model\InfoGetResponse200Plugins::class => \Docker\API\Normalizer\InfoGetResponse200PluginsNormalizer::class, + + \Docker\API\Model\InfoGetResponse200RegistryConfig::class => \Docker\API\Normalizer\InfoGetResponse200RegistryConfigNormalizer::class, + + \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class => \Docker\API\Normalizer\InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer::class, + + \Docker\API\Model\VersionGetResponse200::class => \Docker\API\Normalizer\VersionGetResponse200Normalizer::class, + + \Docker\API\Model\EventsGetResponse200::class => \Docker\API\Normalizer\EventsGetResponse200Normalizer::class, + + \Docker\API\Model\EventsGetResponse200Actor::class => \Docker\API\Normalizer\EventsGetResponse200ActorNormalizer::class, + + \Docker\API\Model\SystemDfGetResponse200::class => \Docker\API\Normalizer\SystemDfGetResponse200Normalizer::class, + + \Docker\API\Model\ContainersIdExecPostBody::class => \Docker\API\Normalizer\ContainersIdExecPostBodyNormalizer::class, + + \Docker\API\Model\ExecIdStartPostBody::class => \Docker\API\Normalizer\ExecIdStartPostBodyNormalizer::class, + + \Docker\API\Model\ExecIdJsonGetResponse200::class => \Docker\API\Normalizer\ExecIdJsonGetResponse200Normalizer::class, + + \Docker\API\Model\VolumesGetResponse200::class => \Docker\API\Normalizer\VolumesGetResponse200Normalizer::class, + + \Docker\API\Model\VolumesCreatePostBody::class => \Docker\API\Normalizer\VolumesCreatePostBodyNormalizer::class, + + \Docker\API\Model\VolumesPrunePostResponse200::class => \Docker\API\Normalizer\VolumesPrunePostResponse200Normalizer::class, + + \Docker\API\Model\NetworksCreatePostBody::class => \Docker\API\Normalizer\NetworksCreatePostBodyNormalizer::class, + + \Docker\API\Model\NetworksCreatePostResponse201::class => \Docker\API\Normalizer\NetworksCreatePostResponse201Normalizer::class, + + \Docker\API\Model\NetworksIdConnectPostBody::class => \Docker\API\Normalizer\NetworksIdConnectPostBodyNormalizer::class, + + \Docker\API\Model\NetworksIdDisconnectPostBody::class => \Docker\API\Normalizer\NetworksIdDisconnectPostBodyNormalizer::class, + + \Docker\API\Model\NetworksPrunePostResponse200::class => \Docker\API\Normalizer\NetworksPrunePostResponse200Normalizer::class, + + \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class => \Docker\API\Normalizer\PluginsPrivilegesGetResponse200ItemNormalizer::class, + + \Docker\API\Model\PluginsPullPostBodyItem::class => \Docker\API\Normalizer\PluginsPullPostBodyItemNormalizer::class, + + \Docker\API\Model\SwarmGetResponse200::class => \Docker\API\Normalizer\SwarmGetResponse200Normalizer::class, + + \Docker\API\Model\SwarmGetResponse200JoinTokens::class => \Docker\API\Normalizer\SwarmGetResponse200JoinTokensNormalizer::class, + + \Docker\API\Model\SwarmInitPostBody::class => \Docker\API\Normalizer\SwarmInitPostBodyNormalizer::class, + + \Docker\API\Model\SwarmJoinPostBody::class => \Docker\API\Normalizer\SwarmJoinPostBodyNormalizer::class, + + \Docker\API\Model\SwarmUnlockkeyGetResponse200::class => \Docker\API\Normalizer\SwarmUnlockkeyGetResponse200Normalizer::class, + + \Docker\API\Model\SwarmUnlockPostBody::class => \Docker\API\Normalizer\SwarmUnlockPostBodyNormalizer::class, + + \Docker\API\Model\ServicesCreatePostBody::class => \Docker\API\Normalizer\ServicesCreatePostBodyNormalizer::class, + + \Docker\API\Model\ServicesCreatePostResponse201::class => \Docker\API\Normalizer\ServicesCreatePostResponse201Normalizer::class, + + \Docker\API\Model\ServicesIdUpdatePostBody::class => \Docker\API\Normalizer\ServicesIdUpdatePostBodyNormalizer::class, + + \Docker\API\Model\SecretsCreatePostBody::class => \Docker\API\Normalizer\SecretsCreatePostBodyNormalizer::class, + + \Docker\API\Model\SecretsCreatePostResponse201::class => \Docker\API\Normalizer\SecretsCreatePostResponse201Normalizer::class, + + \Jane\Component\JsonSchemaRuntime\Reference::class => \Docker\API\Runtime\Normalizer\ReferenceNormalizer::class, + ], $normalizersCache = []; + public function supportsDenormalization($data, $type, $format = null, array $context = []): bool + { + return array_key_exists($type, $this->normalizers); + } + public function supportsNormalization($data, $format = null, array $context = []): bool + { + return is_object($data) && array_key_exists(get_class($data), $this->normalizers); + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $normalizerClass = $this->normalizers[get_class($object)]; + $normalizer = $this->getNormalizer($normalizerClass); + return $normalizer->normalize($object, $format, $context); + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + $denormalizerClass = $this->normalizers[$type]; + $denormalizer = $this->getNormalizer($denormalizerClass); + return $denormalizer->denormalize($data, $type, $format, $context); + } + private function getNormalizer(string $normalizerClass) + { + return $this->normalizersCache[$normalizerClass] ?? $this->initNormalizer($normalizerClass); + } + private function initNormalizer(string $normalizerClass) + { + $normalizer = new $normalizerClass(); + $normalizer->setNormalizer($this->normalizer); + $normalizer->setDenormalizer($this->denormalizer); + $this->normalizersCache[$normalizerClass] = $normalizer; + return $normalizer; + } + public function getSupportedTypes(?string $format = null): array + { + return [ + + \Docker\API\Model\Port::class => false, + \Docker\API\Model\MountPoint::class => false, + \Docker\API\Model\DeviceMapping::class => false, + \Docker\API\Model\ThrottleDevice::class => false, + \Docker\API\Model\Mount::class => false, + \Docker\API\Model\MountBindOptions::class => false, + \Docker\API\Model\MountVolumeOptions::class => false, + \Docker\API\Model\MountVolumeOptionsDriverConfig::class => false, + \Docker\API\Model\MountTmpfsOptions::class => false, + \Docker\API\Model\RestartPolicy::class => false, + \Docker\API\Model\Resources::class => false, + \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class => false, + \Docker\API\Model\ResourcesUlimitsItem::class => false, + \Docker\API\Model\HostConfig::class => false, + \Docker\API\Model\HostConfigLogConfig::class => false, + \Docker\API\Model\HostConfigPortBindingsItem::class => false, + \Docker\API\Model\Config::class => false, + \Docker\API\Model\ConfigHealthcheck::class => false, + \Docker\API\Model\ConfigVolumes::class => false, + \Docker\API\Model\NetworkConfig::class => false, + \Docker\API\Model\GraphDriver::class => false, + \Docker\API\Model\Image::class => false, + \Docker\API\Model\ImageRootFS::class => false, + \Docker\API\Model\ImageSummary::class => false, + \Docker\API\Model\AuthConfig::class => false, + \Docker\API\Model\ProcessConfig::class => false, + \Docker\API\Model\Volume::class => false, + \Docker\API\Model\VolumeUsageData::class => false, + \Docker\API\Model\Network::class => false, + \Docker\API\Model\IPAM::class => false, + \Docker\API\Model\NetworkContainer::class => false, + \Docker\API\Model\BuildInfo::class => false, + \Docker\API\Model\CreateImageInfo::class => false, + \Docker\API\Model\PushImageInfo::class => false, + \Docker\API\Model\ErrorDetail::class => false, + \Docker\API\Model\ProgressDetail::class => false, + \Docker\API\Model\ErrorResponse::class => false, + \Docker\API\Model\IdResponse::class => false, + \Docker\API\Model\EndpointSettings::class => false, + \Docker\API\Model\EndpointSettingsIPAMConfig::class => false, + \Docker\API\Model\PluginMount::class => false, + \Docker\API\Model\PluginDevice::class => false, + \Docker\API\Model\PluginEnv::class => false, + \Docker\API\Model\PluginInterfaceType::class => false, + \Docker\API\Model\Plugin::class => false, + \Docker\API\Model\PluginSettings::class => false, + \Docker\API\Model\PluginConfig::class => false, + \Docker\API\Model\PluginConfigInterface::class => false, + \Docker\API\Model\PluginConfigUser::class => false, + \Docker\API\Model\PluginConfigNetwork::class => false, + \Docker\API\Model\PluginConfigLinux::class => false, + \Docker\API\Model\PluginConfigArgs::class => false, + \Docker\API\Model\PluginConfigRootfs::class => false, + \Docker\API\Model\NodeSpec::class => false, + \Docker\API\Model\Node::class => false, + \Docker\API\Model\NodeVersion::class => false, + \Docker\API\Model\NodeDescription::class => false, + \Docker\API\Model\NodeDescriptionPlatform::class => false, + \Docker\API\Model\NodeDescriptionResources::class => false, + \Docker\API\Model\NodeDescriptionEngine::class => false, + \Docker\API\Model\NodeDescriptionEnginePluginsItem::class => false, + \Docker\API\Model\SwarmSpec::class => false, + \Docker\API\Model\SwarmSpecOrchestration::class => false, + \Docker\API\Model\SwarmSpecRaft::class => false, + \Docker\API\Model\SwarmSpecDispatcher::class => false, + \Docker\API\Model\SwarmSpecCAConfig::class => false, + \Docker\API\Model\SwarmSpecCAConfigExternalCAsItem::class => false, + \Docker\API\Model\SwarmSpecEncryptionConfig::class => false, + \Docker\API\Model\SwarmSpecTaskDefaults::class => false, + \Docker\API\Model\SwarmSpecTaskDefaultsLogDriver::class => false, + \Docker\API\Model\ClusterInfo::class => false, + \Docker\API\Model\ClusterInfoVersion::class => false, + \Docker\API\Model\TaskSpec::class => false, + \Docker\API\Model\TaskSpecContainerSpec::class => false, + \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class => false, + \Docker\API\Model\TaskSpecResources::class => false, + \Docker\API\Model\TaskSpecResourcesLimits::class => false, + \Docker\API\Model\TaskSpecResourcesReservations::class => false, + \Docker\API\Model\TaskSpecRestartPolicy::class => false, + \Docker\API\Model\TaskSpecPlacement::class => false, + \Docker\API\Model\TaskSpecNetworksItem::class => false, + \Docker\API\Model\TaskSpecLogDriver::class => false, + \Docker\API\Model\Task::class => false, + \Docker\API\Model\TaskVersion::class => false, + \Docker\API\Model\TaskStatus::class => false, + \Docker\API\Model\TaskStatusContainerStatus::class => false, + \Docker\API\Model\ServiceSpec::class => false, + \Docker\API\Model\ServiceSpecMode::class => false, + \Docker\API\Model\ServiceSpecModeReplicated::class => false, + \Docker\API\Model\ServiceSpecUpdateConfig::class => false, + \Docker\API\Model\ServiceSpecNetworksItem::class => false, + \Docker\API\Model\EndpointPortConfig::class => false, + \Docker\API\Model\EndpointSpec::class => false, + \Docker\API\Model\Service::class => false, + \Docker\API\Model\ServiceVersion::class => false, + \Docker\API\Model\ServiceEndpoint::class => false, + \Docker\API\Model\ServiceEndpointVirtualIPsItem::class => false, + \Docker\API\Model\ServiceUpdateStatus::class => false, + \Docker\API\Model\ImageDeleteResponse::class => false, + \Docker\API\Model\ServiceUpdateResponse::class => false, + \Docker\API\Model\ContainerSummaryItem::class => false, + \Docker\API\Model\ContainerSummaryItemHostConfig::class => false, + \Docker\API\Model\ContainerSummaryItemNetworkSettings::class => false, + \Docker\API\Model\SecretSpec::class => false, + \Docker\API\Model\Secret::class => false, + \Docker\API\Model\SecretVersion::class => false, + \Docker\API\Model\ContainersCreatePostBody::class => false, + \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class => false, + \Docker\API\Model\ContainersCreatePostResponse201::class => false, + \Docker\API\Model\ContainersIdJsonGetResponse200::class => false, + \Docker\API\Model\ContainersIdJsonGetResponse200State::class => false, + \Docker\API\Model\ContainersIdTopGetResponse200::class => false, + \Docker\API\Model\ContainersIdChangesGetResponse200Item::class => false, + \Docker\API\Model\ContainersIdUpdatePostBody::class => false, + \Docker\API\Model\ContainersIdUpdatePostResponse200::class => false, + \Docker\API\Model\ContainersIdWaitPostResponse200::class => false, + \Docker\API\Model\ContainersPrunePostResponse200::class => false, + \Docker\API\Model\ImagesNameHistoryGetResponse200Item::class => false, + \Docker\API\Model\ImagesSearchGetResponse200Item::class => false, + \Docker\API\Model\ImagesPrunePostResponse200::class => false, + \Docker\API\Model\AuthPostResponse200::class => false, + \Docker\API\Model\InfoGetResponse200::class => false, + \Docker\API\Model\InfoGetResponse200Plugins::class => false, + \Docker\API\Model\InfoGetResponse200RegistryConfig::class => false, + \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class => false, + \Docker\API\Model\VersionGetResponse200::class => false, + \Docker\API\Model\EventsGetResponse200::class => false, + \Docker\API\Model\EventsGetResponse200Actor::class => false, + \Docker\API\Model\SystemDfGetResponse200::class => false, + \Docker\API\Model\ContainersIdExecPostBody::class => false, + \Docker\API\Model\ExecIdStartPostBody::class => false, + \Docker\API\Model\ExecIdJsonGetResponse200::class => false, + \Docker\API\Model\VolumesGetResponse200::class => false, + \Docker\API\Model\VolumesCreatePostBody::class => false, + \Docker\API\Model\VolumesPrunePostResponse200::class => false, + \Docker\API\Model\NetworksCreatePostBody::class => false, + \Docker\API\Model\NetworksCreatePostResponse201::class => false, + \Docker\API\Model\NetworksIdConnectPostBody::class => false, + \Docker\API\Model\NetworksIdDisconnectPostBody::class => false, + \Docker\API\Model\NetworksPrunePostResponse200::class => false, + \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class => false, + \Docker\API\Model\PluginsPullPostBodyItem::class => false, + \Docker\API\Model\SwarmGetResponse200::class => false, + \Docker\API\Model\SwarmGetResponse200JoinTokens::class => false, + \Docker\API\Model\SwarmInitPostBody::class => false, + \Docker\API\Model\SwarmJoinPostBody::class => false, + \Docker\API\Model\SwarmUnlockkeyGetResponse200::class => false, + \Docker\API\Model\SwarmUnlockPostBody::class => false, + \Docker\API\Model\ServicesCreatePostBody::class => false, + \Docker\API\Model\ServicesCreatePostResponse201::class => false, + \Docker\API\Model\ServicesIdUpdatePostBody::class => false, + \Docker\API\Model\SecretsCreatePostBody::class => false, + \Docker\API\Model\SecretsCreatePostResponse201::class => false, + \Jane\Component\JsonSchemaRuntime\Reference::class => false, + ]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/LogConfigNormalizer.php b/generated/Normalizer/LogConfigNormalizer.php deleted file mode 100644 index fa5d69923..000000000 --- a/generated/Normalizer/LogConfigNormalizer.php +++ /dev/null @@ -1,83 +0,0 @@ -setType($data->{'Type'}); - } - if (property_exists($data, 'Config')) { - $value = $data->{'Config'}; - if (is_object($data->{'Config'})) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Config'} as $key => $value_1) { - $values[$key] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Config'})) { - $value = $data->{'Config'}; - } - $object->setConfig($value); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getType()) { - $data->{'Type'} = $object->getType(); - } - $value = $object->getConfig(); - if (is_object($object->getConfig())) { - $values = new \stdClass(); - foreach ($object->getConfig() as $key => $value_1) { - $values->{$key} = $value_1; - } - $value = $values; - } - if (is_null($object->getConfig())) { - $value = $object->getConfig(); - } - $data->{'Config'} = $value; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/MountBindOptionsNormalizer.php b/generated/Normalizer/MountBindOptionsNormalizer.php new file mode 100644 index 000000000..992222369 --- /dev/null +++ b/generated/Normalizer/MountBindOptionsNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class MountBindOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\MountBindOptions::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\MountBindOptions::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\MountBindOptions(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Propagation', $data) && $data['Propagation'] !== null) { + $object->setPropagation($data['Propagation']); + } + elseif (\array_key_exists('Propagation', $data) && $data['Propagation'] === null) { + $object->setPropagation(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('propagation') && null !== $object->getPropagation()) { + $data['Propagation'] = $object->getPropagation(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\MountBindOptions::class => false]; + } + } +} else { + class MountBindOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\MountBindOptions::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\MountBindOptions::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\MountBindOptions(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Propagation', $data) && $data['Propagation'] !== null) { + $object->setPropagation($data['Propagation']); + } + elseif (\array_key_exists('Propagation', $data) && $data['Propagation'] === null) { + $object->setPropagation(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('propagation') && null !== $object->getPropagation()) { + $data['Propagation'] = $object->getPropagation(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\MountBindOptions::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/MountNormalizer.php b/generated/Normalizer/MountNormalizer.php index 1ab0025f4..9e89c4de4 100644 --- a/generated/Normalizer/MountNormalizer.php +++ b/generated/Normalizer/MountNormalizer.php @@ -2,92 +2,225 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class MountNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\Mount') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class MountNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($data instanceof \Docker\API\Model\Mount) { - return true; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Mount::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Mount::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Mount(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Target', $data) && $data['Target'] !== null) { + $object->setTarget($data['Target']); + } + elseif (\array_key_exists('Target', $data) && $data['Target'] === null) { + $object->setTarget(null); + } + if (\array_key_exists('Source', $data) && $data['Source'] !== null) { + $object->setSource($data['Source']); + } + elseif (\array_key_exists('Source', $data) && $data['Source'] === null) { + $object->setSource(null); + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('ReadOnly', $data) && $data['ReadOnly'] !== null) { + $object->setReadOnly($data['ReadOnly']); + } + elseif (\array_key_exists('ReadOnly', $data) && $data['ReadOnly'] === null) { + $object->setReadOnly(null); + } + if (\array_key_exists('BindOptions', $data) && $data['BindOptions'] !== null) { + $object->setBindOptions($this->denormalizer->denormalize($data['BindOptions'], \Docker\API\Model\MountBindOptions::class, 'json', $context)); + } + elseif (\array_key_exists('BindOptions', $data) && $data['BindOptions'] === null) { + $object->setBindOptions(null); + } + if (\array_key_exists('VolumeOptions', $data) && $data['VolumeOptions'] !== null) { + $object->setVolumeOptions($this->denormalizer->denormalize($data['VolumeOptions'], \Docker\API\Model\MountVolumeOptions::class, 'json', $context)); + } + elseif (\array_key_exists('VolumeOptions', $data) && $data['VolumeOptions'] === null) { + $object->setVolumeOptions(null); + } + if (\array_key_exists('TmpfsOptions', $data) && $data['TmpfsOptions'] !== null) { + $object->setTmpfsOptions($this->denormalizer->denormalize($data['TmpfsOptions'], \Docker\API\Model\MountTmpfsOptions::class, 'json', $context)); + } + elseif (\array_key_exists('TmpfsOptions', $data) && $data['TmpfsOptions'] === null) { + $object->setTmpfsOptions(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('target') && null !== $object->getTarget()) { + $data['Target'] = $object->getTarget(); + } + if ($object->isInitialized('source') && null !== $object->getSource()) { + $data['Source'] = $object->getSource(); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('readOnly') && null !== $object->getReadOnly()) { + $data['ReadOnly'] = $object->getReadOnly(); + } + if ($object->isInitialized('bindOptions') && null !== $object->getBindOptions()) { + $data['BindOptions'] = $this->normalizer->normalize($object->getBindOptions(), 'json', $context); + } + if ($object->isInitialized('volumeOptions') && null !== $object->getVolumeOptions()) { + $data['VolumeOptions'] = $this->normalizer->normalize($object->getVolumeOptions(), 'json', $context); + } + if ($object->isInitialized('tmpfsOptions') && null !== $object->getTmpfsOptions()) { + $data['TmpfsOptions'] = $this->normalizer->normalize($object->getTmpfsOptions(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Mount::class => false]; } - - return false; } - - public function denormalize($data, $class, $format = null, array $context = []) +} else { + class MountNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $object = new \Docker\API\Model\Mount(); - if (property_exists($data, 'Name')) { - $object->setName($data->{'Name'}); - } - if (property_exists($data, 'Source')) { - $object->setSource($data->{'Source'}); - } - if (property_exists($data, 'Destination')) { - $object->setDestination($data->{'Destination'}); - } - if (property_exists($data, 'Driver')) { - $object->setDriver($data->{'Driver'}); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Mount::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Mount::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Mount(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Target', $data) && $data['Target'] !== null) { + $object->setTarget($data['Target']); + } + elseif (\array_key_exists('Target', $data) && $data['Target'] === null) { + $object->setTarget(null); + } + if (\array_key_exists('Source', $data) && $data['Source'] !== null) { + $object->setSource($data['Source']); + } + elseif (\array_key_exists('Source', $data) && $data['Source'] === null) { + $object->setSource(null); + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('ReadOnly', $data) && $data['ReadOnly'] !== null) { + $object->setReadOnly($data['ReadOnly']); + } + elseif (\array_key_exists('ReadOnly', $data) && $data['ReadOnly'] === null) { + $object->setReadOnly(null); + } + if (\array_key_exists('BindOptions', $data) && $data['BindOptions'] !== null) { + $object->setBindOptions($this->denormalizer->denormalize($data['BindOptions'], \Docker\API\Model\MountBindOptions::class, 'json', $context)); + } + elseif (\array_key_exists('BindOptions', $data) && $data['BindOptions'] === null) { + $object->setBindOptions(null); + } + if (\array_key_exists('VolumeOptions', $data) && $data['VolumeOptions'] !== null) { + $object->setVolumeOptions($this->denormalizer->denormalize($data['VolumeOptions'], \Docker\API\Model\MountVolumeOptions::class, 'json', $context)); + } + elseif (\array_key_exists('VolumeOptions', $data) && $data['VolumeOptions'] === null) { + $object->setVolumeOptions(null); + } + if (\array_key_exists('TmpfsOptions', $data) && $data['TmpfsOptions'] !== null) { + $object->setTmpfsOptions($this->denormalizer->denormalize($data['TmpfsOptions'], \Docker\API\Model\MountTmpfsOptions::class, 'json', $context)); + } + elseif (\array_key_exists('TmpfsOptions', $data) && $data['TmpfsOptions'] === null) { + $object->setTmpfsOptions(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('target') && null !== $object->getTarget()) { + $data['Target'] = $object->getTarget(); + } + if ($object->isInitialized('source') && null !== $object->getSource()) { + $data['Source'] = $object->getSource(); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('readOnly') && null !== $object->getReadOnly()) { + $data['ReadOnly'] = $object->getReadOnly(); + } + if ($object->isInitialized('bindOptions') && null !== $object->getBindOptions()) { + $data['BindOptions'] = $this->normalizer->normalize($object->getBindOptions(), 'json', $context); + } + if ($object->isInitialized('volumeOptions') && null !== $object->getVolumeOptions()) { + $data['VolumeOptions'] = $this->normalizer->normalize($object->getVolumeOptions(), 'json', $context); + } + if ($object->isInitialized('tmpfsOptions') && null !== $object->getTmpfsOptions()) { + $data['TmpfsOptions'] = $this->normalizer->normalize($object->getTmpfsOptions(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Mount::class => false]; } - if (property_exists($data, 'Mode')) { - $object->setMode($data->{'Mode'}); - } - if (property_exists($data, 'RW')) { - $object->setRW($data->{'RW'}); - } - if (property_exists($data, 'Propagation')) { - $object->setPropagation($data->{'Propagation'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - if (null !== $object->getSource()) { - $data->{'Source'} = $object->getSource(); - } - if (null !== $object->getDestination()) { - $data->{'Destination'} = $object->getDestination(); - } - if (null !== $object->getDriver()) { - $data->{'Driver'} = $object->getDriver(); - } - if (null !== $object->getMode()) { - $data->{'Mode'} = $object->getMode(); - } - if (null !== $object->getRW()) { - $data->{'RW'} = $object->getRW(); - } - if (null !== $object->getPropagation()) { - $data->{'Propagation'} = $object->getPropagation(); - } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/MountPointNormalizer.php b/generated/Normalizer/MountPointNormalizer.php new file mode 100644 index 000000000..17128caaf --- /dev/null +++ b/generated/Normalizer/MountPointNormalizer.php @@ -0,0 +1,244 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class MountPointNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\MountPoint::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\MountPoint::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\MountPoint(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Source', $data) && $data['Source'] !== null) { + $object->setSource($data['Source']); + } + elseif (\array_key_exists('Source', $data) && $data['Source'] === null) { + $object->setSource(null); + } + if (\array_key_exists('Destination', $data) && $data['Destination'] !== null) { + $object->setDestination($data['Destination']); + } + elseif (\array_key_exists('Destination', $data) && $data['Destination'] === null) { + $object->setDestination(null); + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($data['Mode']); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + if (\array_key_exists('RW', $data) && $data['RW'] !== null) { + $object->setRW($data['RW']); + } + elseif (\array_key_exists('RW', $data) && $data['RW'] === null) { + $object->setRW(null); + } + if (\array_key_exists('Propagation', $data) && $data['Propagation'] !== null) { + $object->setPropagation($data['Propagation']); + } + elseif (\array_key_exists('Propagation', $data) && $data['Propagation'] === null) { + $object->setPropagation(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('source') && null !== $object->getSource()) { + $data['Source'] = $object->getSource(); + } + if ($object->isInitialized('destination') && null !== $object->getDestination()) { + $data['Destination'] = $object->getDestination(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $object->getMode(); + } + if ($object->isInitialized('rW') && null !== $object->getRW()) { + $data['RW'] = $object->getRW(); + } + if ($object->isInitialized('propagation') && null !== $object->getPropagation()) { + $data['Propagation'] = $object->getPropagation(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\MountPoint::class => false]; + } + } +} else { + class MountPointNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\MountPoint::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\MountPoint::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\MountPoint(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Source', $data) && $data['Source'] !== null) { + $object->setSource($data['Source']); + } + elseif (\array_key_exists('Source', $data) && $data['Source'] === null) { + $object->setSource(null); + } + if (\array_key_exists('Destination', $data) && $data['Destination'] !== null) { + $object->setDestination($data['Destination']); + } + elseif (\array_key_exists('Destination', $data) && $data['Destination'] === null) { + $object->setDestination(null); + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($data['Mode']); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + if (\array_key_exists('RW', $data) && $data['RW'] !== null) { + $object->setRW($data['RW']); + } + elseif (\array_key_exists('RW', $data) && $data['RW'] === null) { + $object->setRW(null); + } + if (\array_key_exists('Propagation', $data) && $data['Propagation'] !== null) { + $object->setPropagation($data['Propagation']); + } + elseif (\array_key_exists('Propagation', $data) && $data['Propagation'] === null) { + $object->setPropagation(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('source') && null !== $object->getSource()) { + $data['Source'] = $object->getSource(); + } + if ($object->isInitialized('destination') && null !== $object->getDestination()) { + $data['Destination'] = $object->getDestination(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $object->getMode(); + } + if ($object->isInitialized('rW') && null !== $object->getRW()) { + $data['RW'] = $object->getRW(); + } + if ($object->isInitialized('propagation') && null !== $object->getPropagation()) { + $data['Propagation'] = $object->getPropagation(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\MountPoint::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/MountTmpfsOptionsNormalizer.php b/generated/Normalizer/MountTmpfsOptionsNormalizer.php new file mode 100644 index 000000000..30df6fb49 --- /dev/null +++ b/generated/Normalizer/MountTmpfsOptionsNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class MountTmpfsOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\MountTmpfsOptions::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\MountTmpfsOptions::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\MountTmpfsOptions(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('SizeBytes', $data) && $data['SizeBytes'] !== null) { + $object->setSizeBytes($data['SizeBytes']); + } + elseif (\array_key_exists('SizeBytes', $data) && $data['SizeBytes'] === null) { + $object->setSizeBytes(null); + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($data['Mode']); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('sizeBytes') && null !== $object->getSizeBytes()) { + $data['SizeBytes'] = $object->getSizeBytes(); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $object->getMode(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\MountTmpfsOptions::class => false]; + } + } +} else { + class MountTmpfsOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\MountTmpfsOptions::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\MountTmpfsOptions::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\MountTmpfsOptions(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('SizeBytes', $data) && $data['SizeBytes'] !== null) { + $object->setSizeBytes($data['SizeBytes']); + } + elseif (\array_key_exists('SizeBytes', $data) && $data['SizeBytes'] === null) { + $object->setSizeBytes(null); + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($data['Mode']); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('sizeBytes') && null !== $object->getSizeBytes()) { + $data['SizeBytes'] = $object->getSizeBytes(); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $object->getMode(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\MountTmpfsOptions::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/MountVolumeOptionsDriverConfigNormalizer.php b/generated/Normalizer/MountVolumeOptionsDriverConfigNormalizer.php new file mode 100644 index 000000000..d569a981d --- /dev/null +++ b/generated/Normalizer/MountVolumeOptionsDriverConfigNormalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class MountVolumeOptionsDriverConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\MountVolumeOptionsDriverConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\MountVolumeOptionsDriverConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\MountVolumeOptionsDriverConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value) { + $values[$key] = $value; + } + $object->setOptions($values); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values = []; + foreach ($object->getOptions() as $key => $value) { + $values[$key] = $value; + } + $data['Options'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\MountVolumeOptionsDriverConfig::class => false]; + } + } +} else { + class MountVolumeOptionsDriverConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\MountVolumeOptionsDriverConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\MountVolumeOptionsDriverConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\MountVolumeOptionsDriverConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value) { + $values[$key] = $value; + } + $object->setOptions($values); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values = []; + foreach ($object->getOptions() as $key => $value) { + $values[$key] = $value; + } + $data['Options'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\MountVolumeOptionsDriverConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/MountVolumeOptionsNormalizer.php b/generated/Normalizer/MountVolumeOptionsNormalizer.php new file mode 100644 index 000000000..a02728d19 --- /dev/null +++ b/generated/Normalizer/MountVolumeOptionsNormalizer.php @@ -0,0 +1,170 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class MountVolumeOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\MountVolumeOptions::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\MountVolumeOptions::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\MountVolumeOptions(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NoCopy', $data) && $data['NoCopy'] !== null) { + $object->setNoCopy($data['NoCopy']); + } + elseif (\array_key_exists('NoCopy', $data) && $data['NoCopy'] === null) { + $object->setNoCopy(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('DriverConfig', $data) && $data['DriverConfig'] !== null) { + $object->setDriverConfig($this->denormalizer->denormalize($data['DriverConfig'], \Docker\API\Model\MountVolumeOptionsDriverConfig::class, 'json', $context)); + } + elseif (\array_key_exists('DriverConfig', $data) && $data['DriverConfig'] === null) { + $object->setDriverConfig(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('noCopy') && null !== $object->getNoCopy()) { + $data['NoCopy'] = $object->getNoCopy(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('driverConfig') && null !== $object->getDriverConfig()) { + $data['DriverConfig'] = $this->normalizer->normalize($object->getDriverConfig(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\MountVolumeOptions::class => false]; + } + } +} else { + class MountVolumeOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\MountVolumeOptions::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\MountVolumeOptions::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\MountVolumeOptions(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NoCopy', $data) && $data['NoCopy'] !== null) { + $object->setNoCopy($data['NoCopy']); + } + elseif (\array_key_exists('NoCopy', $data) && $data['NoCopy'] === null) { + $object->setNoCopy(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('DriverConfig', $data) && $data['DriverConfig'] !== null) { + $object->setDriverConfig($this->denormalizer->denormalize($data['DriverConfig'], \Docker\API\Model\MountVolumeOptionsDriverConfig::class, 'json', $context)); + } + elseif (\array_key_exists('DriverConfig', $data) && $data['DriverConfig'] === null) { + $object->setDriverConfig(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('noCopy') && null !== $object->getNoCopy()) { + $data['NoCopy'] = $object->getNoCopy(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('driverConfig') && null !== $object->getDriverConfig()) { + $data['DriverConfig'] = $this->normalizer->normalize($object->getDriverConfig(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\MountVolumeOptions::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/NetworkAttachmentConfigNormalizer.php b/generated/Normalizer/NetworkAttachmentConfigNormalizer.php deleted file mode 100644 index 95d7c958d..000000000 --- a/generated/Normalizer/NetworkAttachmentConfigNormalizer.php +++ /dev/null @@ -1,82 +0,0 @@ -setTarget($data->{'Target'}); - } - if (property_exists($data, 'Aliases')) { - $value = $data->{'Aliases'}; - if (is_array($data->{'Aliases'})) { - $values = []; - foreach ($data->{'Aliases'} as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Aliases'})) { - $value = $data->{'Aliases'}; - } - $object->setAliases($value); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getTarget()) { - $data->{'Target'} = $object->getTarget(); - } - $value = $object->getAliases(); - if (is_array($object->getAliases())) { - $values = []; - foreach ($object->getAliases() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getAliases())) { - $value = $object->getAliases(); - } - $data->{'Aliases'} = $value; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/NetworkAttachmentNormalizer.php b/generated/Normalizer/NetworkAttachmentNormalizer.php deleted file mode 100644 index 78905031c..000000000 --- a/generated/Normalizer/NetworkAttachmentNormalizer.php +++ /dev/null @@ -1,82 +0,0 @@ -setNetwork($this->serializer->denormalize($data->{'Network'}, 'Docker\\API\\Model\\SwarmNetwork', 'raw', $context)); - } - if (property_exists($data, 'Addresses')) { - $value = $data->{'Addresses'}; - if (is_array($data->{'Addresses'})) { - $values = []; - foreach ($data->{'Addresses'} as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Addresses'})) { - $value = $data->{'Addresses'}; - } - $object->setAddresses($value); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getNetwork()) { - $data->{'Network'} = json_decode($this->serializer->normalize($object->getNetwork())); - } - $value = $object->getAddresses(); - if (is_array($object->getAddresses())) { - $values = []; - foreach ($object->getAddresses() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getAddresses())) { - $value = $object->getAddresses(); - } - $data->{'Addresses'} = $value; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/NetworkConfigNormalizer.php b/generated/Normalizer/NetworkConfigNormalizer.php index 4253cfe1a..91722e53d 100644 --- a/generated/Normalizer/NetworkConfigNormalizer.php +++ b/generated/Normalizer/NetworkConfigNormalizer.php @@ -2,148 +2,241 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class NetworkConfigNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\NetworkConfig') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\NetworkConfig) { - return true; - } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NetworkConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $object = new \Docker\API\Model\NetworkConfig(); - if (property_exists($data, 'Bridge')) { - $object->setBridge($data->{'Bridge'}); - } - if (property_exists($data, 'Gateway')) { - $object->setGateway($data->{'Gateway'}); - } - if (property_exists($data, 'IPAddress')) { - $object->setIPAddress($data->{'IPAddress'}); - } - if (property_exists($data, 'IPPrefixLen')) { - $object->setIPPrefixLen($data->{'IPPrefixLen'}); - } - if (property_exists($data, 'MacAddress')) { - $object->setMacAddress($data->{'MacAddress'}); - } - if (property_exists($data, 'PortMapping')) { - $object->setPortMapping($data->{'PortMapping'}); - } - if (property_exists($data, 'Networks')) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Networks'} as $key => $value) { - $values[$key] = $this->serializer->denormalize($value, 'Docker\\API\\Model\\ContainerNetwork', 'raw', $context); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworkConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworkConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $object->setNetworks($values); - } - if (property_exists($data, 'Ports')) { - $value_1 = $data->{'Ports'}; - if (is_object($data->{'Ports'})) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Ports'} as $key_1 => $value_2) { - $value_3 = $value_2; - if (is_array($value_2)) { - $values_2 = []; - foreach ($value_2 as $value_4) { - $values_2[] = $this->serializer->denormalize($value_4, 'Docker\\API\\Model\\PortBinding', 'raw', $context); - } - $value_3 = $values_2; - } - if (is_null($value_2)) { - $value_3 = $value_2; - } - $values_1[$key_1] = $value_3; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworkConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Bridge', $data) && $data['Bridge'] !== null) { + $object->setBridge($data['Bridge']); + } + elseif (\array_key_exists('Bridge', $data) && $data['Bridge'] === null) { + $object->setBridge(null); + } + if (\array_key_exists('Gateway', $data) && $data['Gateway'] !== null) { + $object->setGateway($data['Gateway']); + } + elseif (\array_key_exists('Gateway', $data) && $data['Gateway'] === null) { + $object->setGateway(null); + } + if (\array_key_exists('Address', $data) && $data['Address'] !== null) { + $object->setAddress($data['Address']); + } + elseif (\array_key_exists('Address', $data) && $data['Address'] === null) { + $object->setAddress(null); + } + if (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] !== null) { + $object->setIPPrefixLen($data['IPPrefixLen']); + } + elseif (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] === null) { + $object->setIPPrefixLen(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + if (\array_key_exists('PortMapping', $data) && $data['PortMapping'] !== null) { + $object->setPortMapping($data['PortMapping']); + } + elseif (\array_key_exists('PortMapping', $data) && $data['PortMapping'] === null) { + $object->setPortMapping(null); + } + if (\array_key_exists('Ports', $data) && $data['Ports'] !== null) { + $values = []; + foreach ($data['Ports'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\Port::class, 'json', $context); } - $value_1 = $values_1; + $object->setPorts($values); } - if (is_null($data->{'Ports'})) { - $value_1 = $data->{'Ports'}; + elseif (\array_key_exists('Ports', $data) && $data['Ports'] === null) { + $object->setPorts(null); } - $object->setPorts($value_1); + return $object; } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getBridge()) { - $data->{'Bridge'} = $object->getBridge(); - } - if (null !== $object->getGateway()) { - $data->{'Gateway'} = $object->getGateway(); - } - if (null !== $object->getIPAddress()) { - $data->{'IPAddress'} = $object->getIPAddress(); - } - if (null !== $object->getIPPrefixLen()) { - $data->{'IPPrefixLen'} = $object->getIPPrefixLen(); - } - if (null !== $object->getMacAddress()) { - $data->{'MacAddress'} = $object->getMacAddress(); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('bridge') && null !== $object->getBridge()) { + $data['Bridge'] = $object->getBridge(); + } + if ($object->isInitialized('gateway') && null !== $object->getGateway()) { + $data['Gateway'] = $object->getGateway(); + } + if ($object->isInitialized('address') && null !== $object->getAddress()) { + $data['Address'] = $object->getAddress(); + } + if ($object->isInitialized('iPPrefixLen') && null !== $object->getIPPrefixLen()) { + $data['IPPrefixLen'] = $object->getIPPrefixLen(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + if ($object->isInitialized('portMapping') && null !== $object->getPortMapping()) { + $data['PortMapping'] = $object->getPortMapping(); + } + if ($object->isInitialized('ports') && null !== $object->getPorts()) { + $values = []; + foreach ($object->getPorts() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Ports'] = $values; + } + return $data; } - if (null !== $object->getPortMapping()) { - $data->{'PortMapping'} = $object->getPortMapping(); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworkConfig::class => false]; } - if (null !== $object->getNetworks()) { - $values = new \stdClass(); - foreach ($object->getNetworks() as $key => $value) { - $values->{$key} = $value; + } +} else { + class NetworkConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworkConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworkConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $data->{'Networks'} = $values; - } - $value_1 = $object->getPorts(); - if (is_object($object->getPorts())) { - $values_1 = new \stdClass(); - foreach ($object->getPorts() as $key_1 => $value_2) { - $value_3 = $value_2; - if (is_array($value_2)) { - $values_2 = []; - foreach ($value_2 as $value_4) { - $values_2[] = $value_4; - } - $value_3 = $values_2; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworkConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Bridge', $data) && $data['Bridge'] !== null) { + $object->setBridge($data['Bridge']); + } + elseif (\array_key_exists('Bridge', $data) && $data['Bridge'] === null) { + $object->setBridge(null); + } + if (\array_key_exists('Gateway', $data) && $data['Gateway'] !== null) { + $object->setGateway($data['Gateway']); + } + elseif (\array_key_exists('Gateway', $data) && $data['Gateway'] === null) { + $object->setGateway(null); + } + if (\array_key_exists('Address', $data) && $data['Address'] !== null) { + $object->setAddress($data['Address']); + } + elseif (\array_key_exists('Address', $data) && $data['Address'] === null) { + $object->setAddress(null); + } + if (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] !== null) { + $object->setIPPrefixLen($data['IPPrefixLen']); + } + elseif (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] === null) { + $object->setIPPrefixLen(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + if (\array_key_exists('PortMapping', $data) && $data['PortMapping'] !== null) { + $object->setPortMapping($data['PortMapping']); + } + elseif (\array_key_exists('PortMapping', $data) && $data['PortMapping'] === null) { + $object->setPortMapping(null); + } + if (\array_key_exists('Ports', $data) && $data['Ports'] !== null) { + $values = []; + foreach ($data['Ports'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\Port::class, 'json', $context); } - if (is_null($value_2)) { - $value_3 = $value_2; + $object->setPorts($values); + } + elseif (\array_key_exists('Ports', $data) && $data['Ports'] === null) { + $object->setPorts(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('bridge') && null !== $object->getBridge()) { + $data['Bridge'] = $object->getBridge(); + } + if ($object->isInitialized('gateway') && null !== $object->getGateway()) { + $data['Gateway'] = $object->getGateway(); + } + if ($object->isInitialized('address') && null !== $object->getAddress()) { + $data['Address'] = $object->getAddress(); + } + if ($object->isInitialized('iPPrefixLen') && null !== $object->getIPPrefixLen()) { + $data['IPPrefixLen'] = $object->getIPPrefixLen(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + if ($object->isInitialized('portMapping') && null !== $object->getPortMapping()) { + $data['PortMapping'] = $object->getPortMapping(); + } + if ($object->isInitialized('ports') && null !== $object->getPorts()) { + $values = []; + foreach ($object->getPorts() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); } - $values_1->{$key_1} = $value_3; + $data['Ports'] = $values; } - $value_1 = $values_1; + return $data; } - if (is_null($object->getPorts())) { - $value_1 = $object->getPorts(); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworkConfig::class => false]; } - $data->{'Ports'} = $value_1; - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/NetworkContainerNormalizer.php b/generated/Normalizer/NetworkContainerNormalizer.php index 7f6b5bcfa..4af11ecfc 100644 --- a/generated/Normalizer/NetworkContainerNormalizer.php +++ b/generated/Normalizer/NetworkContainerNormalizer.php @@ -2,80 +2,171 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class NetworkContainerNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\NetworkContainer') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\NetworkContainer) { - return true; - } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NetworkContainerNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $object = new \Docker\API\Model\NetworkContainer(); - if (property_exists($data, 'Name')) { - $object->setName($data->{'Name'}); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworkContainer::class; } - if (property_exists($data, 'EndpointID')) { - $object->setEndpointID($data->{'EndpointID'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworkContainer::class; } - if (property_exists($data, 'MacAddress')) { - $object->setMacAddress($data->{'MacAddress'}); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworkContainer(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('EndpointID', $data) && $data['EndpointID'] !== null) { + $object->setEndpointID($data['EndpointID']); + } + elseif (\array_key_exists('EndpointID', $data) && $data['EndpointID'] === null) { + $object->setEndpointID(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + if (\array_key_exists('IPv4Address', $data) && $data['IPv4Address'] !== null) { + $object->setIPv4Address($data['IPv4Address']); + } + elseif (\array_key_exists('IPv4Address', $data) && $data['IPv4Address'] === null) { + $object->setIPv4Address(null); + } + if (\array_key_exists('IPv6Address', $data) && $data['IPv6Address'] !== null) { + $object->setIPv6Address($data['IPv6Address']); + } + elseif (\array_key_exists('IPv6Address', $data) && $data['IPv6Address'] === null) { + $object->setIPv6Address(null); + } + return $object; } - if (property_exists($data, 'IPv4Address')) { - $object->setIPv4Address($data->{'IPv4Address'}); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('endpointID') && null !== $object->getEndpointID()) { + $data['EndpointID'] = $object->getEndpointID(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + if ($object->isInitialized('iPv4Address') && null !== $object->getIPv4Address()) { + $data['IPv4Address'] = $object->getIPv4Address(); + } + if ($object->isInitialized('iPv6Address') && null !== $object->getIPv6Address()) { + $data['IPv6Address'] = $object->getIPv6Address(); + } + return $data; } - if (property_exists($data, 'IPv6Address')) { - $object->setIPv6Address($data->{'IPv6Address'}); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworkContainer::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class NetworkContainerNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworkContainer::class; } - if (null !== $object->getEndpointID()) { - $data->{'EndpointID'} = $object->getEndpointID(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworkContainer::class; } - if (null !== $object->getMacAddress()) { - $data->{'MacAddress'} = $object->getMacAddress(); + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworkContainer(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('EndpointID', $data) && $data['EndpointID'] !== null) { + $object->setEndpointID($data['EndpointID']); + } + elseif (\array_key_exists('EndpointID', $data) && $data['EndpointID'] === null) { + $object->setEndpointID(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + if (\array_key_exists('IPv4Address', $data) && $data['IPv4Address'] !== null) { + $object->setIPv4Address($data['IPv4Address']); + } + elseif (\array_key_exists('IPv4Address', $data) && $data['IPv4Address'] === null) { + $object->setIPv4Address(null); + } + if (\array_key_exists('IPv6Address', $data) && $data['IPv6Address'] !== null) { + $object->setIPv6Address($data['IPv6Address']); + } + elseif (\array_key_exists('IPv6Address', $data) && $data['IPv6Address'] === null) { + $object->setIPv6Address(null); + } + return $object; } - if (null !== $object->getIPv4Address()) { - $data->{'IPv4Address'} = $object->getIPv4Address(); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('endpointID') && null !== $object->getEndpointID()) { + $data['EndpointID'] = $object->getEndpointID(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + if ($object->isInitialized('iPv4Address') && null !== $object->getIPv4Address()) { + $data['IPv4Address'] = $object->getIPv4Address(); + } + if ($object->isInitialized('iPv6Address') && null !== $object->getIPv6Address()) { + $data['IPv6Address'] = $object->getIPv6Address(); + } + return $data; } - if (null !== $object->getIPv6Address()) { - $data->{'IPv6Address'} = $object->getIPv6Address(); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworkContainer::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/NetworkCreateConfigNormalizer.php b/generated/Normalizer/NetworkCreateConfigNormalizer.php deleted file mode 100644 index 990a530d3..000000000 --- a/generated/Normalizer/NetworkCreateConfigNormalizer.php +++ /dev/null @@ -1,126 +0,0 @@ -setName($data->{'Name'}); - } - if (property_exists($data, 'CheckDuplicate')) { - $object->setCheckDuplicate($data->{'CheckDuplicate'}); - } - if (property_exists($data, 'Driver')) { - $object->setDriver($data->{'Driver'}); - } - if (property_exists($data, 'EnableIPv6')) { - $object->setEnableIPv6($data->{'EnableIPv6'}); - } - if (property_exists($data, 'IPAM')) { - $object->setIPAM($this->serializer->denormalize($data->{'IPAM'}, 'Docker\\API\\Model\\IPAM', 'raw', $context)); - } - if (property_exists($data, 'Internal')) { - $object->setInternal($data->{'Internal'}); - } - if (property_exists($data, 'Options')) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Options'} as $key => $value) { - $values[$key] = $value; - } - $object->setOptions($values); - } - if (property_exists($data, 'Labels')) { - $value_1 = $data->{'Labels'}; - if (is_object($data->{'Labels'})) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Labels'} as $key_1 => $value_2) { - $values_1[$key_1] = $value_2; - } - $value_1 = $values_1; - } - if (is_null($data->{'Labels'})) { - $value_1 = $data->{'Labels'}; - } - $object->setLabels($value_1); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - if (null !== $object->getCheckDuplicate()) { - $data->{'CheckDuplicate'} = $object->getCheckDuplicate(); - } - if (null !== $object->getDriver()) { - $data->{'Driver'} = $object->getDriver(); - } - if (null !== $object->getEnableIPv6()) { - $data->{'EnableIPv6'} = $object->getEnableIPv6(); - } - if (null !== $object->getIPAM()) { - $data->{'IPAM'} = json_decode($this->serializer->normalize($object->getIPAM(), 'raw', $context)); - } - if (null !== $object->getInternal()) { - $data->{'Internal'} = $object->getInternal(); - } - if (null !== $object->getOptions()) { - $values = new \stdClass(); - foreach ($object->getOptions() as $key => $value) { - $values->{$key} = $value; - } - $data->{'Options'} = $values; - } - $value_1 = $object->getLabels(); - if (is_object($object->getLabels())) { - $values_1 = new \stdClass(); - foreach ($object->getLabels() as $key_1 => $value_2) { - $values_1->{$key_1} = $value_2; - } - $value_1 = $values_1; - } - if (is_null($object->getLabels())) { - $value_1 = $object->getLabels(); - } - $data->{'Labels'} = $value_1; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/NetworkCreateResultNormalizer.php b/generated/Normalizer/NetworkCreateResultNormalizer.php deleted file mode 100644 index 382497edc..000000000 --- a/generated/Normalizer/NetworkCreateResultNormalizer.php +++ /dev/null @@ -1,63 +0,0 @@ -setId($data->{'Id'}); - } - if (property_exists($data, 'Warning')) { - $object->setWarning($data->{'Warning'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getId()) { - $data->{'Id'} = $object->getId(); - } - if (null !== $object->getWarning()) { - $data->{'Warning'} = $object->getWarning(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/NetworkNormalizer.php b/generated/Normalizer/NetworkNormalizer.php index 0763a51f1..28fec9321 100644 --- a/generated/Normalizer/NetworkNormalizer.php +++ b/generated/Normalizer/NetworkNormalizer.php @@ -2,158 +2,345 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class NetworkNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\Network') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\Network) { - return true; - } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NetworkNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $object = new \Docker\API\Model\Network(); - if (property_exists($data, 'Name')) { - $object->setName($data->{'Name'}); - } - if (property_exists($data, 'Id')) { - $object->setId($data->{'Id'}); - } - if (property_exists($data, 'Scope')) { - $object->setScope($data->{'Scope'}); - } - if (property_exists($data, 'Driver')) { - $object->setDriver($data->{'Driver'}); - } - if (property_exists($data, 'EnableIPv6')) { - $object->setEnableIPv6($data->{'EnableIPv6'}); - } - if (property_exists($data, 'IPAM')) { - $object->setIPAM($this->serializer->denormalize($data->{'IPAM'}, 'Docker\\API\\Model\\IPAM', 'raw', $context)); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Network::class; } - if (property_exists($data, 'Internal')) { - $object->setInternal($data->{'Internal'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Network::class; } - if (property_exists($data, 'Containers')) { - $value = $data->{'Containers'}; - if (is_object($data->{'Containers'})) { + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Network(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('Created', $data) && $data['Created'] !== null) { + $object->setCreated($data['Created']); + } + elseif (\array_key_exists('Created', $data) && $data['Created'] === null) { + $object->setCreated(null); + } + if (\array_key_exists('Scope', $data) && $data['Scope'] !== null) { + $object->setScope($data['Scope']); + } + elseif (\array_key_exists('Scope', $data) && $data['Scope'] === null) { + $object->setScope(null); + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('EnableIPv6', $data) && $data['EnableIPv6'] !== null) { + $object->setEnableIPv6($data['EnableIPv6']); + } + elseif (\array_key_exists('EnableIPv6', $data) && $data['EnableIPv6'] === null) { + $object->setEnableIPv6(null); + } + if (\array_key_exists('IPAM', $data) && $data['IPAM'] !== null) { + $object->setIPAM($this->denormalizer->denormalize($data['IPAM'], \Docker\API\Model\IPAM::class, 'json', $context)); + } + elseif (\array_key_exists('IPAM', $data) && $data['IPAM'] === null) { + $object->setIPAM(null); + } + if (\array_key_exists('Internal', $data) && $data['Internal'] !== null) { + $object->setInternal($data['Internal']); + } + elseif (\array_key_exists('Internal', $data) && $data['Internal'] === null) { + $object->setInternal(null); + } + if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Containers'} as $key => $value_1) { - $values[$key] = $this->serializer->denormalize($value_1, 'Docker\\API\\Model\\NetworkContainer', 'raw', $context); + foreach ($data['Containers'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \Docker\API\Model\NetworkContainer::class, 'json', $context); } - $value = $values; + $object->setContainers($values); } - if (is_null($data->{'Containers'})) { - $value = $data->{'Containers'}; + elseif (\array_key_exists('Containers', $data) && $data['Containers'] === null) { + $object->setContainers(null); } - $object->setContainers($value); - } - if (property_exists($data, 'Options')) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Options'} as $key_1 => $value_2) { - $values_1[$key_1] = $value_2; + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $object->setOptions($values_1); } - $object->setOptions($values_1); - } - if (property_exists($data, 'Labels')) { - $value_3 = $data->{'Labels'}; - if (is_object($data->{'Labels'})) { + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Labels'} as $key_2 => $value_4) { - $values_2[$key_2] = $value_4; + foreach ($data['Labels'] as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; } - $value_3 = $values_2; + $object->setLabels($values_2); } - if (is_null($data->{'Labels'})) { - $value_3 = $data->{'Labels'}; + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); } - $object->setLabels($value_3); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); + return $object; } - if (null !== $object->getId()) { - $data->{'Id'} = $object->getId(); - } - if (null !== $object->getScope()) { - $data->{'Scope'} = $object->getScope(); - } - if (null !== $object->getDriver()) { - $data->{'Driver'} = $object->getDriver(); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['Id'] = $object->getId(); + } + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['Created'] = $object->getCreated(); + } + if ($object->isInitialized('scope') && null !== $object->getScope()) { + $data['Scope'] = $object->getScope(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('enableIPv6') && null !== $object->getEnableIPv6()) { + $data['EnableIPv6'] = $object->getEnableIPv6(); + } + if ($object->isInitialized('iPAM') && null !== $object->getIPAM()) { + $data['IPAM'] = $this->normalizer->normalize($object->getIPAM(), 'json', $context); + } + if ($object->isInitialized('internal') && null !== $object->getInternal()) { + $data['Internal'] = $object->getInternal(); + } + if ($object->isInitialized('containers') && null !== $object->getContainers()) { + $values = []; + foreach ($object->getContainers() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Containers'] = $values; + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values_1 = []; + foreach ($object->getOptions() as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $data['Options'] = $values_1; + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_2 = []; + foreach ($object->getLabels() as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; + } + $data['Labels'] = $values_2; + } + return $data; } - if (null !== $object->getEnableIPv6()) { - $data->{'EnableIPv6'} = $object->getEnableIPv6(); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Network::class => false]; } - if (null !== $object->getIPAM()) { - $data->{'IPAM'} = json_decode($this->serializer->normalize($object->getIPAM(), 'raw', $context)); + } +} else { + class NetworkNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Network::class; } - if (null !== $object->getInternal()) { - $data->{'Internal'} = $object->getInternal(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Network::class; } - $value = $object->getContainers(); - if (is_object($object->getContainers())) { - $values = new \stdClass(); - foreach ($object->getContainers() as $key => $value_1) { - $values->{$key} = $value_1; + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); } - $value = $values; - } - if (is_null($object->getContainers())) { - $value = $object->getContainers(); - } - $data->{'Containers'} = $value; - if (null !== $object->getOptions()) { - $values_1 = new \stdClass(); - foreach ($object->getOptions() as $key_1 => $value_2) { - $values_1->{$key_1} = $value_2; + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Network(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('Created', $data) && $data['Created'] !== null) { + $object->setCreated($data['Created']); + } + elseif (\array_key_exists('Created', $data) && $data['Created'] === null) { + $object->setCreated(null); + } + if (\array_key_exists('Scope', $data) && $data['Scope'] !== null) { + $object->setScope($data['Scope']); + } + elseif (\array_key_exists('Scope', $data) && $data['Scope'] === null) { + $object->setScope(null); + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('EnableIPv6', $data) && $data['EnableIPv6'] !== null) { + $object->setEnableIPv6($data['EnableIPv6']); + } + elseif (\array_key_exists('EnableIPv6', $data) && $data['EnableIPv6'] === null) { + $object->setEnableIPv6(null); + } + if (\array_key_exists('IPAM', $data) && $data['IPAM'] !== null) { + $object->setIPAM($this->denormalizer->denormalize($data['IPAM'], \Docker\API\Model\IPAM::class, 'json', $context)); + } + elseif (\array_key_exists('IPAM', $data) && $data['IPAM'] === null) { + $object->setIPAM(null); } - $data->{'Options'} = $values_1; + if (\array_key_exists('Internal', $data) && $data['Internal'] !== null) { + $object->setInternal($data['Internal']); + } + elseif (\array_key_exists('Internal', $data) && $data['Internal'] === null) { + $object->setInternal(null); + } + if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Containers'] as $key => $value) { + $values[$key] = $this->denormalizer->denormalize($value, \Docker\API\Model\NetworkContainer::class, 'json', $context); + } + $object->setContainers($values); + } + elseif (\array_key_exists('Containers', $data) && $data['Containers'] === null) { + $object->setContainers(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $object->setOptions($values_1); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; + } + $object->setLabels($values_2); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + return $object; } - $value_3 = $object->getLabels(); - if (is_object($object->getLabels())) { - $values_2 = new \stdClass(); - foreach ($object->getLabels() as $key_2 => $value_4) { - $values_2->{$key_2} = $value_4; + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['Id'] = $object->getId(); } - $value_3 = $values_2; + if ($object->isInitialized('created') && null !== $object->getCreated()) { + $data['Created'] = $object->getCreated(); + } + if ($object->isInitialized('scope') && null !== $object->getScope()) { + $data['Scope'] = $object->getScope(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('enableIPv6') && null !== $object->getEnableIPv6()) { + $data['EnableIPv6'] = $object->getEnableIPv6(); + } + if ($object->isInitialized('iPAM') && null !== $object->getIPAM()) { + $data['IPAM'] = $this->normalizer->normalize($object->getIPAM(), 'json', $context); + } + if ($object->isInitialized('internal') && null !== $object->getInternal()) { + $data['Internal'] = $object->getInternal(); + } + if ($object->isInitialized('containers') && null !== $object->getContainers()) { + $values = []; + foreach ($object->getContainers() as $key => $value) { + $values[$key] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Containers'] = $values; + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values_1 = []; + foreach ($object->getOptions() as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $data['Options'] = $values_1; + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_2 = []; + foreach ($object->getLabels() as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; + } + $data['Labels'] = $values_2; + } + return $data; } - if (is_null($object->getLabels())) { - $value_3 = $object->getLabels(); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Network::class => false]; } - $data->{'Labels'} = $value_3; - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/NetworkingConfigNormalizer.php b/generated/Normalizer/NetworkingConfigNormalizer.php deleted file mode 100644 index d0e94de98..000000000 --- a/generated/Normalizer/NetworkingConfigNormalizer.php +++ /dev/null @@ -1,65 +0,0 @@ -{'EndpointsConfig'} as $key => $value) { - $values[$key] = $this->serializer->denormalize($value, 'Docker\\API\\Model\\EndpointSettings', 'raw', $context); - } - $object->setEndpointsConfig($values); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getEndpointsConfig()) { - $values = new \stdClass(); - foreach ($object->getEndpointsConfig() as $key => $value) { - $values->{$key} = $value; - } - $data->{'EndpointsConfig'} = $values; - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/NetworksCreatePostBodyNormalizer.php b/generated/Normalizer/NetworksCreatePostBodyNormalizer.php new file mode 100644 index 000000000..2e8c81870 --- /dev/null +++ b/generated/Normalizer/NetworksCreatePostBodyNormalizer.php @@ -0,0 +1,272 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NetworksCreatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworksCreatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworksCreatePostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworksCreatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('CheckDuplicate', $data) && $data['CheckDuplicate'] !== null) { + $object->setCheckDuplicate($data['CheckDuplicate']); + } + elseif (\array_key_exists('CheckDuplicate', $data) && $data['CheckDuplicate'] === null) { + $object->setCheckDuplicate(null); + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('Internal', $data) && $data['Internal'] !== null) { + $object->setInternal($data['Internal']); + } + elseif (\array_key_exists('Internal', $data) && $data['Internal'] === null) { + $object->setInternal(null); + } + if (\array_key_exists('IPAM', $data) && $data['IPAM'] !== null) { + $object->setIPAM($this->denormalizer->denormalize($data['IPAM'], \Docker\API\Model\IPAM::class, 'json', $context)); + } + elseif (\array_key_exists('IPAM', $data) && $data['IPAM'] === null) { + $object->setIPAM(null); + } + if (\array_key_exists('EnableIPv6', $data) && $data['EnableIPv6'] !== null) { + $object->setEnableIPv6($data['EnableIPv6']); + } + elseif (\array_key_exists('EnableIPv6', $data) && $data['EnableIPv6'] === null) { + $object->setEnableIPv6(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value) { + $values[$key] = $value; + } + $object->setOptions($values); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $object->setLabels($values_1); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Name'] = $object->getName(); + if ($object->isInitialized('checkDuplicate') && null !== $object->getCheckDuplicate()) { + $data['CheckDuplicate'] = $object->getCheckDuplicate(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('internal') && null !== $object->getInternal()) { + $data['Internal'] = $object->getInternal(); + } + if ($object->isInitialized('iPAM') && null !== $object->getIPAM()) { + $data['IPAM'] = $this->normalizer->normalize($object->getIPAM(), 'json', $context); + } + if ($object->isInitialized('enableIPv6') && null !== $object->getEnableIPv6()) { + $data['EnableIPv6'] = $object->getEnableIPv6(); + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values = []; + foreach ($object->getOptions() as $key => $value) { + $values[$key] = $value; + } + $data['Options'] = $values; + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_1 = []; + foreach ($object->getLabels() as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $data['Labels'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworksCreatePostBody::class => false]; + } + } +} else { + class NetworksCreatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworksCreatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworksCreatePostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworksCreatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('CheckDuplicate', $data) && $data['CheckDuplicate'] !== null) { + $object->setCheckDuplicate($data['CheckDuplicate']); + } + elseif (\array_key_exists('CheckDuplicate', $data) && $data['CheckDuplicate'] === null) { + $object->setCheckDuplicate(null); + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('Internal', $data) && $data['Internal'] !== null) { + $object->setInternal($data['Internal']); + } + elseif (\array_key_exists('Internal', $data) && $data['Internal'] === null) { + $object->setInternal(null); + } + if (\array_key_exists('IPAM', $data) && $data['IPAM'] !== null) { + $object->setIPAM($this->denormalizer->denormalize($data['IPAM'], \Docker\API\Model\IPAM::class, 'json', $context)); + } + elseif (\array_key_exists('IPAM', $data) && $data['IPAM'] === null) { + $object->setIPAM(null); + } + if (\array_key_exists('EnableIPv6', $data) && $data['EnableIPv6'] !== null) { + $object->setEnableIPv6($data['EnableIPv6']); + } + elseif (\array_key_exists('EnableIPv6', $data) && $data['EnableIPv6'] === null) { + $object->setEnableIPv6(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value) { + $values[$key] = $value; + } + $object->setOptions($values); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $object->setLabels($values_1); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Name'] = $object->getName(); + if ($object->isInitialized('checkDuplicate') && null !== $object->getCheckDuplicate()) { + $data['CheckDuplicate'] = $object->getCheckDuplicate(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('internal') && null !== $object->getInternal()) { + $data['Internal'] = $object->getInternal(); + } + if ($object->isInitialized('iPAM') && null !== $object->getIPAM()) { + $data['IPAM'] = $this->normalizer->normalize($object->getIPAM(), 'json', $context); + } + if ($object->isInitialized('enableIPv6') && null !== $object->getEnableIPv6()) { + $data['EnableIPv6'] = $object->getEnableIPv6(); + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values = []; + foreach ($object->getOptions() as $key => $value) { + $values[$key] = $value; + } + $data['Options'] = $values; + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_1 = []; + foreach ($object->getLabels() as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $data['Labels'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworksCreatePostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/NetworksCreatePostResponse201Normalizer.php b/generated/Normalizer/NetworksCreatePostResponse201Normalizer.php new file mode 100644 index 000000000..6115ebb2c --- /dev/null +++ b/generated/Normalizer/NetworksCreatePostResponse201Normalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NetworksCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworksCreatePostResponse201::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworksCreatePostResponse201::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworksCreatePostResponse201(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('Warning', $data) && $data['Warning'] !== null) { + $object->setWarning($data['Warning']); + } + elseif (\array_key_exists('Warning', $data) && $data['Warning'] === null) { + $object->setWarning(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['Id'] = $object->getId(); + } + if ($object->isInitialized('warning') && null !== $object->getWarning()) { + $data['Warning'] = $object->getWarning(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworksCreatePostResponse201::class => false]; + } + } +} else { + class NetworksCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworksCreatePostResponse201::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworksCreatePostResponse201::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworksCreatePostResponse201(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('Warning', $data) && $data['Warning'] !== null) { + $object->setWarning($data['Warning']); + } + elseif (\array_key_exists('Warning', $data) && $data['Warning'] === null) { + $object->setWarning(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['Id'] = $object->getId(); + } + if ($object->isInitialized('warning') && null !== $object->getWarning()) { + $data['Warning'] = $object->getWarning(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworksCreatePostResponse201::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/NetworksIdConnectPostBodyNormalizer.php b/generated/Normalizer/NetworksIdConnectPostBodyNormalizer.php new file mode 100644 index 000000000..6b39290fd --- /dev/null +++ b/generated/Normalizer/NetworksIdConnectPostBodyNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NetworksIdConnectPostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworksIdConnectPostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworksIdConnectPostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworksIdConnectPostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Container', $data) && $data['Container'] !== null) { + $object->setContainer($data['Container']); + } + elseif (\array_key_exists('Container', $data) && $data['Container'] === null) { + $object->setContainer(null); + } + if (\array_key_exists('EndpointConfig', $data) && $data['EndpointConfig'] !== null) { + $object->setEndpointConfig($this->denormalizer->denormalize($data['EndpointConfig'], \Docker\API\Model\EndpointSettings::class, 'json', $context)); + } + elseif (\array_key_exists('EndpointConfig', $data) && $data['EndpointConfig'] === null) { + $object->setEndpointConfig(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('container') && null !== $object->getContainer()) { + $data['Container'] = $object->getContainer(); + } + if ($object->isInitialized('endpointConfig') && null !== $object->getEndpointConfig()) { + $data['EndpointConfig'] = $this->normalizer->normalize($object->getEndpointConfig(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworksIdConnectPostBody::class => false]; + } + } +} else { + class NetworksIdConnectPostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworksIdConnectPostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworksIdConnectPostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworksIdConnectPostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Container', $data) && $data['Container'] !== null) { + $object->setContainer($data['Container']); + } + elseif (\array_key_exists('Container', $data) && $data['Container'] === null) { + $object->setContainer(null); + } + if (\array_key_exists('EndpointConfig', $data) && $data['EndpointConfig'] !== null) { + $object->setEndpointConfig($this->denormalizer->denormalize($data['EndpointConfig'], \Docker\API\Model\EndpointSettings::class, 'json', $context)); + } + elseif (\array_key_exists('EndpointConfig', $data) && $data['EndpointConfig'] === null) { + $object->setEndpointConfig(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('container') && null !== $object->getContainer()) { + $data['Container'] = $object->getContainer(); + } + if ($object->isInitialized('endpointConfig') && null !== $object->getEndpointConfig()) { + $data['EndpointConfig'] = $this->normalizer->normalize($object->getEndpointConfig(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworksIdConnectPostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/NetworksIdDisconnectPostBodyNormalizer.php b/generated/Normalizer/NetworksIdDisconnectPostBodyNormalizer.php new file mode 100644 index 000000000..6f94f91d3 --- /dev/null +++ b/generated/Normalizer/NetworksIdDisconnectPostBodyNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NetworksIdDisconnectPostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworksIdDisconnectPostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworksIdDisconnectPostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworksIdDisconnectPostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Container', $data) && $data['Container'] !== null) { + $object->setContainer($data['Container']); + } + elseif (\array_key_exists('Container', $data) && $data['Container'] === null) { + $object->setContainer(null); + } + if (\array_key_exists('Force', $data) && $data['Force'] !== null) { + $object->setForce($data['Force']); + } + elseif (\array_key_exists('Force', $data) && $data['Force'] === null) { + $object->setForce(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('container') && null !== $object->getContainer()) { + $data['Container'] = $object->getContainer(); + } + if ($object->isInitialized('force') && null !== $object->getForce()) { + $data['Force'] = $object->getForce(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworksIdDisconnectPostBody::class => false]; + } + } +} else { + class NetworksIdDisconnectPostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworksIdDisconnectPostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworksIdDisconnectPostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworksIdDisconnectPostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Container', $data) && $data['Container'] !== null) { + $object->setContainer($data['Container']); + } + elseif (\array_key_exists('Container', $data) && $data['Container'] === null) { + $object->setContainer(null); + } + if (\array_key_exists('Force', $data) && $data['Force'] !== null) { + $object->setForce($data['Force']); + } + elseif (\array_key_exists('Force', $data) && $data['Force'] === null) { + $object->setForce(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('container') && null !== $object->getContainer()) { + $data['Container'] = $object->getContainer(); + } + if ($object->isInitialized('force') && null !== $object->getForce()) { + $data['Force'] = $object->getForce(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworksIdDisconnectPostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/NetworksPrunePostResponse200Normalizer.php b/generated/Normalizer/NetworksPrunePostResponse200Normalizer.php new file mode 100644 index 000000000..15af9d475 --- /dev/null +++ b/generated/Normalizer/NetworksPrunePostResponse200Normalizer.php @@ -0,0 +1,134 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NetworksPrunePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworksPrunePostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworksPrunePostResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworksPrunePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('VolumesDeleted', $data) && $data['VolumesDeleted'] !== null) { + $values = []; + foreach ($data['VolumesDeleted'] as $value) { + $values[] = $value; + } + $object->setVolumesDeleted($values); + } + elseif (\array_key_exists('VolumesDeleted', $data) && $data['VolumesDeleted'] === null) { + $object->setVolumesDeleted(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('volumesDeleted') && null !== $object->getVolumesDeleted()) { + $values = []; + foreach ($object->getVolumesDeleted() as $value) { + $values[] = $value; + } + $data['VolumesDeleted'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworksPrunePostResponse200::class => false]; + } + } +} else { + class NetworksPrunePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworksPrunePostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworksPrunePostResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworksPrunePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('VolumesDeleted', $data) && $data['VolumesDeleted'] !== null) { + $values = []; + foreach ($data['VolumesDeleted'] as $value) { + $values[] = $value; + } + $object->setVolumesDeleted($values); + } + elseif (\array_key_exists('VolumesDeleted', $data) && $data['VolumesDeleted'] === null) { + $object->setVolumesDeleted(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('volumesDeleted') && null !== $object->getVolumesDeleted()) { + $values = []; + foreach ($object->getVolumesDeleted() as $value) { + $values[] = $value; + } + $data['VolumesDeleted'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworksPrunePostResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/NodeDescriptionEngineNormalizer.php b/generated/Normalizer/NodeDescriptionEngineNormalizer.php new file mode 100644 index 000000000..fcbe49fdc --- /dev/null +++ b/generated/Normalizer/NodeDescriptionEngineNormalizer.php @@ -0,0 +1,186 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NodeDescriptionEngineNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeDescriptionEngine::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionEngine::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeDescriptionEngine(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('EngineVersion', $data) && $data['EngineVersion'] !== null) { + $object->setEngineVersion($data['EngineVersion']); + } + elseif (\array_key_exists('EngineVersion', $data) && $data['EngineVersion'] === null) { + $object->setEngineVersion(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Plugins', $data) && $data['Plugins'] !== null) { + $values_1 = []; + foreach ($data['Plugins'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\NodeDescriptionEnginePluginsItem::class, 'json', $context); + } + $object->setPlugins($values_1); + } + elseif (\array_key_exists('Plugins', $data) && $data['Plugins'] === null) { + $object->setPlugins(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('engineVersion') && null !== $object->getEngineVersion()) { + $data['EngineVersion'] = $object->getEngineVersion(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('plugins') && null !== $object->getPlugins()) { + $values_1 = []; + foreach ($object->getPlugins() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Plugins'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeDescriptionEngine::class => false]; + } + } +} else { + class NodeDescriptionEngineNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeDescriptionEngine::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionEngine::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeDescriptionEngine(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('EngineVersion', $data) && $data['EngineVersion'] !== null) { + $object->setEngineVersion($data['EngineVersion']); + } + elseif (\array_key_exists('EngineVersion', $data) && $data['EngineVersion'] === null) { + $object->setEngineVersion(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Plugins', $data) && $data['Plugins'] !== null) { + $values_1 = []; + foreach ($data['Plugins'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\NodeDescriptionEnginePluginsItem::class, 'json', $context); + } + $object->setPlugins($values_1); + } + elseif (\array_key_exists('Plugins', $data) && $data['Plugins'] === null) { + $object->setPlugins(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('engineVersion') && null !== $object->getEngineVersion()) { + $data['EngineVersion'] = $object->getEngineVersion(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('plugins') && null !== $object->getPlugins()) { + $values_1 = []; + foreach ($object->getPlugins() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Plugins'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeDescriptionEngine::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/NodeDescriptionEnginePluginsItemNormalizer.php b/generated/Normalizer/NodeDescriptionEnginePluginsItemNormalizer.php new file mode 100644 index 000000000..b719f58bd --- /dev/null +++ b/generated/Normalizer/NodeDescriptionEnginePluginsItemNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NodeDescriptionEnginePluginsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeDescriptionEnginePluginsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionEnginePluginsItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeDescriptionEnginePluginsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeDescriptionEnginePluginsItem::class => false]; + } + } +} else { + class NodeDescriptionEnginePluginsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeDescriptionEnginePluginsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionEnginePluginsItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeDescriptionEnginePluginsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeDescriptionEnginePluginsItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/NodeDescriptionNormalizer.php b/generated/Normalizer/NodeDescriptionNormalizer.php index 69f3525d2..aced57b17 100644 --- a/generated/Normalizer/NodeDescriptionNormalizer.php +++ b/generated/Normalizer/NodeDescriptionNormalizer.php @@ -2,73 +2,171 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class NodeDescriptionNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\NodeDescription') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NodeDescriptionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($data instanceof \Docker\API\Model\NodeDescription) { - return true; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeDescription::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\NodeDescription(); - if (property_exists($data, 'Hostname')) { - $object->setHostname($data->{'Hostname'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescription::class; } - if (property_exists($data, 'Platform')) { - $object->setPlatform($this->serializer->denormalize($data->{'Platform'}, 'Docker\\API\\Model\\NodePlatform', 'raw', $context)); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeDescription(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Hostname', $data) && $data['Hostname'] !== null) { + $object->setHostname($data['Hostname']); + } + elseif (\array_key_exists('Hostname', $data) && $data['Hostname'] === null) { + $object->setHostname(null); + } + if (\array_key_exists('Platform', $data) && $data['Platform'] !== null) { + $object->setPlatform($this->denormalizer->denormalize($data['Platform'], \Docker\API\Model\NodeDescriptionPlatform::class, 'json', $context)); + } + elseif (\array_key_exists('Platform', $data) && $data['Platform'] === null) { + $object->setPlatform(null); + } + if (\array_key_exists('Resources', $data) && $data['Resources'] !== null) { + $object->setResources($this->denormalizer->denormalize($data['Resources'], \Docker\API\Model\NodeDescriptionResources::class, 'json', $context)); + } + elseif (\array_key_exists('Resources', $data) && $data['Resources'] === null) { + $object->setResources(null); + } + if (\array_key_exists('Engine', $data) && $data['Engine'] !== null) { + $object->setEngine($this->denormalizer->denormalize($data['Engine'], \Docker\API\Model\NodeDescriptionEngine::class, 'json', $context)); + } + elseif (\array_key_exists('Engine', $data) && $data['Engine'] === null) { + $object->setEngine(null); + } + return $object; } - if (property_exists($data, 'Resources')) { - $object->setResources($this->serializer->denormalize($data->{'Resources'}, 'Docker\\API\\Model\\NodeResources', 'raw', $context)); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('hostname') && null !== $object->getHostname()) { + $data['Hostname'] = $object->getHostname(); + } + if ($object->isInitialized('platform') && null !== $object->getPlatform()) { + $data['Platform'] = $this->normalizer->normalize($object->getPlatform(), 'json', $context); + } + if ($object->isInitialized('resources') && null !== $object->getResources()) { + $data['Resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + } + if ($object->isInitialized('engine') && null !== $object->getEngine()) { + $data['Engine'] = $this->normalizer->normalize($object->getEngine(), 'json', $context); + } + return $data; } - if (property_exists($data, 'Engine')) { - $object->setEngine($this->serializer->denormalize($data->{'Engine'}, 'Docker\\API\\Model\\NodeEngine', 'raw', $context)); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeDescription::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class NodeDescriptionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getHostname()) { - $data->{'Hostname'} = $object->getHostname(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeDescription::class; } - if (null !== $object->getPlatform()) { - $data->{'Platform'} = json_decode($this->serializer->normalize($object->getPlatform(), 'raw', $context)); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescription::class; } - if (null !== $object->getResources()) { - $data->{'Resources'} = json_decode($this->serializer->normalize($object->getResources(), 'raw', $context)); + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeDescription(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Hostname', $data) && $data['Hostname'] !== null) { + $object->setHostname($data['Hostname']); + } + elseif (\array_key_exists('Hostname', $data) && $data['Hostname'] === null) { + $object->setHostname(null); + } + if (\array_key_exists('Platform', $data) && $data['Platform'] !== null) { + $object->setPlatform($this->denormalizer->denormalize($data['Platform'], \Docker\API\Model\NodeDescriptionPlatform::class, 'json', $context)); + } + elseif (\array_key_exists('Platform', $data) && $data['Platform'] === null) { + $object->setPlatform(null); + } + if (\array_key_exists('Resources', $data) && $data['Resources'] !== null) { + $object->setResources($this->denormalizer->denormalize($data['Resources'], \Docker\API\Model\NodeDescriptionResources::class, 'json', $context)); + } + elseif (\array_key_exists('Resources', $data) && $data['Resources'] === null) { + $object->setResources(null); + } + if (\array_key_exists('Engine', $data) && $data['Engine'] !== null) { + $object->setEngine($this->denormalizer->denormalize($data['Engine'], \Docker\API\Model\NodeDescriptionEngine::class, 'json', $context)); + } + elseif (\array_key_exists('Engine', $data) && $data['Engine'] === null) { + $object->setEngine(null); + } + return $object; } - if (null !== $object->getEngine()) { - $data->{'Engine'} = json_decode($this->serializer->normalize($object->getEngine(), 'raw', $context)); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('hostname') && null !== $object->getHostname()) { + $data['Hostname'] = $object->getHostname(); + } + if ($object->isInitialized('platform') && null !== $object->getPlatform()) { + $data['Platform'] = $this->normalizer->normalize($object->getPlatform(), 'json', $context); + } + if ($object->isInitialized('resources') && null !== $object->getResources()) { + $data['Resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + } + if ($object->isInitialized('engine') && null !== $object->getEngine()) { + $data['Engine'] = $this->normalizer->normalize($object->getEngine(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeDescription::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/NodeDescriptionPlatformNormalizer.php b/generated/Normalizer/NodeDescriptionPlatformNormalizer.php new file mode 100644 index 000000000..2442bc676 --- /dev/null +++ b/generated/Normalizer/NodeDescriptionPlatformNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NodeDescriptionPlatformNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeDescriptionPlatform::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionPlatform::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeDescriptionPlatform(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Architecture', $data) && $data['Architecture'] !== null) { + $object->setArchitecture($data['Architecture']); + } + elseif (\array_key_exists('Architecture', $data) && $data['Architecture'] === null) { + $object->setArchitecture(null); + } + if (\array_key_exists('OS', $data) && $data['OS'] !== null) { + $object->setOS($data['OS']); + } + elseif (\array_key_exists('OS', $data) && $data['OS'] === null) { + $object->setOS(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('architecture') && null !== $object->getArchitecture()) { + $data['Architecture'] = $object->getArchitecture(); + } + if ($object->isInitialized('oS') && null !== $object->getOS()) { + $data['OS'] = $object->getOS(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeDescriptionPlatform::class => false]; + } + } +} else { + class NodeDescriptionPlatformNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeDescriptionPlatform::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionPlatform::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeDescriptionPlatform(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Architecture', $data) && $data['Architecture'] !== null) { + $object->setArchitecture($data['Architecture']); + } + elseif (\array_key_exists('Architecture', $data) && $data['Architecture'] === null) { + $object->setArchitecture(null); + } + if (\array_key_exists('OS', $data) && $data['OS'] !== null) { + $object->setOS($data['OS']); + } + elseif (\array_key_exists('OS', $data) && $data['OS'] === null) { + $object->setOS(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('architecture') && null !== $object->getArchitecture()) { + $data['Architecture'] = $object->getArchitecture(); + } + if ($object->isInitialized('oS') && null !== $object->getOS()) { + $data['OS'] = $object->getOS(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeDescriptionPlatform::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/NodeDescriptionResourcesNormalizer.php b/generated/Normalizer/NodeDescriptionResourcesNormalizer.php new file mode 100644 index 000000000..6ee9e5122 --- /dev/null +++ b/generated/Normalizer/NodeDescriptionResourcesNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NodeDescriptionResourcesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeDescriptionResources::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionResources::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeDescriptionResources(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] !== null) { + $object->setNanoCPUs($data['NanoCPUs']); + } + elseif (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] === null) { + $object->setNanoCPUs(null); + } + if (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] !== null) { + $object->setMemoryBytes($data['MemoryBytes']); + } + elseif (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] === null) { + $object->setMemoryBytes(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('nanoCPUs') && null !== $object->getNanoCPUs()) { + $data['NanoCPUs'] = $object->getNanoCPUs(); + } + if ($object->isInitialized('memoryBytes') && null !== $object->getMemoryBytes()) { + $data['MemoryBytes'] = $object->getMemoryBytes(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeDescriptionResources::class => false]; + } + } +} else { + class NodeDescriptionResourcesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeDescriptionResources::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionResources::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeDescriptionResources(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] !== null) { + $object->setNanoCPUs($data['NanoCPUs']); + } + elseif (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] === null) { + $object->setNanoCPUs(null); + } + if (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] !== null) { + $object->setMemoryBytes($data['MemoryBytes']); + } + elseif (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] === null) { + $object->setMemoryBytes(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('nanoCPUs') && null !== $object->getNanoCPUs()) { + $data['NanoCPUs'] = $object->getNanoCPUs(); + } + if ($object->isInitialized('memoryBytes') && null !== $object->getMemoryBytes()) { + $data['MemoryBytes'] = $object->getMemoryBytes(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeDescriptionResources::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/NodeEngineNormalizer.php b/generated/Normalizer/NodeEngineNormalizer.php deleted file mode 100644 index c56f567b2..000000000 --- a/generated/Normalizer/NodeEngineNormalizer.php +++ /dev/null @@ -1,96 +0,0 @@ -setEngineVersion($data->{'EngineVersion'}); - } - if (property_exists($data, 'Labels')) { - $value = $data->{'Labels'}; - if (is_object($data->{'Labels'})) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Labels'} as $key => $value_1) { - $values[$key] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Labels'})) { - $value = $data->{'Labels'}; - } - $object->setLabels($value); - } - if (property_exists($data, 'Plugins')) { - $values_1 = []; - foreach ($data->{'Plugins'} as $value_2) { - $values_1[] = $this->serializer->denormalize($value_2, 'Docker\\API\\Model\\NodePlugin', 'raw', $context); - } - $object->setPlugins($values_1); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getEngineVersion()) { - $data->{'EngineVersion'} = $object->getEngineVersion(); - } - $value = $object->getLabels(); - if (is_object($object->getLabels())) { - $values = new \stdClass(); - foreach ($object->getLabels() as $key => $value_1) { - $values->{$key} = $value_1; - } - $value = $values; - } - if (is_null($object->getLabels())) { - $value = $object->getLabels(); - } - $data->{'Labels'} = $value; - if (null !== $object->getPlugins()) { - $values_1 = []; - foreach ($object->getPlugins() as $value_2) { - $values_1[] = $value_2; - } - $data->{'Plugins'} = $values_1; - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/NodeManagerStatusNormalizer.php b/generated/Normalizer/NodeManagerStatusNormalizer.php deleted file mode 100644 index a1de1acb3..000000000 --- a/generated/Normalizer/NodeManagerStatusNormalizer.php +++ /dev/null @@ -1,69 +0,0 @@ -setLeader($data->{'Leader'}); - } - if (property_exists($data, 'Reachability')) { - $object->setReachability($data->{'Reachability'}); - } - if (property_exists($data, 'Addr')) { - $object->setAddr($data->{'Addr'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getLeader()) { - $data->{'Leader'} = $object->getLeader(); - } - if (null !== $object->getReachability()) { - $data->{'Reachability'} = $object->getReachability(); - } - if (null !== $object->getAddr()) { - $data->{'Addr'} = $object->getAddr(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/NodeNormalizer.php b/generated/Normalizer/NodeNormalizer.php index 7195943b0..7c3a3be9d 100644 --- a/generated/Normalizer/NodeNormalizer.php +++ b/generated/Normalizer/NodeNormalizer.php @@ -2,98 +2,207 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class NodeNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\Node') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NodeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($data instanceof \Docker\API\Model\Node) { - return true; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Node::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Node::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Node(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\NodeVersion::class, 'json', $context)); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); + } + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\NodeSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($this->denormalizer->denormalize($data['Description'], \Docker\API\Model\NodeDescription::class, 'json', $context)); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + if ($object->isInitialized('description') && null !== $object->getDescription()) { + $data['Description'] = $this->normalizer->normalize($object->getDescription(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Node::class => false]; } - - return false; } - - public function denormalize($data, $class, $format = null, array $context = []) +} else { + class NodeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $object = new \Docker\API\Model\Node(); - if (property_exists($data, 'ID')) { - $object->setID($data->{'ID'}); - } - if (property_exists($data, 'Version')) { - $object->setVersion($this->serializer->denormalize($data->{'Version'}, 'Docker\\API\\Model\\NodeVersion', 'raw', $context)); - } - if (property_exists($data, 'CreatedAt')) { - $object->setCreatedAt(\DateTime::createFromFormat("Y-m-d\TH:i:sP", $data->{'CreatedAt'})); - } - if (property_exists($data, 'UpdatedAt')) { - $object->setUpdatedAt(\DateTime::createFromFormat("Y-m-d\TH:i:sP", $data->{'UpdatedAt'})); - } - if (property_exists($data, 'Spec')) { - $object->setSpec($this->serializer->denormalize($data->{'Spec'}, 'Docker\\API\\Model\\NodeSpec', 'raw', $context)); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Node::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Node::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Node(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\NodeVersion::class, 'json', $context)); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); + } + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\NodeSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($this->denormalizer->denormalize($data['Description'], \Docker\API\Model\NodeDescription::class, 'json', $context)); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + if ($object->isInitialized('description') && null !== $object->getDescription()) { + $data['Description'] = $this->normalizer->normalize($object->getDescription(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Node::class => false]; } - if (property_exists($data, 'Description')) { - $object->setDescription($this->serializer->denormalize($data->{'Description'}, 'Docker\\API\\Model\\NodeDescription', 'raw', $context)); - } - if (property_exists($data, 'Status')) { - $object->setStatus($this->serializer->denormalize($data->{'Status'}, 'Docker\\API\\Model\\NodeStatus', 'raw', $context)); - } - if (property_exists($data, 'ManagerStatus')) { - $object->setManagerStatus($this->serializer->denormalize($data->{'ManagerStatus'}, 'Docker\\API\\Model\\NodeManagerStatus', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getID()) { - $data->{'ID'} = $object->getID(); - } - if (null !== $object->getVersion()) { - $data->{'Version'} = json_decode($this->serializer->normalize($object->getVersion(), 'raw', $context)); - } - if (null !== $object->getCreatedAt()) { - $data->{'CreatedAt'} = $object->getCreatedAt()->format("Y-m-d\TH:i:sP"); - } - if (null !== $object->getUpdatedAt()) { - $data->{'UpdatedAt'} = $object->getUpdatedAt()->format("Y-m-d\TH:i:sP"); - } - if (null !== $object->getSpec()) { - $data->{'Spec'} = json_decode($this->serializer->normalize($object->getSpec(), 'raw', $context)); - } - if (null !== $object->getDescription()) { - $data->{'Description'} = json_decode($this->serializer->normalize($object->getDescription(), 'raw', $context)); - } - if (null !== $object->getStatus()) { - $data->{'Status'} = json_decode($this->serializer->normalize($object->getStatus(), 'raw', $context)); - } - if (null !== $object->getManagerStatus()) { - $data->{'ManagerStatus'} = json_decode($this->serializer->normalize($object->getManagerStatus(), 'raw', $context)); - } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/NodePlatformNormalizer.php b/generated/Normalizer/NodePlatformNormalizer.php deleted file mode 100644 index ccee50db5..000000000 --- a/generated/Normalizer/NodePlatformNormalizer.php +++ /dev/null @@ -1,63 +0,0 @@ -setArchitecture($data->{'Architecture'}); - } - if (property_exists($data, 'OS')) { - $object->setOS($data->{'OS'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getArchitecture()) { - $data->{'Architecture'} = $object->getArchitecture(); - } - if (null !== $object->getOS()) { - $data->{'OS'} = $object->getOS(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/NodePluginNormalizer.php b/generated/Normalizer/NodePluginNormalizer.php deleted file mode 100644 index a29d358cb..000000000 --- a/generated/Normalizer/NodePluginNormalizer.php +++ /dev/null @@ -1,63 +0,0 @@ -setType($data->{'Type'}); - } - if (property_exists($data, 'Name')) { - $object->setName($data->{'Name'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getType()) { - $data->{'Type'} = $object->getType(); - } - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/NodeResourcesNormalizer.php b/generated/Normalizer/NodeResourcesNormalizer.php deleted file mode 100644 index a1f08d970..000000000 --- a/generated/Normalizer/NodeResourcesNormalizer.php +++ /dev/null @@ -1,63 +0,0 @@ -setNanoCPUs($data->{'NanoCPUs'}); - } - if (property_exists($data, 'MemoryBytes')) { - $object->setMemoryBytes($data->{'MemoryBytes'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getNanoCPUs()) { - $data->{'NanoCPUs'} = $object->getNanoCPUs(); - } - if (null !== $object->getMemoryBytes()) { - $data->{'MemoryBytes'} = $object->getMemoryBytes(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/NodeSpecNormalizer.php b/generated/Normalizer/NodeSpecNormalizer.php index c33ffbdd8..0416274bc 100644 --- a/generated/Normalizer/NodeSpecNormalizer.php +++ b/generated/Normalizer/NodeSpecNormalizer.php @@ -2,94 +2,187 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class NodeSpecNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\NodeSpec') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\NodeSpec) { - return true; - } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NodeSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $object = new \Docker\API\Model\NodeSpec(); - if (property_exists($data, 'Name')) { - $object->setName($data->{'Name'}); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeSpec::class; } - if (property_exists($data, 'Role')) { - $object->setRole($data->{'Role'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeSpec::class; } - if (property_exists($data, 'Availability')) { - $object->setAvailability($data->{'Availability'}); - } - if (property_exists($data, 'Labels')) { - $value = $data->{'Labels'}; - if (is_object($data->{'Labels'})) { + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Labels'} as $key => $value_1) { - $values[$key] = $value_1; + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; } - $value = $values; + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Role', $data) && $data['Role'] !== null) { + $object->setRole($data['Role']); } - if (is_null($data->{'Labels'})) { - $value = $data->{'Labels'}; + elseif (\array_key_exists('Role', $data) && $data['Role'] === null) { + $object->setRole(null); } - $object->setLabels($value); + if (\array_key_exists('Availability', $data) && $data['Availability'] !== null) { + $object->setAvailability($data['Availability']); + } + elseif (\array_key_exists('Availability', $data) && $data['Availability'] === null) { + $object->setAvailability(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('role') && null !== $object->getRole()) { + $data['Role'] = $object->getRole(); + } + if ($object->isInitialized('availability') && null !== $object->getAvailability()) { + $data['Availability'] = $object->getAvailability(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeSpec::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class NodeSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeSpec::class; } - if (null !== $object->getRole()) { - $data->{'Role'} = $object->getRole(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeSpec::class; } - if (null !== $object->getAvailability()) { - $data->{'Availability'} = $object->getAvailability(); + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Role', $data) && $data['Role'] !== null) { + $object->setRole($data['Role']); + } + elseif (\array_key_exists('Role', $data) && $data['Role'] === null) { + $object->setRole(null); + } + if (\array_key_exists('Availability', $data) && $data['Availability'] !== null) { + $object->setAvailability($data['Availability']); + } + elseif (\array_key_exists('Availability', $data) && $data['Availability'] === null) { + $object->setAvailability(null); + } + return $object; } - $value = $object->getLabels(); - if (is_object($object->getLabels())) { - $values = new \stdClass(); - foreach ($object->getLabels() as $key => $value_1) { - $values->{$key} = $value_1; + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; } - $value = $values; + if ($object->isInitialized('role') && null !== $object->getRole()) { + $data['Role'] = $object->getRole(); + } + if ($object->isInitialized('availability') && null !== $object->getAvailability()) { + $data['Availability'] = $object->getAvailability(); + } + return $data; } - if (is_null($object->getLabels())) { - $value = $object->getLabels(); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeSpec::class => false]; } - $data->{'Labels'} = $value; - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/NodeStatusNormalizer.php b/generated/Normalizer/NodeStatusNormalizer.php deleted file mode 100644 index 559885876..000000000 --- a/generated/Normalizer/NodeStatusNormalizer.php +++ /dev/null @@ -1,56 +0,0 @@ -setState($data->{'State'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getState()) { - $data->{'State'} = $object->getState(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/NodeVersionNormalizer.php b/generated/Normalizer/NodeVersionNormalizer.php index 25b27760a..fe80c6498 100644 --- a/generated/Normalizer/NodeVersionNormalizer.php +++ b/generated/Normalizer/NodeVersionNormalizer.php @@ -2,55 +2,117 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class NodeVersionNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NodeVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($type !== 'Docker\\API\\Model\\NodeVersion') { - return false; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeVersion::class; } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\NodeVersion) { - return true; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeVersion::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\NodeVersion(); - if (property_exists($data, 'Index')) { - $object->setIndex($data->{'Index'}); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeVersion(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Index', $data) && $data['Index'] !== null) { + $object->setIndex($data['Index']); + } + elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { + $object->setIndex(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('index') && null !== $object->getIndex()) { + $data['Index'] = $object->getIndex(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeVersion::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class NodeVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getIndex()) { - $data->{'Index'} = $object->getIndex(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeVersion::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeVersion::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeVersion(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Index', $data) && $data['Index'] !== null) { + $object->setIndex($data['Index']); + } + elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { + $object->setIndex(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('index') && null !== $object->getIndex()) { + $data['Index'] = $object->getIndex(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeVersion::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/NormalizerFactory.php b/generated/Normalizer/NormalizerFactory.php deleted file mode 100644 index 1f5749f17..000000000 --- a/generated/Normalizer/NormalizerFactory.php +++ /dev/null @@ -1,127 +0,0 @@ -= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginConfigArgsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginConfigArgs::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginConfigArgs::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginConfigArgs(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('Settable', $data) && $data['Settable'] !== null) { + $values = []; + foreach ($data['Settable'] as $value) { + $values[] = $value; + } + $object->setSettable($values); + } + elseif (\array_key_exists('Settable', $data) && $data['Settable'] === null) { + $object->setSettable(null); + } + if (\array_key_exists('Value', $data) && $data['Value'] !== null) { + $values_1 = []; + foreach ($data['Value'] as $value_1) { + $values_1[] = $value_1; + } + $object->setValue($values_1); + } + elseif (\array_key_exists('Value', $data) && $data['Value'] === null) { + $object->setValue(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Name'] = $object->getName(); + $data['Description'] = $object->getDescription(); + $values = []; + foreach ($object->getSettable() as $value) { + $values[] = $value; + } + $data['Settable'] = $values; + $values_1 = []; + foreach ($object->getValue() as $value_1) { + $values_1[] = $value_1; + } + $data['Value'] = $values_1; + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginConfigArgs::class => false]; + } + } +} else { + class PluginConfigArgsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginConfigArgs::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginConfigArgs::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginConfigArgs(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('Settable', $data) && $data['Settable'] !== null) { + $values = []; + foreach ($data['Settable'] as $value) { + $values[] = $value; + } + $object->setSettable($values); + } + elseif (\array_key_exists('Settable', $data) && $data['Settable'] === null) { + $object->setSettable(null); + } + if (\array_key_exists('Value', $data) && $data['Value'] !== null) { + $values_1 = []; + foreach ($data['Value'] as $value_1) { + $values_1[] = $value_1; + } + $object->setValue($values_1); + } + elseif (\array_key_exists('Value', $data) && $data['Value'] === null) { + $object->setValue(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Name'] = $object->getName(); + $data['Description'] = $object->getDescription(); + $values = []; + foreach ($object->getSettable() as $value) { + $values[] = $value; + } + $data['Settable'] = $values; + $values_1 = []; + foreach ($object->getValue() as $value_1) { + $values_1[] = $value_1; + } + $data['Value'] = $values_1; + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginConfigArgs::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginConfigInterfaceNormalizer.php b/generated/Normalizer/PluginConfigInterfaceNormalizer.php new file mode 100644 index 000000000..537f626aa --- /dev/null +++ b/generated/Normalizer/PluginConfigInterfaceNormalizer.php @@ -0,0 +1,144 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginConfigInterfaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginConfigInterface::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginConfigInterface::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginConfigInterface(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Types', $data) && $data['Types'] !== null) { + $values = []; + foreach ($data['Types'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\PluginInterfaceType::class, 'json', $context); + } + $object->setTypes($values); + } + elseif (\array_key_exists('Types', $data) && $data['Types'] === null) { + $object->setTypes(null); + } + if (\array_key_exists('Socket', $data) && $data['Socket'] !== null) { + $object->setSocket($data['Socket']); + } + elseif (\array_key_exists('Socket', $data) && $data['Socket'] === null) { + $object->setSocket(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $values = []; + foreach ($object->getTypes() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Types'] = $values; + $data['Socket'] = $object->getSocket(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginConfigInterface::class => false]; + } + } +} else { + class PluginConfigInterfaceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginConfigInterface::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginConfigInterface::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginConfigInterface(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Types', $data) && $data['Types'] !== null) { + $values = []; + foreach ($data['Types'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\PluginInterfaceType::class, 'json', $context); + } + $object->setTypes($values); + } + elseif (\array_key_exists('Types', $data) && $data['Types'] === null) { + $object->setTypes(null); + } + if (\array_key_exists('Socket', $data) && $data['Socket'] !== null) { + $object->setSocket($data['Socket']); + } + elseif (\array_key_exists('Socket', $data) && $data['Socket'] === null) { + $object->setSocket(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getTypes() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Types'] = $values; + $data['Socket'] = $object->getSocket(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginConfigInterface::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginConfigLinuxNormalizer.php b/generated/Normalizer/PluginConfigLinuxNormalizer.php new file mode 100644 index 000000000..ded2d1057 --- /dev/null +++ b/generated/Normalizer/PluginConfigLinuxNormalizer.php @@ -0,0 +1,174 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginConfigLinuxNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginConfigLinux::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginConfigLinux::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginConfigLinux(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Capabilities', $data) && $data['Capabilities'] !== null) { + $values = []; + foreach ($data['Capabilities'] as $value) { + $values[] = $value; + } + $object->setCapabilities($values); + } + elseif (\array_key_exists('Capabilities', $data) && $data['Capabilities'] === null) { + $object->setCapabilities(null); + } + if (\array_key_exists('AllowAllDevices', $data) && $data['AllowAllDevices'] !== null) { + $object->setAllowAllDevices($data['AllowAllDevices']); + } + elseif (\array_key_exists('AllowAllDevices', $data) && $data['AllowAllDevices'] === null) { + $object->setAllowAllDevices(null); + } + if (\array_key_exists('Devices', $data) && $data['Devices'] !== null) { + $values_1 = []; + foreach ($data['Devices'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\PluginDevice::class, 'json', $context); + } + $object->setDevices($values_1); + } + elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { + $object->setDevices(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $values = []; + foreach ($object->getCapabilities() as $value) { + $values[] = $value; + } + $data['Capabilities'] = $values; + $data['AllowAllDevices'] = $object->getAllowAllDevices(); + $values_1 = []; + foreach ($object->getDevices() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Devices'] = $values_1; + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginConfigLinux::class => false]; + } + } +} else { + class PluginConfigLinuxNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginConfigLinux::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginConfigLinux::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginConfigLinux(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Capabilities', $data) && $data['Capabilities'] !== null) { + $values = []; + foreach ($data['Capabilities'] as $value) { + $values[] = $value; + } + $object->setCapabilities($values); + } + elseif (\array_key_exists('Capabilities', $data) && $data['Capabilities'] === null) { + $object->setCapabilities(null); + } + if (\array_key_exists('AllowAllDevices', $data) && $data['AllowAllDevices'] !== null) { + $object->setAllowAllDevices($data['AllowAllDevices']); + } + elseif (\array_key_exists('AllowAllDevices', $data) && $data['AllowAllDevices'] === null) { + $object->setAllowAllDevices(null); + } + if (\array_key_exists('Devices', $data) && $data['Devices'] !== null) { + $values_1 = []; + foreach ($data['Devices'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\PluginDevice::class, 'json', $context); + } + $object->setDevices($values_1); + } + elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { + $object->setDevices(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getCapabilities() as $value) { + $values[] = $value; + } + $data['Capabilities'] = $values; + $data['AllowAllDevices'] = $object->getAllowAllDevices(); + $values_1 = []; + foreach ($object->getDevices() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Devices'] = $values_1; + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginConfigLinux::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginConfigNetworkNormalizer.php b/generated/Normalizer/PluginConfigNetworkNormalizer.php new file mode 100644 index 000000000..fbc4923d2 --- /dev/null +++ b/generated/Normalizer/PluginConfigNetworkNormalizer.php @@ -0,0 +1,114 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginConfigNetworkNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginConfigNetwork::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginConfigNetwork::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginConfigNetwork(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Type'] = $object->getType(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginConfigNetwork::class => false]; + } + } +} else { + class PluginConfigNetworkNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginConfigNetwork::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginConfigNetwork::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginConfigNetwork(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Type'] = $object->getType(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginConfigNetwork::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginConfigNormalizer.php b/generated/Normalizer/PluginConfigNormalizer.php new file mode 100644 index 000000000..9de6087a7 --- /dev/null +++ b/generated/Normalizer/PluginConfigNormalizer.php @@ -0,0 +1,338 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('Documentation', $data) && $data['Documentation'] !== null) { + $object->setDocumentation($data['Documentation']); + } + elseif (\array_key_exists('Documentation', $data) && $data['Documentation'] === null) { + $object->setDocumentation(null); + } + if (\array_key_exists('Interface', $data) && $data['Interface'] !== null) { + $object->setInterface($this->denormalizer->denormalize($data['Interface'], \Docker\API\Model\PluginConfigInterface::class, 'json', $context)); + } + elseif (\array_key_exists('Interface', $data) && $data['Interface'] === null) { + $object->setInterface(null); + } + if (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] !== null) { + $values = []; + foreach ($data['Entrypoint'] as $value) { + $values[] = $value; + } + $object->setEntrypoint($values); + } + elseif (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] === null) { + $object->setEntrypoint(null); + } + if (\array_key_exists('WorkDir', $data) && $data['WorkDir'] !== null) { + $object->setWorkDir($data['WorkDir']); + } + elseif (\array_key_exists('WorkDir', $data) && $data['WorkDir'] === null) { + $object->setWorkDir(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($this->denormalizer->denormalize($data['User'], \Docker\API\Model\PluginConfigUser::class, 'json', $context)); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + if (\array_key_exists('Network', $data) && $data['Network'] !== null) { + $object->setNetwork($this->denormalizer->denormalize($data['Network'], \Docker\API\Model\PluginConfigNetwork::class, 'json', $context)); + } + elseif (\array_key_exists('Network', $data) && $data['Network'] === null) { + $object->setNetwork(null); + } + if (\array_key_exists('Linux', $data) && $data['Linux'] !== null) { + $object->setLinux($this->denormalizer->denormalize($data['Linux'], \Docker\API\Model\PluginConfigLinux::class, 'json', $context)); + } + elseif (\array_key_exists('Linux', $data) && $data['Linux'] === null) { + $object->setLinux(null); + } + if (\array_key_exists('PropagatedMount', $data) && $data['PropagatedMount'] !== null) { + $object->setPropagatedMount($data['PropagatedMount']); + } + elseif (\array_key_exists('PropagatedMount', $data) && $data['PropagatedMount'] === null) { + $object->setPropagatedMount(null); + } + if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { + $values_1 = []; + foreach ($data['Mounts'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\PluginMount::class, 'json', $context); + } + $object->setMounts($values_1); + } + elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { + $object->setMounts(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values_2 = []; + foreach ($data['Env'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\PluginEnv::class, 'json', $context); + } + $object->setEnv($values_2); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Args', $data) && $data['Args'] !== null) { + $object->setArgs($this->denormalizer->denormalize($data['Args'], \Docker\API\Model\PluginConfigArgs::class, 'json', $context)); + } + elseif (\array_key_exists('Args', $data) && $data['Args'] === null) { + $object->setArgs(null); + } + if (\array_key_exists('rootfs', $data) && $data['rootfs'] !== null) { + $object->setRootfs($this->denormalizer->denormalize($data['rootfs'], \Docker\API\Model\PluginConfigRootfs::class, 'json', $context)); + } + elseif (\array_key_exists('rootfs', $data) && $data['rootfs'] === null) { + $object->setRootfs(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Description'] = $object->getDescription(); + $data['Documentation'] = $object->getDocumentation(); + $data['Interface'] = $this->normalizer->normalize($object->getInterface(), 'json', $context); + $values = []; + foreach ($object->getEntrypoint() as $value) { + $values[] = $value; + } + $data['Entrypoint'] = $values; + $data['WorkDir'] = $object->getWorkDir(); + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + } + $data['Network'] = $this->normalizer->normalize($object->getNetwork(), 'json', $context); + $data['Linux'] = $this->normalizer->normalize($object->getLinux(), 'json', $context); + $data['PropagatedMount'] = $object->getPropagatedMount(); + $values_1 = []; + foreach ($object->getMounts() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Mounts'] = $values_1; + $values_2 = []; + foreach ($object->getEnv() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['Env'] = $values_2; + $data['Args'] = $this->normalizer->normalize($object->getArgs(), 'json', $context); + if ($object->isInitialized('rootfs') && null !== $object->getRootfs()) { + $data['rootfs'] = $this->normalizer->normalize($object->getRootfs(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginConfig::class => false]; + } + } +} else { + class PluginConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('Documentation', $data) && $data['Documentation'] !== null) { + $object->setDocumentation($data['Documentation']); + } + elseif (\array_key_exists('Documentation', $data) && $data['Documentation'] === null) { + $object->setDocumentation(null); + } + if (\array_key_exists('Interface', $data) && $data['Interface'] !== null) { + $object->setInterface($this->denormalizer->denormalize($data['Interface'], \Docker\API\Model\PluginConfigInterface::class, 'json', $context)); + } + elseif (\array_key_exists('Interface', $data) && $data['Interface'] === null) { + $object->setInterface(null); + } + if (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] !== null) { + $values = []; + foreach ($data['Entrypoint'] as $value) { + $values[] = $value; + } + $object->setEntrypoint($values); + } + elseif (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] === null) { + $object->setEntrypoint(null); + } + if (\array_key_exists('WorkDir', $data) && $data['WorkDir'] !== null) { + $object->setWorkDir($data['WorkDir']); + } + elseif (\array_key_exists('WorkDir', $data) && $data['WorkDir'] === null) { + $object->setWorkDir(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($this->denormalizer->denormalize($data['User'], \Docker\API\Model\PluginConfigUser::class, 'json', $context)); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + if (\array_key_exists('Network', $data) && $data['Network'] !== null) { + $object->setNetwork($this->denormalizer->denormalize($data['Network'], \Docker\API\Model\PluginConfigNetwork::class, 'json', $context)); + } + elseif (\array_key_exists('Network', $data) && $data['Network'] === null) { + $object->setNetwork(null); + } + if (\array_key_exists('Linux', $data) && $data['Linux'] !== null) { + $object->setLinux($this->denormalizer->denormalize($data['Linux'], \Docker\API\Model\PluginConfigLinux::class, 'json', $context)); + } + elseif (\array_key_exists('Linux', $data) && $data['Linux'] === null) { + $object->setLinux(null); + } + if (\array_key_exists('PropagatedMount', $data) && $data['PropagatedMount'] !== null) { + $object->setPropagatedMount($data['PropagatedMount']); + } + elseif (\array_key_exists('PropagatedMount', $data) && $data['PropagatedMount'] === null) { + $object->setPropagatedMount(null); + } + if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { + $values_1 = []; + foreach ($data['Mounts'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\PluginMount::class, 'json', $context); + } + $object->setMounts($values_1); + } + elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { + $object->setMounts(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values_2 = []; + foreach ($data['Env'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\PluginEnv::class, 'json', $context); + } + $object->setEnv($values_2); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Args', $data) && $data['Args'] !== null) { + $object->setArgs($this->denormalizer->denormalize($data['Args'], \Docker\API\Model\PluginConfigArgs::class, 'json', $context)); + } + elseif (\array_key_exists('Args', $data) && $data['Args'] === null) { + $object->setArgs(null); + } + if (\array_key_exists('rootfs', $data) && $data['rootfs'] !== null) { + $object->setRootfs($this->denormalizer->denormalize($data['rootfs'], \Docker\API\Model\PluginConfigRootfs::class, 'json', $context)); + } + elseif (\array_key_exists('rootfs', $data) && $data['rootfs'] === null) { + $object->setRootfs(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Description'] = $object->getDescription(); + $data['Documentation'] = $object->getDocumentation(); + $data['Interface'] = $this->normalizer->normalize($object->getInterface(), 'json', $context); + $values = []; + foreach ($object->getEntrypoint() as $value) { + $values[] = $value; + } + $data['Entrypoint'] = $values; + $data['WorkDir'] = $object->getWorkDir(); + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $this->normalizer->normalize($object->getUser(), 'json', $context); + } + $data['Network'] = $this->normalizer->normalize($object->getNetwork(), 'json', $context); + $data['Linux'] = $this->normalizer->normalize($object->getLinux(), 'json', $context); + $data['PropagatedMount'] = $object->getPropagatedMount(); + $values_1 = []; + foreach ($object->getMounts() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Mounts'] = $values_1; + $values_2 = []; + foreach ($object->getEnv() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['Env'] = $values_2; + $data['Args'] = $this->normalizer->normalize($object->getArgs(), 'json', $context); + if ($object->isInitialized('rootfs') && null !== $object->getRootfs()) { + $data['rootfs'] = $this->normalizer->normalize($object->getRootfs(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginConfigRootfsNormalizer.php b/generated/Normalizer/PluginConfigRootfsNormalizer.php new file mode 100644 index 000000000..0166eb008 --- /dev/null +++ b/generated/Normalizer/PluginConfigRootfsNormalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginConfigRootfsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginConfigRootfs::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginConfigRootfs::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginConfigRootfs(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('type', $data) && $data['type'] !== null) { + $object->setType($data['type']); + } + elseif (\array_key_exists('type', $data) && $data['type'] === null) { + $object->setType(null); + } + if (\array_key_exists('diff_ids', $data) && $data['diff_ids'] !== null) { + $values = []; + foreach ($data['diff_ids'] as $value) { + $values[] = $value; + } + $object->setDiffIds($values); + } + elseif (\array_key_exists('diff_ids', $data) && $data['diff_ids'] === null) { + $object->setDiffIds(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if ($object->isInitialized('diffIds') && null !== $object->getDiffIds()) { + $values = []; + foreach ($object->getDiffIds() as $value) { + $values[] = $value; + } + $data['diff_ids'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginConfigRootfs::class => false]; + } + } +} else { + class PluginConfigRootfsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginConfigRootfs::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginConfigRootfs::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginConfigRootfs(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('type', $data) && $data['type'] !== null) { + $object->setType($data['type']); + } + elseif (\array_key_exists('type', $data) && $data['type'] === null) { + $object->setType(null); + } + if (\array_key_exists('diff_ids', $data) && $data['diff_ids'] !== null) { + $values = []; + foreach ($data['diff_ids'] as $value) { + $values[] = $value; + } + $object->setDiffIds($values); + } + elseif (\array_key_exists('diff_ids', $data) && $data['diff_ids'] === null) { + $object->setDiffIds(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['type'] = $object->getType(); + } + if ($object->isInitialized('diffIds') && null !== $object->getDiffIds()) { + $values = []; + foreach ($object->getDiffIds() as $value) { + $values[] = $value; + } + $data['diff_ids'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginConfigRootfs::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginConfigUserNormalizer.php b/generated/Normalizer/PluginConfigUserNormalizer.php new file mode 100644 index 000000000..7b701c765 --- /dev/null +++ b/generated/Normalizer/PluginConfigUserNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginConfigUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginConfigUser::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginConfigUser::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginConfigUser(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('UID', $data) && $data['UID'] !== null) { + $object->setUID($data['UID']); + } + elseif (\array_key_exists('UID', $data) && $data['UID'] === null) { + $object->setUID(null); + } + if (\array_key_exists('GID', $data) && $data['GID'] !== null) { + $object->setGID($data['GID']); + } + elseif (\array_key_exists('GID', $data) && $data['GID'] === null) { + $object->setGID(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('uID') && null !== $object->getUID()) { + $data['UID'] = $object->getUID(); + } + if ($object->isInitialized('gID') && null !== $object->getGID()) { + $data['GID'] = $object->getGID(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginConfigUser::class => false]; + } + } +} else { + class PluginConfigUserNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginConfigUser::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginConfigUser::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginConfigUser(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('UID', $data) && $data['UID'] !== null) { + $object->setUID($data['UID']); + } + elseif (\array_key_exists('UID', $data) && $data['UID'] === null) { + $object->setUID(null); + } + if (\array_key_exists('GID', $data) && $data['GID'] !== null) { + $object->setGID($data['GID']); + } + elseif (\array_key_exists('GID', $data) && $data['GID'] === null) { + $object->setGID(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('uID') && null !== $object->getUID()) { + $data['UID'] = $object->getUID(); + } + if ($object->isInitialized('gID') && null !== $object->getGID()) { + $data['GID'] = $object->getGID(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginConfigUser::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginDeviceNormalizer.php b/generated/Normalizer/PluginDeviceNormalizer.php new file mode 100644 index 000000000..4c9fc2ced --- /dev/null +++ b/generated/Normalizer/PluginDeviceNormalizer.php @@ -0,0 +1,172 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginDeviceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginDevice::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginDevice::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginDevice(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('Settable', $data) && $data['Settable'] !== null) { + $values = []; + foreach ($data['Settable'] as $value) { + $values[] = $value; + } + $object->setSettable($values); + } + elseif (\array_key_exists('Settable', $data) && $data['Settable'] === null) { + $object->setSettable(null); + } + if (\array_key_exists('Path', $data) && $data['Path'] !== null) { + $object->setPath($data['Path']); + } + elseif (\array_key_exists('Path', $data) && $data['Path'] === null) { + $object->setPath(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Name'] = $object->getName(); + $data['Description'] = $object->getDescription(); + $values = []; + foreach ($object->getSettable() as $value) { + $values[] = $value; + } + $data['Settable'] = $values; + $data['Path'] = $object->getPath(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginDevice::class => false]; + } + } +} else { + class PluginDeviceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginDevice::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginDevice::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginDevice(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('Settable', $data) && $data['Settable'] !== null) { + $values = []; + foreach ($data['Settable'] as $value) { + $values[] = $value; + } + $object->setSettable($values); + } + elseif (\array_key_exists('Settable', $data) && $data['Settable'] === null) { + $object->setSettable(null); + } + if (\array_key_exists('Path', $data) && $data['Path'] !== null) { + $object->setPath($data['Path']); + } + elseif (\array_key_exists('Path', $data) && $data['Path'] === null) { + $object->setPath(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Name'] = $object->getName(); + $data['Description'] = $object->getDescription(); + $values = []; + foreach ($object->getSettable() as $value) { + $values[] = $value; + } + $data['Settable'] = $values; + $data['Path'] = $object->getPath(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginDevice::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginEnvNormalizer.php b/generated/Normalizer/PluginEnvNormalizer.php new file mode 100644 index 000000000..e8c4f4938 --- /dev/null +++ b/generated/Normalizer/PluginEnvNormalizer.php @@ -0,0 +1,172 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginEnvNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginEnv::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginEnv::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginEnv(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('Settable', $data) && $data['Settable'] !== null) { + $values = []; + foreach ($data['Settable'] as $value) { + $values[] = $value; + } + $object->setSettable($values); + } + elseif (\array_key_exists('Settable', $data) && $data['Settable'] === null) { + $object->setSettable(null); + } + if (\array_key_exists('Value', $data) && $data['Value'] !== null) { + $object->setValue($data['Value']); + } + elseif (\array_key_exists('Value', $data) && $data['Value'] === null) { + $object->setValue(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Name'] = $object->getName(); + $data['Description'] = $object->getDescription(); + $values = []; + foreach ($object->getSettable() as $value) { + $values[] = $value; + } + $data['Settable'] = $values; + $data['Value'] = $object->getValue(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginEnv::class => false]; + } + } +} else { + class PluginEnvNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginEnv::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginEnv::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginEnv(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('Settable', $data) && $data['Settable'] !== null) { + $values = []; + foreach ($data['Settable'] as $value) { + $values[] = $value; + } + $object->setSettable($values); + } + elseif (\array_key_exists('Settable', $data) && $data['Settable'] === null) { + $object->setSettable(null); + } + if (\array_key_exists('Value', $data) && $data['Value'] !== null) { + $object->setValue($data['Value']); + } + elseif (\array_key_exists('Value', $data) && $data['Value'] === null) { + $object->setValue(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Name'] = $object->getName(); + $data['Description'] = $object->getDescription(); + $values = []; + foreach ($object->getSettable() as $value) { + $values[] = $value; + } + $data['Settable'] = $values; + $data['Value'] = $object->getValue(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginEnv::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginInterfaceTypeNormalizer.php b/generated/Normalizer/PluginInterfaceTypeNormalizer.php new file mode 100644 index 000000000..05825b23c --- /dev/null +++ b/generated/Normalizer/PluginInterfaceTypeNormalizer.php @@ -0,0 +1,142 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginInterfaceTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginInterfaceType::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginInterfaceType::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginInterfaceType(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Prefix', $data) && $data['Prefix'] !== null) { + $object->setPrefix($data['Prefix']); + } + elseif (\array_key_exists('Prefix', $data) && $data['Prefix'] === null) { + $object->setPrefix(null); + } + if (\array_key_exists('Capability', $data) && $data['Capability'] !== null) { + $object->setCapability($data['Capability']); + } + elseif (\array_key_exists('Capability', $data) && $data['Capability'] === null) { + $object->setCapability(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($data['Version']); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Prefix'] = $object->getPrefix(); + $data['Capability'] = $object->getCapability(); + $data['Version'] = $object->getVersion(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginInterfaceType::class => false]; + } + } +} else { + class PluginInterfaceTypeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginInterfaceType::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginInterfaceType::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginInterfaceType(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Prefix', $data) && $data['Prefix'] !== null) { + $object->setPrefix($data['Prefix']); + } + elseif (\array_key_exists('Prefix', $data) && $data['Prefix'] === null) { + $object->setPrefix(null); + } + if (\array_key_exists('Capability', $data) && $data['Capability'] !== null) { + $object->setCapability($data['Capability']); + } + elseif (\array_key_exists('Capability', $data) && $data['Capability'] === null) { + $object->setCapability(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($data['Version']); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Prefix'] = $object->getPrefix(); + $data['Capability'] = $object->getCapability(); + $data['Version'] = $object->getVersion(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginInterfaceType::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginMountNormalizer.php b/generated/Normalizer/PluginMountNormalizer.php new file mode 100644 index 000000000..0538f138f --- /dev/null +++ b/generated/Normalizer/PluginMountNormalizer.php @@ -0,0 +1,230 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginMountNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginMount::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginMount::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginMount(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('Settable', $data) && $data['Settable'] !== null) { + $values = []; + foreach ($data['Settable'] as $value) { + $values[] = $value; + } + $object->setSettable($values); + } + elseif (\array_key_exists('Settable', $data) && $data['Settable'] === null) { + $object->setSettable(null); + } + if (\array_key_exists('Source', $data) && $data['Source'] !== null) { + $object->setSource($data['Source']); + } + elseif (\array_key_exists('Source', $data) && $data['Source'] === null) { + $object->setSource(null); + } + if (\array_key_exists('Destination', $data) && $data['Destination'] !== null) { + $object->setDestination($data['Destination']); + } + elseif (\array_key_exists('Destination', $data) && $data['Destination'] === null) { + $object->setDestination(null); + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values_1 = []; + foreach ($data['Options'] as $value_1) { + $values_1[] = $value_1; + } + $object->setOptions($values_1); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Name'] = $object->getName(); + $data['Description'] = $object->getDescription(); + $values = []; + foreach ($object->getSettable() as $value) { + $values[] = $value; + } + $data['Settable'] = $values; + $data['Source'] = $object->getSource(); + $data['Destination'] = $object->getDestination(); + $data['Type'] = $object->getType(); + $values_1 = []; + foreach ($object->getOptions() as $value_1) { + $values_1[] = $value_1; + } + $data['Options'] = $values_1; + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginMount::class => false]; + } + } +} else { + class PluginMountNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginMount::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginMount::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginMount(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('Settable', $data) && $data['Settable'] !== null) { + $values = []; + foreach ($data['Settable'] as $value) { + $values[] = $value; + } + $object->setSettable($values); + } + elseif (\array_key_exists('Settable', $data) && $data['Settable'] === null) { + $object->setSettable(null); + } + if (\array_key_exists('Source', $data) && $data['Source'] !== null) { + $object->setSource($data['Source']); + } + elseif (\array_key_exists('Source', $data) && $data['Source'] === null) { + $object->setSource(null); + } + if (\array_key_exists('Destination', $data) && $data['Destination'] !== null) { + $object->setDestination($data['Destination']); + } + elseif (\array_key_exists('Destination', $data) && $data['Destination'] === null) { + $object->setDestination(null); + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values_1 = []; + foreach ($data['Options'] as $value_1) { + $values_1[] = $value_1; + } + $object->setOptions($values_1); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Name'] = $object->getName(); + $data['Description'] = $object->getDescription(); + $values = []; + foreach ($object->getSettable() as $value) { + $values[] = $value; + } + $data['Settable'] = $values; + $data['Source'] = $object->getSource(); + $data['Destination'] = $object->getDestination(); + $data['Type'] = $object->getType(); + $values_1 = []; + foreach ($object->getOptions() as $value_1) { + $values_1[] = $value_1; + } + $data['Options'] = $values_1; + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginMount::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginNormalizer.php b/generated/Normalizer/PluginNormalizer.php new file mode 100644 index 000000000..9b127dd5f --- /dev/null +++ b/generated/Normalizer/PluginNormalizer.php @@ -0,0 +1,174 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Plugin::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Plugin::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Plugin(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Enabled', $data) && $data['Enabled'] !== null) { + $object->setEnabled($data['Enabled']); + } + elseif (\array_key_exists('Enabled', $data) && $data['Enabled'] === null) { + $object->setEnabled(null); + } + if (\array_key_exists('Settings', $data) && $data['Settings'] !== null) { + $object->setSettings($this->denormalizer->denormalize($data['Settings'], \Docker\API\Model\PluginSettings::class, 'json', $context)); + } + elseif (\array_key_exists('Settings', $data) && $data['Settings'] === null) { + $object->setSettings(null); + } + if (\array_key_exists('Config', $data) && $data['Config'] !== null) { + $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\PluginConfig::class, 'json', $context)); + } + elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { + $object->setConfig(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['Id'] = $object->getId(); + } + $data['Name'] = $object->getName(); + $data['Enabled'] = $object->getEnabled(); + $data['Settings'] = $this->normalizer->normalize($object->getSettings(), 'json', $context); + $data['Config'] = $this->normalizer->normalize($object->getConfig(), 'json', $context); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Plugin::class => false]; + } + } +} else { + class PluginNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Plugin::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Plugin::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Plugin(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Id', $data) && $data['Id'] !== null) { + $object->setId($data['Id']); + } + elseif (\array_key_exists('Id', $data) && $data['Id'] === null) { + $object->setId(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Enabled', $data) && $data['Enabled'] !== null) { + $object->setEnabled($data['Enabled']); + } + elseif (\array_key_exists('Enabled', $data) && $data['Enabled'] === null) { + $object->setEnabled(null); + } + if (\array_key_exists('Settings', $data) && $data['Settings'] !== null) { + $object->setSettings($this->denormalizer->denormalize($data['Settings'], \Docker\API\Model\PluginSettings::class, 'json', $context)); + } + elseif (\array_key_exists('Settings', $data) && $data['Settings'] === null) { + $object->setSettings(null); + } + if (\array_key_exists('Config', $data) && $data['Config'] !== null) { + $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\PluginConfig::class, 'json', $context)); + } + elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { + $object->setConfig(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['Id'] = $object->getId(); + } + $data['Name'] = $object->getName(); + $data['Enabled'] = $object->getEnabled(); + $data['Settings'] = $this->normalizer->normalize($object->getSettings(), 'json', $context); + $data['Config'] = $this->normalizer->normalize($object->getConfig(), 'json', $context); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Plugin::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginSettingsNormalizer.php b/generated/Normalizer/PluginSettingsNormalizer.php new file mode 100644 index 000000000..be1c6d8b9 --- /dev/null +++ b/generated/Normalizer/PluginSettingsNormalizer.php @@ -0,0 +1,220 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginSettings::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginSettings::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginSettings(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { + $values = []; + foreach ($data['Mounts'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\PluginMount::class, 'json', $context); + } + $object->setMounts($values); + } + elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { + $object->setMounts(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values_1 = []; + foreach ($data['Env'] as $value_1) { + $values_1[] = $value_1; + } + $object->setEnv($values_1); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Args', $data) && $data['Args'] !== null) { + $values_2 = []; + foreach ($data['Args'] as $value_2) { + $values_2[] = $value_2; + } + $object->setArgs($values_2); + } + elseif (\array_key_exists('Args', $data) && $data['Args'] === null) { + $object->setArgs(null); + } + if (\array_key_exists('Devices', $data) && $data['Devices'] !== null) { + $values_3 = []; + foreach ($data['Devices'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\PluginDevice::class, 'json', $context); + } + $object->setDevices($values_3); + } + elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { + $object->setDevices(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $values = []; + foreach ($object->getMounts() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Mounts'] = $values; + $values_1 = []; + foreach ($object->getEnv() as $value_1) { + $values_1[] = $value_1; + } + $data['Env'] = $values_1; + $values_2 = []; + foreach ($object->getArgs() as $value_2) { + $values_2[] = $value_2; + } + $data['Args'] = $values_2; + $values_3 = []; + foreach ($object->getDevices() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['Devices'] = $values_3; + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginSettings::class => false]; + } + } +} else { + class PluginSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginSettings::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginSettings::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginSettings(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { + $values = []; + foreach ($data['Mounts'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\PluginMount::class, 'json', $context); + } + $object->setMounts($values); + } + elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { + $object->setMounts(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values_1 = []; + foreach ($data['Env'] as $value_1) { + $values_1[] = $value_1; + } + $object->setEnv($values_1); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Args', $data) && $data['Args'] !== null) { + $values_2 = []; + foreach ($data['Args'] as $value_2) { + $values_2[] = $value_2; + } + $object->setArgs($values_2); + } + elseif (\array_key_exists('Args', $data) && $data['Args'] === null) { + $object->setArgs(null); + } + if (\array_key_exists('Devices', $data) && $data['Devices'] !== null) { + $values_3 = []; + foreach ($data['Devices'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\PluginDevice::class, 'json', $context); + } + $object->setDevices($values_3); + } + elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { + $object->setDevices(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getMounts() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Mounts'] = $values; + $values_1 = []; + foreach ($object->getEnv() as $value_1) { + $values_1[] = $value_1; + } + $data['Env'] = $values_1; + $values_2 = []; + foreach ($object->getArgs() as $value_2) { + $values_2[] = $value_2; + } + $data['Args'] = $values_2; + $values_3 = []; + foreach ($object->getDevices() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['Devices'] = $values_3; + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginSettings::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginsPrivilegesGetResponse200ItemNormalizer.php b/generated/Normalizer/PluginsPrivilegesGetResponse200ItemNormalizer.php new file mode 100644 index 000000000..105bd0f29 --- /dev/null +++ b/generated/Normalizer/PluginsPrivilegesGetResponse200ItemNormalizer.php @@ -0,0 +1,170 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginsPrivilegesGetResponse200ItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginsPrivilegesGetResponse200Item(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('Value', $data) && $data['Value'] !== null) { + $values = []; + foreach ($data['Value'] as $value) { + $values[] = $value; + } + $object->setValue($values); + } + elseif (\array_key_exists('Value', $data) && $data['Value'] === null) { + $object->setValue(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('description') && null !== $object->getDescription()) { + $data['Description'] = $object->getDescription(); + } + if ($object->isInitialized('value') && null !== $object->getValue()) { + $values = []; + foreach ($object->getValue() as $value) { + $values[] = $value; + } + $data['Value'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginsPrivilegesGetResponse200Item::class => false]; + } + } +} else { + class PluginsPrivilegesGetResponse200ItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginsPrivilegesGetResponse200Item(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('Value', $data) && $data['Value'] !== null) { + $values = []; + foreach ($data['Value'] as $value) { + $values[] = $value; + } + $object->setValue($values); + } + elseif (\array_key_exists('Value', $data) && $data['Value'] === null) { + $object->setValue(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('description') && null !== $object->getDescription()) { + $data['Description'] = $object->getDescription(); + } + if ($object->isInitialized('value') && null !== $object->getValue()) { + $values = []; + foreach ($object->getValue() as $value) { + $values[] = $value; + } + $data['Value'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginsPrivilegesGetResponse200Item::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginsPullPostBodyItemNormalizer.php b/generated/Normalizer/PluginsPullPostBodyItemNormalizer.php new file mode 100644 index 000000000..7a093e9f2 --- /dev/null +++ b/generated/Normalizer/PluginsPullPostBodyItemNormalizer.php @@ -0,0 +1,170 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PluginsPullPostBodyItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginsPullPostBodyItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginsPullPostBodyItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginsPullPostBodyItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('Value', $data) && $data['Value'] !== null) { + $values = []; + foreach ($data['Value'] as $value) { + $values[] = $value; + } + $object->setValue($values); + } + elseif (\array_key_exists('Value', $data) && $data['Value'] === null) { + $object->setValue(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('description') && null !== $object->getDescription()) { + $data['Description'] = $object->getDescription(); + } + if ($object->isInitialized('value') && null !== $object->getValue()) { + $values = []; + foreach ($object->getValue() as $value) { + $values[] = $value; + } + $data['Value'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginsPullPostBodyItem::class => false]; + } + } +} else { + class PluginsPullPostBodyItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PluginsPullPostBodyItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PluginsPullPostBodyItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PluginsPullPostBodyItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('Value', $data) && $data['Value'] !== null) { + $values = []; + foreach ($data['Value'] as $value) { + $values[] = $value; + } + $object->setValue($values); + } + elseif (\array_key_exists('Value', $data) && $data['Value'] === null) { + $object->setValue(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('description') && null !== $object->getDescription()) { + $data['Description'] = $object->getDescription(); + } + if ($object->isInitialized('value') && null !== $object->getValue()) { + $values = []; + foreach ($object->getValue() as $value) { + $values[] = $value; + } + $data['Value'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PluginsPullPostBodyItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PortBindingNormalizer.php b/generated/Normalizer/PortBindingNormalizer.php deleted file mode 100644 index 266d64438..000000000 --- a/generated/Normalizer/PortBindingNormalizer.php +++ /dev/null @@ -1,63 +0,0 @@ -setHostPort($data->{'HostPort'}); - } - if (property_exists($data, 'HostIp')) { - $object->setHostIp($data->{'HostIp'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getHostPort()) { - $data->{'HostPort'} = $object->getHostPort(); - } - if (null !== $object->getHostIp()) { - $data->{'HostIp'} = $object->getHostIp(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/PortConfigNormalizer.php b/generated/Normalizer/PortConfigNormalizer.php deleted file mode 100644 index c8132d192..000000000 --- a/generated/Normalizer/PortConfigNormalizer.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($data->{'Name'}); - } - if (property_exists($data, 'Protocol')) { - $object->setProtocol($data->{'Protocol'}); - } - if (property_exists($data, 'TargetPort')) { - $object->setTargetPort($data->{'TargetPort'}); - } - if (property_exists($data, 'PublishedPort')) { - $object->setPublishedPort($data->{'PublishedPort'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - if (null !== $object->getProtocol()) { - $data->{'Protocol'} = $object->getProtocol(); - } - if (null !== $object->getTargetPort()) { - $data->{'TargetPort'} = $object->getTargetPort(); - } - if (null !== $object->getPublishedPort()) { - $data->{'PublishedPort'} = $object->getPublishedPort(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/PortNormalizer.php b/generated/Normalizer/PortNormalizer.php index 6fbba695d..4c840a078 100644 --- a/generated/Normalizer/PortNormalizer.php +++ b/generated/Normalizer/PortNormalizer.php @@ -2,67 +2,163 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class PortNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($type !== 'Docker\\API\\Model\\Port') { - return false; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Port::class; } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\Port) { - return true; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Port::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\Port(); - if (property_exists($data, 'PrivatePort')) { - $object->setPrivatePort($data->{'PrivatePort'}); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Port(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('IP', $data) && $data['IP'] !== null) { + $object->setIP($data['IP']); + } + elseif (\array_key_exists('IP', $data) && $data['IP'] === null) { + $object->setIP(null); + } + if (\array_key_exists('PrivatePort', $data) && $data['PrivatePort'] !== null) { + $object->setPrivatePort($data['PrivatePort']); + } + elseif (\array_key_exists('PrivatePort', $data) && $data['PrivatePort'] === null) { + $object->setPrivatePort(null); + } + if (\array_key_exists('PublicPort', $data) && $data['PublicPort'] !== null) { + $object->setPublicPort($data['PublicPort']); + } + elseif (\array_key_exists('PublicPort', $data) && $data['PublicPort'] === null) { + $object->setPublicPort(null); + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + return $object; } - if (property_exists($data, 'PublicPort')) { - $object->setPublicPort($data->{'PublicPort'}); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iP') && null !== $object->getIP()) { + $data['IP'] = $object->getIP(); + } + $data['PrivatePort'] = $object->getPrivatePort(); + if ($object->isInitialized('publicPort') && null !== $object->getPublicPort()) { + $data['PublicPort'] = $object->getPublicPort(); + } + $data['Type'] = $object->getType(); + return $data; } - if (property_exists($data, 'Type')) { - $object->setType($data->{'Type'}); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Port::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class PortNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getPrivatePort()) { - $data->{'PrivatePort'} = $object->getPrivatePort(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Port::class; } - if (null !== $object->getPublicPort()) { - $data->{'PublicPort'} = $object->getPublicPort(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Port::class; } - if (null !== $object->getType()) { - $data->{'Type'} = $object->getType(); + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Port(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('IP', $data) && $data['IP'] !== null) { + $object->setIP($data['IP']); + } + elseif (\array_key_exists('IP', $data) && $data['IP'] === null) { + $object->setIP(null); + } + if (\array_key_exists('PrivatePort', $data) && $data['PrivatePort'] !== null) { + $object->setPrivatePort($data['PrivatePort']); + } + elseif (\array_key_exists('PrivatePort', $data) && $data['PrivatePort'] === null) { + $object->setPrivatePort(null); + } + if (\array_key_exists('PublicPort', $data) && $data['PublicPort'] !== null) { + $object->setPublicPort($data['PublicPort']); + } + elseif (\array_key_exists('PublicPort', $data) && $data['PublicPort'] === null) { + $object->setPublicPort(null); + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iP') && null !== $object->getIP()) { + $data['IP'] = $object->getIP(); + } + $data['PrivatePort'] = $object->getPrivatePort(); + if ($object->isInitialized('publicPort') && null !== $object->getPublicPort()) { + $data['PublicPort'] = $object->getPublicPort(); + } + $data['Type'] = $object->getType(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Port::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/ProcessConfigNormalizer.php b/generated/Normalizer/ProcessConfigNormalizer.php index e15e38804..dbfb2b6cd 100644 --- a/generated/Normalizer/ProcessConfigNormalizer.php +++ b/generated/Normalizer/ProcessConfigNormalizer.php @@ -2,100 +2,205 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class ProcessConfigNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\ProcessConfig') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\ProcessConfig) { - return true; - } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ProcessConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $object = new \Docker\API\Model\ProcessConfig(); - if (property_exists($data, 'privileged')) { - $object->setPrivileged($data->{'privileged'}); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ProcessConfig::class; } - if (property_exists($data, 'user')) { - $object->setUser($data->{'user'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ProcessConfig::class; } - if (property_exists($data, 'tty')) { - $object->setTty($data->{'tty'}); - } - if (property_exists($data, 'entrypoint')) { - $object->setEntrypoint($data->{'entrypoint'}); - } - if (property_exists($data, 'arguments')) { - $value = $data->{'arguments'}; - if (is_array($data->{'arguments'})) { + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ProcessConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('privileged', $data) && $data['privileged'] !== null) { + $object->setPrivileged($data['privileged']); + } + elseif (\array_key_exists('privileged', $data) && $data['privileged'] === null) { + $object->setPrivileged(null); + } + if (\array_key_exists('user', $data) && $data['user'] !== null) { + $object->setUser($data['user']); + } + elseif (\array_key_exists('user', $data) && $data['user'] === null) { + $object->setUser(null); + } + if (\array_key_exists('tty', $data) && $data['tty'] !== null) { + $object->setTty($data['tty']); + } + elseif (\array_key_exists('tty', $data) && $data['tty'] === null) { + $object->setTty(null); + } + if (\array_key_exists('entrypoint', $data) && $data['entrypoint'] !== null) { + $object->setEntrypoint($data['entrypoint']); + } + elseif (\array_key_exists('entrypoint', $data) && $data['entrypoint'] === null) { + $object->setEntrypoint(null); + } + if (\array_key_exists('arguments', $data) && $data['arguments'] !== null) { $values = []; - foreach ($data->{'arguments'} as $value_1) { - $values[] = $value_1; + foreach ($data['arguments'] as $value) { + $values[] = $value; } - $value = $values; + $object->setArguments($values); } - if (is_null($data->{'arguments'})) { - $value = $data->{'arguments'}; + elseif (\array_key_exists('arguments', $data) && $data['arguments'] === null) { + $object->setArguments(null); } - $object->setArguments($value); + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('privileged') && null !== $object->getPrivileged()) { + $data['privileged'] = $object->getPrivileged(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['user'] = $object->getUser(); + } + if ($object->isInitialized('tty') && null !== $object->getTty()) { + $data['tty'] = $object->getTty(); + } + if ($object->isInitialized('entrypoint') && null !== $object->getEntrypoint()) { + $data['entrypoint'] = $object->getEntrypoint(); + } + if ($object->isInitialized('arguments') && null !== $object->getArguments()) { + $values = []; + foreach ($object->getArguments() as $value) { + $values[] = $value; + } + $data['arguments'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ProcessConfig::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class ProcessConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getPrivileged()) { - $data->{'privileged'} = $object->getPrivileged(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ProcessConfig::class; } - if (null !== $object->getUser()) { - $data->{'user'} = $object->getUser(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ProcessConfig::class; } - if (null !== $object->getTty()) { - $data->{'tty'} = $object->getTty(); - } - if (null !== $object->getEntrypoint()) { - $data->{'entrypoint'} = $object->getEntrypoint(); + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ProcessConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('privileged', $data) && $data['privileged'] !== null) { + $object->setPrivileged($data['privileged']); + } + elseif (\array_key_exists('privileged', $data) && $data['privileged'] === null) { + $object->setPrivileged(null); + } + if (\array_key_exists('user', $data) && $data['user'] !== null) { + $object->setUser($data['user']); + } + elseif (\array_key_exists('user', $data) && $data['user'] === null) { + $object->setUser(null); + } + if (\array_key_exists('tty', $data) && $data['tty'] !== null) { + $object->setTty($data['tty']); + } + elseif (\array_key_exists('tty', $data) && $data['tty'] === null) { + $object->setTty(null); + } + if (\array_key_exists('entrypoint', $data) && $data['entrypoint'] !== null) { + $object->setEntrypoint($data['entrypoint']); + } + elseif (\array_key_exists('entrypoint', $data) && $data['entrypoint'] === null) { + $object->setEntrypoint(null); + } + if (\array_key_exists('arguments', $data) && $data['arguments'] !== null) { + $values = []; + foreach ($data['arguments'] as $value) { + $values[] = $value; + } + $object->setArguments($values); + } + elseif (\array_key_exists('arguments', $data) && $data['arguments'] === null) { + $object->setArguments(null); + } + return $object; } - $value = $object->getArguments(); - if (is_array($object->getArguments())) { - $values = []; - foreach ($object->getArguments() as $value_1) { - $values[] = $value_1; + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('privileged') && null !== $object->getPrivileged()) { + $data['privileged'] = $object->getPrivileged(); } - $value = $values; + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['user'] = $object->getUser(); + } + if ($object->isInitialized('tty') && null !== $object->getTty()) { + $data['tty'] = $object->getTty(); + } + if ($object->isInitialized('entrypoint') && null !== $object->getEntrypoint()) { + $data['entrypoint'] = $object->getEntrypoint(); + } + if ($object->isInitialized('arguments') && null !== $object->getArguments()) { + $values = []; + foreach ($object->getArguments() as $value) { + $values[] = $value; + } + $data['arguments'] = $values; + } + return $data; } - if (is_null($object->getArguments())) { - $value = $object->getArguments(); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ProcessConfig::class => false]; } - $data->{'arguments'} = $value; - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/ProgressDetailNormalizer.php b/generated/Normalizer/ProgressDetailNormalizer.php index 4af6af2e4..bd5e7df40 100644 --- a/generated/Normalizer/ProgressDetailNormalizer.php +++ b/generated/Normalizer/ProgressDetailNormalizer.php @@ -2,74 +2,135 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class ProgressDetailNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\ProgressDetail') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ProgressDetailNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($data instanceof \Docker\API\Model\ProgressDetail) { - return true; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ProgressDetail::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\ProgressDetail(); - if (property_exists($data, 'code')) { - $object->setCode($data->{'code'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ProgressDetail::class; } - if (property_exists($data, 'message')) { - $object->setMessage($data->{'message'}); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ProgressDetail(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('code', $data) && $data['code'] !== null) { + $object->setCode($data['code']); + } + elseif (\array_key_exists('code', $data) && $data['code'] === null) { + $object->setCode(null); + } + if (\array_key_exists('message', $data) && $data['message'] !== null) { + $object->setMessage($data['message']); + } + elseif (\array_key_exists('message', $data) && $data['message'] === null) { + $object->setMessage(null); + } + return $object; } - if (property_exists($data, 'current')) { - $object->setCurrent($data->{'current'}); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('code') && null !== $object->getCode()) { + $data['code'] = $object->getCode(); + } + if ($object->isInitialized('message') && null !== $object->getMessage()) { + $data['message'] = $object->getMessage(); + } + return $data; } - if (property_exists($data, 'total')) { - $object->setTotal($data->{'total'}); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ProgressDetail::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class ProgressDetailNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getCode()) { - $data->{'code'} = $object->getCode(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ProgressDetail::class; } - if (null !== $object->getMessage()) { - $data->{'message'} = $object->getMessage(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ProgressDetail::class; } - if (null !== $object->getCurrent()) { - $data->{'current'} = $object->getCurrent(); + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ProgressDetail(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('code', $data) && $data['code'] !== null) { + $object->setCode($data['code']); + } + elseif (\array_key_exists('code', $data) && $data['code'] === null) { + $object->setCode(null); + } + if (\array_key_exists('message', $data) && $data['message'] !== null) { + $object->setMessage($data['message']); + } + elseif (\array_key_exists('message', $data) && $data['message'] === null) { + $object->setMessage(null); + } + return $object; } - if (null !== $object->getTotal()) { - $data->{'total'} = $object->getTotal(); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('code') && null !== $object->getCode()) { + $data['code'] = $object->getCode(); + } + if ($object->isInitialized('message') && null !== $object->getMessage()) { + $data['message'] = $object->getMessage(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ProgressDetail::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/PushImageInfoNormalizer.php b/generated/Normalizer/PushImageInfoNormalizer.php index f5213e14f..0de17182e 100644 --- a/generated/Normalizer/PushImageInfoNormalizer.php +++ b/generated/Normalizer/PushImageInfoNormalizer.php @@ -2,74 +2,171 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class PushImageInfoNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\PushImageInfo') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PushImageInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($data instanceof \Docker\API\Model\PushImageInfo) { - return true; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PushImageInfo::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\PushImageInfo(); - if (property_exists($data, 'error')) { - $object->setError($data->{'error'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PushImageInfo::class; } - if (property_exists($data, 'status')) { - $object->setStatus($data->{'status'}); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PushImageInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && $data['error'] !== null) { + $object->setError($data['error']); + } + elseif (\array_key_exists('error', $data) && $data['error'] === null) { + $object->setError(null); + } + if (\array_key_exists('status', $data) && $data['status'] !== null) { + $object->setStatus($data['status']); + } + elseif (\array_key_exists('status', $data) && $data['status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('progress', $data) && $data['progress'] !== null) { + $object->setProgress($data['progress']); + } + elseif (\array_key_exists('progress', $data) && $data['progress'] === null) { + $object->setProgress(null); + } + if (\array_key_exists('progressDetail', $data) && $data['progressDetail'] !== null) { + $object->setProgressDetail($this->denormalizer->denormalize($data['progressDetail'], \Docker\API\Model\ProgressDetail::class, 'json', $context)); + } + elseif (\array_key_exists('progressDetail', $data) && $data['progressDetail'] === null) { + $object->setProgressDetail(null); + } + return $object; } - if (property_exists($data, 'progress')) { - $object->setProgress($data->{'progress'}); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('error') && null !== $object->getError()) { + $data['error'] = $object->getError(); + } + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['status'] = $object->getStatus(); + } + if ($object->isInitialized('progress') && null !== $object->getProgress()) { + $data['progress'] = $object->getProgress(); + } + if ($object->isInitialized('progressDetail') && null !== $object->getProgressDetail()) { + $data['progressDetail'] = $this->normalizer->normalize($object->getProgressDetail(), 'json', $context); + } + return $data; } - if (property_exists($data, 'progressDetail')) { - $object->setProgressDetail($this->serializer->denormalize($data->{'progressDetail'}, 'Docker\\API\\Model\\ProgressDetail', 'raw', $context)); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PushImageInfo::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class PushImageInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getError()) { - $data->{'error'} = $object->getError(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PushImageInfo::class; } - if (null !== $object->getStatus()) { - $data->{'status'} = $object->getStatus(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PushImageInfo::class; } - if (null !== $object->getProgress()) { - $data->{'progress'} = $object->getProgress(); + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PushImageInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('error', $data) && $data['error'] !== null) { + $object->setError($data['error']); + } + elseif (\array_key_exists('error', $data) && $data['error'] === null) { + $object->setError(null); + } + if (\array_key_exists('status', $data) && $data['status'] !== null) { + $object->setStatus($data['status']); + } + elseif (\array_key_exists('status', $data) && $data['status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('progress', $data) && $data['progress'] !== null) { + $object->setProgress($data['progress']); + } + elseif (\array_key_exists('progress', $data) && $data['progress'] === null) { + $object->setProgress(null); + } + if (\array_key_exists('progressDetail', $data) && $data['progressDetail'] !== null) { + $object->setProgressDetail($this->denormalizer->denormalize($data['progressDetail'], \Docker\API\Model\ProgressDetail::class, 'json', $context)); + } + elseif (\array_key_exists('progressDetail', $data) && $data['progressDetail'] === null) { + $object->setProgressDetail(null); + } + return $object; } - if (null !== $object->getProgressDetail()) { - $data->{'progressDetail'} = json_decode($this->serializer->normalize($object->getProgressDetail(), 'raw', $context)); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('error') && null !== $object->getError()) { + $data['error'] = $object->getError(); + } + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['status'] = $object->getStatus(); + } + if ($object->isInitialized('progress') && null !== $object->getProgress()) { + $data['progress'] = $object->getProgress(); + } + if ($object->isInitialized('progressDetail') && null !== $object->getProgressDetail()) { + $data['progressDetail'] = $this->normalizer->normalize($object->getProgressDetail(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PushImageInfo::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/RegistryConfigNormalizer.php b/generated/Normalizer/RegistryConfigNormalizer.php deleted file mode 100644 index 7808b91fc..000000000 --- a/generated/Normalizer/RegistryConfigNormalizer.php +++ /dev/null @@ -1,90 +0,0 @@ -{'IndexConfigs'} as $key => $value) { - $values[$key] = $this->serializer->denormalize($value, 'Docker\\API\\Model\\Registry', 'raw', $context); - } - $object->setIndexConfigs($values); - } - if (property_exists($data, 'InsecureRegistryCIDRs')) { - $value_1 = $data->{'InsecureRegistryCIDRs'}; - if (is_array($data->{'InsecureRegistryCIDRs'})) { - $values_1 = []; - foreach ($data->{'InsecureRegistryCIDRs'} as $value_2) { - $values_1[] = $value_2; - } - $value_1 = $values_1; - } - if (is_null($data->{'InsecureRegistryCIDRs'})) { - $value_1 = $data->{'InsecureRegistryCIDRs'}; - } - $object->setInsecureRegistryCIDRs($value_1); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getIndexConfigs()) { - $values = new \stdClass(); - foreach ($object->getIndexConfigs() as $key => $value) { - $values->{$key} = $value; - } - $data->{'IndexConfigs'} = $values; - } - $value_1 = $object->getInsecureRegistryCIDRs(); - if (is_array($object->getInsecureRegistryCIDRs())) { - $values_1 = []; - foreach ($object->getInsecureRegistryCIDRs() as $value_2) { - $values_1[] = $value_2; - } - $value_1 = $values_1; - } - if (is_null($object->getInsecureRegistryCIDRs())) { - $value_1 = $object->getInsecureRegistryCIDRs(); - } - $data->{'InsecureRegistryCIDRs'} = $value_1; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/RegistryNormalizer.php b/generated/Normalizer/RegistryNormalizer.php deleted file mode 100644 index ed77ebe60..000000000 --- a/generated/Normalizer/RegistryNormalizer.php +++ /dev/null @@ -1,94 +0,0 @@ -{'Mirrors'}; - if (is_array($data->{'Mirrors'})) { - $values = []; - foreach ($data->{'Mirrors'} as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Mirrors'})) { - $value = $data->{'Mirrors'}; - } - $object->setMirrors($value); - } - if (property_exists($data, 'Name')) { - $object->setName($data->{'Name'}); - } - if (property_exists($data, 'Official')) { - $object->setOfficial($data->{'Official'}); - } - if (property_exists($data, 'Secure')) { - $object->setSecure($data->{'Secure'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - $value = $object->getMirrors(); - if (is_array($object->getMirrors())) { - $values = []; - foreach ($object->getMirrors() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getMirrors())) { - $value = $object->getMirrors(); - } - $data->{'Mirrors'} = $value; - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - if (null !== $object->getOfficial()) { - $data->{'Official'} = $object->getOfficial(); - } - if (null !== $object->getSecure()) { - $data->{'Secure'} = $object->getSecure(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ReplicatedServiceNormalizer.php b/generated/Normalizer/ReplicatedServiceNormalizer.php deleted file mode 100644 index a21a3d3d2..000000000 --- a/generated/Normalizer/ReplicatedServiceNormalizer.php +++ /dev/null @@ -1,57 +0,0 @@ -setReplicas($data->{'Replicas'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getReplicas()) { - $data->{'Replicas'} = $object->getReplicas(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ResourceUpdateNormalizer.php b/generated/Normalizer/ResourceUpdateNormalizer.php deleted file mode 100644 index cf7cbe810..000000000 --- a/generated/Normalizer/ResourceUpdateNormalizer.php +++ /dev/null @@ -1,117 +0,0 @@ -setBlkioWeight($data->{'BlkioWeight'}); - } - 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'}); - } - if (property_exists($data, 'CpusetMems')) { - $object->setCpusetMems($data->{'CpusetMems'}); - } - if (property_exists($data, 'Memory')) { - $object->setMemory($data->{'Memory'}); - } - 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, 'RestartPolicy')) { - $object->setRestartPolicy($this->serializer->denormalize($data->{'RestartPolicy'}, 'Docker\\API\\Model\\RestartPolicy', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getBlkioWeight()) { - $data->{'BlkioWeight'} = $object->getBlkioWeight(); - } - 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(); - } - if (null !== $object->getCpusetMems()) { - $data->{'CpusetMems'} = $object->getCpusetMems(); - } - 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->getRestartPolicy()) { - $data->{'RestartPolicy'} = json_decode($this->serializer->normalize($object->getRestartPolicy(), 'raw', $context)); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ResourcesBlkioWeightDeviceItemNormalizer.php b/generated/Normalizer/ResourcesBlkioWeightDeviceItemNormalizer.php new file mode 100644 index 000000000..f902544cc --- /dev/null +++ b/generated/Normalizer/ResourcesBlkioWeightDeviceItemNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ResourcesBlkioWeightDeviceItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ResourcesBlkioWeightDeviceItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Path', $data) && $data['Path'] !== null) { + $object->setPath($data['Path']); + } + elseif (\array_key_exists('Path', $data) && $data['Path'] === null) { + $object->setPath(null); + } + if (\array_key_exists('Weight', $data) && $data['Weight'] !== null) { + $object->setWeight($data['Weight']); + } + elseif (\array_key_exists('Weight', $data) && $data['Weight'] === null) { + $object->setWeight(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('path') && null !== $object->getPath()) { + $data['Path'] = $object->getPath(); + } + if ($object->isInitialized('weight') && null !== $object->getWeight()) { + $data['Weight'] = $object->getWeight(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ResourcesBlkioWeightDeviceItem::class => false]; + } + } +} else { + class ResourcesBlkioWeightDeviceItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ResourcesBlkioWeightDeviceItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Path', $data) && $data['Path'] !== null) { + $object->setPath($data['Path']); + } + elseif (\array_key_exists('Path', $data) && $data['Path'] === null) { + $object->setPath(null); + } + if (\array_key_exists('Weight', $data) && $data['Weight'] !== null) { + $object->setWeight($data['Weight']); + } + elseif (\array_key_exists('Weight', $data) && $data['Weight'] === null) { + $object->setWeight(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('path') && null !== $object->getPath()) { + $data['Path'] = $object->getPath(); + } + if ($object->isInitialized('weight') && null !== $object->getWeight()) { + $data['Weight'] = $object->getWeight(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ResourcesBlkioWeightDeviceItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ResourcesNormalizer.php b/generated/Normalizer/ResourcesNormalizer.php new file mode 100644 index 000000000..8cf72cb4a --- /dev/null +++ b/generated/Normalizer/ResourcesNormalizer.php @@ -0,0 +1,734 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ResourcesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Resources::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Resources::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Resources(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('CpuShares', $data) && $data['CpuShares'] !== null) { + $object->setCpuShares($data['CpuShares']); + } + elseif (\array_key_exists('CpuShares', $data) && $data['CpuShares'] === null) { + $object->setCpuShares(null); + } + if (\array_key_exists('Memory', $data) && $data['Memory'] !== null) { + $object->setMemory($data['Memory']); + } + elseif (\array_key_exists('Memory', $data) && $data['Memory'] === null) { + $object->setMemory(null); + } + if (\array_key_exists('CgroupParent', $data) && $data['CgroupParent'] !== null) { + $object->setCgroupParent($data['CgroupParent']); + } + elseif (\array_key_exists('CgroupParent', $data) && $data['CgroupParent'] === null) { + $object->setCgroupParent(null); + } + if (\array_key_exists('BlkioWeight', $data) && $data['BlkioWeight'] !== null) { + $object->setBlkioWeight($data['BlkioWeight']); + } + elseif (\array_key_exists('BlkioWeight', $data) && $data['BlkioWeight'] === null) { + $object->setBlkioWeight(null); + } + if (\array_key_exists('BlkioWeightDevice', $data) && $data['BlkioWeightDevice'] !== null) { + $values = []; + foreach ($data['BlkioWeightDevice'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class, 'json', $context); + } + $object->setBlkioWeightDevice($values); + } + elseif (\array_key_exists('BlkioWeightDevice', $data) && $data['BlkioWeightDevice'] === null) { + $object->setBlkioWeightDevice(null); + } + if (\array_key_exists('BlkioDeviceReadBps', $data) && $data['BlkioDeviceReadBps'] !== null) { + $values_1 = []; + foreach ($data['BlkioDeviceReadBps'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceReadBps($values_1); + } + elseif (\array_key_exists('BlkioDeviceReadBps', $data) && $data['BlkioDeviceReadBps'] === null) { + $object->setBlkioDeviceReadBps(null); + } + if (\array_key_exists('BlkioDeviceWriteBps', $data) && $data['BlkioDeviceWriteBps'] !== null) { + $values_2 = []; + foreach ($data['BlkioDeviceWriteBps'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceWriteBps($values_2); + } + elseif (\array_key_exists('BlkioDeviceWriteBps', $data) && $data['BlkioDeviceWriteBps'] === null) { + $object->setBlkioDeviceWriteBps(null); + } + if (\array_key_exists('BlkioDeviceReadIOps', $data) && $data['BlkioDeviceReadIOps'] !== null) { + $values_3 = []; + foreach ($data['BlkioDeviceReadIOps'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceReadIOps($values_3); + } + elseif (\array_key_exists('BlkioDeviceReadIOps', $data) && $data['BlkioDeviceReadIOps'] === null) { + $object->setBlkioDeviceReadIOps(null); + } + if (\array_key_exists('BlkioDeviceWriteIOps', $data) && $data['BlkioDeviceWriteIOps'] !== null) { + $values_4 = []; + foreach ($data['BlkioDeviceWriteIOps'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceWriteIOps($values_4); + } + elseif (\array_key_exists('BlkioDeviceWriteIOps', $data) && $data['BlkioDeviceWriteIOps'] === null) { + $object->setBlkioDeviceWriteIOps(null); + } + if (\array_key_exists('CpuPeriod', $data) && $data['CpuPeriod'] !== null) { + $object->setCpuPeriod($data['CpuPeriod']); + } + elseif (\array_key_exists('CpuPeriod', $data) && $data['CpuPeriod'] === null) { + $object->setCpuPeriod(null); + } + if (\array_key_exists('CpuQuota', $data) && $data['CpuQuota'] !== null) { + $object->setCpuQuota($data['CpuQuota']); + } + elseif (\array_key_exists('CpuQuota', $data) && $data['CpuQuota'] === null) { + $object->setCpuQuota(null); + } + if (\array_key_exists('CpuRealtimePeriod', $data) && $data['CpuRealtimePeriod'] !== null) { + $object->setCpuRealtimePeriod($data['CpuRealtimePeriod']); + } + elseif (\array_key_exists('CpuRealtimePeriod', $data) && $data['CpuRealtimePeriod'] === null) { + $object->setCpuRealtimePeriod(null); + } + if (\array_key_exists('CpuRealtimeRuntime', $data) && $data['CpuRealtimeRuntime'] !== null) { + $object->setCpuRealtimeRuntime($data['CpuRealtimeRuntime']); + } + elseif (\array_key_exists('CpuRealtimeRuntime', $data) && $data['CpuRealtimeRuntime'] === null) { + $object->setCpuRealtimeRuntime(null); + } + if (\array_key_exists('CpusetCpus', $data) && $data['CpusetCpus'] !== null) { + $object->setCpusetCpus($data['CpusetCpus']); + } + elseif (\array_key_exists('CpusetCpus', $data) && $data['CpusetCpus'] === null) { + $object->setCpusetCpus(null); + } + if (\array_key_exists('CpusetMems', $data) && $data['CpusetMems'] !== null) { + $object->setCpusetMems($data['CpusetMems']); + } + elseif (\array_key_exists('CpusetMems', $data) && $data['CpusetMems'] === null) { + $object->setCpusetMems(null); + } + if (\array_key_exists('Devices', $data) && $data['Devices'] !== null) { + $values_5 = []; + foreach ($data['Devices'] as $value_5) { + $values_5[] = $this->denormalizer->denormalize($value_5, \Docker\API\Model\DeviceMapping::class, 'json', $context); + } + $object->setDevices($values_5); + } + elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { + $object->setDevices(null); + } + if (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] !== null) { + $object->setDiskQuota($data['DiskQuota']); + } + elseif (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] === null) { + $object->setDiskQuota(null); + } + if (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] !== null) { + $object->setKernelMemory($data['KernelMemory']); + } + elseif (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] === null) { + $object->setKernelMemory(null); + } + if (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] !== null) { + $object->setMemoryReservation($data['MemoryReservation']); + } + elseif (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] === null) { + $object->setMemoryReservation(null); + } + if (\array_key_exists('MemorySwap', $data) && $data['MemorySwap'] !== null) { + $object->setMemorySwap($data['MemorySwap']); + } + elseif (\array_key_exists('MemorySwap', $data) && $data['MemorySwap'] === null) { + $object->setMemorySwap(null); + } + if (\array_key_exists('MemorySwappiness', $data) && $data['MemorySwappiness'] !== null) { + $object->setMemorySwappiness($data['MemorySwappiness']); + } + elseif (\array_key_exists('MemorySwappiness', $data) && $data['MemorySwappiness'] === null) { + $object->setMemorySwappiness(null); + } + if (\array_key_exists('NanoCpus', $data) && $data['NanoCpus'] !== null) { + $object->setNanoCpus($data['NanoCpus']); + } + elseif (\array_key_exists('NanoCpus', $data) && $data['NanoCpus'] === null) { + $object->setNanoCpus(null); + } + if (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] !== null) { + $object->setOomKillDisable($data['OomKillDisable']); + } + elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { + $object->setOomKillDisable(null); + } + if (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] !== null) { + $object->setPidsLimit($data['PidsLimit']); + } + elseif (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] === null) { + $object->setPidsLimit(null); + } + if (\array_key_exists('Ulimits', $data) && $data['Ulimits'] !== null) { + $values_6 = []; + foreach ($data['Ulimits'] as $value_6) { + $values_6[] = $this->denormalizer->denormalize($value_6, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); + } + $object->setUlimits($values_6); + } + elseif (\array_key_exists('Ulimits', $data) && $data['Ulimits'] === null) { + $object->setUlimits(null); + } + if (\array_key_exists('CpuCount', $data) && $data['CpuCount'] !== null) { + $object->setCpuCount($data['CpuCount']); + } + elseif (\array_key_exists('CpuCount', $data) && $data['CpuCount'] === null) { + $object->setCpuCount(null); + } + if (\array_key_exists('CpuPercent', $data) && $data['CpuPercent'] !== null) { + $object->setCpuPercent($data['CpuPercent']); + } + elseif (\array_key_exists('CpuPercent', $data) && $data['CpuPercent'] === null) { + $object->setCpuPercent(null); + } + if (\array_key_exists('IOMaximumIOps', $data) && $data['IOMaximumIOps'] !== null) { + $object->setIOMaximumIOps($data['IOMaximumIOps']); + } + elseif (\array_key_exists('IOMaximumIOps', $data) && $data['IOMaximumIOps'] === null) { + $object->setIOMaximumIOps(null); + } + if (\array_key_exists('IOMaximumBandwidth', $data) && $data['IOMaximumBandwidth'] !== null) { + $object->setIOMaximumBandwidth($data['IOMaximumBandwidth']); + } + elseif (\array_key_exists('IOMaximumBandwidth', $data) && $data['IOMaximumBandwidth'] === null) { + $object->setIOMaximumBandwidth(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('cpuShares') && null !== $object->getCpuShares()) { + $data['CpuShares'] = $object->getCpuShares(); + } + if ($object->isInitialized('memory') && null !== $object->getMemory()) { + $data['Memory'] = $object->getMemory(); + } + if ($object->isInitialized('cgroupParent') && null !== $object->getCgroupParent()) { + $data['CgroupParent'] = $object->getCgroupParent(); + } + if ($object->isInitialized('blkioWeight') && null !== $object->getBlkioWeight()) { + $data['BlkioWeight'] = $object->getBlkioWeight(); + } + if ($object->isInitialized('blkioWeightDevice') && null !== $object->getBlkioWeightDevice()) { + $values = []; + foreach ($object->getBlkioWeightDevice() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['BlkioWeightDevice'] = $values; + } + if ($object->isInitialized('blkioDeviceReadBps') && null !== $object->getBlkioDeviceReadBps()) { + $values_1 = []; + foreach ($object->getBlkioDeviceReadBps() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['BlkioDeviceReadBps'] = $values_1; + } + if ($object->isInitialized('blkioDeviceWriteBps') && null !== $object->getBlkioDeviceWriteBps()) { + $values_2 = []; + foreach ($object->getBlkioDeviceWriteBps() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['BlkioDeviceWriteBps'] = $values_2; + } + if ($object->isInitialized('blkioDeviceReadIOps') && null !== $object->getBlkioDeviceReadIOps()) { + $values_3 = []; + foreach ($object->getBlkioDeviceReadIOps() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['BlkioDeviceReadIOps'] = $values_3; + } + if ($object->isInitialized('blkioDeviceWriteIOps') && null !== $object->getBlkioDeviceWriteIOps()) { + $values_4 = []; + foreach ($object->getBlkioDeviceWriteIOps() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['BlkioDeviceWriteIOps'] = $values_4; + } + if ($object->isInitialized('cpuPeriod') && null !== $object->getCpuPeriod()) { + $data['CpuPeriod'] = $object->getCpuPeriod(); + } + if ($object->isInitialized('cpuQuota') && null !== $object->getCpuQuota()) { + $data['CpuQuota'] = $object->getCpuQuota(); + } + if ($object->isInitialized('cpuRealtimePeriod') && null !== $object->getCpuRealtimePeriod()) { + $data['CpuRealtimePeriod'] = $object->getCpuRealtimePeriod(); + } + if ($object->isInitialized('cpuRealtimeRuntime') && null !== $object->getCpuRealtimeRuntime()) { + $data['CpuRealtimeRuntime'] = $object->getCpuRealtimeRuntime(); + } + if ($object->isInitialized('cpusetCpus') && null !== $object->getCpusetCpus()) { + $data['CpusetCpus'] = $object->getCpusetCpus(); + } + if ($object->isInitialized('cpusetMems') && null !== $object->getCpusetMems()) { + $data['CpusetMems'] = $object->getCpusetMems(); + } + if ($object->isInitialized('devices') && null !== $object->getDevices()) { + $values_5 = []; + foreach ($object->getDevices() as $value_5) { + $values_5[] = $this->normalizer->normalize($value_5, 'json', $context); + } + $data['Devices'] = $values_5; + } + if ($object->isInitialized('diskQuota') && null !== $object->getDiskQuota()) { + $data['DiskQuota'] = $object->getDiskQuota(); + } + if ($object->isInitialized('kernelMemory') && null !== $object->getKernelMemory()) { + $data['KernelMemory'] = $object->getKernelMemory(); + } + if ($object->isInitialized('memoryReservation') && null !== $object->getMemoryReservation()) { + $data['MemoryReservation'] = $object->getMemoryReservation(); + } + if ($object->isInitialized('memorySwap') && null !== $object->getMemorySwap()) { + $data['MemorySwap'] = $object->getMemorySwap(); + } + if ($object->isInitialized('memorySwappiness') && null !== $object->getMemorySwappiness()) { + $data['MemorySwappiness'] = $object->getMemorySwappiness(); + } + if ($object->isInitialized('nanoCpus') && null !== $object->getNanoCpus()) { + $data['NanoCpus'] = $object->getNanoCpus(); + } + if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { + $data['OomKillDisable'] = $object->getOomKillDisable(); + } + if ($object->isInitialized('pidsLimit') && null !== $object->getPidsLimit()) { + $data['PidsLimit'] = $object->getPidsLimit(); + } + if ($object->isInitialized('ulimits') && null !== $object->getUlimits()) { + $values_6 = []; + foreach ($object->getUlimits() as $value_6) { + $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + } + $data['Ulimits'] = $values_6; + } + if ($object->isInitialized('cpuCount') && null !== $object->getCpuCount()) { + $data['CpuCount'] = $object->getCpuCount(); + } + if ($object->isInitialized('cpuPercent') && null !== $object->getCpuPercent()) { + $data['CpuPercent'] = $object->getCpuPercent(); + } + if ($object->isInitialized('iOMaximumIOps') && null !== $object->getIOMaximumIOps()) { + $data['IOMaximumIOps'] = $object->getIOMaximumIOps(); + } + if ($object->isInitialized('iOMaximumBandwidth') && null !== $object->getIOMaximumBandwidth()) { + $data['IOMaximumBandwidth'] = $object->getIOMaximumBandwidth(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Resources::class => false]; + } + } +} else { + class ResourcesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Resources::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Resources::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Resources(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('CpuShares', $data) && $data['CpuShares'] !== null) { + $object->setCpuShares($data['CpuShares']); + } + elseif (\array_key_exists('CpuShares', $data) && $data['CpuShares'] === null) { + $object->setCpuShares(null); + } + if (\array_key_exists('Memory', $data) && $data['Memory'] !== null) { + $object->setMemory($data['Memory']); + } + elseif (\array_key_exists('Memory', $data) && $data['Memory'] === null) { + $object->setMemory(null); + } + if (\array_key_exists('CgroupParent', $data) && $data['CgroupParent'] !== null) { + $object->setCgroupParent($data['CgroupParent']); + } + elseif (\array_key_exists('CgroupParent', $data) && $data['CgroupParent'] === null) { + $object->setCgroupParent(null); + } + if (\array_key_exists('BlkioWeight', $data) && $data['BlkioWeight'] !== null) { + $object->setBlkioWeight($data['BlkioWeight']); + } + elseif (\array_key_exists('BlkioWeight', $data) && $data['BlkioWeight'] === null) { + $object->setBlkioWeight(null); + } + if (\array_key_exists('BlkioWeightDevice', $data) && $data['BlkioWeightDevice'] !== null) { + $values = []; + foreach ($data['BlkioWeightDevice'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class, 'json', $context); + } + $object->setBlkioWeightDevice($values); + } + elseif (\array_key_exists('BlkioWeightDevice', $data) && $data['BlkioWeightDevice'] === null) { + $object->setBlkioWeightDevice(null); + } + if (\array_key_exists('BlkioDeviceReadBps', $data) && $data['BlkioDeviceReadBps'] !== null) { + $values_1 = []; + foreach ($data['BlkioDeviceReadBps'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceReadBps($values_1); + } + elseif (\array_key_exists('BlkioDeviceReadBps', $data) && $data['BlkioDeviceReadBps'] === null) { + $object->setBlkioDeviceReadBps(null); + } + if (\array_key_exists('BlkioDeviceWriteBps', $data) && $data['BlkioDeviceWriteBps'] !== null) { + $values_2 = []; + foreach ($data['BlkioDeviceWriteBps'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceWriteBps($values_2); + } + elseif (\array_key_exists('BlkioDeviceWriteBps', $data) && $data['BlkioDeviceWriteBps'] === null) { + $object->setBlkioDeviceWriteBps(null); + } + if (\array_key_exists('BlkioDeviceReadIOps', $data) && $data['BlkioDeviceReadIOps'] !== null) { + $values_3 = []; + foreach ($data['BlkioDeviceReadIOps'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceReadIOps($values_3); + } + elseif (\array_key_exists('BlkioDeviceReadIOps', $data) && $data['BlkioDeviceReadIOps'] === null) { + $object->setBlkioDeviceReadIOps(null); + } + if (\array_key_exists('BlkioDeviceWriteIOps', $data) && $data['BlkioDeviceWriteIOps'] !== null) { + $values_4 = []; + foreach ($data['BlkioDeviceWriteIOps'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \Docker\API\Model\ThrottleDevice::class, 'json', $context); + } + $object->setBlkioDeviceWriteIOps($values_4); + } + elseif (\array_key_exists('BlkioDeviceWriteIOps', $data) && $data['BlkioDeviceWriteIOps'] === null) { + $object->setBlkioDeviceWriteIOps(null); + } + if (\array_key_exists('CpuPeriod', $data) && $data['CpuPeriod'] !== null) { + $object->setCpuPeriod($data['CpuPeriod']); + } + elseif (\array_key_exists('CpuPeriod', $data) && $data['CpuPeriod'] === null) { + $object->setCpuPeriod(null); + } + if (\array_key_exists('CpuQuota', $data) && $data['CpuQuota'] !== null) { + $object->setCpuQuota($data['CpuQuota']); + } + elseif (\array_key_exists('CpuQuota', $data) && $data['CpuQuota'] === null) { + $object->setCpuQuota(null); + } + if (\array_key_exists('CpuRealtimePeriod', $data) && $data['CpuRealtimePeriod'] !== null) { + $object->setCpuRealtimePeriod($data['CpuRealtimePeriod']); + } + elseif (\array_key_exists('CpuRealtimePeriod', $data) && $data['CpuRealtimePeriod'] === null) { + $object->setCpuRealtimePeriod(null); + } + if (\array_key_exists('CpuRealtimeRuntime', $data) && $data['CpuRealtimeRuntime'] !== null) { + $object->setCpuRealtimeRuntime($data['CpuRealtimeRuntime']); + } + elseif (\array_key_exists('CpuRealtimeRuntime', $data) && $data['CpuRealtimeRuntime'] === null) { + $object->setCpuRealtimeRuntime(null); + } + if (\array_key_exists('CpusetCpus', $data) && $data['CpusetCpus'] !== null) { + $object->setCpusetCpus($data['CpusetCpus']); + } + elseif (\array_key_exists('CpusetCpus', $data) && $data['CpusetCpus'] === null) { + $object->setCpusetCpus(null); + } + if (\array_key_exists('CpusetMems', $data) && $data['CpusetMems'] !== null) { + $object->setCpusetMems($data['CpusetMems']); + } + elseif (\array_key_exists('CpusetMems', $data) && $data['CpusetMems'] === null) { + $object->setCpusetMems(null); + } + if (\array_key_exists('Devices', $data) && $data['Devices'] !== null) { + $values_5 = []; + foreach ($data['Devices'] as $value_5) { + $values_5[] = $this->denormalizer->denormalize($value_5, \Docker\API\Model\DeviceMapping::class, 'json', $context); + } + $object->setDevices($values_5); + } + elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { + $object->setDevices(null); + } + if (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] !== null) { + $object->setDiskQuota($data['DiskQuota']); + } + elseif (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] === null) { + $object->setDiskQuota(null); + } + if (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] !== null) { + $object->setKernelMemory($data['KernelMemory']); + } + elseif (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] === null) { + $object->setKernelMemory(null); + } + if (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] !== null) { + $object->setMemoryReservation($data['MemoryReservation']); + } + elseif (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] === null) { + $object->setMemoryReservation(null); + } + if (\array_key_exists('MemorySwap', $data) && $data['MemorySwap'] !== null) { + $object->setMemorySwap($data['MemorySwap']); + } + elseif (\array_key_exists('MemorySwap', $data) && $data['MemorySwap'] === null) { + $object->setMemorySwap(null); + } + if (\array_key_exists('MemorySwappiness', $data) && $data['MemorySwappiness'] !== null) { + $object->setMemorySwappiness($data['MemorySwappiness']); + } + elseif (\array_key_exists('MemorySwappiness', $data) && $data['MemorySwappiness'] === null) { + $object->setMemorySwappiness(null); + } + if (\array_key_exists('NanoCpus', $data) && $data['NanoCpus'] !== null) { + $object->setNanoCpus($data['NanoCpus']); + } + elseif (\array_key_exists('NanoCpus', $data) && $data['NanoCpus'] === null) { + $object->setNanoCpus(null); + } + if (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] !== null) { + $object->setOomKillDisable($data['OomKillDisable']); + } + elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { + $object->setOomKillDisable(null); + } + if (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] !== null) { + $object->setPidsLimit($data['PidsLimit']); + } + elseif (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] === null) { + $object->setPidsLimit(null); + } + if (\array_key_exists('Ulimits', $data) && $data['Ulimits'] !== null) { + $values_6 = []; + foreach ($data['Ulimits'] as $value_6) { + $values_6[] = $this->denormalizer->denormalize($value_6, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); + } + $object->setUlimits($values_6); + } + elseif (\array_key_exists('Ulimits', $data) && $data['Ulimits'] === null) { + $object->setUlimits(null); + } + if (\array_key_exists('CpuCount', $data) && $data['CpuCount'] !== null) { + $object->setCpuCount($data['CpuCount']); + } + elseif (\array_key_exists('CpuCount', $data) && $data['CpuCount'] === null) { + $object->setCpuCount(null); + } + if (\array_key_exists('CpuPercent', $data) && $data['CpuPercent'] !== null) { + $object->setCpuPercent($data['CpuPercent']); + } + elseif (\array_key_exists('CpuPercent', $data) && $data['CpuPercent'] === null) { + $object->setCpuPercent(null); + } + if (\array_key_exists('IOMaximumIOps', $data) && $data['IOMaximumIOps'] !== null) { + $object->setIOMaximumIOps($data['IOMaximumIOps']); + } + elseif (\array_key_exists('IOMaximumIOps', $data) && $data['IOMaximumIOps'] === null) { + $object->setIOMaximumIOps(null); + } + if (\array_key_exists('IOMaximumBandwidth', $data) && $data['IOMaximumBandwidth'] !== null) { + $object->setIOMaximumBandwidth($data['IOMaximumBandwidth']); + } + elseif (\array_key_exists('IOMaximumBandwidth', $data) && $data['IOMaximumBandwidth'] === null) { + $object->setIOMaximumBandwidth(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('cpuShares') && null !== $object->getCpuShares()) { + $data['CpuShares'] = $object->getCpuShares(); + } + if ($object->isInitialized('memory') && null !== $object->getMemory()) { + $data['Memory'] = $object->getMemory(); + } + if ($object->isInitialized('cgroupParent') && null !== $object->getCgroupParent()) { + $data['CgroupParent'] = $object->getCgroupParent(); + } + if ($object->isInitialized('blkioWeight') && null !== $object->getBlkioWeight()) { + $data['BlkioWeight'] = $object->getBlkioWeight(); + } + if ($object->isInitialized('blkioWeightDevice') && null !== $object->getBlkioWeightDevice()) { + $values = []; + foreach ($object->getBlkioWeightDevice() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['BlkioWeightDevice'] = $values; + } + if ($object->isInitialized('blkioDeviceReadBps') && null !== $object->getBlkioDeviceReadBps()) { + $values_1 = []; + foreach ($object->getBlkioDeviceReadBps() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['BlkioDeviceReadBps'] = $values_1; + } + if ($object->isInitialized('blkioDeviceWriteBps') && null !== $object->getBlkioDeviceWriteBps()) { + $values_2 = []; + foreach ($object->getBlkioDeviceWriteBps() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['BlkioDeviceWriteBps'] = $values_2; + } + if ($object->isInitialized('blkioDeviceReadIOps') && null !== $object->getBlkioDeviceReadIOps()) { + $values_3 = []; + foreach ($object->getBlkioDeviceReadIOps() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['BlkioDeviceReadIOps'] = $values_3; + } + if ($object->isInitialized('blkioDeviceWriteIOps') && null !== $object->getBlkioDeviceWriteIOps()) { + $values_4 = []; + foreach ($object->getBlkioDeviceWriteIOps() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['BlkioDeviceWriteIOps'] = $values_4; + } + if ($object->isInitialized('cpuPeriod') && null !== $object->getCpuPeriod()) { + $data['CpuPeriod'] = $object->getCpuPeriod(); + } + if ($object->isInitialized('cpuQuota') && null !== $object->getCpuQuota()) { + $data['CpuQuota'] = $object->getCpuQuota(); + } + if ($object->isInitialized('cpuRealtimePeriod') && null !== $object->getCpuRealtimePeriod()) { + $data['CpuRealtimePeriod'] = $object->getCpuRealtimePeriod(); + } + if ($object->isInitialized('cpuRealtimeRuntime') && null !== $object->getCpuRealtimeRuntime()) { + $data['CpuRealtimeRuntime'] = $object->getCpuRealtimeRuntime(); + } + if ($object->isInitialized('cpusetCpus') && null !== $object->getCpusetCpus()) { + $data['CpusetCpus'] = $object->getCpusetCpus(); + } + if ($object->isInitialized('cpusetMems') && null !== $object->getCpusetMems()) { + $data['CpusetMems'] = $object->getCpusetMems(); + } + if ($object->isInitialized('devices') && null !== $object->getDevices()) { + $values_5 = []; + foreach ($object->getDevices() as $value_5) { + $values_5[] = $this->normalizer->normalize($value_5, 'json', $context); + } + $data['Devices'] = $values_5; + } + if ($object->isInitialized('diskQuota') && null !== $object->getDiskQuota()) { + $data['DiskQuota'] = $object->getDiskQuota(); + } + if ($object->isInitialized('kernelMemory') && null !== $object->getKernelMemory()) { + $data['KernelMemory'] = $object->getKernelMemory(); + } + if ($object->isInitialized('memoryReservation') && null !== $object->getMemoryReservation()) { + $data['MemoryReservation'] = $object->getMemoryReservation(); + } + if ($object->isInitialized('memorySwap') && null !== $object->getMemorySwap()) { + $data['MemorySwap'] = $object->getMemorySwap(); + } + if ($object->isInitialized('memorySwappiness') && null !== $object->getMemorySwappiness()) { + $data['MemorySwappiness'] = $object->getMemorySwappiness(); + } + if ($object->isInitialized('nanoCpus') && null !== $object->getNanoCpus()) { + $data['NanoCpus'] = $object->getNanoCpus(); + } + if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { + $data['OomKillDisable'] = $object->getOomKillDisable(); + } + if ($object->isInitialized('pidsLimit') && null !== $object->getPidsLimit()) { + $data['PidsLimit'] = $object->getPidsLimit(); + } + if ($object->isInitialized('ulimits') && null !== $object->getUlimits()) { + $values_6 = []; + foreach ($object->getUlimits() as $value_6) { + $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + } + $data['Ulimits'] = $values_6; + } + if ($object->isInitialized('cpuCount') && null !== $object->getCpuCount()) { + $data['CpuCount'] = $object->getCpuCount(); + } + if ($object->isInitialized('cpuPercent') && null !== $object->getCpuPercent()) { + $data['CpuPercent'] = $object->getCpuPercent(); + } + if ($object->isInitialized('iOMaximumIOps') && null !== $object->getIOMaximumIOps()) { + $data['IOMaximumIOps'] = $object->getIOMaximumIOps(); + } + if ($object->isInitialized('iOMaximumBandwidth') && null !== $object->getIOMaximumBandwidth()) { + $data['IOMaximumBandwidth'] = $object->getIOMaximumBandwidth(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Resources::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ResourcesUlimitsItemNormalizer.php b/generated/Normalizer/ResourcesUlimitsItemNormalizer.php new file mode 100644 index 000000000..8f311b66c --- /dev/null +++ b/generated/Normalizer/ResourcesUlimitsItemNormalizer.php @@ -0,0 +1,154 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ResourcesUlimitsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ResourcesUlimitsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ResourcesUlimitsItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ResourcesUlimitsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Soft', $data) && $data['Soft'] !== null) { + $object->setSoft($data['Soft']); + } + elseif (\array_key_exists('Soft', $data) && $data['Soft'] === null) { + $object->setSoft(null); + } + if (\array_key_exists('Hard', $data) && $data['Hard'] !== null) { + $object->setHard($data['Hard']); + } + elseif (\array_key_exists('Hard', $data) && $data['Hard'] === null) { + $object->setHard(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('soft') && null !== $object->getSoft()) { + $data['Soft'] = $object->getSoft(); + } + if ($object->isInitialized('hard') && null !== $object->getHard()) { + $data['Hard'] = $object->getHard(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ResourcesUlimitsItem::class => false]; + } + } +} else { + class ResourcesUlimitsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ResourcesUlimitsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ResourcesUlimitsItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ResourcesUlimitsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Soft', $data) && $data['Soft'] !== null) { + $object->setSoft($data['Soft']); + } + elseif (\array_key_exists('Soft', $data) && $data['Soft'] === null) { + $object->setSoft(null); + } + if (\array_key_exists('Hard', $data) && $data['Hard'] !== null) { + $object->setHard($data['Hard']); + } + elseif (\array_key_exists('Hard', $data) && $data['Hard'] === null) { + $object->setHard(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('soft') && null !== $object->getSoft()) { + $data['Soft'] = $object->getSoft(); + } + if ($object->isInitialized('hard') && null !== $object->getHard()) { + $data['Hard'] = $object->getHard(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ResourcesUlimitsItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/RestartPolicyNormalizer.php b/generated/Normalizer/RestartPolicyNormalizer.php index 6b13bf72d..600470970 100644 --- a/generated/Normalizer/RestartPolicyNormalizer.php +++ b/generated/Normalizer/RestartPolicyNormalizer.php @@ -2,61 +2,135 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class RestartPolicyNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class RestartPolicyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($type !== 'Docker\\API\\Model\\RestartPolicy') { - return false; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\RestartPolicy::class; } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\RestartPolicy) { - return true; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\RestartPolicy::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\RestartPolicy(); - if (property_exists($data, 'Name')) { - $object->setName($data->{'Name'}); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\RestartPolicy(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('MaximumRetryCount', $data) && $data['MaximumRetryCount'] !== null) { + $object->setMaximumRetryCount($data['MaximumRetryCount']); + } + elseif (\array_key_exists('MaximumRetryCount', $data) && $data['MaximumRetryCount'] === null) { + $object->setMaximumRetryCount(null); + } + return $object; } - if (property_exists($data, 'MaximumRetryCount')) { - $object->setMaximumRetryCount($data->{'MaximumRetryCount'}); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('maximumRetryCount') && null !== $object->getMaximumRetryCount()) { + $data['MaximumRetryCount'] = $object->getMaximumRetryCount(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\RestartPolicy::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class RestartPolicyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\RestartPolicy::class; } - if (null !== $object->getMaximumRetryCount()) { - $data->{'MaximumRetryCount'} = $object->getMaximumRetryCount(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\RestartPolicy::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\RestartPolicy(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('MaximumRetryCount', $data) && $data['MaximumRetryCount'] !== null) { + $object->setMaximumRetryCount($data['MaximumRetryCount']); + } + elseif (\array_key_exists('MaximumRetryCount', $data) && $data['MaximumRetryCount'] === null) { + $object->setMaximumRetryCount(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('maximumRetryCount') && null !== $object->getMaximumRetryCount()) { + $data['MaximumRetryCount'] = $object->getMaximumRetryCount(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\RestartPolicy::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/SecretNormalizer.php b/generated/Normalizer/SecretNormalizer.php new file mode 100644 index 000000000..9505359c4 --- /dev/null +++ b/generated/Normalizer/SecretNormalizer.php @@ -0,0 +1,190 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SecretNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Secret::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Secret::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Secret(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\SecretVersion::class, 'json', $context)); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); + } + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\ServiceSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Secret::class => false]; + } + } +} else { + class SecretNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Secret::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Secret::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Secret(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\SecretVersion::class, 'json', $context)); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); + } + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\ServiceSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Secret::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SecretSpecNormalizer.php b/generated/Normalizer/SecretSpecNormalizer.php new file mode 100644 index 000000000..2128f6d4f --- /dev/null +++ b/generated/Normalizer/SecretSpecNormalizer.php @@ -0,0 +1,186 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SecretSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SecretSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SecretSpec::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SecretSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Data', $data) && $data['Data'] !== null) { + $values_1 = []; + foreach ($data['Data'] as $value_1) { + $values_1[] = $value_1; + } + $object->setData($values_1); + } + elseif (\array_key_exists('Data', $data) && $data['Data'] === null) { + $object->setData(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('data') && null !== $object->getData()) { + $values_1 = []; + foreach ($object->getData() as $value_1) { + $values_1[] = $value_1; + } + $data['Data'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SecretSpec::class => false]; + } + } +} else { + class SecretSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SecretSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SecretSpec::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SecretSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Data', $data) && $data['Data'] !== null) { + $values_1 = []; + foreach ($data['Data'] as $value_1) { + $values_1[] = $value_1; + } + $object->setData($values_1); + } + elseif (\array_key_exists('Data', $data) && $data['Data'] === null) { + $object->setData(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('data') && null !== $object->getData()) { + $values_1 = []; + foreach ($object->getData() as $value_1) { + $values_1[] = $value_1; + } + $data['Data'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SecretSpec::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SecretVersionNormalizer.php b/generated/Normalizer/SecretVersionNormalizer.php new file mode 100644 index 000000000..14ac028d3 --- /dev/null +++ b/generated/Normalizer/SecretVersionNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SecretVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SecretVersion::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SecretVersion::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SecretVersion(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Index', $data) && $data['Index'] !== null) { + $object->setIndex($data['Index']); + } + elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { + $object->setIndex(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('index') && null !== $object->getIndex()) { + $data['Index'] = $object->getIndex(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SecretVersion::class => false]; + } + } +} else { + class SecretVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SecretVersion::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SecretVersion::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SecretVersion(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Index', $data) && $data['Index'] !== null) { + $object->setIndex($data['Index']); + } + elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { + $object->setIndex(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('index') && null !== $object->getIndex()) { + $data['Index'] = $object->getIndex(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SecretVersion::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SecretsCreatePostBodyNormalizer.php b/generated/Normalizer/SecretsCreatePostBodyNormalizer.php new file mode 100644 index 000000000..246825134 --- /dev/null +++ b/generated/Normalizer/SecretsCreatePostBodyNormalizer.php @@ -0,0 +1,186 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SecretsCreatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SecretsCreatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SecretsCreatePostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SecretsCreatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Data', $data) && $data['Data'] !== null) { + $values_1 = []; + foreach ($data['Data'] as $value_1) { + $values_1[] = $value_1; + } + $object->setData($values_1); + } + elseif (\array_key_exists('Data', $data) && $data['Data'] === null) { + $object->setData(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('data') && null !== $object->getData()) { + $values_1 = []; + foreach ($object->getData() as $value_1) { + $values_1[] = $value_1; + } + $data['Data'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SecretsCreatePostBody::class => false]; + } + } +} else { + class SecretsCreatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SecretsCreatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SecretsCreatePostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SecretsCreatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Data', $data) && $data['Data'] !== null) { + $values_1 = []; + foreach ($data['Data'] as $value_1) { + $values_1[] = $value_1; + } + $object->setData($values_1); + } + elseif (\array_key_exists('Data', $data) && $data['Data'] === null) { + $object->setData(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('data') && null !== $object->getData()) { + $values_1 = []; + foreach ($object->getData() as $value_1) { + $values_1[] = $value_1; + } + $data['Data'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SecretsCreatePostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SecretsCreatePostResponse201Normalizer.php b/generated/Normalizer/SecretsCreatePostResponse201Normalizer.php new file mode 100644 index 000000000..16cc40f41 --- /dev/null +++ b/generated/Normalizer/SecretsCreatePostResponse201Normalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SecretsCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SecretsCreatePostResponse201::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SecretsCreatePostResponse201::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SecretsCreatePostResponse201(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SecretsCreatePostResponse201::class => false]; + } + } +} else { + class SecretsCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SecretsCreatePostResponse201::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SecretsCreatePostResponse201::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SecretsCreatePostResponse201(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SecretsCreatePostResponse201::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceCreateResponseNormalizer.php b/generated/Normalizer/ServiceCreateResponseNormalizer.php deleted file mode 100644 index bf348d846..000000000 --- a/generated/Normalizer/ServiceCreateResponseNormalizer.php +++ /dev/null @@ -1,57 +0,0 @@ -setId($data->{'Id'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getId()) { - $data->{'Id'} = $object->getId(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/ServiceEndpointNormalizer.php b/generated/Normalizer/ServiceEndpointNormalizer.php new file mode 100644 index 000000000..dbc6a52ee --- /dev/null +++ b/generated/Normalizer/ServiceEndpointNormalizer.php @@ -0,0 +1,186 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceEndpointNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceEndpoint::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceEndpoint::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceEndpoint(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\EndpointSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + if (\array_key_exists('Ports', $data) && $data['Ports'] !== null) { + $values = []; + foreach ($data['Ports'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\EndpointPortConfig::class, 'json', $context); + } + $object->setPorts($values); + } + elseif (\array_key_exists('Ports', $data) && $data['Ports'] === null) { + $object->setPorts(null); + } + if (\array_key_exists('VirtualIPs', $data) && $data['VirtualIPs'] !== null) { + $values_1 = []; + foreach ($data['VirtualIPs'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ServiceEndpointVirtualIPsItem::class, 'json', $context); + } + $object->setVirtualIPs($values_1); + } + elseif (\array_key_exists('VirtualIPs', $data) && $data['VirtualIPs'] === null) { + $object->setVirtualIPs(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + if ($object->isInitialized('ports') && null !== $object->getPorts()) { + $values = []; + foreach ($object->getPorts() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Ports'] = $values; + } + if ($object->isInitialized('virtualIPs') && null !== $object->getVirtualIPs()) { + $values_1 = []; + foreach ($object->getVirtualIPs() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['VirtualIPs'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceEndpoint::class => false]; + } + } +} else { + class ServiceEndpointNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceEndpoint::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceEndpoint::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceEndpoint(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\EndpointSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + if (\array_key_exists('Ports', $data) && $data['Ports'] !== null) { + $values = []; + foreach ($data['Ports'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\EndpointPortConfig::class, 'json', $context); + } + $object->setPorts($values); + } + elseif (\array_key_exists('Ports', $data) && $data['Ports'] === null) { + $object->setPorts(null); + } + if (\array_key_exists('VirtualIPs', $data) && $data['VirtualIPs'] !== null) { + $values_1 = []; + foreach ($data['VirtualIPs'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ServiceEndpointVirtualIPsItem::class, 'json', $context); + } + $object->setVirtualIPs($values_1); + } + elseif (\array_key_exists('VirtualIPs', $data) && $data['VirtualIPs'] === null) { + $object->setVirtualIPs(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + if ($object->isInitialized('ports') && null !== $object->getPorts()) { + $values = []; + foreach ($object->getPorts() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Ports'] = $values; + } + if ($object->isInitialized('virtualIPs') && null !== $object->getVirtualIPs()) { + $values_1 = []; + foreach ($object->getVirtualIPs() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['VirtualIPs'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceEndpoint::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceEndpointVirtualIPsItemNormalizer.php b/generated/Normalizer/ServiceEndpointVirtualIPsItemNormalizer.php new file mode 100644 index 000000000..48138978a --- /dev/null +++ b/generated/Normalizer/ServiceEndpointVirtualIPsItemNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceEndpointVirtualIPsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceEndpointVirtualIPsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceEndpointVirtualIPsItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceEndpointVirtualIPsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NetworkID', $data) && $data['NetworkID'] !== null) { + $object->setNetworkID($data['NetworkID']); + } + elseif (\array_key_exists('NetworkID', $data) && $data['NetworkID'] === null) { + $object->setNetworkID(null); + } + if (\array_key_exists('Addr', $data) && $data['Addr'] !== null) { + $object->setAddr($data['Addr']); + } + elseif (\array_key_exists('Addr', $data) && $data['Addr'] === null) { + $object->setAddr(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('networkID') && null !== $object->getNetworkID()) { + $data['NetworkID'] = $object->getNetworkID(); + } + if ($object->isInitialized('addr') && null !== $object->getAddr()) { + $data['Addr'] = $object->getAddr(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceEndpointVirtualIPsItem::class => false]; + } + } +} else { + class ServiceEndpointVirtualIPsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceEndpointVirtualIPsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceEndpointVirtualIPsItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceEndpointVirtualIPsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NetworkID', $data) && $data['NetworkID'] !== null) { + $object->setNetworkID($data['NetworkID']); + } + elseif (\array_key_exists('NetworkID', $data) && $data['NetworkID'] === null) { + $object->setNetworkID(null); + } + if (\array_key_exists('Addr', $data) && $data['Addr'] !== null) { + $object->setAddr($data['Addr']); + } + elseif (\array_key_exists('Addr', $data) && $data['Addr'] === null) { + $object->setAddr(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('networkID') && null !== $object->getNetworkID()) { + $data['NetworkID'] = $object->getNetworkID(); + } + if ($object->isInitialized('addr') && null !== $object->getAddr()) { + $data['Addr'] = $object->getAddr(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceEndpointVirtualIPsItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceNormalizer.php b/generated/Normalizer/ServiceNormalizer.php index c21752495..114bec717 100644 --- a/generated/Normalizer/ServiceNormalizer.php +++ b/generated/Normalizer/ServiceNormalizer.php @@ -2,92 +2,225 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class ServiceNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\Service') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($data instanceof \Docker\API\Model\Service) { - return true; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Service::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Service::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Service(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ServiceVersion::class, 'json', $context)); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); + } + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\ServiceSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + if (\array_key_exists('Endpoint', $data) && $data['Endpoint'] !== null) { + $object->setEndpoint($this->denormalizer->denormalize($data['Endpoint'], \Docker\API\Model\ServiceEndpoint::class, 'json', $context)); + } + elseif (\array_key_exists('Endpoint', $data) && $data['Endpoint'] === null) { + $object->setEndpoint(null); + } + if (\array_key_exists('UpdateStatus', $data) && $data['UpdateStatus'] !== null) { + $object->setUpdateStatus($this->denormalizer->denormalize($data['UpdateStatus'], \Docker\API\Model\ServiceUpdateStatus::class, 'json', $context)); + } + elseif (\array_key_exists('UpdateStatus', $data) && $data['UpdateStatus'] === null) { + $object->setUpdateStatus(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + if ($object->isInitialized('endpoint') && null !== $object->getEndpoint()) { + $data['Endpoint'] = $this->normalizer->normalize($object->getEndpoint(), 'json', $context); + } + if ($object->isInitialized('updateStatus') && null !== $object->getUpdateStatus()) { + $data['UpdateStatus'] = $this->normalizer->normalize($object->getUpdateStatus(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Service::class => false]; } - - return false; } - - public function denormalize($data, $class, $format = null, array $context = []) +} else { + class ServiceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $object = new \Docker\API\Model\Service(); - if (property_exists($data, 'ID')) { - $object->setID($data->{'ID'}); - } - if (property_exists($data, 'Version')) { - $object->setVersion($this->serializer->denormalize($data->{'Version'}, 'Docker\\API\\Model\\NodeVersion', 'raw', $context)); - } - if (property_exists($data, 'CreatedAt')) { - $object->setCreatedAt(\DateTime::createFromFormat("Y-m-d\TH:i:sP", $data->{'CreatedAt'})); - } - if (property_exists($data, 'UpdatedAt')) { - $object->setUpdatedAt(\DateTime::createFromFormat("Y-m-d\TH:i:sP", $data->{'UpdatedAt'})); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Service::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Service::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Service(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ServiceVersion::class, 'json', $context)); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); + } + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\ServiceSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + if (\array_key_exists('Endpoint', $data) && $data['Endpoint'] !== null) { + $object->setEndpoint($this->denormalizer->denormalize($data['Endpoint'], \Docker\API\Model\ServiceEndpoint::class, 'json', $context)); + } + elseif (\array_key_exists('Endpoint', $data) && $data['Endpoint'] === null) { + $object->setEndpoint(null); + } + if (\array_key_exists('UpdateStatus', $data) && $data['UpdateStatus'] !== null) { + $object->setUpdateStatus($this->denormalizer->denormalize($data['UpdateStatus'], \Docker\API\Model\ServiceUpdateStatus::class, 'json', $context)); + } + elseif (\array_key_exists('UpdateStatus', $data) && $data['UpdateStatus'] === null) { + $object->setUpdateStatus(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + if ($object->isInitialized('endpoint') && null !== $object->getEndpoint()) { + $data['Endpoint'] = $this->normalizer->normalize($object->getEndpoint(), 'json', $context); + } + if ($object->isInitialized('updateStatus') && null !== $object->getUpdateStatus()) { + $data['UpdateStatus'] = $this->normalizer->normalize($object->getUpdateStatus(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Service::class => false]; } - if (property_exists($data, 'Spec')) { - $object->setSpec($this->serializer->denormalize($data->{'Spec'}, 'Docker\\API\\Model\\ServiceSpec', 'raw', $context)); - } - if (property_exists($data, 'Endpoint')) { - $object->setEndpoint($this->serializer->denormalize($data->{'Endpoint'}, 'Docker\\API\\Model\\Endpoint', 'raw', $context)); - } - if (property_exists($data, 'UpdateStatus')) { - $object->setUpdateStatus($this->serializer->denormalize($data->{'UpdateStatus'}, 'Docker\\API\\Model\\UpdateStatus', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getID()) { - $data->{'ID'} = $object->getID(); - } - if (null !== $object->getVersion()) { - $data->{'Version'} = json_decode($this->serializer->normalize($object->getVersion(), 'raw', $context)); - } - if (null !== $object->getCreatedAt()) { - $data->{'CreatedAt'} = $object->getCreatedAt()->format("Y-m-d\TH:i:sP"); - } - if (null !== $object->getUpdatedAt()) { - $data->{'UpdatedAt'} = $object->getUpdatedAt()->format("Y-m-d\TH:i:sP"); - } - if (null !== $object->getSpec()) { - $data->{'Spec'} = json_decode($this->serializer->normalize($object->getSpec(), 'raw', $context)); - } - if (null !== $object->getEndpoint()) { - $data->{'Endpoint'} = json_decode($this->serializer->normalize($object->getEndpoint(), 'raw', $context)); - } - if (null !== $object->getUpdateStatus()) { - $data->{'UpdateStatus'} = json_decode($this->serializer->normalize($object->getUpdateStatus(), 'raw', $context)); - } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceSpecModeNormalizer.php b/generated/Normalizer/ServiceSpecModeNormalizer.php index 9a0ac892c..ea70450c8 100644 --- a/generated/Normalizer/ServiceSpecModeNormalizer.php +++ b/generated/Normalizer/ServiceSpecModeNormalizer.php @@ -2,62 +2,135 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class ServiceSpecModeNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceSpecModeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($type !== 'Docker\\API\\Model\\ServiceSpecMode') { - return false; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceSpecMode::class; } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\ServiceSpecMode) { - return true; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpecMode::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\ServiceSpecMode(); - if (property_exists($data, 'Replicated')) { - $object->setReplicated($this->serializer->denormalize($data->{'Replicated'}, 'Docker\\API\\Model\\ReplicatedService', 'raw', $context)); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceSpecMode(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Replicated', $data) && $data['Replicated'] !== null) { + $object->setReplicated($this->denormalizer->denormalize($data['Replicated'], \Docker\API\Model\ServiceSpecModeReplicated::class, 'json', $context)); + } + elseif (\array_key_exists('Replicated', $data) && $data['Replicated'] === null) { + $object->setReplicated(null); + } + if (\array_key_exists('Global', $data) && $data['Global'] !== null) { + $object->setGlobal($data['Global']); + } + elseif (\array_key_exists('Global', $data) && $data['Global'] === null) { + $object->setGlobal(null); + } + return $object; } - if (property_exists($data, 'Global')) { - $object->setGlobal($this->serializer->denormalize($data->{'Global'}, 'Docker\\API\\Model\\GlobalService', 'raw', $context)); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('replicated') && null !== $object->getReplicated()) { + $data['Replicated'] = $this->normalizer->normalize($object->getReplicated(), 'json', $context); + } + if ($object->isInitialized('global') && null !== $object->getGlobal()) { + $data['Global'] = $object->getGlobal(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceSpecMode::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class ServiceSpecModeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getReplicated()) { - $data->{'Replicated'} = json_decode($this->serializer->normalize($object->getReplicated(), 'raw', $context)); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceSpecMode::class; } - if (null !== $object->getGlobal()) { - $data->{'Global'} = json_decode($this->serializer->normalize($object->getGlobal(), 'raw', $context)); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpecMode::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceSpecMode(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Replicated', $data) && $data['Replicated'] !== null) { + $object->setReplicated($this->denormalizer->denormalize($data['Replicated'], \Docker\API\Model\ServiceSpecModeReplicated::class, 'json', $context)); + } + elseif (\array_key_exists('Replicated', $data) && $data['Replicated'] === null) { + $object->setReplicated(null); + } + if (\array_key_exists('Global', $data) && $data['Global'] !== null) { + $object->setGlobal($data['Global']); + } + elseif (\array_key_exists('Global', $data) && $data['Global'] === null) { + $object->setGlobal(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('replicated') && null !== $object->getReplicated()) { + $data['Replicated'] = $this->normalizer->normalize($object->getReplicated(), 'json', $context); + } + if ($object->isInitialized('global') && null !== $object->getGlobal()) { + $data['Global'] = $object->getGlobal(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceSpecMode::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceSpecModeReplicatedNormalizer.php b/generated/Normalizer/ServiceSpecModeReplicatedNormalizer.php new file mode 100644 index 000000000..8c1c21334 --- /dev/null +++ b/generated/Normalizer/ServiceSpecModeReplicatedNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceSpecModeReplicatedNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceSpecModeReplicated::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpecModeReplicated::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceSpecModeReplicated(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Replicas', $data) && $data['Replicas'] !== null) { + $object->setReplicas($data['Replicas']); + } + elseif (\array_key_exists('Replicas', $data) && $data['Replicas'] === null) { + $object->setReplicas(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('replicas') && null !== $object->getReplicas()) { + $data['Replicas'] = $object->getReplicas(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceSpecModeReplicated::class => false]; + } + } +} else { + class ServiceSpecModeReplicatedNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceSpecModeReplicated::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpecModeReplicated::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceSpecModeReplicated(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Replicas', $data) && $data['Replicas'] !== null) { + $object->setReplicas($data['Replicas']); + } + elseif (\array_key_exists('Replicas', $data) && $data['Replicas'] === null) { + $object->setReplicas(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('replicas') && null !== $object->getReplicas()) { + $data['Replicas'] = $object->getReplicas(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceSpecModeReplicated::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceSpecNetworksItemNormalizer.php b/generated/Normalizer/ServiceSpecNetworksItemNormalizer.php new file mode 100644 index 000000000..a430b411c --- /dev/null +++ b/generated/Normalizer/ServiceSpecNetworksItemNormalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceSpecNetworksItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceSpecNetworksItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpecNetworksItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceSpecNetworksItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Target', $data) && $data['Target'] !== null) { + $object->setTarget($data['Target']); + } + elseif (\array_key_exists('Target', $data) && $data['Target'] === null) { + $object->setTarget(null); + } + if (\array_key_exists('Aliases', $data) && $data['Aliases'] !== null) { + $values = []; + foreach ($data['Aliases'] as $value) { + $values[] = $value; + } + $object->setAliases($values); + } + elseif (\array_key_exists('Aliases', $data) && $data['Aliases'] === null) { + $object->setAliases(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('target') && null !== $object->getTarget()) { + $data['Target'] = $object->getTarget(); + } + if ($object->isInitialized('aliases') && null !== $object->getAliases()) { + $values = []; + foreach ($object->getAliases() as $value) { + $values[] = $value; + } + $data['Aliases'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceSpecNetworksItem::class => false]; + } + } +} else { + class ServiceSpecNetworksItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceSpecNetworksItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpecNetworksItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceSpecNetworksItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Target', $data) && $data['Target'] !== null) { + $object->setTarget($data['Target']); + } + elseif (\array_key_exists('Target', $data) && $data['Target'] === null) { + $object->setTarget(null); + } + if (\array_key_exists('Aliases', $data) && $data['Aliases'] !== null) { + $values = []; + foreach ($data['Aliases'] as $value) { + $values[] = $value; + } + $object->setAliases($values); + } + elseif (\array_key_exists('Aliases', $data) && $data['Aliases'] === null) { + $object->setAliases(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('target') && null !== $object->getTarget()) { + $data['Target'] = $object->getTarget(); + } + if ($object->isInitialized('aliases') && null !== $object->getAliases()) { + $values = []; + foreach ($object->getAliases() as $value) { + $values[] = $value; + } + $data['Aliases'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceSpecNetworksItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceSpecNormalizer.php b/generated/Normalizer/ServiceSpecNormalizer.php index 0673e0f72..2fa838c28 100644 --- a/generated/Normalizer/ServiceSpecNormalizer.php +++ b/generated/Normalizer/ServiceSpecNormalizer.php @@ -2,131 +2,257 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class ServiceSpecNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\ServiceSpec') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($data instanceof \Docker\API\Model\ServiceSpec) { - return true; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceSpec::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\ServiceSpec(); - if (property_exists($data, 'Name')) { - $object->setName($data->{'Name'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpec::class; } - if (property_exists($data, 'Labels')) { - $value = $data->{'Labels'}; - if (is_object($data->{'Labels'})) { + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Labels'} as $key => $value_1) { - $values[$key] = $value_1; + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; } - $value = $values; + $object->setLabels($values); } - if (is_null($data->{'Labels'})) { - $value = $data->{'Labels'}; + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); } - $object->setLabels($value); - } - if (property_exists($data, 'TaskTemplate')) { - $object->setTaskTemplate($this->serializer->denormalize($data->{'TaskTemplate'}, 'Docker\\API\\Model\\TaskSpec', 'raw', $context)); - } - if (property_exists($data, 'Mode')) { - $object->setMode($this->serializer->denormalize($data->{'Mode'}, 'Docker\\API\\Model\\ServiceSpecMode', 'raw', $context)); - } - if (property_exists($data, 'UpdateConfig')) { - $object->setUpdateConfig($this->serializer->denormalize($data->{'UpdateConfig'}, 'Docker\\API\\Model\\UpdateConfig', 'raw', $context)); + if (\array_key_exists('TaskTemplate', $data) && $data['TaskTemplate'] !== null) { + $object->setTaskTemplate($this->denormalizer->denormalize($data['TaskTemplate'], \Docker\API\Model\TaskSpec::class, 'json', $context)); + } + elseif (\array_key_exists('TaskTemplate', $data) && $data['TaskTemplate'] === null) { + $object->setTaskTemplate(null); + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($this->denormalizer->denormalize($data['Mode'], \Docker\API\Model\ServiceSpecMode::class, 'json', $context)); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + if (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] !== null) { + $object->setUpdateConfig($this->denormalizer->denormalize($data['UpdateConfig'], \Docker\API\Model\ServiceSpecUpdateConfig::class, 'json', $context)); + } + elseif (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] === null) { + $object->setUpdateConfig(null); + } + if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { + $values_1 = []; + foreach ($data['Networks'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ServiceSpecNetworksItem::class, 'json', $context); + } + $object->setNetworks($values_1); + } + elseif (\array_key_exists('Networks', $data) && $data['Networks'] === null) { + $object->setNetworks(null); + } + if (\array_key_exists('EndpointSpec', $data) && $data['EndpointSpec'] !== null) { + $object->setEndpointSpec($this->denormalizer->denormalize($data['EndpointSpec'], \Docker\API\Model\EndpointSpec::class, 'json', $context)); + } + elseif (\array_key_exists('EndpointSpec', $data) && $data['EndpointSpec'] === null) { + $object->setEndpointSpec(null); + } + return $object; } - if (property_exists($data, 'Networks')) { - $value_2 = $data->{'Networks'}; - if (is_array($data->{'Networks'})) { + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('taskTemplate') && null !== $object->getTaskTemplate()) { + $data['TaskTemplate'] = $this->normalizer->normalize($object->getTaskTemplate(), 'json', $context); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $this->normalizer->normalize($object->getMode(), 'json', $context); + } + if ($object->isInitialized('updateConfig') && null !== $object->getUpdateConfig()) { + $data['UpdateConfig'] = $this->normalizer->normalize($object->getUpdateConfig(), 'json', $context); + } + if ($object->isInitialized('networks') && null !== $object->getNetworks()) { $values_1 = []; - foreach ($data->{'Networks'} as $value_3) { - $values_1[] = $this->serializer->denormalize($value_3, 'Docker\\API\\Model\\NetworkAttachmentConfig', 'raw', $context); + foreach ($object->getNetworks() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } - $value_2 = $values_1; + $data['Networks'] = $values_1; } - if (is_null($data->{'Networks'})) { - $value_2 = $data->{'Networks'}; + if ($object->isInitialized('endpointSpec') && null !== $object->getEndpointSpec()) { + $data['EndpointSpec'] = $this->normalizer->normalize($object->getEndpointSpec(), 'json', $context); } - $object->setNetworks($value_2); + return $data; } - if (property_exists($data, 'EndpointSpec')) { - $object->setEndpointSpec($data->{'EndpointSpec'}); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceSpec::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class ServiceSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - $value = $object->getLabels(); - if (is_object($object->getLabels())) { - $values = new \stdClass(); - foreach ($object->getLabels() as $key => $value_1) { - $values->{$key} = $value_1; - } - $value = $values; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceSpec::class; } - if (is_null($object->getLabels())) { - $value = $object->getLabels(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpec::class; } - $data->{'Labels'} = $value; - if (null !== $object->getTaskTemplate()) { - $data->{'TaskTemplate'} = json_decode($this->serializer->normalize($object->getTaskTemplate(), 'raw', $context)); - } - if (null !== $object->getMode()) { - $data->{'Mode'} = json_decode($this->serializer->normalize($object->getMode(), 'raw', $context)); - } - if (null !== $object->getUpdateConfig()) { - $data->{'UpdateConfig'} = json_decode($this->serializer->normalize($object->getUpdateConfig(), 'raw', $context)); - } - $value_2 = $object->getNetworks(); - if (is_array($object->getNetworks())) { - $values_1 = []; - foreach ($object->getNetworks() as $value_3) { - $values_1[] = $value_3; + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('TaskTemplate', $data) && $data['TaskTemplate'] !== null) { + $object->setTaskTemplate($this->denormalizer->denormalize($data['TaskTemplate'], \Docker\API\Model\TaskSpec::class, 'json', $context)); + } + elseif (\array_key_exists('TaskTemplate', $data) && $data['TaskTemplate'] === null) { + $object->setTaskTemplate(null); + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($this->denormalizer->denormalize($data['Mode'], \Docker\API\Model\ServiceSpecMode::class, 'json', $context)); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); } - $value_2 = $values_1; + if (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] !== null) { + $object->setUpdateConfig($this->denormalizer->denormalize($data['UpdateConfig'], \Docker\API\Model\ServiceSpecUpdateConfig::class, 'json', $context)); + } + elseif (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] === null) { + $object->setUpdateConfig(null); + } + if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { + $values_1 = []; + foreach ($data['Networks'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ServiceSpecNetworksItem::class, 'json', $context); + } + $object->setNetworks($values_1); + } + elseif (\array_key_exists('Networks', $data) && $data['Networks'] === null) { + $object->setNetworks(null); + } + if (\array_key_exists('EndpointSpec', $data) && $data['EndpointSpec'] !== null) { + $object->setEndpointSpec($this->denormalizer->denormalize($data['EndpointSpec'], \Docker\API\Model\EndpointSpec::class, 'json', $context)); + } + elseif (\array_key_exists('EndpointSpec', $data) && $data['EndpointSpec'] === null) { + $object->setEndpointSpec(null); + } + return $object; } - if (is_null($object->getNetworks())) { - $value_2 = $object->getNetworks(); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('taskTemplate') && null !== $object->getTaskTemplate()) { + $data['TaskTemplate'] = $this->normalizer->normalize($object->getTaskTemplate(), 'json', $context); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $this->normalizer->normalize($object->getMode(), 'json', $context); + } + if ($object->isInitialized('updateConfig') && null !== $object->getUpdateConfig()) { + $data['UpdateConfig'] = $this->normalizer->normalize($object->getUpdateConfig(), 'json', $context); + } + if ($object->isInitialized('networks') && null !== $object->getNetworks()) { + $values_1 = []; + foreach ($object->getNetworks() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Networks'] = $values_1; + } + if ($object->isInitialized('endpointSpec') && null !== $object->getEndpointSpec()) { + $data['EndpointSpec'] = $this->normalizer->normalize($object->getEndpointSpec(), 'json', $context); + } + return $data; } - $data->{'Networks'} = $value_2; - if (null !== $object->getEndpointSpec()) { - $data->{'EndpointSpec'} = $object->getEndpointSpec(); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceSpec::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceSpecUpdateConfigNormalizer.php b/generated/Normalizer/ServiceSpecUpdateConfigNormalizer.php new file mode 100644 index 000000000..86e1a9344 --- /dev/null +++ b/generated/Normalizer/ServiceSpecUpdateConfigNormalizer.php @@ -0,0 +1,196 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceSpecUpdateConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceSpecUpdateConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpecUpdateConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceSpecUpdateConfig(); + if (\array_key_exists('MaxFailureRatio', $data) && \is_int($data['MaxFailureRatio'])) { + $data['MaxFailureRatio'] = (double) $data['MaxFailureRatio']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Parallelism', $data) && $data['Parallelism'] !== null) { + $object->setParallelism($data['Parallelism']); + } + elseif (\array_key_exists('Parallelism', $data) && $data['Parallelism'] === null) { + $object->setParallelism(null); + } + if (\array_key_exists('Delay', $data) && $data['Delay'] !== null) { + $object->setDelay($data['Delay']); + } + elseif (\array_key_exists('Delay', $data) && $data['Delay'] === null) { + $object->setDelay(null); + } + if (\array_key_exists('FailureAction', $data) && $data['FailureAction'] !== null) { + $object->setFailureAction($data['FailureAction']); + } + elseif (\array_key_exists('FailureAction', $data) && $data['FailureAction'] === null) { + $object->setFailureAction(null); + } + if (\array_key_exists('Monitor', $data) && $data['Monitor'] !== null) { + $object->setMonitor($data['Monitor']); + } + elseif (\array_key_exists('Monitor', $data) && $data['Monitor'] === null) { + $object->setMonitor(null); + } + if (\array_key_exists('MaxFailureRatio', $data) && $data['MaxFailureRatio'] !== null) { + $object->setMaxFailureRatio($data['MaxFailureRatio']); + } + elseif (\array_key_exists('MaxFailureRatio', $data) && $data['MaxFailureRatio'] === null) { + $object->setMaxFailureRatio(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('parallelism') && null !== $object->getParallelism()) { + $data['Parallelism'] = $object->getParallelism(); + } + if ($object->isInitialized('delay') && null !== $object->getDelay()) { + $data['Delay'] = $object->getDelay(); + } + if ($object->isInitialized('failureAction') && null !== $object->getFailureAction()) { + $data['FailureAction'] = $object->getFailureAction(); + } + if ($object->isInitialized('monitor') && null !== $object->getMonitor()) { + $data['Monitor'] = $object->getMonitor(); + } + if ($object->isInitialized('maxFailureRatio') && null !== $object->getMaxFailureRatio()) { + $data['MaxFailureRatio'] = $object->getMaxFailureRatio(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceSpecUpdateConfig::class => false]; + } + } +} else { + class ServiceSpecUpdateConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceSpecUpdateConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpecUpdateConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceSpecUpdateConfig(); + if (\array_key_exists('MaxFailureRatio', $data) && \is_int($data['MaxFailureRatio'])) { + $data['MaxFailureRatio'] = (double) $data['MaxFailureRatio']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Parallelism', $data) && $data['Parallelism'] !== null) { + $object->setParallelism($data['Parallelism']); + } + elseif (\array_key_exists('Parallelism', $data) && $data['Parallelism'] === null) { + $object->setParallelism(null); + } + if (\array_key_exists('Delay', $data) && $data['Delay'] !== null) { + $object->setDelay($data['Delay']); + } + elseif (\array_key_exists('Delay', $data) && $data['Delay'] === null) { + $object->setDelay(null); + } + if (\array_key_exists('FailureAction', $data) && $data['FailureAction'] !== null) { + $object->setFailureAction($data['FailureAction']); + } + elseif (\array_key_exists('FailureAction', $data) && $data['FailureAction'] === null) { + $object->setFailureAction(null); + } + if (\array_key_exists('Monitor', $data) && $data['Monitor'] !== null) { + $object->setMonitor($data['Monitor']); + } + elseif (\array_key_exists('Monitor', $data) && $data['Monitor'] === null) { + $object->setMonitor(null); + } + if (\array_key_exists('MaxFailureRatio', $data) && $data['MaxFailureRatio'] !== null) { + $object->setMaxFailureRatio($data['MaxFailureRatio']); + } + elseif (\array_key_exists('MaxFailureRatio', $data) && $data['MaxFailureRatio'] === null) { + $object->setMaxFailureRatio(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('parallelism') && null !== $object->getParallelism()) { + $data['Parallelism'] = $object->getParallelism(); + } + if ($object->isInitialized('delay') && null !== $object->getDelay()) { + $data['Delay'] = $object->getDelay(); + } + if ($object->isInitialized('failureAction') && null !== $object->getFailureAction()) { + $data['FailureAction'] = $object->getFailureAction(); + } + if ($object->isInitialized('monitor') && null !== $object->getMonitor()) { + $data['Monitor'] = $object->getMonitor(); + } + if ($object->isInitialized('maxFailureRatio') && null !== $object->getMaxFailureRatio()) { + $data['MaxFailureRatio'] = $object->getMaxFailureRatio(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceSpecUpdateConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceUpdateResponseNormalizer.php b/generated/Normalizer/ServiceUpdateResponseNormalizer.php new file mode 100644 index 000000000..4556fe175 --- /dev/null +++ b/generated/Normalizer/ServiceUpdateResponseNormalizer.php @@ -0,0 +1,134 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceUpdateResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceUpdateResponse::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceUpdateResponse::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceUpdateResponse(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Warnings', $data) && $data['Warnings'] !== null) { + $values = []; + foreach ($data['Warnings'] as $value) { + $values[] = $value; + } + $object->setWarnings($values); + } + elseif (\array_key_exists('Warnings', $data) && $data['Warnings'] === null) { + $object->setWarnings(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { + $values = []; + foreach ($object->getWarnings() as $value) { + $values[] = $value; + } + $data['Warnings'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceUpdateResponse::class => false]; + } + } +} else { + class ServiceUpdateResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceUpdateResponse::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceUpdateResponse::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceUpdateResponse(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Warnings', $data) && $data['Warnings'] !== null) { + $values = []; + foreach ($data['Warnings'] as $value) { + $values[] = $value; + } + $object->setWarnings($values); + } + elseif (\array_key_exists('Warnings', $data) && $data['Warnings'] === null) { + $object->setWarnings(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { + $values = []; + foreach ($object->getWarnings() as $value) { + $values[] = $value; + } + $data['Warnings'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceUpdateResponse::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceUpdateStatusNormalizer.php b/generated/Normalizer/ServiceUpdateStatusNormalizer.php new file mode 100644 index 000000000..375e699fc --- /dev/null +++ b/generated/Normalizer/ServiceUpdateStatusNormalizer.php @@ -0,0 +1,172 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceUpdateStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceUpdateStatus::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceUpdateStatus::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceUpdateStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('State', $data) && $data['State'] !== null) { + $object->setState($data['State']); + } + elseif (\array_key_exists('State', $data) && $data['State'] === null) { + $object->setState(null); + } + if (\array_key_exists('StartedAt', $data) && $data['StartedAt'] !== null) { + $object->setStartedAt($data['StartedAt']); + } + elseif (\array_key_exists('StartedAt', $data) && $data['StartedAt'] === null) { + $object->setStartedAt(null); + } + if (\array_key_exists('CompletedAt', $data) && $data['CompletedAt'] !== null) { + $object->setCompletedAt($data['CompletedAt']); + } + elseif (\array_key_exists('CompletedAt', $data) && $data['CompletedAt'] === null) { + $object->setCompletedAt(null); + } + if (\array_key_exists('Message', $data) && $data['Message'] !== null) { + $object->setMessage($data['Message']); + } + elseif (\array_key_exists('Message', $data) && $data['Message'] === null) { + $object->setMessage(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['State'] = $object->getState(); + } + if ($object->isInitialized('startedAt') && null !== $object->getStartedAt()) { + $data['StartedAt'] = $object->getStartedAt(); + } + if ($object->isInitialized('completedAt') && null !== $object->getCompletedAt()) { + $data['CompletedAt'] = $object->getCompletedAt(); + } + if ($object->isInitialized('message') && null !== $object->getMessage()) { + $data['Message'] = $object->getMessage(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceUpdateStatus::class => false]; + } + } +} else { + class ServiceUpdateStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceUpdateStatus::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceUpdateStatus::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceUpdateStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('State', $data) && $data['State'] !== null) { + $object->setState($data['State']); + } + elseif (\array_key_exists('State', $data) && $data['State'] === null) { + $object->setState(null); + } + if (\array_key_exists('StartedAt', $data) && $data['StartedAt'] !== null) { + $object->setStartedAt($data['StartedAt']); + } + elseif (\array_key_exists('StartedAt', $data) && $data['StartedAt'] === null) { + $object->setStartedAt(null); + } + if (\array_key_exists('CompletedAt', $data) && $data['CompletedAt'] !== null) { + $object->setCompletedAt($data['CompletedAt']); + } + elseif (\array_key_exists('CompletedAt', $data) && $data['CompletedAt'] === null) { + $object->setCompletedAt(null); + } + if (\array_key_exists('Message', $data) && $data['Message'] !== null) { + $object->setMessage($data['Message']); + } + elseif (\array_key_exists('Message', $data) && $data['Message'] === null) { + $object->setMessage(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['State'] = $object->getState(); + } + if ($object->isInitialized('startedAt') && null !== $object->getStartedAt()) { + $data['StartedAt'] = $object->getStartedAt(); + } + if ($object->isInitialized('completedAt') && null !== $object->getCompletedAt()) { + $data['CompletedAt'] = $object->getCompletedAt(); + } + if ($object->isInitialized('message') && null !== $object->getMessage()) { + $data['Message'] = $object->getMessage(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceUpdateStatus::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceVersionNormalizer.php b/generated/Normalizer/ServiceVersionNormalizer.php new file mode 100644 index 000000000..f89b30419 --- /dev/null +++ b/generated/Normalizer/ServiceVersionNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceVersion::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceVersion::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceVersion(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Index', $data) && $data['Index'] !== null) { + $object->setIndex($data['Index']); + } + elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { + $object->setIndex(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('index') && null !== $object->getIndex()) { + $data['Index'] = $object->getIndex(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceVersion::class => false]; + } + } +} else { + class ServiceVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceVersion::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceVersion::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceVersion(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Index', $data) && $data['Index'] !== null) { + $object->setIndex($data['Index']); + } + elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { + $object->setIndex(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('index') && null !== $object->getIndex()) { + $data['Index'] = $object->getIndex(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceVersion::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServicesCreatePostBodyNormalizer.php b/generated/Normalizer/ServicesCreatePostBodyNormalizer.php new file mode 100644 index 000000000..d65bfb18a --- /dev/null +++ b/generated/Normalizer/ServicesCreatePostBodyNormalizer.php @@ -0,0 +1,258 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServicesCreatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServicesCreatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServicesCreatePostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServicesCreatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('TaskTemplate', $data) && $data['TaskTemplate'] !== null) { + $object->setTaskTemplate($this->denormalizer->denormalize($data['TaskTemplate'], \Docker\API\Model\TaskSpec::class, 'json', $context)); + } + elseif (\array_key_exists('TaskTemplate', $data) && $data['TaskTemplate'] === null) { + $object->setTaskTemplate(null); + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($this->denormalizer->denormalize($data['Mode'], \Docker\API\Model\ServiceSpecMode::class, 'json', $context)); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + if (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] !== null) { + $object->setUpdateConfig($this->denormalizer->denormalize($data['UpdateConfig'], \Docker\API\Model\ServiceSpecUpdateConfig::class, 'json', $context)); + } + elseif (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] === null) { + $object->setUpdateConfig(null); + } + if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { + $values_1 = []; + foreach ($data['Networks'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ServiceSpecNetworksItem::class, 'json', $context); + } + $object->setNetworks($values_1); + } + elseif (\array_key_exists('Networks', $data) && $data['Networks'] === null) { + $object->setNetworks(null); + } + if (\array_key_exists('EndpointSpec', $data) && $data['EndpointSpec'] !== null) { + $object->setEndpointSpec($this->denormalizer->denormalize($data['EndpointSpec'], \Docker\API\Model\EndpointSpec::class, 'json', $context)); + } + elseif (\array_key_exists('EndpointSpec', $data) && $data['EndpointSpec'] === null) { + $object->setEndpointSpec(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('taskTemplate') && null !== $object->getTaskTemplate()) { + $data['TaskTemplate'] = $this->normalizer->normalize($object->getTaskTemplate(), 'json', $context); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $this->normalizer->normalize($object->getMode(), 'json', $context); + } + if ($object->isInitialized('updateConfig') && null !== $object->getUpdateConfig()) { + $data['UpdateConfig'] = $this->normalizer->normalize($object->getUpdateConfig(), 'json', $context); + } + if ($object->isInitialized('networks') && null !== $object->getNetworks()) { + $values_1 = []; + foreach ($object->getNetworks() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Networks'] = $values_1; + } + if ($object->isInitialized('endpointSpec') && null !== $object->getEndpointSpec()) { + $data['EndpointSpec'] = $this->normalizer->normalize($object->getEndpointSpec(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServicesCreatePostBody::class => false]; + } + } +} else { + class ServicesCreatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServicesCreatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServicesCreatePostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServicesCreatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('TaskTemplate', $data) && $data['TaskTemplate'] !== null) { + $object->setTaskTemplate($this->denormalizer->denormalize($data['TaskTemplate'], \Docker\API\Model\TaskSpec::class, 'json', $context)); + } + elseif (\array_key_exists('TaskTemplate', $data) && $data['TaskTemplate'] === null) { + $object->setTaskTemplate(null); + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($this->denormalizer->denormalize($data['Mode'], \Docker\API\Model\ServiceSpecMode::class, 'json', $context)); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + if (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] !== null) { + $object->setUpdateConfig($this->denormalizer->denormalize($data['UpdateConfig'], \Docker\API\Model\ServiceSpecUpdateConfig::class, 'json', $context)); + } + elseif (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] === null) { + $object->setUpdateConfig(null); + } + if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { + $values_1 = []; + foreach ($data['Networks'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ServiceSpecNetworksItem::class, 'json', $context); + } + $object->setNetworks($values_1); + } + elseif (\array_key_exists('Networks', $data) && $data['Networks'] === null) { + $object->setNetworks(null); + } + if (\array_key_exists('EndpointSpec', $data) && $data['EndpointSpec'] !== null) { + $object->setEndpointSpec($this->denormalizer->denormalize($data['EndpointSpec'], \Docker\API\Model\EndpointSpec::class, 'json', $context)); + } + elseif (\array_key_exists('EndpointSpec', $data) && $data['EndpointSpec'] === null) { + $object->setEndpointSpec(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('taskTemplate') && null !== $object->getTaskTemplate()) { + $data['TaskTemplate'] = $this->normalizer->normalize($object->getTaskTemplate(), 'json', $context); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $this->normalizer->normalize($object->getMode(), 'json', $context); + } + if ($object->isInitialized('updateConfig') && null !== $object->getUpdateConfig()) { + $data['UpdateConfig'] = $this->normalizer->normalize($object->getUpdateConfig(), 'json', $context); + } + if ($object->isInitialized('networks') && null !== $object->getNetworks()) { + $values_1 = []; + foreach ($object->getNetworks() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Networks'] = $values_1; + } + if ($object->isInitialized('endpointSpec') && null !== $object->getEndpointSpec()) { + $data['EndpointSpec'] = $this->normalizer->normalize($object->getEndpointSpec(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServicesCreatePostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServicesCreatePostResponse201Normalizer.php b/generated/Normalizer/ServicesCreatePostResponse201Normalizer.php new file mode 100644 index 000000000..b29c7aa8f --- /dev/null +++ b/generated/Normalizer/ServicesCreatePostResponse201Normalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServicesCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServicesCreatePostResponse201::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServicesCreatePostResponse201::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServicesCreatePostResponse201(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Warning', $data) && $data['Warning'] !== null) { + $object->setWarning($data['Warning']); + } + elseif (\array_key_exists('Warning', $data) && $data['Warning'] === null) { + $object->setWarning(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('warning') && null !== $object->getWarning()) { + $data['Warning'] = $object->getWarning(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServicesCreatePostResponse201::class => false]; + } + } +} else { + class ServicesCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServicesCreatePostResponse201::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServicesCreatePostResponse201::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServicesCreatePostResponse201(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Warning', $data) && $data['Warning'] !== null) { + $object->setWarning($data['Warning']); + } + elseif (\array_key_exists('Warning', $data) && $data['Warning'] === null) { + $object->setWarning(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('warning') && null !== $object->getWarning()) { + $data['Warning'] = $object->getWarning(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServicesCreatePostResponse201::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServicesIdUpdatePostBodyNormalizer.php b/generated/Normalizer/ServicesIdUpdatePostBodyNormalizer.php new file mode 100644 index 000000000..abff7c616 --- /dev/null +++ b/generated/Normalizer/ServicesIdUpdatePostBodyNormalizer.php @@ -0,0 +1,258 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServicesIdUpdatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServicesIdUpdatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServicesIdUpdatePostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServicesIdUpdatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('TaskTemplate', $data) && $data['TaskTemplate'] !== null) { + $object->setTaskTemplate($this->denormalizer->denormalize($data['TaskTemplate'], \Docker\API\Model\TaskSpec::class, 'json', $context)); + } + elseif (\array_key_exists('TaskTemplate', $data) && $data['TaskTemplate'] === null) { + $object->setTaskTemplate(null); + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($this->denormalizer->denormalize($data['Mode'], \Docker\API\Model\ServiceSpecMode::class, 'json', $context)); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + if (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] !== null) { + $object->setUpdateConfig($this->denormalizer->denormalize($data['UpdateConfig'], \Docker\API\Model\ServiceSpecUpdateConfig::class, 'json', $context)); + } + elseif (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] === null) { + $object->setUpdateConfig(null); + } + if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { + $values_1 = []; + foreach ($data['Networks'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ServiceSpecNetworksItem::class, 'json', $context); + } + $object->setNetworks($values_1); + } + elseif (\array_key_exists('Networks', $data) && $data['Networks'] === null) { + $object->setNetworks(null); + } + if (\array_key_exists('EndpointSpec', $data) && $data['EndpointSpec'] !== null) { + $object->setEndpointSpec($this->denormalizer->denormalize($data['EndpointSpec'], \Docker\API\Model\EndpointSpec::class, 'json', $context)); + } + elseif (\array_key_exists('EndpointSpec', $data) && $data['EndpointSpec'] === null) { + $object->setEndpointSpec(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('taskTemplate') && null !== $object->getTaskTemplate()) { + $data['TaskTemplate'] = $this->normalizer->normalize($object->getTaskTemplate(), 'json', $context); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $this->normalizer->normalize($object->getMode(), 'json', $context); + } + if ($object->isInitialized('updateConfig') && null !== $object->getUpdateConfig()) { + $data['UpdateConfig'] = $this->normalizer->normalize($object->getUpdateConfig(), 'json', $context); + } + if ($object->isInitialized('networks') && null !== $object->getNetworks()) { + $values_1 = []; + foreach ($object->getNetworks() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Networks'] = $values_1; + } + if ($object->isInitialized('endpointSpec') && null !== $object->getEndpointSpec()) { + $data['EndpointSpec'] = $this->normalizer->normalize($object->getEndpointSpec(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServicesIdUpdatePostBody::class => false]; + } + } +} else { + class ServicesIdUpdatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServicesIdUpdatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServicesIdUpdatePostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServicesIdUpdatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('TaskTemplate', $data) && $data['TaskTemplate'] !== null) { + $object->setTaskTemplate($this->denormalizer->denormalize($data['TaskTemplate'], \Docker\API\Model\TaskSpec::class, 'json', $context)); + } + elseif (\array_key_exists('TaskTemplate', $data) && $data['TaskTemplate'] === null) { + $object->setTaskTemplate(null); + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($this->denormalizer->denormalize($data['Mode'], \Docker\API\Model\ServiceSpecMode::class, 'json', $context)); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + if (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] !== null) { + $object->setUpdateConfig($this->denormalizer->denormalize($data['UpdateConfig'], \Docker\API\Model\ServiceSpecUpdateConfig::class, 'json', $context)); + } + elseif (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] === null) { + $object->setUpdateConfig(null); + } + if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { + $values_1 = []; + foreach ($data['Networks'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ServiceSpecNetworksItem::class, 'json', $context); + } + $object->setNetworks($values_1); + } + elseif (\array_key_exists('Networks', $data) && $data['Networks'] === null) { + $object->setNetworks(null); + } + if (\array_key_exists('EndpointSpec', $data) && $data['EndpointSpec'] !== null) { + $object->setEndpointSpec($this->denormalizer->denormalize($data['EndpointSpec'], \Docker\API\Model\EndpointSpec::class, 'json', $context)); + } + elseif (\array_key_exists('EndpointSpec', $data) && $data['EndpointSpec'] === null) { + $object->setEndpointSpec(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('taskTemplate') && null !== $object->getTaskTemplate()) { + $data['TaskTemplate'] = $this->normalizer->normalize($object->getTaskTemplate(), 'json', $context); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $this->normalizer->normalize($object->getMode(), 'json', $context); + } + if ($object->isInitialized('updateConfig') && null !== $object->getUpdateConfig()) { + $data['UpdateConfig'] = $this->normalizer->normalize($object->getUpdateConfig(), 'json', $context); + } + if ($object->isInitialized('networks') && null !== $object->getNetworks()) { + $values_1 = []; + foreach ($object->getNetworks() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Networks'] = $values_1; + } + if ($object->isInitialized('endpointSpec') && null !== $object->getEndpointSpec()) { + $data['EndpointSpec'] = $this->normalizer->normalize($object->getEndpointSpec(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServicesIdUpdatePostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmConfigNormalizer.php b/generated/Normalizer/SwarmConfigNormalizer.php deleted file mode 100644 index 2e39c88b3..000000000 --- a/generated/Normalizer/SwarmConfigNormalizer.php +++ /dev/null @@ -1,75 +0,0 @@ -setListenAddr($data->{'ListenAddr'}); - } - if (property_exists($data, 'AdvertiseAddr')) { - $object->setAdvertiseAddr($data->{'AdvertiseAddr'}); - } - if (property_exists($data, 'ForceNewCluster')) { - $object->setForceNewCluster($data->{'ForceNewCluster'}); - } - if (property_exists($data, 'Spec')) { - $object->setSpec($this->serializer->denormalize($data->{'Spec'}, 'Docker\\API\\Model\\SwarmConfigSpec', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getListenAddr()) { - $data->{'ListenAddr'} = $object->getListenAddr(); - } - if (null !== $object->getAdvertiseAddr()) { - $data->{'AdvertiseAddr'} = $object->getAdvertiseAddr(); - } - if (null !== $object->getForceNewCluster()) { - $data->{'ForceNewCluster'} = $object->getForceNewCluster(); - } - if (null !== $object->getSpec()) { - $data->{'Spec'} = json_decode($this->serializer->normalize($object->getSpec(), 'raw', $context)); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/SwarmConfigSpecCAConfigExternalCANormalizer.php b/generated/Normalizer/SwarmConfigSpecCAConfigExternalCANormalizer.php deleted file mode 100644 index c9812870e..000000000 --- a/generated/Normalizer/SwarmConfigSpecCAConfigExternalCANormalizer.php +++ /dev/null @@ -1,89 +0,0 @@ -setProtocol($data->{'Protocol'}); - } - if (property_exists($data, 'URL')) { - $object->setURL($data->{'URL'}); - } - if (property_exists($data, 'Options')) { - $value = $data->{'Options'}; - if (is_object($data->{'Options'})) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Options'} as $key => $value_1) { - $values[$key] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Options'})) { - $value = $data->{'Options'}; - } - $object->setOptions($value); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getProtocol()) { - $data->{'Protocol'} = $object->getProtocol(); - } - if (null !== $object->getURL()) { - $data->{'URL'} = $object->getURL(); - } - $value = $object->getOptions(); - if (is_object($object->getOptions())) { - $values = new \stdClass(); - foreach ($object->getOptions() as $key => $value_1) { - $values->{$key} = $value_1; - } - $value = $values; - } - if (is_null($object->getOptions())) { - $value = $object->getOptions(); - } - $data->{'Options'} = $value; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/SwarmConfigSpecCAConfigNormalizer.php b/generated/Normalizer/SwarmConfigSpecCAConfigNormalizer.php deleted file mode 100644 index 3fd949476..000000000 --- a/generated/Normalizer/SwarmConfigSpecCAConfigNormalizer.php +++ /dev/null @@ -1,63 +0,0 @@ -setNodeCertExpiry($data->{'NodeCertExpiry'}); - } - if (property_exists($data, 'ExternalCA')) { - $object->setExternalCA($this->serializer->denormalize($data->{'ExternalCA'}, 'Docker\\API\\Model\\SwarmConfigSpecCAConfigExternalCA', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getNodeCertExpiry()) { - $data->{'NodeCertExpiry'} = $object->getNodeCertExpiry(); - } - if (null !== $object->getExternalCA()) { - $data->{'ExternalCA'} = json_decode($this->serializer->normalize($object->getExternalCA(), 'raw', $context)); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/SwarmConfigSpecDispatcherNormalizer.php b/generated/Normalizer/SwarmConfigSpecDispatcherNormalizer.php deleted file mode 100644 index 523c5c309..000000000 --- a/generated/Normalizer/SwarmConfigSpecDispatcherNormalizer.php +++ /dev/null @@ -1,56 +0,0 @@ -setHeartbeatPeriod($data->{'HeartbeatPeriod'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getHeartbeatPeriod()) { - $data->{'HeartbeatPeriod'} = $object->getHeartbeatPeriod(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/SwarmConfigSpecNormalizer.php b/generated/Normalizer/SwarmConfigSpecNormalizer.php deleted file mode 100644 index 119444c41..000000000 --- a/generated/Normalizer/SwarmConfigSpecNormalizer.php +++ /dev/null @@ -1,75 +0,0 @@ -setOrchestration($this->serializer->denormalize($data->{'Orchestration'}, 'Docker\\API\\Model\\SwarmConfigSpecOrchestration', 'raw', $context)); - } - if (property_exists($data, 'Raft')) { - $object->setRaft($this->serializer->denormalize($data->{'Raft'}, 'Docker\\API\\Model\\SwarmConfigSpecRaft', 'raw', $context)); - } - if (property_exists($data, 'Dispatcher')) { - $object->setDispatcher($this->serializer->denormalize($data->{'Dispatcher'}, 'Docker\\API\\Model\\SwarmConfigSpecDispatcher', 'raw', $context)); - } - if (property_exists($data, 'CAConfig')) { - $object->setCAConfig($this->serializer->denormalize($data->{'CAConfig'}, 'Docker\\API\\Model\\SwarmConfigSpecCAConfig', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getOrchestration()) { - $data->{'Orchestration'} = json_decode($this->serializer->normalize($object->getOrchestration(), 'raw', $context)); - } - if (null !== $object->getRaft()) { - $data->{'Raft'} = json_decode($this->serializer->normalize($object->getRaft(), 'raw', $context)); - } - if (null !== $object->getDispatcher()) { - $data->{'Dispatcher'} = json_decode($this->serializer->normalize($object->getDispatcher(), 'raw', $context)); - } - if (null !== $object->getCAConfig()) { - $data->{'CAConfig'} = json_decode($this->serializer->normalize($object->getCAConfig(), 'raw', $context)); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/SwarmConfigSpecOrchestrationNormalizer.php b/generated/Normalizer/SwarmConfigSpecOrchestrationNormalizer.php deleted file mode 100644 index 9190f2110..000000000 --- a/generated/Normalizer/SwarmConfigSpecOrchestrationNormalizer.php +++ /dev/null @@ -1,57 +0,0 @@ -setTaskHistoryRetentionLimit($data->{'TaskHistoryRetentionLimit'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getTaskHistoryRetentionLimit()) { - $data->{'TaskHistoryRetentionLimit'} = $object->getTaskHistoryRetentionLimit(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/SwarmConfigSpecRaftNormalizer.php b/generated/Normalizer/SwarmConfigSpecRaftNormalizer.php deleted file mode 100644 index 6fd8bf18f..000000000 --- a/generated/Normalizer/SwarmConfigSpecRaftNormalizer.php +++ /dev/null @@ -1,81 +0,0 @@ -setSnapshotInterval($data->{'SnapshotInterval'}); - } - if (property_exists($data, 'KeepOldSnapshots')) { - $object->setKeepOldSnapshots($data->{'KeepOldSnapshots'}); - } - if (property_exists($data, 'LogEntriesForSlowFollowers')) { - $object->setLogEntriesForSlowFollowers($data->{'LogEntriesForSlowFollowers'}); - } - if (property_exists($data, 'HeartbeatTick')) { - $object->setHeartbeatTick($data->{'HeartbeatTick'}); - } - if (property_exists($data, 'ElectionTick')) { - $object->setElectionTick($data->{'ElectionTick'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getSnapshotInterval()) { - $data->{'SnapshotInterval'} = $object->getSnapshotInterval(); - } - if (null !== $object->getKeepOldSnapshots()) { - $data->{'KeepOldSnapshots'} = $object->getKeepOldSnapshots(); - } - if (null !== $object->getLogEntriesForSlowFollowers()) { - $data->{'LogEntriesForSlowFollowers'} = $object->getLogEntriesForSlowFollowers(); - } - if (null !== $object->getHeartbeatTick()) { - $data->{'HeartbeatTick'} = $object->getHeartbeatTick(); - } - if (null !== $object->getElectionTick()) { - $data->{'ElectionTick'} = $object->getElectionTick(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/SwarmGetResponse200JoinTokensNormalizer.php b/generated/Normalizer/SwarmGetResponse200JoinTokensNormalizer.php new file mode 100644 index 000000000..d57fdc988 --- /dev/null +++ b/generated/Normalizer/SwarmGetResponse200JoinTokensNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmGetResponse200JoinTokensNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmGetResponse200JoinTokens::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmGetResponse200JoinTokens::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmGetResponse200JoinTokens(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Worker', $data) && $data['Worker'] !== null) { + $object->setWorker($data['Worker']); + } + elseif (\array_key_exists('Worker', $data) && $data['Worker'] === null) { + $object->setWorker(null); + } + if (\array_key_exists('Manager', $data) && $data['Manager'] !== null) { + $object->setManager($data['Manager']); + } + elseif (\array_key_exists('Manager', $data) && $data['Manager'] === null) { + $object->setManager(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('worker') && null !== $object->getWorker()) { + $data['Worker'] = $object->getWorker(); + } + if ($object->isInitialized('manager') && null !== $object->getManager()) { + $data['Manager'] = $object->getManager(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmGetResponse200JoinTokens::class => false]; + } + } +} else { + class SwarmGetResponse200JoinTokensNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmGetResponse200JoinTokens::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmGetResponse200JoinTokens::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmGetResponse200JoinTokens(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Worker', $data) && $data['Worker'] !== null) { + $object->setWorker($data['Worker']); + } + elseif (\array_key_exists('Worker', $data) && $data['Worker'] === null) { + $object->setWorker(null); + } + if (\array_key_exists('Manager', $data) && $data['Manager'] !== null) { + $object->setManager($data['Manager']); + } + elseif (\array_key_exists('Manager', $data) && $data['Manager'] === null) { + $object->setManager(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('worker') && null !== $object->getWorker()) { + $data['Worker'] = $object->getWorker(); + } + if ($object->isInitialized('manager') && null !== $object->getManager()) { + $data['Manager'] = $object->getManager(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmGetResponse200JoinTokens::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmGetResponse200Normalizer.php b/generated/Normalizer/SwarmGetResponse200Normalizer.php new file mode 100644 index 000000000..c9856d57c --- /dev/null +++ b/generated/Normalizer/SwarmGetResponse200Normalizer.php @@ -0,0 +1,208 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmGetResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ClusterInfoVersion::class, 'json', $context)); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); + } + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\SwarmSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + if (\array_key_exists('JoinTokens', $data) && $data['JoinTokens'] !== null) { + $object->setJoinTokens($this->denormalizer->denormalize($data['JoinTokens'], \Docker\API\Model\SwarmGetResponse200JoinTokens::class, 'json', $context)); + } + elseif (\array_key_exists('JoinTokens', $data) && $data['JoinTokens'] === null) { + $object->setJoinTokens(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + if ($object->isInitialized('joinTokens') && null !== $object->getJoinTokens()) { + $data['JoinTokens'] = $this->normalizer->normalize($object->getJoinTokens(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmGetResponse200::class => false]; + } + } +} else { + class SwarmGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmGetResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ClusterInfoVersion::class, 'json', $context)); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); + } + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\SwarmSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + if (\array_key_exists('JoinTokens', $data) && $data['JoinTokens'] !== null) { + $object->setJoinTokens($this->denormalizer->denormalize($data['JoinTokens'], \Docker\API\Model\SwarmGetResponse200JoinTokens::class, 'json', $context)); + } + elseif (\array_key_exists('JoinTokens', $data) && $data['JoinTokens'] === null) { + $object->setJoinTokens(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + if ($object->isInitialized('joinTokens') && null !== $object->getJoinTokens()) { + $data['JoinTokens'] = $this->normalizer->normalize($object->getJoinTokens(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmGetResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmIPAMOptionsNormalizer.php b/generated/Normalizer/SwarmIPAMOptionsNormalizer.php deleted file mode 100644 index 87f7d7483..000000000 --- a/generated/Normalizer/SwarmIPAMOptionsNormalizer.php +++ /dev/null @@ -1,83 +0,0 @@ -setDriver($this->serializer->denormalize($data->{'Driver'}, 'Docker\\API\\Model\\Driver', 'raw', $context)); - } - if (property_exists($data, 'Configs')) { - $value = $data->{'Configs'}; - if (is_array($data->{'Configs'})) { - $values = []; - foreach ($data->{'Configs'} as $value_1) { - $values[] = $this->serializer->denormalize($value_1, 'Docker\\API\\Model\\IPAMConfig', 'raw', $context); - } - $value = $values; - } - if (is_null($data->{'Configs'})) { - $value = $data->{'Configs'}; - } - $object->setConfigs($value); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getDriver()) { - $data->{'Driver'} = json_decode($this->serializer->normalize($object->getDriver(), 'raw', $context)); - } - $value = $object->getConfigs(); - if (is_array($object->getConfigs())) { - $values = []; - foreach ($object->getConfigs() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getConfigs())) { - $value = $object->getConfigs(); - } - $data->{'Configs'} = $value; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/SwarmInitPostBodyNormalizer.php b/generated/Normalizer/SwarmInitPostBodyNormalizer.php new file mode 100644 index 000000000..c02346596 --- /dev/null +++ b/generated/Normalizer/SwarmInitPostBodyNormalizer.php @@ -0,0 +1,172 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmInitPostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmInitPostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmInitPostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmInitPostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ListenAddr', $data) && $data['ListenAddr'] !== null) { + $object->setListenAddr($data['ListenAddr']); + } + elseif (\array_key_exists('ListenAddr', $data) && $data['ListenAddr'] === null) { + $object->setListenAddr(null); + } + if (\array_key_exists('AdvertiseAddr', $data) && $data['AdvertiseAddr'] !== null) { + $object->setAdvertiseAddr($data['AdvertiseAddr']); + } + elseif (\array_key_exists('AdvertiseAddr', $data) && $data['AdvertiseAddr'] === null) { + $object->setAdvertiseAddr(null); + } + if (\array_key_exists('ForceNewCluster', $data) && $data['ForceNewCluster'] !== null) { + $object->setForceNewCluster($data['ForceNewCluster']); + } + elseif (\array_key_exists('ForceNewCluster', $data) && $data['ForceNewCluster'] === null) { + $object->setForceNewCluster(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\SwarmSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('listenAddr') && null !== $object->getListenAddr()) { + $data['ListenAddr'] = $object->getListenAddr(); + } + if ($object->isInitialized('advertiseAddr') && null !== $object->getAdvertiseAddr()) { + $data['AdvertiseAddr'] = $object->getAdvertiseAddr(); + } + if ($object->isInitialized('forceNewCluster') && null !== $object->getForceNewCluster()) { + $data['ForceNewCluster'] = $object->getForceNewCluster(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmInitPostBody::class => false]; + } + } +} else { + class SwarmInitPostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmInitPostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmInitPostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmInitPostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ListenAddr', $data) && $data['ListenAddr'] !== null) { + $object->setListenAddr($data['ListenAddr']); + } + elseif (\array_key_exists('ListenAddr', $data) && $data['ListenAddr'] === null) { + $object->setListenAddr(null); + } + if (\array_key_exists('AdvertiseAddr', $data) && $data['AdvertiseAddr'] !== null) { + $object->setAdvertiseAddr($data['AdvertiseAddr']); + } + elseif (\array_key_exists('AdvertiseAddr', $data) && $data['AdvertiseAddr'] === null) { + $object->setAdvertiseAddr(null); + } + if (\array_key_exists('ForceNewCluster', $data) && $data['ForceNewCluster'] !== null) { + $object->setForceNewCluster($data['ForceNewCluster']); + } + elseif (\array_key_exists('ForceNewCluster', $data) && $data['ForceNewCluster'] === null) { + $object->setForceNewCluster(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\SwarmSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('listenAddr') && null !== $object->getListenAddr()) { + $data['ListenAddr'] = $object->getListenAddr(); + } + if ($object->isInitialized('advertiseAddr') && null !== $object->getAdvertiseAddr()) { + $data['AdvertiseAddr'] = $object->getAdvertiseAddr(); + } + if ($object->isInitialized('forceNewCluster') && null !== $object->getForceNewCluster()) { + $data['ForceNewCluster'] = $object->getForceNewCluster(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmInitPostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmJoinConfigNormalizer.php b/generated/Normalizer/SwarmJoinConfigNormalizer.php deleted file mode 100644 index 7580659ed..000000000 --- a/generated/Normalizer/SwarmJoinConfigNormalizer.php +++ /dev/null @@ -1,95 +0,0 @@ -setListenAddr($data->{'ListenAddr'}); - } - if (property_exists($data, 'AdvertiseAddr')) { - $object->setAdvertiseAddr($data->{'AdvertiseAddr'}); - } - if (property_exists($data, 'RemoteAddrs')) { - $value = $data->{'RemoteAddrs'}; - if (is_array($data->{'RemoteAddrs'})) { - $values = []; - foreach ($data->{'RemoteAddrs'} as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($data->{'RemoteAddrs'})) { - $value = $data->{'RemoteAddrs'}; - } - $object->setRemoteAddrs($value); - } - if (property_exists($data, 'JoinToken')) { - $object->setJoinToken($data->{'JoinToken'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getListenAddr()) { - $data->{'ListenAddr'} = $object->getListenAddr(); - } - if (null !== $object->getAdvertiseAddr()) { - $data->{'AdvertiseAddr'} = $object->getAdvertiseAddr(); - } - $value = $object->getRemoteAddrs(); - if (is_array($object->getRemoteAddrs())) { - $values = []; - foreach ($object->getRemoteAddrs() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getRemoteAddrs())) { - $value = $object->getRemoteAddrs(); - } - $data->{'RemoteAddrs'} = $value; - if (null !== $object->getJoinToken()) { - $data->{'JoinToken'} = $object->getJoinToken(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/SwarmJoinPostBodyNormalizer.php b/generated/Normalizer/SwarmJoinPostBodyNormalizer.php new file mode 100644 index 000000000..50cb57f23 --- /dev/null +++ b/generated/Normalizer/SwarmJoinPostBodyNormalizer.php @@ -0,0 +1,172 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmJoinPostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmJoinPostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmJoinPostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmJoinPostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ListenAddr', $data) && $data['ListenAddr'] !== null) { + $object->setListenAddr($data['ListenAddr']); + } + elseif (\array_key_exists('ListenAddr', $data) && $data['ListenAddr'] === null) { + $object->setListenAddr(null); + } + if (\array_key_exists('AdvertiseAddr', $data) && $data['AdvertiseAddr'] !== null) { + $object->setAdvertiseAddr($data['AdvertiseAddr']); + } + elseif (\array_key_exists('AdvertiseAddr', $data) && $data['AdvertiseAddr'] === null) { + $object->setAdvertiseAddr(null); + } + if (\array_key_exists('RemoteAddrs', $data) && $data['RemoteAddrs'] !== null) { + $object->setRemoteAddrs($data['RemoteAddrs']); + } + elseif (\array_key_exists('RemoteAddrs', $data) && $data['RemoteAddrs'] === null) { + $object->setRemoteAddrs(null); + } + if (\array_key_exists('JoinToken', $data) && $data['JoinToken'] !== null) { + $object->setJoinToken($data['JoinToken']); + } + elseif (\array_key_exists('JoinToken', $data) && $data['JoinToken'] === null) { + $object->setJoinToken(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('listenAddr') && null !== $object->getListenAddr()) { + $data['ListenAddr'] = $object->getListenAddr(); + } + if ($object->isInitialized('advertiseAddr') && null !== $object->getAdvertiseAddr()) { + $data['AdvertiseAddr'] = $object->getAdvertiseAddr(); + } + if ($object->isInitialized('remoteAddrs') && null !== $object->getRemoteAddrs()) { + $data['RemoteAddrs'] = $object->getRemoteAddrs(); + } + if ($object->isInitialized('joinToken') && null !== $object->getJoinToken()) { + $data['JoinToken'] = $object->getJoinToken(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmJoinPostBody::class => false]; + } + } +} else { + class SwarmJoinPostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmJoinPostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmJoinPostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmJoinPostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ListenAddr', $data) && $data['ListenAddr'] !== null) { + $object->setListenAddr($data['ListenAddr']); + } + elseif (\array_key_exists('ListenAddr', $data) && $data['ListenAddr'] === null) { + $object->setListenAddr(null); + } + if (\array_key_exists('AdvertiseAddr', $data) && $data['AdvertiseAddr'] !== null) { + $object->setAdvertiseAddr($data['AdvertiseAddr']); + } + elseif (\array_key_exists('AdvertiseAddr', $data) && $data['AdvertiseAddr'] === null) { + $object->setAdvertiseAddr(null); + } + if (\array_key_exists('RemoteAddrs', $data) && $data['RemoteAddrs'] !== null) { + $object->setRemoteAddrs($data['RemoteAddrs']); + } + elseif (\array_key_exists('RemoteAddrs', $data) && $data['RemoteAddrs'] === null) { + $object->setRemoteAddrs(null); + } + if (\array_key_exists('JoinToken', $data) && $data['JoinToken'] !== null) { + $object->setJoinToken($data['JoinToken']); + } + elseif (\array_key_exists('JoinToken', $data) && $data['JoinToken'] === null) { + $object->setJoinToken(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('listenAddr') && null !== $object->getListenAddr()) { + $data['ListenAddr'] = $object->getListenAddr(); + } + if ($object->isInitialized('advertiseAddr') && null !== $object->getAdvertiseAddr()) { + $data['AdvertiseAddr'] = $object->getAdvertiseAddr(); + } + if ($object->isInitialized('remoteAddrs') && null !== $object->getRemoteAddrs()) { + $data['RemoteAddrs'] = $object->getRemoteAddrs(); + } + if ($object->isInitialized('joinToken') && null !== $object->getJoinToken()) { + $data['JoinToken'] = $object->getJoinToken(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmJoinPostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmJoinTokensNormalizer.php b/generated/Normalizer/SwarmJoinTokensNormalizer.php deleted file mode 100644 index 0fe29d181..000000000 --- a/generated/Normalizer/SwarmJoinTokensNormalizer.php +++ /dev/null @@ -1,63 +0,0 @@ -setWorker($data->{'Worker'}); - } - if (property_exists($data, 'Manager')) { - $object->setManager($data->{'Manager'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getWorker()) { - $data->{'Worker'} = $object->getWorker(); - } - if (null !== $object->getManager()) { - $data->{'Manager'} = $object->getManager(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/SwarmNetworkNormalizer.php b/generated/Normalizer/SwarmNetworkNormalizer.php deleted file mode 100644 index a5f2f57fc..000000000 --- a/generated/Normalizer/SwarmNetworkNormalizer.php +++ /dev/null @@ -1,93 +0,0 @@ -setID($data->{'ID'}); - } - if (property_exists($data, 'Version')) { - $object->setVersion($this->serializer->denormalize($data->{'Version'}, 'Docker\\API\\Model\\NodeVersion', 'raw', $context)); - } - if (property_exists($data, 'CreatedAt')) { - $object->setCreatedAt(\DateTime::createFromFormat("Y-m-d\TH:i:sP", $data->{'CreatedAt'})); - } - if (property_exists($data, 'UpdatedAt')) { - $object->setUpdatedAt(\DateTime::createFromFormat("Y-m-d\TH:i:sP", $data->{'UpdatedAt'})); - } - if (property_exists($data, 'Spec')) { - $object->setSpec($this->serializer->denormalize($data->{'Spec'}, 'Docker\\API\\Model\\SwarmNetworkSpec', 'raw', $context)); - } - if (property_exists($data, 'DriverState')) { - $object->setDriverState($this->serializer->denormalize($data->{'DriverState'}, 'Docker\\API\\Model\\Driver', 'raw', $context)); - } - if (property_exists($data, 'IPAM')) { - $object->setIPAM($this->serializer->denormalize($data->{'IPAM'}, 'Docker\\API\\Model\\SwarmIPAMOptions', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getID()) { - $data->{'ID'} = $object->getID(); - } - if (null !== $object->getVersion()) { - $data->{'Version'} = json_decode($this->serializer->normalize($object->getVersion(), 'raw', $context)); - } - if (null !== $object->getCreatedAt()) { - $data->{'CreatedAt'} = $object->getCreatedAt()->format("Y-m-d\TH:i:sP"); - } - if (null !== $object->getUpdatedAt()) { - $data->{'UpdatedAt'} = $object->getUpdatedAt()->format("Y-m-d\TH:i:sP"); - } - if (null !== $object->getSpec()) { - $data->{'Spec'} = json_decode($this->serializer->normalize($object->getSpec(), 'raw', $context)); - } - if (null !== $object->getDriverState()) { - $data->{'DriverState'} = json_decode($this->serializer->normalize($object->getDriverState(), 'raw', $context)); - } - if (null !== $object->getIPAM()) { - $data->{'IPAM'} = json_decode($this->serializer->normalize($object->getIPAM(), 'raw', $context)); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/SwarmNetworkSpecNormalizer.php b/generated/Normalizer/SwarmNetworkSpecNormalizer.php deleted file mode 100644 index 0c18cf946..000000000 --- a/generated/Normalizer/SwarmNetworkSpecNormalizer.php +++ /dev/null @@ -1,107 +0,0 @@ -setName($data->{'Name'}); - } - if (property_exists($data, 'Labels')) { - $value = $data->{'Labels'}; - if (is_object($data->{'Labels'})) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Labels'} as $key => $value_1) { - $values[$key] = $value_1; - } - $value = $values; - } - if (is_null($data->{'Labels'})) { - $value = $data->{'Labels'}; - } - $object->setLabels($value); - } - if (property_exists($data, 'DriverConfiguration')) { - $object->setDriverConfiguration($this->serializer->denormalize($data->{'DriverConfiguration'}, 'Docker\\API\\Model\\Driver', 'raw', $context)); - } - if (property_exists($data, 'IPv6Enabled')) { - $object->setIPv6Enabled($data->{'IPv6Enabled'}); - } - if (property_exists($data, 'Internal')) { - $object->setInternal($data->{'Internal'}); - } - if (property_exists($data, 'IPAM')) { - $object->setIPAM($this->serializer->denormalize($data->{'IPAM'}, 'Docker\\API\\Model\\SwarmIPAMOptions', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - $value = $object->getLabels(); - if (is_object($object->getLabels())) { - $values = new \stdClass(); - foreach ($object->getLabels() as $key => $value_1) { - $values->{$key} = $value_1; - } - $value = $values; - } - if (is_null($object->getLabels())) { - $value = $object->getLabels(); - } - $data->{'Labels'} = $value; - if (null !== $object->getDriverConfiguration()) { - $data->{'DriverConfiguration'} = json_decode($this->serializer->normalize($object->getDriverConfiguration(), 'raw', $context)); - } - if (null !== $object->getIPv6Enabled()) { - $data->{'IPv6Enabled'} = $object->getIPv6Enabled(); - } - if (null !== $object->getInternal()) { - $data->{'Internal'} = $object->getInternal(); - } - if (null !== $object->getIPAM()) { - $data->{'IPAM'} = json_decode($this->serializer->normalize($object->getIPAM(), 'raw', $context)); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/SwarmSpecCAConfigExternalCAsItemNormalizer.php b/generated/Normalizer/SwarmSpecCAConfigExternalCAsItemNormalizer.php new file mode 100644 index 000000000..27e8c6f8d --- /dev/null +++ b/generated/Normalizer/SwarmSpecCAConfigExternalCAsItemNormalizer.php @@ -0,0 +1,170 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmSpecCAConfigExternalCAsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecCAConfigExternalCAsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecCAConfigExternalCAsItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecCAConfigExternalCAsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Protocol', $data) && $data['Protocol'] !== null) { + $object->setProtocol($data['Protocol']); + } + elseif (\array_key_exists('Protocol', $data) && $data['Protocol'] === null) { + $object->setProtocol(null); + } + if (\array_key_exists('URL', $data) && $data['URL'] !== null) { + $object->setURL($data['URL']); + } + elseif (\array_key_exists('URL', $data) && $data['URL'] === null) { + $object->setURL(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value) { + $values[$key] = $value; + } + $object->setOptions($values); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('protocol') && null !== $object->getProtocol()) { + $data['Protocol'] = $object->getProtocol(); + } + if ($object->isInitialized('uRL') && null !== $object->getURL()) { + $data['URL'] = $object->getURL(); + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values = []; + foreach ($object->getOptions() as $key => $value) { + $values[$key] = $value; + } + $data['Options'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecCAConfigExternalCAsItem::class => false]; + } + } +} else { + class SwarmSpecCAConfigExternalCAsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecCAConfigExternalCAsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecCAConfigExternalCAsItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecCAConfigExternalCAsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Protocol', $data) && $data['Protocol'] !== null) { + $object->setProtocol($data['Protocol']); + } + elseif (\array_key_exists('Protocol', $data) && $data['Protocol'] === null) { + $object->setProtocol(null); + } + if (\array_key_exists('URL', $data) && $data['URL'] !== null) { + $object->setURL($data['URL']); + } + elseif (\array_key_exists('URL', $data) && $data['URL'] === null) { + $object->setURL(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value) { + $values[$key] = $value; + } + $object->setOptions($values); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('protocol') && null !== $object->getProtocol()) { + $data['Protocol'] = $object->getProtocol(); + } + if ($object->isInitialized('uRL') && null !== $object->getURL()) { + $data['URL'] = $object->getURL(); + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values = []; + foreach ($object->getOptions() as $key => $value) { + $values[$key] = $value; + } + $data['Options'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecCAConfigExternalCAsItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmSpecCAConfigNormalizer.php b/generated/Normalizer/SwarmSpecCAConfigNormalizer.php new file mode 100644 index 000000000..90bc60103 --- /dev/null +++ b/generated/Normalizer/SwarmSpecCAConfigNormalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmSpecCAConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecCAConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecCAConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecCAConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NodeCertExpiry', $data) && $data['NodeCertExpiry'] !== null) { + $object->setNodeCertExpiry($data['NodeCertExpiry']); + } + elseif (\array_key_exists('NodeCertExpiry', $data) && $data['NodeCertExpiry'] === null) { + $object->setNodeCertExpiry(null); + } + if (\array_key_exists('ExternalCAs', $data) && $data['ExternalCAs'] !== null) { + $values = []; + foreach ($data['ExternalCAs'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\SwarmSpecCAConfigExternalCAsItem::class, 'json', $context); + } + $object->setExternalCAs($values); + } + elseif (\array_key_exists('ExternalCAs', $data) && $data['ExternalCAs'] === null) { + $object->setExternalCAs(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('nodeCertExpiry') && null !== $object->getNodeCertExpiry()) { + $data['NodeCertExpiry'] = $object->getNodeCertExpiry(); + } + if ($object->isInitialized('externalCAs') && null !== $object->getExternalCAs()) { + $values = []; + foreach ($object->getExternalCAs() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['ExternalCAs'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecCAConfig::class => false]; + } + } +} else { + class SwarmSpecCAConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecCAConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecCAConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecCAConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NodeCertExpiry', $data) && $data['NodeCertExpiry'] !== null) { + $object->setNodeCertExpiry($data['NodeCertExpiry']); + } + elseif (\array_key_exists('NodeCertExpiry', $data) && $data['NodeCertExpiry'] === null) { + $object->setNodeCertExpiry(null); + } + if (\array_key_exists('ExternalCAs', $data) && $data['ExternalCAs'] !== null) { + $values = []; + foreach ($data['ExternalCAs'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\SwarmSpecCAConfigExternalCAsItem::class, 'json', $context); + } + $object->setExternalCAs($values); + } + elseif (\array_key_exists('ExternalCAs', $data) && $data['ExternalCAs'] === null) { + $object->setExternalCAs(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('nodeCertExpiry') && null !== $object->getNodeCertExpiry()) { + $data['NodeCertExpiry'] = $object->getNodeCertExpiry(); + } + if ($object->isInitialized('externalCAs') && null !== $object->getExternalCAs()) { + $values = []; + foreach ($object->getExternalCAs() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['ExternalCAs'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecCAConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmSpecDispatcherNormalizer.php b/generated/Normalizer/SwarmSpecDispatcherNormalizer.php new file mode 100644 index 000000000..868e7b8e1 --- /dev/null +++ b/generated/Normalizer/SwarmSpecDispatcherNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmSpecDispatcherNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecDispatcher::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecDispatcher::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecDispatcher(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('HeartbeatPeriod', $data) && $data['HeartbeatPeriod'] !== null) { + $object->setHeartbeatPeriod($data['HeartbeatPeriod']); + } + elseif (\array_key_exists('HeartbeatPeriod', $data) && $data['HeartbeatPeriod'] === null) { + $object->setHeartbeatPeriod(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('heartbeatPeriod') && null !== $object->getHeartbeatPeriod()) { + $data['HeartbeatPeriod'] = $object->getHeartbeatPeriod(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecDispatcher::class => false]; + } + } +} else { + class SwarmSpecDispatcherNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecDispatcher::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecDispatcher::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecDispatcher(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('HeartbeatPeriod', $data) && $data['HeartbeatPeriod'] !== null) { + $object->setHeartbeatPeriod($data['HeartbeatPeriod']); + } + elseif (\array_key_exists('HeartbeatPeriod', $data) && $data['HeartbeatPeriod'] === null) { + $object->setHeartbeatPeriod(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('heartbeatPeriod') && null !== $object->getHeartbeatPeriod()) { + $data['HeartbeatPeriod'] = $object->getHeartbeatPeriod(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecDispatcher::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmSpecEncryptionConfigNormalizer.php b/generated/Normalizer/SwarmSpecEncryptionConfigNormalizer.php new file mode 100644 index 000000000..34ed5c984 --- /dev/null +++ b/generated/Normalizer/SwarmSpecEncryptionConfigNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmSpecEncryptionConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecEncryptionConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecEncryptionConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecEncryptionConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('AutoLockManagers', $data) && $data['AutoLockManagers'] !== null) { + $object->setAutoLockManagers($data['AutoLockManagers']); + } + elseif (\array_key_exists('AutoLockManagers', $data) && $data['AutoLockManagers'] === null) { + $object->setAutoLockManagers(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('autoLockManagers') && null !== $object->getAutoLockManagers()) { + $data['AutoLockManagers'] = $object->getAutoLockManagers(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecEncryptionConfig::class => false]; + } + } +} else { + class SwarmSpecEncryptionConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecEncryptionConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecEncryptionConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecEncryptionConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('AutoLockManagers', $data) && $data['AutoLockManagers'] !== null) { + $object->setAutoLockManagers($data['AutoLockManagers']); + } + elseif (\array_key_exists('AutoLockManagers', $data) && $data['AutoLockManagers'] === null) { + $object->setAutoLockManagers(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('autoLockManagers') && null !== $object->getAutoLockManagers()) { + $data['AutoLockManagers'] = $object->getAutoLockManagers(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecEncryptionConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmSpecNormalizer.php b/generated/Normalizer/SwarmSpecNormalizer.php new file mode 100644 index 000000000..b37a2c98d --- /dev/null +++ b/generated/Normalizer/SwarmSpecNormalizer.php @@ -0,0 +1,260 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpec::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Orchestration', $data) && $data['Orchestration'] !== null) { + $object->setOrchestration($this->denormalizer->denormalize($data['Orchestration'], \Docker\API\Model\SwarmSpecOrchestration::class, 'json', $context)); + } + elseif (\array_key_exists('Orchestration', $data) && $data['Orchestration'] === null) { + $object->setOrchestration(null); + } + if (\array_key_exists('Raft', $data) && $data['Raft'] !== null) { + $object->setRaft($this->denormalizer->denormalize($data['Raft'], \Docker\API\Model\SwarmSpecRaft::class, 'json', $context)); + } + elseif (\array_key_exists('Raft', $data) && $data['Raft'] === null) { + $object->setRaft(null); + } + if (\array_key_exists('Dispatcher', $data) && $data['Dispatcher'] !== null) { + $object->setDispatcher($this->denormalizer->denormalize($data['Dispatcher'], \Docker\API\Model\SwarmSpecDispatcher::class, 'json', $context)); + } + elseif (\array_key_exists('Dispatcher', $data) && $data['Dispatcher'] === null) { + $object->setDispatcher(null); + } + if (\array_key_exists('CAConfig', $data) && $data['CAConfig'] !== null) { + $object->setCAConfig($this->denormalizer->denormalize($data['CAConfig'], \Docker\API\Model\SwarmSpecCAConfig::class, 'json', $context)); + } + elseif (\array_key_exists('CAConfig', $data) && $data['CAConfig'] === null) { + $object->setCAConfig(null); + } + if (\array_key_exists('EncryptionConfig', $data) && $data['EncryptionConfig'] !== null) { + $object->setEncryptionConfig($this->denormalizer->denormalize($data['EncryptionConfig'], \Docker\API\Model\SwarmSpecEncryptionConfig::class, 'json', $context)); + } + elseif (\array_key_exists('EncryptionConfig', $data) && $data['EncryptionConfig'] === null) { + $object->setEncryptionConfig(null); + } + if (\array_key_exists('TaskDefaults', $data) && $data['TaskDefaults'] !== null) { + $object->setTaskDefaults($this->denormalizer->denormalize($data['TaskDefaults'], \Docker\API\Model\SwarmSpecTaskDefaults::class, 'json', $context)); + } + elseif (\array_key_exists('TaskDefaults', $data) && $data['TaskDefaults'] === null) { + $object->setTaskDefaults(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('orchestration') && null !== $object->getOrchestration()) { + $data['Orchestration'] = $this->normalizer->normalize($object->getOrchestration(), 'json', $context); + } + if ($object->isInitialized('raft') && null !== $object->getRaft()) { + $data['Raft'] = $this->normalizer->normalize($object->getRaft(), 'json', $context); + } + if ($object->isInitialized('dispatcher') && null !== $object->getDispatcher()) { + $data['Dispatcher'] = $this->normalizer->normalize($object->getDispatcher(), 'json', $context); + } + if ($object->isInitialized('cAConfig') && null !== $object->getCAConfig()) { + $data['CAConfig'] = $this->normalizer->normalize($object->getCAConfig(), 'json', $context); + } + if ($object->isInitialized('encryptionConfig') && null !== $object->getEncryptionConfig()) { + $data['EncryptionConfig'] = $this->normalizer->normalize($object->getEncryptionConfig(), 'json', $context); + } + if ($object->isInitialized('taskDefaults') && null !== $object->getTaskDefaults()) { + $data['TaskDefaults'] = $this->normalizer->normalize($object->getTaskDefaults(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpec::class => false]; + } + } +} else { + class SwarmSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpec::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Orchestration', $data) && $data['Orchestration'] !== null) { + $object->setOrchestration($this->denormalizer->denormalize($data['Orchestration'], \Docker\API\Model\SwarmSpecOrchestration::class, 'json', $context)); + } + elseif (\array_key_exists('Orchestration', $data) && $data['Orchestration'] === null) { + $object->setOrchestration(null); + } + if (\array_key_exists('Raft', $data) && $data['Raft'] !== null) { + $object->setRaft($this->denormalizer->denormalize($data['Raft'], \Docker\API\Model\SwarmSpecRaft::class, 'json', $context)); + } + elseif (\array_key_exists('Raft', $data) && $data['Raft'] === null) { + $object->setRaft(null); + } + if (\array_key_exists('Dispatcher', $data) && $data['Dispatcher'] !== null) { + $object->setDispatcher($this->denormalizer->denormalize($data['Dispatcher'], \Docker\API\Model\SwarmSpecDispatcher::class, 'json', $context)); + } + elseif (\array_key_exists('Dispatcher', $data) && $data['Dispatcher'] === null) { + $object->setDispatcher(null); + } + if (\array_key_exists('CAConfig', $data) && $data['CAConfig'] !== null) { + $object->setCAConfig($this->denormalizer->denormalize($data['CAConfig'], \Docker\API\Model\SwarmSpecCAConfig::class, 'json', $context)); + } + elseif (\array_key_exists('CAConfig', $data) && $data['CAConfig'] === null) { + $object->setCAConfig(null); + } + if (\array_key_exists('EncryptionConfig', $data) && $data['EncryptionConfig'] !== null) { + $object->setEncryptionConfig($this->denormalizer->denormalize($data['EncryptionConfig'], \Docker\API\Model\SwarmSpecEncryptionConfig::class, 'json', $context)); + } + elseif (\array_key_exists('EncryptionConfig', $data) && $data['EncryptionConfig'] === null) { + $object->setEncryptionConfig(null); + } + if (\array_key_exists('TaskDefaults', $data) && $data['TaskDefaults'] !== null) { + $object->setTaskDefaults($this->denormalizer->denormalize($data['TaskDefaults'], \Docker\API\Model\SwarmSpecTaskDefaults::class, 'json', $context)); + } + elseif (\array_key_exists('TaskDefaults', $data) && $data['TaskDefaults'] === null) { + $object->setTaskDefaults(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('orchestration') && null !== $object->getOrchestration()) { + $data['Orchestration'] = $this->normalizer->normalize($object->getOrchestration(), 'json', $context); + } + if ($object->isInitialized('raft') && null !== $object->getRaft()) { + $data['Raft'] = $this->normalizer->normalize($object->getRaft(), 'json', $context); + } + if ($object->isInitialized('dispatcher') && null !== $object->getDispatcher()) { + $data['Dispatcher'] = $this->normalizer->normalize($object->getDispatcher(), 'json', $context); + } + if ($object->isInitialized('cAConfig') && null !== $object->getCAConfig()) { + $data['CAConfig'] = $this->normalizer->normalize($object->getCAConfig(), 'json', $context); + } + if ($object->isInitialized('encryptionConfig') && null !== $object->getEncryptionConfig()) { + $data['EncryptionConfig'] = $this->normalizer->normalize($object->getEncryptionConfig(), 'json', $context); + } + if ($object->isInitialized('taskDefaults') && null !== $object->getTaskDefaults()) { + $data['TaskDefaults'] = $this->normalizer->normalize($object->getTaskDefaults(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpec::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmSpecOrchestrationNormalizer.php b/generated/Normalizer/SwarmSpecOrchestrationNormalizer.php new file mode 100644 index 000000000..7182a9f43 --- /dev/null +++ b/generated/Normalizer/SwarmSpecOrchestrationNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmSpecOrchestrationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecOrchestration::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecOrchestration::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecOrchestration(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('TaskHistoryRetentionLimit', $data) && $data['TaskHistoryRetentionLimit'] !== null) { + $object->setTaskHistoryRetentionLimit($data['TaskHistoryRetentionLimit']); + } + elseif (\array_key_exists('TaskHistoryRetentionLimit', $data) && $data['TaskHistoryRetentionLimit'] === null) { + $object->setTaskHistoryRetentionLimit(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('taskHistoryRetentionLimit') && null !== $object->getTaskHistoryRetentionLimit()) { + $data['TaskHistoryRetentionLimit'] = $object->getTaskHistoryRetentionLimit(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecOrchestration::class => false]; + } + } +} else { + class SwarmSpecOrchestrationNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecOrchestration::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecOrchestration::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecOrchestration(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('TaskHistoryRetentionLimit', $data) && $data['TaskHistoryRetentionLimit'] !== null) { + $object->setTaskHistoryRetentionLimit($data['TaskHistoryRetentionLimit']); + } + elseif (\array_key_exists('TaskHistoryRetentionLimit', $data) && $data['TaskHistoryRetentionLimit'] === null) { + $object->setTaskHistoryRetentionLimit(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('taskHistoryRetentionLimit') && null !== $object->getTaskHistoryRetentionLimit()) { + $data['TaskHistoryRetentionLimit'] = $object->getTaskHistoryRetentionLimit(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecOrchestration::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmSpecRaftNormalizer.php b/generated/Normalizer/SwarmSpecRaftNormalizer.php new file mode 100644 index 000000000..697055928 --- /dev/null +++ b/generated/Normalizer/SwarmSpecRaftNormalizer.php @@ -0,0 +1,190 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmSpecRaftNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecRaft::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecRaft::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecRaft(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('SnapshotInterval', $data) && $data['SnapshotInterval'] !== null) { + $object->setSnapshotInterval($data['SnapshotInterval']); + } + elseif (\array_key_exists('SnapshotInterval', $data) && $data['SnapshotInterval'] === null) { + $object->setSnapshotInterval(null); + } + if (\array_key_exists('KeepOldSnapshots', $data) && $data['KeepOldSnapshots'] !== null) { + $object->setKeepOldSnapshots($data['KeepOldSnapshots']); + } + elseif (\array_key_exists('KeepOldSnapshots', $data) && $data['KeepOldSnapshots'] === null) { + $object->setKeepOldSnapshots(null); + } + if (\array_key_exists('LogEntriesForSlowFollowers', $data) && $data['LogEntriesForSlowFollowers'] !== null) { + $object->setLogEntriesForSlowFollowers($data['LogEntriesForSlowFollowers']); + } + elseif (\array_key_exists('LogEntriesForSlowFollowers', $data) && $data['LogEntriesForSlowFollowers'] === null) { + $object->setLogEntriesForSlowFollowers(null); + } + if (\array_key_exists('ElectionTick', $data) && $data['ElectionTick'] !== null) { + $object->setElectionTick($data['ElectionTick']); + } + elseif (\array_key_exists('ElectionTick', $data) && $data['ElectionTick'] === null) { + $object->setElectionTick(null); + } + if (\array_key_exists('HeartbeatTick', $data) && $data['HeartbeatTick'] !== null) { + $object->setHeartbeatTick($data['HeartbeatTick']); + } + elseif (\array_key_exists('HeartbeatTick', $data) && $data['HeartbeatTick'] === null) { + $object->setHeartbeatTick(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('snapshotInterval') && null !== $object->getSnapshotInterval()) { + $data['SnapshotInterval'] = $object->getSnapshotInterval(); + } + if ($object->isInitialized('keepOldSnapshots') && null !== $object->getKeepOldSnapshots()) { + $data['KeepOldSnapshots'] = $object->getKeepOldSnapshots(); + } + if ($object->isInitialized('logEntriesForSlowFollowers') && null !== $object->getLogEntriesForSlowFollowers()) { + $data['LogEntriesForSlowFollowers'] = $object->getLogEntriesForSlowFollowers(); + } + if ($object->isInitialized('electionTick') && null !== $object->getElectionTick()) { + $data['ElectionTick'] = $object->getElectionTick(); + } + if ($object->isInitialized('heartbeatTick') && null !== $object->getHeartbeatTick()) { + $data['HeartbeatTick'] = $object->getHeartbeatTick(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecRaft::class => false]; + } + } +} else { + class SwarmSpecRaftNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecRaft::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecRaft::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecRaft(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('SnapshotInterval', $data) && $data['SnapshotInterval'] !== null) { + $object->setSnapshotInterval($data['SnapshotInterval']); + } + elseif (\array_key_exists('SnapshotInterval', $data) && $data['SnapshotInterval'] === null) { + $object->setSnapshotInterval(null); + } + if (\array_key_exists('KeepOldSnapshots', $data) && $data['KeepOldSnapshots'] !== null) { + $object->setKeepOldSnapshots($data['KeepOldSnapshots']); + } + elseif (\array_key_exists('KeepOldSnapshots', $data) && $data['KeepOldSnapshots'] === null) { + $object->setKeepOldSnapshots(null); + } + if (\array_key_exists('LogEntriesForSlowFollowers', $data) && $data['LogEntriesForSlowFollowers'] !== null) { + $object->setLogEntriesForSlowFollowers($data['LogEntriesForSlowFollowers']); + } + elseif (\array_key_exists('LogEntriesForSlowFollowers', $data) && $data['LogEntriesForSlowFollowers'] === null) { + $object->setLogEntriesForSlowFollowers(null); + } + if (\array_key_exists('ElectionTick', $data) && $data['ElectionTick'] !== null) { + $object->setElectionTick($data['ElectionTick']); + } + elseif (\array_key_exists('ElectionTick', $data) && $data['ElectionTick'] === null) { + $object->setElectionTick(null); + } + if (\array_key_exists('HeartbeatTick', $data) && $data['HeartbeatTick'] !== null) { + $object->setHeartbeatTick($data['HeartbeatTick']); + } + elseif (\array_key_exists('HeartbeatTick', $data) && $data['HeartbeatTick'] === null) { + $object->setHeartbeatTick(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('snapshotInterval') && null !== $object->getSnapshotInterval()) { + $data['SnapshotInterval'] = $object->getSnapshotInterval(); + } + if ($object->isInitialized('keepOldSnapshots') && null !== $object->getKeepOldSnapshots()) { + $data['KeepOldSnapshots'] = $object->getKeepOldSnapshots(); + } + if ($object->isInitialized('logEntriesForSlowFollowers') && null !== $object->getLogEntriesForSlowFollowers()) { + $data['LogEntriesForSlowFollowers'] = $object->getLogEntriesForSlowFollowers(); + } + if ($object->isInitialized('electionTick') && null !== $object->getElectionTick()) { + $data['ElectionTick'] = $object->getElectionTick(); + } + if ($object->isInitialized('heartbeatTick') && null !== $object->getHeartbeatTick()) { + $data['HeartbeatTick'] = $object->getHeartbeatTick(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecRaft::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmSpecTaskDefaultsLogDriverNormalizer.php b/generated/Normalizer/SwarmSpecTaskDefaultsLogDriverNormalizer.php new file mode 100644 index 000000000..eb2968a55 --- /dev/null +++ b/generated/Normalizer/SwarmSpecTaskDefaultsLogDriverNormalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmSpecTaskDefaultsLogDriverNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecTaskDefaultsLogDriver::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecTaskDefaultsLogDriver::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecTaskDefaultsLogDriver(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value) { + $values[$key] = $value; + } + $object->setOptions($values); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values = []; + foreach ($object->getOptions() as $key => $value) { + $values[$key] = $value; + } + $data['Options'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecTaskDefaultsLogDriver::class => false]; + } + } +} else { + class SwarmSpecTaskDefaultsLogDriverNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecTaskDefaultsLogDriver::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecTaskDefaultsLogDriver::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecTaskDefaultsLogDriver(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value) { + $values[$key] = $value; + } + $object->setOptions($values); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values = []; + foreach ($object->getOptions() as $key => $value) { + $values[$key] = $value; + } + $data['Options'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecTaskDefaultsLogDriver::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmSpecTaskDefaultsNormalizer.php b/generated/Normalizer/SwarmSpecTaskDefaultsNormalizer.php new file mode 100644 index 000000000..d73a467c4 --- /dev/null +++ b/generated/Normalizer/SwarmSpecTaskDefaultsNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmSpecTaskDefaultsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecTaskDefaults::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecTaskDefaults::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecTaskDefaults(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('LogDriver', $data) && $data['LogDriver'] !== null) { + $object->setLogDriver($this->denormalizer->denormalize($data['LogDriver'], \Docker\API\Model\SwarmSpecTaskDefaultsLogDriver::class, 'json', $context)); + } + elseif (\array_key_exists('LogDriver', $data) && $data['LogDriver'] === null) { + $object->setLogDriver(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('logDriver') && null !== $object->getLogDriver()) { + $data['LogDriver'] = $this->normalizer->normalize($object->getLogDriver(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecTaskDefaults::class => false]; + } + } +} else { + class SwarmSpecTaskDefaultsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmSpecTaskDefaults::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmSpecTaskDefaults::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmSpecTaskDefaults(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('LogDriver', $data) && $data['LogDriver'] !== null) { + $object->setLogDriver($this->denormalizer->denormalize($data['LogDriver'], \Docker\API\Model\SwarmSpecTaskDefaultsLogDriver::class, 'json', $context)); + } + elseif (\array_key_exists('LogDriver', $data) && $data['LogDriver'] === null) { + $object->setLogDriver(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('logDriver') && null !== $object->getLogDriver()) { + $data['LogDriver'] = $this->normalizer->normalize($object->getLogDriver(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmSpecTaskDefaults::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmUnlockPostBodyNormalizer.php b/generated/Normalizer/SwarmUnlockPostBodyNormalizer.php new file mode 100644 index 000000000..ec8777d86 --- /dev/null +++ b/generated/Normalizer/SwarmUnlockPostBodyNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmUnlockPostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmUnlockPostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmUnlockPostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmUnlockPostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('UnlockKey', $data) && $data['UnlockKey'] !== null) { + $object->setUnlockKey($data['UnlockKey']); + } + elseif (\array_key_exists('UnlockKey', $data) && $data['UnlockKey'] === null) { + $object->setUnlockKey(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('unlockKey') && null !== $object->getUnlockKey()) { + $data['UnlockKey'] = $object->getUnlockKey(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmUnlockPostBody::class => false]; + } + } +} else { + class SwarmUnlockPostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmUnlockPostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmUnlockPostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmUnlockPostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('UnlockKey', $data) && $data['UnlockKey'] !== null) { + $object->setUnlockKey($data['UnlockKey']); + } + elseif (\array_key_exists('UnlockKey', $data) && $data['UnlockKey'] === null) { + $object->setUnlockKey(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('unlockKey') && null !== $object->getUnlockKey()) { + $data['UnlockKey'] = $object->getUnlockKey(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmUnlockPostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmUnlockkeyGetResponse200Normalizer.php b/generated/Normalizer/SwarmUnlockkeyGetResponse200Normalizer.php new file mode 100644 index 000000000..159192b9f --- /dev/null +++ b/generated/Normalizer/SwarmUnlockkeyGetResponse200Normalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmUnlockkeyGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmUnlockkeyGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmUnlockkeyGetResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmUnlockkeyGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('UnlockKey', $data) && $data['UnlockKey'] !== null) { + $object->setUnlockKey($data['UnlockKey']); + } + elseif (\array_key_exists('UnlockKey', $data) && $data['UnlockKey'] === null) { + $object->setUnlockKey(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('unlockKey') && null !== $object->getUnlockKey()) { + $data['UnlockKey'] = $object->getUnlockKey(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmUnlockkeyGetResponse200::class => false]; + } + } +} else { + class SwarmUnlockkeyGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmUnlockkeyGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmUnlockkeyGetResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmUnlockkeyGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('UnlockKey', $data) && $data['UnlockKey'] !== null) { + $object->setUnlockKey($data['UnlockKey']); + } + elseif (\array_key_exists('UnlockKey', $data) && $data['UnlockKey'] === null) { + $object->setUnlockKey(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('unlockKey') && null !== $object->getUnlockKey()) { + $data['UnlockKey'] = $object->getUnlockKey(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmUnlockkeyGetResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmUpdateConfigNormalizer.php b/generated/Normalizer/SwarmUpdateConfigNormalizer.php deleted file mode 100644 index 774f909d1..000000000 --- a/generated/Normalizer/SwarmUpdateConfigNormalizer.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($data->{'Name'}); - } - if (property_exists($data, 'Orchestration')) { - $object->setOrchestration($this->serializer->denormalize($data->{'Orchestration'}, 'Docker\\API\\Model\\SwarmConfigSpecOrchestration', 'raw', $context)); - } - if (property_exists($data, 'Raft')) { - $object->setRaft($this->serializer->denormalize($data->{'Raft'}, 'Docker\\API\\Model\\SwarmConfigSpecRaft', 'raw', $context)); - } - if (property_exists($data, 'Dispatcher')) { - $object->setDispatcher($this->serializer->denormalize($data->{'Dispatcher'}, 'Docker\\API\\Model\\SwarmConfigSpecDispatcher', 'raw', $context)); - } - if (property_exists($data, 'CAConfig')) { - $object->setCAConfig($this->serializer->denormalize($data->{'CAConfig'}, 'Docker\\API\\Model\\SwarmConfigSpecCAConfig', 'raw', $context)); - } - if (property_exists($data, 'JoinTokens')) { - $object->setJoinTokens($this->serializer->denormalize($data->{'JoinTokens'}, 'Docker\\API\\Model\\SwarmJoinTokens', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - if (null !== $object->getOrchestration()) { - $data->{'Orchestration'} = json_decode($this->serializer->normalize($object->getOrchestration(), 'raw', $context)); - } - if (null !== $object->getRaft()) { - $data->{'Raft'} = json_decode($this->serializer->normalize($object->getRaft(), 'raw', $context)); - } - if (null !== $object->getDispatcher()) { - $data->{'Dispatcher'} = json_decode($this->serializer->normalize($object->getDispatcher(), 'raw', $context)); - } - if (null !== $object->getCAConfig()) { - $data->{'CAConfig'} = json_decode($this->serializer->normalize($object->getCAConfig(), 'raw', $context)); - } - if (null !== $object->getJoinTokens()) { - $data->{'JoinTokens'} = json_decode($this->serializer->normalize($object->getJoinTokens(), 'raw', $context)); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/SystemDfGetResponse200Normalizer.php b/generated/Normalizer/SystemDfGetResponse200Normalizer.php new file mode 100644 index 000000000..3644b795f --- /dev/null +++ b/generated/Normalizer/SystemDfGetResponse200Normalizer.php @@ -0,0 +1,236 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SystemDfGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SystemDfGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SystemDfGetResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SystemDfGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('LayersSize', $data) && $data['LayersSize'] !== null) { + $object->setLayersSize($data['LayersSize']); + } + elseif (\array_key_exists('LayersSize', $data) && $data['LayersSize'] === null) { + $object->setLayersSize(null); + } + if (\array_key_exists('Images', $data) && $data['Images'] !== null) { + $values = []; + foreach ($data['Images'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ImageSummary::class, 'json', $context); + } + $object->setImages($values); + } + elseif (\array_key_exists('Images', $data) && $data['Images'] === null) { + $object->setImages(null); + } + if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { + $values_1 = []; + foreach ($data['Containers'] as $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\ContainerSummaryItem::class, 'json', $context); + } + $values_1[] = $values_2; + } + $object->setContainers($values_1); + } + elseif (\array_key_exists('Containers', $data) && $data['Containers'] === null) { + $object->setContainers(null); + } + if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { + $values_3 = []; + foreach ($data['Volumes'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\Volume::class, 'json', $context); + } + $object->setVolumes($values_3); + } + elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { + $object->setVolumes(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('layersSize') && null !== $object->getLayersSize()) { + $data['LayersSize'] = $object->getLayersSize(); + } + if ($object->isInitialized('images') && null !== $object->getImages()) { + $values = []; + foreach ($object->getImages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Images'] = $values; + } + if ($object->isInitialized('containers') && null !== $object->getContainers()) { + $values_1 = []; + foreach ($object->getContainers() as $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $values_1[] = $values_2; + } + $data['Containers'] = $values_1; + } + if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { + $values_3 = []; + foreach ($object->getVolumes() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['Volumes'] = $values_3; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SystemDfGetResponse200::class => false]; + } + } +} else { + class SystemDfGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SystemDfGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SystemDfGetResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SystemDfGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('LayersSize', $data) && $data['LayersSize'] !== null) { + $object->setLayersSize($data['LayersSize']); + } + elseif (\array_key_exists('LayersSize', $data) && $data['LayersSize'] === null) { + $object->setLayersSize(null); + } + if (\array_key_exists('Images', $data) && $data['Images'] !== null) { + $values = []; + foreach ($data['Images'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ImageSummary::class, 'json', $context); + } + $object->setImages($values); + } + elseif (\array_key_exists('Images', $data) && $data['Images'] === null) { + $object->setImages(null); + } + if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { + $values_1 = []; + foreach ($data['Containers'] as $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\ContainerSummaryItem::class, 'json', $context); + } + $values_1[] = $values_2; + } + $object->setContainers($values_1); + } + elseif (\array_key_exists('Containers', $data) && $data['Containers'] === null) { + $object->setContainers(null); + } + if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { + $values_3 = []; + foreach ($data['Volumes'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\Volume::class, 'json', $context); + } + $object->setVolumes($values_3); + } + elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { + $object->setVolumes(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('layersSize') && null !== $object->getLayersSize()) { + $data['LayersSize'] = $object->getLayersSize(); + } + if ($object->isInitialized('images') && null !== $object->getImages()) { + $values = []; + foreach ($object->getImages() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Images'] = $values; + } + if ($object->isInitialized('containers') && null !== $object->getContainers()) { + $values_1 = []; + foreach ($object->getContainers() as $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $values_1[] = $values_2; + } + $data['Containers'] = $values_1; + } + if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { + $values_3 = []; + foreach ($object->getVolumes() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['Volumes'] = $values_3; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SystemDfGetResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SystemInformationNormalizer.php b/generated/Normalizer/SystemInformationNormalizer.php deleted file mode 100644 index c7064cf5e..000000000 --- a/generated/Normalizer/SystemInformationNormalizer.php +++ /dev/null @@ -1,432 +0,0 @@ -setArchitecture($data->{'Architecture'}); - } - if (property_exists($data, 'ClusterStore')) { - $object->setClusterStore($data->{'ClusterStore'}); - } - if (property_exists($data, 'CgroupDriver')) { - $object->setCgroupDriver($data->{'CgroupDriver'}); - } - if (property_exists($data, 'Containers')) { - $object->setContainers($data->{'Containers'}); - } - if (property_exists($data, 'ContainersRunning')) { - $object->setContainersRunning($data->{'ContainersRunning'}); - } - if (property_exists($data, 'ContainersStopped')) { - $object->setContainersStopped($data->{'ContainersStopped'}); - } - if (property_exists($data, 'ContainersPaused')) { - $object->setContainersPaused($data->{'ContainersPaused'}); - } - if (property_exists($data, 'CpuCfsPeriod')) { - $object->setCpuCfsPeriod($data->{'CpuCfsPeriod'}); - } - if (property_exists($data, 'CpuCfsQuota')) { - $object->setCpuCfsQuota($data->{'CpuCfsQuota'}); - } - if (property_exists($data, 'Debug')) { - $object->setDebug($data->{'Debug'}); - } - if (property_exists($data, 'DiscoveryBackend')) { - $object->setDiscoveryBackend($data->{'DiscoveryBackend'}); - } - if (property_exists($data, 'DockerRootDir')) { - $object->setDockerRootDir($data->{'DockerRootDir'}); - } - if (property_exists($data, 'Driver')) { - $object->setDriver($data->{'Driver'}); - } - if (property_exists($data, 'DriverStatus')) { - $value = $data->{'DriverStatus'}; - if (is_array($data->{'DriverStatus'})) { - $values = []; - foreach ($data->{'DriverStatus'} as $value_1) { - $value_2 = $value_1; - if (is_array($value_1)) { - $values_1 = []; - foreach ($value_1 as $value_3) { - $values_1[] = $value_3; - } - $value_2 = $values_1; - } - if (is_null($value_1)) { - $value_2 = $value_1; - } - $values[] = $value_2; - } - $value = $values; - } - if (is_null($data->{'DriverStatus'})) { - $value = $data->{'DriverStatus'}; - } - $object->setDriverStatus($value); - } - if (property_exists($data, 'SystemStatus')) { - $value_4 = $data->{'SystemStatus'}; - if (is_array($data->{'SystemStatus'})) { - $values_2 = []; - foreach ($data->{'SystemStatus'} as $value_5) { - $value_6 = $value_5; - if (is_array($value_5)) { - $values_3 = []; - foreach ($value_5 as $value_7) { - $values_3[] = $value_7; - } - $value_6 = $values_3; - } - if (is_null($value_5)) { - $value_6 = $value_5; - } - $values_2[] = $value_6; - } - $value_4 = $values_2; - } - if (is_null($data->{'SystemStatus'})) { - $value_4 = $data->{'SystemStatus'}; - } - $object->setSystemStatus($value_4); - } - if (property_exists($data, 'ExperimentalBuild')) { - $object->setExperimentalBuild($data->{'ExperimentalBuild'}); - } - if (property_exists($data, 'HttpProxy')) { - $object->setHttpProxy($data->{'HttpProxy'}); - } - if (property_exists($data, 'HttpsProxy')) { - $object->setHttpsProxy($data->{'HttpsProxy'}); - } - if (property_exists($data, 'ID')) { - $object->setID($data->{'ID'}); - } - if (property_exists($data, 'IPv4Forwarding')) { - $object->setIPv4Forwarding($data->{'IPv4Forwarding'}); - } - if (property_exists($data, 'Images')) { - $object->setImages($data->{'Images'}); - } - if (property_exists($data, 'IndexServerAddress')) { - $object->setIndexServerAddress($data->{'IndexServerAddress'}); - } - if (property_exists($data, 'InitPath')) { - $object->setInitPath($data->{'InitPath'}); - } - if (property_exists($data, 'InitSha1')) { - $object->setInitSha1($data->{'InitSha1'}); - } - if (property_exists($data, 'KernelMemory')) { - $object->setKernelMemory($data->{'KernelMemory'}); - } - if (property_exists($data, 'KernelVersion')) { - $object->setKernelVersion($data->{'KernelVersion'}); - } - if (property_exists($data, 'Labels')) { - $value_8 = $data->{'Labels'}; - if (is_object($data->{'Labels'})) { - $values_4 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'Labels'} as $key => $value_9) { - $values_4[$key] = $value_9; - } - $value_8 = $values_4; - } - if (is_null($data->{'Labels'})) { - $value_8 = $data->{'Labels'}; - } - $object->setLabels($value_8); - } - if (property_exists($data, 'MemTotal')) { - $object->setMemTotal($data->{'MemTotal'}); - } - if (property_exists($data, 'MemoryLimit')) { - $object->setMemoryLimit($data->{'MemoryLimit'}); - } - if (property_exists($data, 'NCPU')) { - $object->setNCPU($data->{'NCPU'}); - } - if (property_exists($data, 'NEventsListener')) { - $object->setNEventsListener($data->{'NEventsListener'}); - } - if (property_exists($data, 'NFd')) { - $object->setNFd($data->{'NFd'}); - } - if (property_exists($data, 'NGoroutines')) { - $object->setNGoroutines($data->{'NGoroutines'}); - } - if (property_exists($data, 'Name')) { - $object->setName($data->{'Name'}); - } - if (property_exists($data, 'NoProxy')) { - $object->setNoProxy($data->{'NoProxy'}); - } - if (property_exists($data, 'OomKillDisable')) { - $object->setOomKillDisable($data->{'OomKillDisable'}); - } - if (property_exists($data, 'OSType')) { - $object->setOSType($data->{'OSType'}); - } - if (property_exists($data, 'OperatingSystem')) { - $object->setOperatingSystem($data->{'OperatingSystem'}); - } - if (property_exists($data, 'RegistryConfig')) { - $object->setRegistryConfig($this->serializer->denormalize($data->{'RegistryConfig'}, 'Docker\\API\\Model\\RegistryConfig', 'raw', $context)); - } - if (property_exists($data, 'SecurityOptions')) { - $value_10 = $data->{'SecurityOptions'}; - if (is_array($data->{'SecurityOptions'})) { - $values_5 = []; - foreach ($data->{'SecurityOptions'} as $value_11) { - $values_5[] = $value_11; - } - $value_10 = $values_5; - } - if (is_null($data->{'SecurityOptions'})) { - $value_10 = $data->{'SecurityOptions'}; - } - $object->setSecurityOptions($value_10); - } - if (property_exists($data, 'SwapLimit')) { - $object->setSwapLimit($data->{'SwapLimit'}); - } - if (property_exists($data, 'SystemTime')) { - $object->setSystemTime($data->{'SystemTime'}); - } - if (property_exists($data, 'ServerVersion')) { - $object->setServerVersion($data->{'ServerVersion'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getArchitecture()) { - $data->{'Architecture'} = $object->getArchitecture(); - } - if (null !== $object->getClusterStore()) { - $data->{'ClusterStore'} = $object->getClusterStore(); - } - if (null !== $object->getCgroupDriver()) { - $data->{'CgroupDriver'} = $object->getCgroupDriver(); - } - if (null !== $object->getContainers()) { - $data->{'Containers'} = $object->getContainers(); - } - if (null !== $object->getContainersRunning()) { - $data->{'ContainersRunning'} = $object->getContainersRunning(); - } - if (null !== $object->getContainersStopped()) { - $data->{'ContainersStopped'} = $object->getContainersStopped(); - } - if (null !== $object->getContainersPaused()) { - $data->{'ContainersPaused'} = $object->getContainersPaused(); - } - if (null !== $object->getCpuCfsPeriod()) { - $data->{'CpuCfsPeriod'} = $object->getCpuCfsPeriod(); - } - if (null !== $object->getCpuCfsQuota()) { - $data->{'CpuCfsQuota'} = $object->getCpuCfsQuota(); - } - if (null !== $object->getDebug()) { - $data->{'Debug'} = $object->getDebug(); - } - if (null !== $object->getDiscoveryBackend()) { - $data->{'DiscoveryBackend'} = $object->getDiscoveryBackend(); - } - if (null !== $object->getDockerRootDir()) { - $data->{'DockerRootDir'} = $object->getDockerRootDir(); - } - if (null !== $object->getDriver()) { - $data->{'Driver'} = $object->getDriver(); - } - $value = $object->getDriverStatus(); - if (is_array($object->getDriverStatus())) { - $values = []; - foreach ($object->getDriverStatus() as $value_1) { - $value_2 = $value_1; - if (is_array($value_1)) { - $values_1 = []; - foreach ($value_1 as $value_3) { - $values_1[] = $value_3; - } - $value_2 = $values_1; - } - if (is_null($value_1)) { - $value_2 = $value_1; - } - $values[] = $value_2; - } - $value = $values; - } - if (is_null($object->getDriverStatus())) { - $value = $object->getDriverStatus(); - } - $data->{'DriverStatus'} = $value; - $value_4 = $object->getSystemStatus(); - if (is_array($object->getSystemStatus())) { - $values_2 = []; - foreach ($object->getSystemStatus() as $value_5) { - $value_6 = $value_5; - if (is_array($value_5)) { - $values_3 = []; - foreach ($value_5 as $value_7) { - $values_3[] = $value_7; - } - $value_6 = $values_3; - } - if (is_null($value_5)) { - $value_6 = $value_5; - } - $values_2[] = $value_6; - } - $value_4 = $values_2; - } - if (is_null($object->getSystemStatus())) { - $value_4 = $object->getSystemStatus(); - } - $data->{'SystemStatus'} = $value_4; - if (null !== $object->getExperimentalBuild()) { - $data->{'ExperimentalBuild'} = $object->getExperimentalBuild(); - } - if (null !== $object->getHttpProxy()) { - $data->{'HttpProxy'} = $object->getHttpProxy(); - } - if (null !== $object->getHttpsProxy()) { - $data->{'HttpsProxy'} = $object->getHttpsProxy(); - } - if (null !== $object->getID()) { - $data->{'ID'} = $object->getID(); - } - if (null !== $object->getIPv4Forwarding()) { - $data->{'IPv4Forwarding'} = $object->getIPv4Forwarding(); - } - if (null !== $object->getImages()) { - $data->{'Images'} = $object->getImages(); - } - if (null !== $object->getIndexServerAddress()) { - $data->{'IndexServerAddress'} = $object->getIndexServerAddress(); - } - if (null !== $object->getInitPath()) { - $data->{'InitPath'} = $object->getInitPath(); - } - if (null !== $object->getInitSha1()) { - $data->{'InitSha1'} = $object->getInitSha1(); - } - if (null !== $object->getKernelMemory()) { - $data->{'KernelMemory'} = $object->getKernelMemory(); - } - if (null !== $object->getKernelVersion()) { - $data->{'KernelVersion'} = $object->getKernelVersion(); - } - $value_8 = $object->getLabels(); - if (is_object($object->getLabels())) { - $values_4 = new \stdClass(); - foreach ($object->getLabels() as $key => $value_9) { - $values_4->{$key} = $value_9; - } - $value_8 = $values_4; - } - if (is_null($object->getLabels())) { - $value_8 = $object->getLabels(); - } - $data->{'Labels'} = $value_8; - if (null !== $object->getMemTotal()) { - $data->{'MemTotal'} = $object->getMemTotal(); - } - if (null !== $object->getMemoryLimit()) { - $data->{'MemoryLimit'} = $object->getMemoryLimit(); - } - if (null !== $object->getNCPU()) { - $data->{'NCPU'} = $object->getNCPU(); - } - if (null !== $object->getNEventsListener()) { - $data->{'NEventsListener'} = $object->getNEventsListener(); - } - if (null !== $object->getNFd()) { - $data->{'NFd'} = $object->getNFd(); - } - if (null !== $object->getNGoroutines()) { - $data->{'NGoroutines'} = $object->getNGoroutines(); - } - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - if (null !== $object->getNoProxy()) { - $data->{'NoProxy'} = $object->getNoProxy(); - } - if (null !== $object->getOomKillDisable()) { - $data->{'OomKillDisable'} = $object->getOomKillDisable(); - } - if (null !== $object->getOSType()) { - $data->{'OSType'} = $object->getOSType(); - } - if (null !== $object->getOperatingSystem()) { - $data->{'OperatingSystem'} = $object->getOperatingSystem(); - } - if (null !== $object->getRegistryConfig()) { - $data->{'RegistryConfig'} = json_decode($this->serializer->normalize($object->getRegistryConfig(), 'raw', $context)); - } - $value_10 = $object->getSecurityOptions(); - if (is_array($object->getSecurityOptions())) { - $values_5 = []; - foreach ($object->getSecurityOptions() as $value_11) { - $values_5[] = $value_11; - } - $value_10 = $values_5; - } - if (is_null($object->getSecurityOptions())) { - $value_10 = $object->getSecurityOptions(); - } - $data->{'SecurityOptions'} = $value_10; - if (null !== $object->getSwapLimit()) { - $data->{'SwapLimit'} = $object->getSwapLimit(); - } - if (null !== $object->getSystemTime()) { - $data->{'SystemTime'} = $object->getSystemTime(); - } - if (null !== $object->getServerVersion()) { - $data->{'ServerVersion'} = $object->getServerVersion(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/TaskNormalizer.php b/generated/Normalizer/TaskNormalizer.php index 02fdf1926..55ce9f925 100644 --- a/generated/Normalizer/TaskNormalizer.php +++ b/generated/Normalizer/TaskNormalizer.php @@ -2,154 +2,331 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class TaskNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\Task') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\Task) { - return true; - } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $object = new \Docker\API\Model\Task(); - if (property_exists($data, 'ID')) { - $object->setID($data->{'ID'}); - } - if (property_exists($data, 'Version')) { - $object->setVersion($this->serializer->denormalize($data->{'Version'}, 'Docker\\API\\Model\\NodeVersion', 'raw', $context)); - } - if (property_exists($data, 'CreatedAt')) { - $object->setCreatedAt(\DateTime::createFromFormat("Y-m-d\TH:i:sP", $data->{'CreatedAt'})); - } - if (property_exists($data, 'UpdatedAt')) { - $object->setUpdatedAt(\DateTime::createFromFormat("Y-m-d\TH:i:sP", $data->{'UpdatedAt'})); - } - if (property_exists($data, 'Name')) { - $object->setName($data->{'Name'}); - } - if (property_exists($data, 'Spec')) { - $object->setSpec($this->serializer->denormalize($data->{'Spec'}, 'Docker\\API\\Model\\TaskSpec', 'raw', $context)); - } - if (property_exists($data, 'ServiceID')) { - $object->setServiceID($data->{'ServiceID'}); - } - if (property_exists($data, 'Instance')) { - $object->setInstance($data->{'Instance'}); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Task::class; } - if (property_exists($data, 'NodeID')) { - $object->setNodeID($data->{'NodeID'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Task::class; } - if (property_exists($data, 'ServiceAnnotations')) { - $object->setServiceAnnotations($this->serializer->denormalize($data->{'ServiceAnnotations'}, 'Docker\\API\\Model\\Annotations', 'raw', $context)); - } - if (property_exists($data, 'Status')) { - $object->setStatus($this->serializer->denormalize($data->{'Status'}, 'Docker\\API\\Model\\TaskStatus', 'raw', $context)); - } - if (property_exists($data, 'DesiredState')) { - $object->setDesiredState($data->{'DesiredState'}); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Task(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\TaskVersion::class, 'json', $context)); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); + } + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\TaskSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + if (\array_key_exists('ServiceID', $data) && $data['ServiceID'] !== null) { + $object->setServiceID($data['ServiceID']); + } + elseif (\array_key_exists('ServiceID', $data) && $data['ServiceID'] === null) { + $object->setServiceID(null); + } + if (\array_key_exists('Slot', $data) && $data['Slot'] !== null) { + $object->setSlot($data['Slot']); + } + elseif (\array_key_exists('Slot', $data) && $data['Slot'] === null) { + $object->setSlot(null); + } + if (\array_key_exists('NodeID', $data) && $data['NodeID'] !== null) { + $object->setNodeID($data['NodeID']); + } + elseif (\array_key_exists('NodeID', $data) && $data['NodeID'] === null) { + $object->setNodeID(null); + } + if (\array_key_exists('Status', $data) && $data['Status'] !== null) { + $object->setStatus($this->denormalizer->denormalize($data['Status'], \Docker\API\Model\TaskStatus::class, 'json', $context)); + } + elseif (\array_key_exists('Status', $data) && $data['Status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('DesiredState', $data) && $data['DesiredState'] !== null) { + $object->setDesiredState($data['DesiredState']); + } + elseif (\array_key_exists('DesiredState', $data) && $data['DesiredState'] === null) { + $object->setDesiredState(null); + } + return $object; } - if (property_exists($data, 'NetworksAttachments')) { - $value = $data->{'NetworksAttachments'}; - if (is_array($data->{'NetworksAttachments'})) { + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { $values = []; - foreach ($data->{'NetworksAttachments'} as $value_1) { - $values[] = $this->serializer->denormalize($value_1, 'Docker\\API\\Model\\NetworkAttachment', 'raw', $context); + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; } - $value = $values; + $data['Labels'] = $values; + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); } - if (is_null($data->{'NetworksAttachments'})) { - $value = $data->{'NetworksAttachments'}; + if ($object->isInitialized('serviceID') && null !== $object->getServiceID()) { + $data['ServiceID'] = $object->getServiceID(); } - $object->setNetworksAttachments($value); + if ($object->isInitialized('slot') && null !== $object->getSlot()) { + $data['Slot'] = $object->getSlot(); + } + if ($object->isInitialized('nodeID') && null !== $object->getNodeID()) { + $data['NodeID'] = $object->getNodeID(); + } + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['Status'] = $this->normalizer->normalize($object->getStatus(), 'json', $context); + } + if ($object->isInitialized('desiredState') && null !== $object->getDesiredState()) { + $data['DesiredState'] = $object->getDesiredState(); + } + return $data; } - if (property_exists($data, 'Endpoint')) { - $object->setEndpoint($this->serializer->denormalize($data->{'Endpoint'}, 'Docker\\API\\Model\\Endpoint', 'raw', $context)); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Task::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class TaskNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getID()) { - $data->{'ID'} = $object->getID(); - } - if (null !== $object->getVersion()) { - $data->{'Version'} = json_decode($this->serializer->normalize($object->getVersion(), 'raw', $context)); - } - if (null !== $object->getCreatedAt()) { - $data->{'CreatedAt'} = $object->getCreatedAt()->format("Y-m-d\TH:i:sP"); - } - if (null !== $object->getUpdatedAt()) { - $data->{'UpdatedAt'} = $object->getUpdatedAt()->format("Y-m-d\TH:i:sP"); - } - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - if (null !== $object->getSpec()) { - $data->{'Spec'} = json_decode($this->serializer->normalize($object->getSpec(), 'raw', $context)); - } - if (null !== $object->getServiceID()) { - $data->{'ServiceID'} = $object->getServiceID(); - } - if (null !== $object->getInstance()) { - $data->{'Instance'} = $object->getInstance(); - } - if (null !== $object->getNodeID()) { - $data->{'NodeID'} = $object->getNodeID(); - } - if (null !== $object->getServiceAnnotations()) { - $data->{'ServiceAnnotations'} = json_decode($this->serializer->normalize($object->getServiceAnnotations(), 'raw', $context)); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Task::class; } - if (null !== $object->getStatus()) { - $data->{'Status'} = json_decode($this->serializer->normalize($object->getStatus(), 'raw', $context)); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Task::class; } - if (null !== $object->getDesiredState()) { - $data->{'DesiredState'} = $object->getDesiredState(); - } - $value = $object->getNetworksAttachments(); - if (is_array($object->getNetworksAttachments())) { - $values = []; - foreach ($object->getNetworksAttachments() as $value_1) { - $values[] = $value_1; + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Task(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\TaskVersion::class, 'json', $context)); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); + } + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\TaskSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + if (\array_key_exists('ServiceID', $data) && $data['ServiceID'] !== null) { + $object->setServiceID($data['ServiceID']); + } + elseif (\array_key_exists('ServiceID', $data) && $data['ServiceID'] === null) { + $object->setServiceID(null); + } + if (\array_key_exists('Slot', $data) && $data['Slot'] !== null) { + $object->setSlot($data['Slot']); + } + elseif (\array_key_exists('Slot', $data) && $data['Slot'] === null) { + $object->setSlot(null); } - $value = $values; + if (\array_key_exists('NodeID', $data) && $data['NodeID'] !== null) { + $object->setNodeID($data['NodeID']); + } + elseif (\array_key_exists('NodeID', $data) && $data['NodeID'] === null) { + $object->setNodeID(null); + } + if (\array_key_exists('Status', $data) && $data['Status'] !== null) { + $object->setStatus($this->denormalizer->denormalize($data['Status'], \Docker\API\Model\TaskStatus::class, 'json', $context)); + } + elseif (\array_key_exists('Status', $data) && $data['Status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('DesiredState', $data) && $data['DesiredState'] !== null) { + $object->setDesiredState($data['DesiredState']); + } + elseif (\array_key_exists('DesiredState', $data) && $data['DesiredState'] === null) { + $object->setDesiredState(null); + } + return $object; } - if (is_null($object->getNetworksAttachments())) { - $value = $object->getNetworksAttachments(); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + if ($object->isInitialized('serviceID') && null !== $object->getServiceID()) { + $data['ServiceID'] = $object->getServiceID(); + } + if ($object->isInitialized('slot') && null !== $object->getSlot()) { + $data['Slot'] = $object->getSlot(); + } + if ($object->isInitialized('nodeID') && null !== $object->getNodeID()) { + $data['NodeID'] = $object->getNodeID(); + } + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['Status'] = $this->normalizer->normalize($object->getStatus(), 'json', $context); + } + if ($object->isInitialized('desiredState') && null !== $object->getDesiredState()) { + $data['DesiredState'] = $object->getDesiredState(); + } + return $data; } - $data->{'NetworksAttachments'} = $value; - if (null !== $object->getEndpoint()) { - $data->{'Endpoint'} = json_decode($this->serializer->normalize($object->getEndpoint(), 'raw', $context)); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Task::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecContainerSpecDNSConfigNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecDNSConfigNormalizer.php new file mode 100644 index 000000000..29e11e064 --- /dev/null +++ b/generated/Normalizer/TaskSpecContainerSpecDNSConfigNormalizer.php @@ -0,0 +1,202 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecContainerSpecDNSConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecDNSConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Nameservers', $data) && $data['Nameservers'] !== null) { + $values = []; + foreach ($data['Nameservers'] as $value) { + $values[] = $value; + } + $object->setNameservers($values); + } + elseif (\array_key_exists('Nameservers', $data) && $data['Nameservers'] === null) { + $object->setNameservers(null); + } + if (\array_key_exists('Search', $data) && $data['Search'] !== null) { + $values_1 = []; + foreach ($data['Search'] as $value_1) { + $values_1[] = $value_1; + } + $object->setSearch($values_1); + } + elseif (\array_key_exists('Search', $data) && $data['Search'] === null) { + $object->setSearch(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values_2 = []; + foreach ($data['Options'] as $value_2) { + $values_2[] = $value_2; + } + $object->setOptions($values_2); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('nameservers') && null !== $object->getNameservers()) { + $values = []; + foreach ($object->getNameservers() as $value) { + $values[] = $value; + } + $data['Nameservers'] = $values; + } + if ($object->isInitialized('search') && null !== $object->getSearch()) { + $values_1 = []; + foreach ($object->getSearch() as $value_1) { + $values_1[] = $value_1; + } + $data['Search'] = $values_1; + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values_2 = []; + foreach ($object->getOptions() as $value_2) { + $values_2[] = $value_2; + } + $data['Options'] = $values_2; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecDNSConfig::class => false]; + } + } +} else { + class TaskSpecContainerSpecDNSConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecDNSConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Nameservers', $data) && $data['Nameservers'] !== null) { + $values = []; + foreach ($data['Nameservers'] as $value) { + $values[] = $value; + } + $object->setNameservers($values); + } + elseif (\array_key_exists('Nameservers', $data) && $data['Nameservers'] === null) { + $object->setNameservers(null); + } + if (\array_key_exists('Search', $data) && $data['Search'] !== null) { + $values_1 = []; + foreach ($data['Search'] as $value_1) { + $values_1[] = $value_1; + } + $object->setSearch($values_1); + } + elseif (\array_key_exists('Search', $data) && $data['Search'] === null) { + $object->setSearch(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values_2 = []; + foreach ($data['Options'] as $value_2) { + $values_2[] = $value_2; + } + $object->setOptions($values_2); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('nameservers') && null !== $object->getNameservers()) { + $values = []; + foreach ($object->getNameservers() as $value) { + $values[] = $value; + } + $data['Nameservers'] = $values; + } + if ($object->isInitialized('search') && null !== $object->getSearch()) { + $values_1 = []; + foreach ($object->getSearch() as $value_1) { + $values_1[] = $value_1; + } + $data['Search'] = $values_1; + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values_2 = []; + foreach ($object->getOptions() as $value_2) { + $values_2[] = $value_2; + } + $data['Options'] = $values_2; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecDNSConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecContainerSpecNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecNormalizer.php new file mode 100644 index 000000000..49dac86b8 --- /dev/null +++ b/generated/Normalizer/TaskSpecContainerSpecNormalizer.php @@ -0,0 +1,378 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecContainerSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpec::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Image', $data) && $data['Image'] !== null) { + $object->setImage($data['Image']); + } + elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { + $object->setImage(null); + } + if (\array_key_exists('Command', $data) && $data['Command'] !== null) { + $values = []; + foreach ($data['Command'] as $value) { + $values[] = $value; + } + $object->setCommand($values); + } + elseif (\array_key_exists('Command', $data) && $data['Command'] === null) { + $object->setCommand(null); + } + if (\array_key_exists('Args', $data) && $data['Args'] !== null) { + $values_1 = []; + foreach ($data['Args'] as $value_1) { + $values_1[] = $value_1; + } + $object->setArgs($values_1); + } + elseif (\array_key_exists('Args', $data) && $data['Args'] === null) { + $object->setArgs(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values_2 = []; + foreach ($data['Env'] as $value_2) { + $values_2[] = $value_2; + } + $object->setEnv($values_2); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Dir', $data) && $data['Dir'] !== null) { + $object->setDir($data['Dir']); + } + elseif (\array_key_exists('Dir', $data) && $data['Dir'] === null) { + $object->setDir(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($data['User']); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value_3) { + $values_3[$key] = $value_3; + } + $object->setLabels($values_3); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('TTY', $data) && $data['TTY'] !== null) { + $object->setTTY($data['TTY']); + } + elseif (\array_key_exists('TTY', $data) && $data['TTY'] === null) { + $object->setTTY(null); + } + if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { + $values_4 = []; + foreach ($data['Mounts'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \Docker\API\Model\Mount::class, 'json', $context); + } + $object->setMounts($values_4); + } + elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { + $object->setMounts(null); + } + if (\array_key_exists('StopGracePeriod', $data) && $data['StopGracePeriod'] !== null) { + $object->setStopGracePeriod($data['StopGracePeriod']); + } + elseif (\array_key_exists('StopGracePeriod', $data) && $data['StopGracePeriod'] === null) { + $object->setStopGracePeriod(null); + } + if (\array_key_exists('DNSConfig', $data) && $data['DNSConfig'] !== null) { + $object->setDNSConfig($this->denormalizer->denormalize($data['DNSConfig'], \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class, 'json', $context)); + } + elseif (\array_key_exists('DNSConfig', $data) && $data['DNSConfig'] === null) { + $object->setDNSConfig(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('image') && null !== $object->getImage()) { + $data['Image'] = $object->getImage(); + } + if ($object->isInitialized('command') && null !== $object->getCommand()) { + $values = []; + foreach ($object->getCommand() as $value) { + $values[] = $value; + } + $data['Command'] = $values; + } + if ($object->isInitialized('args') && null !== $object->getArgs()) { + $values_1 = []; + foreach ($object->getArgs() as $value_1) { + $values_1[] = $value_1; + } + $data['Args'] = $values_1; + } + if ($object->isInitialized('env') && null !== $object->getEnv()) { + $values_2 = []; + foreach ($object->getEnv() as $value_2) { + $values_2[] = $value_2; + } + $data['Env'] = $values_2; + } + if ($object->isInitialized('dir') && null !== $object->getDir()) { + $data['Dir'] = $object->getDir(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $object->getUser(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_3 = []; + foreach ($object->getLabels() as $key => $value_3) { + $values_3[$key] = $value_3; + } + $data['Labels'] = $values_3; + } + if ($object->isInitialized('tTY') && null !== $object->getTTY()) { + $data['TTY'] = $object->getTTY(); + } + if ($object->isInitialized('mounts') && null !== $object->getMounts()) { + $values_4 = []; + foreach ($object->getMounts() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['Mounts'] = $values_4; + } + if ($object->isInitialized('stopGracePeriod') && null !== $object->getStopGracePeriod()) { + $data['StopGracePeriod'] = $object->getStopGracePeriod(); + } + if ($object->isInitialized('dNSConfig') && null !== $object->getDNSConfig()) { + $data['DNSConfig'] = $this->normalizer->normalize($object->getDNSConfig(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpec::class => false]; + } + } +} else { + class TaskSpecContainerSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpec::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Image', $data) && $data['Image'] !== null) { + $object->setImage($data['Image']); + } + elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { + $object->setImage(null); + } + if (\array_key_exists('Command', $data) && $data['Command'] !== null) { + $values = []; + foreach ($data['Command'] as $value) { + $values[] = $value; + } + $object->setCommand($values); + } + elseif (\array_key_exists('Command', $data) && $data['Command'] === null) { + $object->setCommand(null); + } + if (\array_key_exists('Args', $data) && $data['Args'] !== null) { + $values_1 = []; + foreach ($data['Args'] as $value_1) { + $values_1[] = $value_1; + } + $object->setArgs($values_1); + } + elseif (\array_key_exists('Args', $data) && $data['Args'] === null) { + $object->setArgs(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values_2 = []; + foreach ($data['Env'] as $value_2) { + $values_2[] = $value_2; + } + $object->setEnv($values_2); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Dir', $data) && $data['Dir'] !== null) { + $object->setDir($data['Dir']); + } + elseif (\array_key_exists('Dir', $data) && $data['Dir'] === null) { + $object->setDir(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($data['User']); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value_3) { + $values_3[$key] = $value_3; + } + $object->setLabels($values_3); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('TTY', $data) && $data['TTY'] !== null) { + $object->setTTY($data['TTY']); + } + elseif (\array_key_exists('TTY', $data) && $data['TTY'] === null) { + $object->setTTY(null); + } + if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { + $values_4 = []; + foreach ($data['Mounts'] as $value_4) { + $values_4[] = $this->denormalizer->denormalize($value_4, \Docker\API\Model\Mount::class, 'json', $context); + } + $object->setMounts($values_4); + } + elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { + $object->setMounts(null); + } + if (\array_key_exists('StopGracePeriod', $data) && $data['StopGracePeriod'] !== null) { + $object->setStopGracePeriod($data['StopGracePeriod']); + } + elseif (\array_key_exists('StopGracePeriod', $data) && $data['StopGracePeriod'] === null) { + $object->setStopGracePeriod(null); + } + if (\array_key_exists('DNSConfig', $data) && $data['DNSConfig'] !== null) { + $object->setDNSConfig($this->denormalizer->denormalize($data['DNSConfig'], \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class, 'json', $context)); + } + elseif (\array_key_exists('DNSConfig', $data) && $data['DNSConfig'] === null) { + $object->setDNSConfig(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('image') && null !== $object->getImage()) { + $data['Image'] = $object->getImage(); + } + if ($object->isInitialized('command') && null !== $object->getCommand()) { + $values = []; + foreach ($object->getCommand() as $value) { + $values[] = $value; + } + $data['Command'] = $values; + } + if ($object->isInitialized('args') && null !== $object->getArgs()) { + $values_1 = []; + foreach ($object->getArgs() as $value_1) { + $values_1[] = $value_1; + } + $data['Args'] = $values_1; + } + if ($object->isInitialized('env') && null !== $object->getEnv()) { + $values_2 = []; + foreach ($object->getEnv() as $value_2) { + $values_2[] = $value_2; + } + $data['Env'] = $values_2; + } + if ($object->isInitialized('dir') && null !== $object->getDir()) { + $data['Dir'] = $object->getDir(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $object->getUser(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_3 = []; + foreach ($object->getLabels() as $key => $value_3) { + $values_3[$key] = $value_3; + } + $data['Labels'] = $values_3; + } + if ($object->isInitialized('tTY') && null !== $object->getTTY()) { + $data['TTY'] = $object->getTTY(); + } + if ($object->isInitialized('mounts') && null !== $object->getMounts()) { + $values_4 = []; + foreach ($object->getMounts() as $value_4) { + $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['Mounts'] = $values_4; + } + if ($object->isInitialized('stopGracePeriod') && null !== $object->getStopGracePeriod()) { + $data['StopGracePeriod'] = $object->getStopGracePeriod(); + } + if ($object->isInitialized('dNSConfig') && null !== $object->getDNSConfig()) { + $data['DNSConfig'] = $this->normalizer->normalize($object->getDNSConfig(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpec::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecLogDriverNormalizer.php b/generated/Normalizer/TaskSpecLogDriverNormalizer.php new file mode 100644 index 000000000..4d2a68423 --- /dev/null +++ b/generated/Normalizer/TaskSpecLogDriverNormalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecLogDriverNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecLogDriver::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecLogDriver::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecLogDriver(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value) { + $values[$key] = $value; + } + $object->setOptions($values); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values = []; + foreach ($object->getOptions() as $key => $value) { + $values[$key] = $value; + } + $data['Options'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecLogDriver::class => false]; + } + } +} else { + class TaskSpecLogDriverNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecLogDriver::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecLogDriver::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecLogDriver(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value) { + $values[$key] = $value; + } + $object->setOptions($values); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values = []; + foreach ($object->getOptions() as $key => $value) { + $values[$key] = $value; + } + $data['Options'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecLogDriver::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecNetworksItemNormalizer.php b/generated/Normalizer/TaskSpecNetworksItemNormalizer.php new file mode 100644 index 000000000..82eb4835d --- /dev/null +++ b/generated/Normalizer/TaskSpecNetworksItemNormalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecNetworksItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecNetworksItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecNetworksItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecNetworksItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Target', $data) && $data['Target'] !== null) { + $object->setTarget($data['Target']); + } + elseif (\array_key_exists('Target', $data) && $data['Target'] === null) { + $object->setTarget(null); + } + if (\array_key_exists('Aliases', $data) && $data['Aliases'] !== null) { + $values = []; + foreach ($data['Aliases'] as $value) { + $values[] = $value; + } + $object->setAliases($values); + } + elseif (\array_key_exists('Aliases', $data) && $data['Aliases'] === null) { + $object->setAliases(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('target') && null !== $object->getTarget()) { + $data['Target'] = $object->getTarget(); + } + if ($object->isInitialized('aliases') && null !== $object->getAliases()) { + $values = []; + foreach ($object->getAliases() as $value) { + $values[] = $value; + } + $data['Aliases'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecNetworksItem::class => false]; + } + } +} else { + class TaskSpecNetworksItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecNetworksItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecNetworksItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecNetworksItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Target', $data) && $data['Target'] !== null) { + $object->setTarget($data['Target']); + } + elseif (\array_key_exists('Target', $data) && $data['Target'] === null) { + $object->setTarget(null); + } + if (\array_key_exists('Aliases', $data) && $data['Aliases'] !== null) { + $values = []; + foreach ($data['Aliases'] as $value) { + $values[] = $value; + } + $object->setAliases($values); + } + elseif (\array_key_exists('Aliases', $data) && $data['Aliases'] === null) { + $object->setAliases(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('target') && null !== $object->getTarget()) { + $data['Target'] = $object->getTarget(); + } + if ($object->isInitialized('aliases') && null !== $object->getAliases()) { + $values = []; + foreach ($object->getAliases() as $value) { + $values[] = $value; + } + $data['Aliases'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecNetworksItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecNormalizer.php b/generated/Normalizer/TaskSpecNormalizer.php index 53ae985d1..2aa2bf0f6 100644 --- a/generated/Normalizer/TaskSpecNormalizer.php +++ b/generated/Normalizer/TaskSpecNormalizer.php @@ -2,74 +2,241 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class TaskSpecNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\TaskSpec') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($data instanceof \Docker\API\Model\TaskSpec) { - return true; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpec::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\TaskSpec(); - if (property_exists($data, 'ContainerSpec')) { - $object->setContainerSpec($this->serializer->denormalize($data->{'ContainerSpec'}, 'Docker\\API\\Model\\ContainerSpec', 'raw', $context)); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpec::class; } - if (property_exists($data, 'Resources')) { - $object->setResources($this->serializer->denormalize($data->{'Resources'}, 'Docker\\API\\Model\\TaskSpecResourceRequirements', 'raw', $context)); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ContainerSpec', $data) && $data['ContainerSpec'] !== null) { + $object->setContainerSpec($this->denormalizer->denormalize($data['ContainerSpec'], \Docker\API\Model\TaskSpecContainerSpec::class, 'json', $context)); + } + elseif (\array_key_exists('ContainerSpec', $data) && $data['ContainerSpec'] === null) { + $object->setContainerSpec(null); + } + if (\array_key_exists('Resources', $data) && $data['Resources'] !== null) { + $object->setResources($this->denormalizer->denormalize($data['Resources'], \Docker\API\Model\TaskSpecResources::class, 'json', $context)); + } + elseif (\array_key_exists('Resources', $data) && $data['Resources'] === null) { + $object->setResources(null); + } + if (\array_key_exists('RestartPolicy', $data) && $data['RestartPolicy'] !== null) { + $object->setRestartPolicy($this->denormalizer->denormalize($data['RestartPolicy'], \Docker\API\Model\TaskSpecRestartPolicy::class, 'json', $context)); + } + elseif (\array_key_exists('RestartPolicy', $data) && $data['RestartPolicy'] === null) { + $object->setRestartPolicy(null); + } + if (\array_key_exists('Placement', $data) && $data['Placement'] !== null) { + $object->setPlacement($this->denormalizer->denormalize($data['Placement'], \Docker\API\Model\TaskSpecPlacement::class, 'json', $context)); + } + elseif (\array_key_exists('Placement', $data) && $data['Placement'] === null) { + $object->setPlacement(null); + } + if (\array_key_exists('ForceUpdate', $data) && $data['ForceUpdate'] !== null) { + $object->setForceUpdate($data['ForceUpdate']); + } + elseif (\array_key_exists('ForceUpdate', $data) && $data['ForceUpdate'] === null) { + $object->setForceUpdate(null); + } + if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { + $values = []; + foreach ($data['Networks'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\TaskSpecNetworksItem::class, 'json', $context); + } + $object->setNetworks($values); + } + elseif (\array_key_exists('Networks', $data) && $data['Networks'] === null) { + $object->setNetworks(null); + } + if (\array_key_exists('LogDriver', $data) && $data['LogDriver'] !== null) { + $object->setLogDriver($this->denormalizer->denormalize($data['LogDriver'], \Docker\API\Model\TaskSpecLogDriver::class, 'json', $context)); + } + elseif (\array_key_exists('LogDriver', $data) && $data['LogDriver'] === null) { + $object->setLogDriver(null); + } + return $object; } - if (property_exists($data, 'RestartPolicy')) { - $object->setRestartPolicy($this->serializer->denormalize($data->{'RestartPolicy'}, 'Docker\\API\\Model\\TaskSpecRestartPolicy', 'raw', $context)); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('containerSpec') && null !== $object->getContainerSpec()) { + $data['ContainerSpec'] = $this->normalizer->normalize($object->getContainerSpec(), 'json', $context); + } + if ($object->isInitialized('resources') && null !== $object->getResources()) { + $data['Resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + } + if ($object->isInitialized('restartPolicy') && null !== $object->getRestartPolicy()) { + $data['RestartPolicy'] = $this->normalizer->normalize($object->getRestartPolicy(), 'json', $context); + } + if ($object->isInitialized('placement') && null !== $object->getPlacement()) { + $data['Placement'] = $this->normalizer->normalize($object->getPlacement(), 'json', $context); + } + if ($object->isInitialized('forceUpdate') && null !== $object->getForceUpdate()) { + $data['ForceUpdate'] = $object->getForceUpdate(); + } + if ($object->isInitialized('networks') && null !== $object->getNetworks()) { + $values = []; + foreach ($object->getNetworks() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Networks'] = $values; + } + if ($object->isInitialized('logDriver') && null !== $object->getLogDriver()) { + $data['LogDriver'] = $this->normalizer->normalize($object->getLogDriver(), 'json', $context); + } + return $data; } - if (property_exists($data, 'Placement')) { - $object->setPlacement($this->serializer->denormalize($data->{'Placement'}, 'Docker\\API\\Model\\TaskSpecPlacement', 'raw', $context)); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpec::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class TaskSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getContainerSpec()) { - $data->{'ContainerSpec'} = json_decode($this->serializer->normalize($object->getContainerSpec(), 'raw', $context)); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpec::class; } - if (null !== $object->getResources()) { - $data->{'Resources'} = json_decode($this->serializer->normalize($object->getResources(), 'raw', $context)); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpec::class; } - if (null !== $object->getRestartPolicy()) { - $data->{'RestartPolicy'} = json_decode($this->serializer->normalize($object->getRestartPolicy(), 'raw', $context)); + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ContainerSpec', $data) && $data['ContainerSpec'] !== null) { + $object->setContainerSpec($this->denormalizer->denormalize($data['ContainerSpec'], \Docker\API\Model\TaskSpecContainerSpec::class, 'json', $context)); + } + elseif (\array_key_exists('ContainerSpec', $data) && $data['ContainerSpec'] === null) { + $object->setContainerSpec(null); + } + if (\array_key_exists('Resources', $data) && $data['Resources'] !== null) { + $object->setResources($this->denormalizer->denormalize($data['Resources'], \Docker\API\Model\TaskSpecResources::class, 'json', $context)); + } + elseif (\array_key_exists('Resources', $data) && $data['Resources'] === null) { + $object->setResources(null); + } + if (\array_key_exists('RestartPolicy', $data) && $data['RestartPolicy'] !== null) { + $object->setRestartPolicy($this->denormalizer->denormalize($data['RestartPolicy'], \Docker\API\Model\TaskSpecRestartPolicy::class, 'json', $context)); + } + elseif (\array_key_exists('RestartPolicy', $data) && $data['RestartPolicy'] === null) { + $object->setRestartPolicy(null); + } + if (\array_key_exists('Placement', $data) && $data['Placement'] !== null) { + $object->setPlacement($this->denormalizer->denormalize($data['Placement'], \Docker\API\Model\TaskSpecPlacement::class, 'json', $context)); + } + elseif (\array_key_exists('Placement', $data) && $data['Placement'] === null) { + $object->setPlacement(null); + } + if (\array_key_exists('ForceUpdate', $data) && $data['ForceUpdate'] !== null) { + $object->setForceUpdate($data['ForceUpdate']); + } + elseif (\array_key_exists('ForceUpdate', $data) && $data['ForceUpdate'] === null) { + $object->setForceUpdate(null); + } + if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { + $values = []; + foreach ($data['Networks'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\TaskSpecNetworksItem::class, 'json', $context); + } + $object->setNetworks($values); + } + elseif (\array_key_exists('Networks', $data) && $data['Networks'] === null) { + $object->setNetworks(null); + } + if (\array_key_exists('LogDriver', $data) && $data['LogDriver'] !== null) { + $object->setLogDriver($this->denormalizer->denormalize($data['LogDriver'], \Docker\API\Model\TaskSpecLogDriver::class, 'json', $context)); + } + elseif (\array_key_exists('LogDriver', $data) && $data['LogDriver'] === null) { + $object->setLogDriver(null); + } + return $object; } - if (null !== $object->getPlacement()) { - $data->{'Placement'} = json_decode($this->serializer->normalize($object->getPlacement(), 'raw', $context)); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('containerSpec') && null !== $object->getContainerSpec()) { + $data['ContainerSpec'] = $this->normalizer->normalize($object->getContainerSpec(), 'json', $context); + } + if ($object->isInitialized('resources') && null !== $object->getResources()) { + $data['Resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); + } + if ($object->isInitialized('restartPolicy') && null !== $object->getRestartPolicy()) { + $data['RestartPolicy'] = $this->normalizer->normalize($object->getRestartPolicy(), 'json', $context); + } + if ($object->isInitialized('placement') && null !== $object->getPlacement()) { + $data['Placement'] = $this->normalizer->normalize($object->getPlacement(), 'json', $context); + } + if ($object->isInitialized('forceUpdate') && null !== $object->getForceUpdate()) { + $data['ForceUpdate'] = $object->getForceUpdate(); + } + if ($object->isInitialized('networks') && null !== $object->getNetworks()) { + $values = []; + foreach ($object->getNetworks() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Networks'] = $values; + } + if ($object->isInitialized('logDriver') && null !== $object->getLogDriver()) { + $data['LogDriver'] = $this->normalizer->normalize($object->getLogDriver(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpec::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecPlacementNormalizer.php b/generated/Normalizer/TaskSpecPlacementNormalizer.php index d3183311c..59c56729e 100644 --- a/generated/Normalizer/TaskSpecPlacementNormalizer.php +++ b/generated/Normalizer/TaskSpecPlacementNormalizer.php @@ -2,76 +2,133 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class TaskSpecPlacementNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecPlacementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($type !== 'Docker\\API\\Model\\TaskSpecPlacement') { - return false; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecPlacement::class; } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\TaskSpecPlacement) { - return true; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecPlacement::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\TaskSpecPlacement(); - if (property_exists($data, 'Constraints')) { - $value = $data->{'Constraints'}; - if (is_array($data->{'Constraints'})) { + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecPlacement(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Constraints', $data) && $data['Constraints'] !== null) { $values = []; - foreach ($data->{'Constraints'} as $value_1) { - $values[] = $value_1; + foreach ($data['Constraints'] as $value) { + $values[] = $value; } - $value = $values; + $object->setConstraints($values); } - if (is_null($data->{'Constraints'})) { - $value = $data->{'Constraints'}; + elseif (\array_key_exists('Constraints', $data) && $data['Constraints'] === null) { + $object->setConstraints(null); } - $object->setConstraints($value); + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('constraints') && null !== $object->getConstraints()) { + $values = []; + foreach ($object->getConstraints() as $value) { + $values[] = $value; + } + $data['Constraints'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecPlacement::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class TaskSpecPlacementNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - $value = $object->getConstraints(); - if (is_array($object->getConstraints())) { - $values = []; - foreach ($object->getConstraints() as $value_1) { - $values[] = $value_1; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecPlacement::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecPlacement::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecPlacement(); + if (null === $data || false === \is_array($data)) { + return $object; } - $value = $values; + if (\array_key_exists('Constraints', $data) && $data['Constraints'] !== null) { + $values = []; + foreach ($data['Constraints'] as $value) { + $values[] = $value; + } + $object->setConstraints($values); + } + elseif (\array_key_exists('Constraints', $data) && $data['Constraints'] === null) { + $object->setConstraints(null); + } + return $object; } - if (is_null($object->getConstraints())) { - $value = $object->getConstraints(); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('constraints') && null !== $object->getConstraints()) { + $values = []; + foreach ($object->getConstraints() as $value) { + $values[] = $value; + } + $data['Constraints'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecPlacement::class => false]; } - $data->{'Constraints'} = $value; - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecResourceRequirementsNormalizer.php b/generated/Normalizer/TaskSpecResourceRequirementsNormalizer.php deleted file mode 100644 index ecbed2a34..000000000 --- a/generated/Normalizer/TaskSpecResourceRequirementsNormalizer.php +++ /dev/null @@ -1,63 +0,0 @@ -setLimits($this->serializer->denormalize($data->{'Limits'}, 'Docker\\API\\Model\\NodeResources', 'raw', $context)); - } - if (property_exists($data, 'Reservations')) { - $object->setReservations($this->serializer->denormalize($data->{'Reservations'}, 'Docker\\API\\Model\\NodeResources', 'raw', $context)); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getLimits()) { - $data->{'Limits'} = json_decode($this->serializer->normalize($object->getLimits(), 'raw', $context)); - } - if (null !== $object->getReservations()) { - $data->{'Reservations'} = json_decode($this->serializer->normalize($object->getReservations(), 'raw', $context)); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/TaskSpecResourcesLimitsNormalizer.php b/generated/Normalizer/TaskSpecResourcesLimitsNormalizer.php new file mode 100644 index 000000000..2fcc8adf4 --- /dev/null +++ b/generated/Normalizer/TaskSpecResourcesLimitsNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecResourcesLimitsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecResourcesLimits::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecResourcesLimits::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecResourcesLimits(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] !== null) { + $object->setNanoCPUs($data['NanoCPUs']); + } + elseif (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] === null) { + $object->setNanoCPUs(null); + } + if (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] !== null) { + $object->setMemoryBytes($data['MemoryBytes']); + } + elseif (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] === null) { + $object->setMemoryBytes(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('nanoCPUs') && null !== $object->getNanoCPUs()) { + $data['NanoCPUs'] = $object->getNanoCPUs(); + } + if ($object->isInitialized('memoryBytes') && null !== $object->getMemoryBytes()) { + $data['MemoryBytes'] = $object->getMemoryBytes(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecResourcesLimits::class => false]; + } + } +} else { + class TaskSpecResourcesLimitsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecResourcesLimits::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecResourcesLimits::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecResourcesLimits(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] !== null) { + $object->setNanoCPUs($data['NanoCPUs']); + } + elseif (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] === null) { + $object->setNanoCPUs(null); + } + if (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] !== null) { + $object->setMemoryBytes($data['MemoryBytes']); + } + elseif (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] === null) { + $object->setMemoryBytes(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('nanoCPUs') && null !== $object->getNanoCPUs()) { + $data['NanoCPUs'] = $object->getNanoCPUs(); + } + if ($object->isInitialized('memoryBytes') && null !== $object->getMemoryBytes()) { + $data['MemoryBytes'] = $object->getMemoryBytes(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecResourcesLimits::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecResourcesNormalizer.php b/generated/Normalizer/TaskSpecResourcesNormalizer.php new file mode 100644 index 000000000..f47cc6035 --- /dev/null +++ b/generated/Normalizer/TaskSpecResourcesNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecResourcesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecResources::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecResources::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecResources(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Limits', $data) && $data['Limits'] !== null) { + $object->setLimits($this->denormalizer->denormalize($data['Limits'], \Docker\API\Model\TaskSpecResourcesLimits::class, 'json', $context)); + } + elseif (\array_key_exists('Limits', $data) && $data['Limits'] === null) { + $object->setLimits(null); + } + if (\array_key_exists('Reservations', $data) && $data['Reservations'] !== null) { + $object->setReservations($this->denormalizer->denormalize($data['Reservations'], \Docker\API\Model\TaskSpecResourcesReservations::class, 'json', $context)); + } + elseif (\array_key_exists('Reservations', $data) && $data['Reservations'] === null) { + $object->setReservations(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('limits') && null !== $object->getLimits()) { + $data['Limits'] = $this->normalizer->normalize($object->getLimits(), 'json', $context); + } + if ($object->isInitialized('reservations') && null !== $object->getReservations()) { + $data['Reservations'] = $this->normalizer->normalize($object->getReservations(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecResources::class => false]; + } + } +} else { + class TaskSpecResourcesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecResources::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecResources::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecResources(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Limits', $data) && $data['Limits'] !== null) { + $object->setLimits($this->denormalizer->denormalize($data['Limits'], \Docker\API\Model\TaskSpecResourcesLimits::class, 'json', $context)); + } + elseif (\array_key_exists('Limits', $data) && $data['Limits'] === null) { + $object->setLimits(null); + } + if (\array_key_exists('Reservations', $data) && $data['Reservations'] !== null) { + $object->setReservations($this->denormalizer->denormalize($data['Reservations'], \Docker\API\Model\TaskSpecResourcesReservations::class, 'json', $context)); + } + elseif (\array_key_exists('Reservations', $data) && $data['Reservations'] === null) { + $object->setReservations(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('limits') && null !== $object->getLimits()) { + $data['Limits'] = $this->normalizer->normalize($object->getLimits(), 'json', $context); + } + if ($object->isInitialized('reservations') && null !== $object->getReservations()) { + $data['Reservations'] = $this->normalizer->normalize($object->getReservations(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecResources::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecResourcesReservationsNormalizer.php b/generated/Normalizer/TaskSpecResourcesReservationsNormalizer.php new file mode 100644 index 000000000..2cb3932a8 --- /dev/null +++ b/generated/Normalizer/TaskSpecResourcesReservationsNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecResourcesReservationsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecResourcesReservations::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecResourcesReservations::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecResourcesReservations(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] !== null) { + $object->setNanoCPUs($data['NanoCPUs']); + } + elseif (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] === null) { + $object->setNanoCPUs(null); + } + if (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] !== null) { + $object->setMemoryBytes($data['MemoryBytes']); + } + elseif (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] === null) { + $object->setMemoryBytes(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('nanoCPUs') && null !== $object->getNanoCPUs()) { + $data['NanoCPUs'] = $object->getNanoCPUs(); + } + if ($object->isInitialized('memoryBytes') && null !== $object->getMemoryBytes()) { + $data['MemoryBytes'] = $object->getMemoryBytes(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecResourcesReservations::class => false]; + } + } +} else { + class TaskSpecResourcesReservationsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecResourcesReservations::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecResourcesReservations::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecResourcesReservations(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] !== null) { + $object->setNanoCPUs($data['NanoCPUs']); + } + elseif (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] === null) { + $object->setNanoCPUs(null); + } + if (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] !== null) { + $object->setMemoryBytes($data['MemoryBytes']); + } + elseif (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] === null) { + $object->setMemoryBytes(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('nanoCPUs') && null !== $object->getNanoCPUs()) { + $data['NanoCPUs'] = $object->getNanoCPUs(); + } + if ($object->isInitialized('memoryBytes') && null !== $object->getMemoryBytes()) { + $data['MemoryBytes'] = $object->getMemoryBytes(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecResourcesReservations::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecRestartPolicyNormalizer.php b/generated/Normalizer/TaskSpecRestartPolicyNormalizer.php index 844ad6eac..a919ddec3 100644 --- a/generated/Normalizer/TaskSpecRestartPolicyNormalizer.php +++ b/generated/Normalizer/TaskSpecRestartPolicyNormalizer.php @@ -2,74 +2,171 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class TaskSpecRestartPolicyNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\TaskSpecRestartPolicy') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecRestartPolicyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($data instanceof \Docker\API\Model\TaskSpecRestartPolicy) { - return true; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecRestartPolicy::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\TaskSpecRestartPolicy(); - if (property_exists($data, 'Condition')) { - $object->setCondition($data->{'Condition'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecRestartPolicy::class; } - if (property_exists($data, 'Delay')) { - $object->setDelay($data->{'Delay'}); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecRestartPolicy(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Condition', $data) && $data['Condition'] !== null) { + $object->setCondition($data['Condition']); + } + elseif (\array_key_exists('Condition', $data) && $data['Condition'] === null) { + $object->setCondition(null); + } + if (\array_key_exists('Delay', $data) && $data['Delay'] !== null) { + $object->setDelay($data['Delay']); + } + elseif (\array_key_exists('Delay', $data) && $data['Delay'] === null) { + $object->setDelay(null); + } + if (\array_key_exists('MaxAttempts', $data) && $data['MaxAttempts'] !== null) { + $object->setMaxAttempts($data['MaxAttempts']); + } + elseif (\array_key_exists('MaxAttempts', $data) && $data['MaxAttempts'] === null) { + $object->setMaxAttempts(null); + } + if (\array_key_exists('Window', $data) && $data['Window'] !== null) { + $object->setWindow($data['Window']); + } + elseif (\array_key_exists('Window', $data) && $data['Window'] === null) { + $object->setWindow(null); + } + return $object; } - if (property_exists($data, 'MaxAttempts')) { - $object->setMaxAttempts($data->{'MaxAttempts'}); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('condition') && null !== $object->getCondition()) { + $data['Condition'] = $object->getCondition(); + } + if ($object->isInitialized('delay') && null !== $object->getDelay()) { + $data['Delay'] = $object->getDelay(); + } + if ($object->isInitialized('maxAttempts') && null !== $object->getMaxAttempts()) { + $data['MaxAttempts'] = $object->getMaxAttempts(); + } + if ($object->isInitialized('window') && null !== $object->getWindow()) { + $data['Window'] = $object->getWindow(); + } + return $data; } - if (property_exists($data, 'Window')) { - $object->setWindow($data->{'Window'}); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecRestartPolicy::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class TaskSpecRestartPolicyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getCondition()) { - $data->{'Condition'} = $object->getCondition(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecRestartPolicy::class; } - if (null !== $object->getDelay()) { - $data->{'Delay'} = $object->getDelay(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecRestartPolicy::class; } - if (null !== $object->getMaxAttempts()) { - $data->{'MaxAttempts'} = $object->getMaxAttempts(); + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecRestartPolicy(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Condition', $data) && $data['Condition'] !== null) { + $object->setCondition($data['Condition']); + } + elseif (\array_key_exists('Condition', $data) && $data['Condition'] === null) { + $object->setCondition(null); + } + if (\array_key_exists('Delay', $data) && $data['Delay'] !== null) { + $object->setDelay($data['Delay']); + } + elseif (\array_key_exists('Delay', $data) && $data['Delay'] === null) { + $object->setDelay(null); + } + if (\array_key_exists('MaxAttempts', $data) && $data['MaxAttempts'] !== null) { + $object->setMaxAttempts($data['MaxAttempts']); + } + elseif (\array_key_exists('MaxAttempts', $data) && $data['MaxAttempts'] === null) { + $object->setMaxAttempts(null); + } + if (\array_key_exists('Window', $data) && $data['Window'] !== null) { + $object->setWindow($data['Window']); + } + elseif (\array_key_exists('Window', $data) && $data['Window'] === null) { + $object->setWindow(null); + } + return $object; } - if (null !== $object->getWindow()) { - $data->{'Window'} = $object->getWindow(); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('condition') && null !== $object->getCondition()) { + $data['Condition'] = $object->getCondition(); + } + if ($object->isInitialized('delay') && null !== $object->getDelay()) { + $data['Delay'] = $object->getDelay(); + } + if ($object->isInitialized('maxAttempts') && null !== $object->getMaxAttempts()) { + $data['MaxAttempts'] = $object->getMaxAttempts(); + } + if ($object->isInitialized('window') && null !== $object->getWindow()) { + $data['Window'] = $object->getWindow(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecRestartPolicy::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/TaskStatusContainerStatusNormalizer.php b/generated/Normalizer/TaskStatusContainerStatusNormalizer.php new file mode 100644 index 000000000..9251ca2a8 --- /dev/null +++ b/generated/Normalizer/TaskStatusContainerStatusNormalizer.php @@ -0,0 +1,154 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskStatusContainerStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskStatusContainerStatus::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskStatusContainerStatus::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskStatusContainerStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ContainerID', $data) && $data['ContainerID'] !== null) { + $object->setContainerID($data['ContainerID']); + } + elseif (\array_key_exists('ContainerID', $data) && $data['ContainerID'] === null) { + $object->setContainerID(null); + } + if (\array_key_exists('PID', $data) && $data['PID'] !== null) { + $object->setPID($data['PID']); + } + elseif (\array_key_exists('PID', $data) && $data['PID'] === null) { + $object->setPID(null); + } + if (\array_key_exists('ExitCode', $data) && $data['ExitCode'] !== null) { + $object->setExitCode($data['ExitCode']); + } + elseif (\array_key_exists('ExitCode', $data) && $data['ExitCode'] === null) { + $object->setExitCode(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('containerID') && null !== $object->getContainerID()) { + $data['ContainerID'] = $object->getContainerID(); + } + if ($object->isInitialized('pID') && null !== $object->getPID()) { + $data['PID'] = $object->getPID(); + } + if ($object->isInitialized('exitCode') && null !== $object->getExitCode()) { + $data['ExitCode'] = $object->getExitCode(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskStatusContainerStatus::class => false]; + } + } +} else { + class TaskStatusContainerStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskStatusContainerStatus::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskStatusContainerStatus::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskStatusContainerStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ContainerID', $data) && $data['ContainerID'] !== null) { + $object->setContainerID($data['ContainerID']); + } + elseif (\array_key_exists('ContainerID', $data) && $data['ContainerID'] === null) { + $object->setContainerID(null); + } + if (\array_key_exists('PID', $data) && $data['PID'] !== null) { + $object->setPID($data['PID']); + } + elseif (\array_key_exists('PID', $data) && $data['PID'] === null) { + $object->setPID(null); + } + if (\array_key_exists('ExitCode', $data) && $data['ExitCode'] !== null) { + $object->setExitCode($data['ExitCode']); + } + elseif (\array_key_exists('ExitCode', $data) && $data['ExitCode'] === null) { + $object->setExitCode(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('containerID') && null !== $object->getContainerID()) { + $data['ContainerID'] = $object->getContainerID(); + } + if ($object->isInitialized('pID') && null !== $object->getPID()) { + $data['PID'] = $object->getPID(); + } + if ($object->isInitialized('exitCode') && null !== $object->getExitCode()) { + $data['ExitCode'] = $object->getExitCode(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskStatusContainerStatus::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskStatusNormalizer.php b/generated/Normalizer/TaskStatusNormalizer.php index 0b29154a8..fc0827494 100644 --- a/generated/Normalizer/TaskStatusNormalizer.php +++ b/generated/Normalizer/TaskStatusNormalizer.php @@ -2,80 +2,189 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class TaskStatusNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) - { - if ($type !== 'Docker\\API\\Model\\TaskStatus') { - return false; - } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\TaskStatus) { - return true; - } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $object = new \Docker\API\Model\TaskStatus(); - if (property_exists($data, 'Timestamp')) { - $object->setTimestamp($data->{'Timestamp'}); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskStatus::class; } - if (property_exists($data, 'State')) { - $object->setState($data->{'State'}); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskStatus::class; } - if (property_exists($data, 'Message')) { - $object->setMessage($data->{'Message'}); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Timestamp', $data) && $data['Timestamp'] !== null) { + $object->setTimestamp($data['Timestamp']); + } + elseif (\array_key_exists('Timestamp', $data) && $data['Timestamp'] === null) { + $object->setTimestamp(null); + } + if (\array_key_exists('State', $data) && $data['State'] !== null) { + $object->setState($data['State']); + } + elseif (\array_key_exists('State', $data) && $data['State'] === null) { + $object->setState(null); + } + if (\array_key_exists('Message', $data) && $data['Message'] !== null) { + $object->setMessage($data['Message']); + } + elseif (\array_key_exists('Message', $data) && $data['Message'] === null) { + $object->setMessage(null); + } + if (\array_key_exists('Err', $data) && $data['Err'] !== null) { + $object->setErr($data['Err']); + } + elseif (\array_key_exists('Err', $data) && $data['Err'] === null) { + $object->setErr(null); + } + if (\array_key_exists('ContainerStatus', $data) && $data['ContainerStatus'] !== null) { + $object->setContainerStatus($this->denormalizer->denormalize($data['ContainerStatus'], \Docker\API\Model\TaskStatusContainerStatus::class, 'json', $context)); + } + elseif (\array_key_exists('ContainerStatus', $data) && $data['ContainerStatus'] === null) { + $object->setContainerStatus(null); + } + return $object; } - if (property_exists($data, 'Err')) { - $object->setErr($data->{'Err'}); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('timestamp') && null !== $object->getTimestamp()) { + $data['Timestamp'] = $object->getTimestamp(); + } + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['State'] = $object->getState(); + } + if ($object->isInitialized('message') && null !== $object->getMessage()) { + $data['Message'] = $object->getMessage(); + } + if ($object->isInitialized('err') && null !== $object->getErr()) { + $data['Err'] = $object->getErr(); + } + if ($object->isInitialized('containerStatus') && null !== $object->getContainerStatus()) { + $data['ContainerStatus'] = $this->normalizer->normalize($object->getContainerStatus(), 'json', $context); + } + return $data; } - if (property_exists($data, 'ContainerStatus')) { - $object->setContainerStatus($this->serializer->denormalize($data->{'ContainerStatus'}, 'Docker\\API\\Model\\ContainerStatus', 'raw', $context)); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskStatus::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class TaskStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getTimestamp()) { - $data->{'Timestamp'} = $object->getTimestamp(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskStatus::class; } - if (null !== $object->getState()) { - $data->{'State'} = $object->getState(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskStatus::class; } - if (null !== $object->getMessage()) { - $data->{'Message'} = $object->getMessage(); + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Timestamp', $data) && $data['Timestamp'] !== null) { + $object->setTimestamp($data['Timestamp']); + } + elseif (\array_key_exists('Timestamp', $data) && $data['Timestamp'] === null) { + $object->setTimestamp(null); + } + if (\array_key_exists('State', $data) && $data['State'] !== null) { + $object->setState($data['State']); + } + elseif (\array_key_exists('State', $data) && $data['State'] === null) { + $object->setState(null); + } + if (\array_key_exists('Message', $data) && $data['Message'] !== null) { + $object->setMessage($data['Message']); + } + elseif (\array_key_exists('Message', $data) && $data['Message'] === null) { + $object->setMessage(null); + } + if (\array_key_exists('Err', $data) && $data['Err'] !== null) { + $object->setErr($data['Err']); + } + elseif (\array_key_exists('Err', $data) && $data['Err'] === null) { + $object->setErr(null); + } + if (\array_key_exists('ContainerStatus', $data) && $data['ContainerStatus'] !== null) { + $object->setContainerStatus($this->denormalizer->denormalize($data['ContainerStatus'], \Docker\API\Model\TaskStatusContainerStatus::class, 'json', $context)); + } + elseif (\array_key_exists('ContainerStatus', $data) && $data['ContainerStatus'] === null) { + $object->setContainerStatus(null); + } + return $object; } - if (null !== $object->getErr()) { - $data->{'Err'} = $object->getErr(); + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('timestamp') && null !== $object->getTimestamp()) { + $data['Timestamp'] = $object->getTimestamp(); + } + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['State'] = $object->getState(); + } + if ($object->isInitialized('message') && null !== $object->getMessage()) { + $data['Message'] = $object->getMessage(); + } + if ($object->isInitialized('err') && null !== $object->getErr()) { + $data['Err'] = $object->getErr(); + } + if ($object->isInitialized('containerStatus') && null !== $object->getContainerStatus()) { + $data['ContainerStatus'] = $this->normalizer->normalize($object->getContainerStatus(), 'json', $context); + } + return $data; } - if (null !== $object->getContainerStatus()) { - $data->{'ContainerStatus'} = json_decode($this->serializer->normalize($object->getContainerStatus(), 'raw', $context)); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskStatus::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/TaskVersionNormalizer.php b/generated/Normalizer/TaskVersionNormalizer.php new file mode 100644 index 000000000..93a871475 --- /dev/null +++ b/generated/Normalizer/TaskVersionNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskVersion::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskVersion::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskVersion(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Index', $data) && $data['Index'] !== null) { + $object->setIndex($data['Index']); + } + elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { + $object->setIndex(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('index') && null !== $object->getIndex()) { + $data['Index'] = $object->getIndex(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskVersion::class => false]; + } + } +} else { + class TaskVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskVersion::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskVersion::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskVersion(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Index', $data) && $data['Index'] !== null) { + $object->setIndex($data['Index']); + } + elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { + $object->setIndex(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('index') && null !== $object->getIndex()) { + $data['Index'] = $object->getIndex(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskVersion::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ThrottleDeviceNormalizer.php b/generated/Normalizer/ThrottleDeviceNormalizer.php new file mode 100644 index 000000000..d19b2d3fb --- /dev/null +++ b/generated/Normalizer/ThrottleDeviceNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ThrottleDeviceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ThrottleDevice::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ThrottleDevice::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ThrottleDevice(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Path', $data) && $data['Path'] !== null) { + $object->setPath($data['Path']); + } + elseif (\array_key_exists('Path', $data) && $data['Path'] === null) { + $object->setPath(null); + } + if (\array_key_exists('Rate', $data) && $data['Rate'] !== null) { + $object->setRate($data['Rate']); + } + elseif (\array_key_exists('Rate', $data) && $data['Rate'] === null) { + $object->setRate(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('path') && null !== $object->getPath()) { + $data['Path'] = $object->getPath(); + } + if ($object->isInitialized('rate') && null !== $object->getRate()) { + $data['Rate'] = $object->getRate(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ThrottleDevice::class => false]; + } + } +} else { + class ThrottleDeviceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ThrottleDevice::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ThrottleDevice::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ThrottleDevice(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Path', $data) && $data['Path'] !== null) { + $object->setPath($data['Path']); + } + elseif (\array_key_exists('Path', $data) && $data['Path'] === null) { + $object->setPath(null); + } + if (\array_key_exists('Rate', $data) && $data['Rate'] !== null) { + $object->setRate($data['Rate']); + } + elseif (\array_key_exists('Rate', $data) && $data['Rate'] === null) { + $object->setRate(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('path') && null !== $object->getPath()) { + $data['Path'] = $object->getPath(); + } + if ($object->isInitialized('rate') && null !== $object->getRate()) { + $data['Rate'] = $object->getRate(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ThrottleDevice::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/UlimitNormalizer.php b/generated/Normalizer/UlimitNormalizer.php deleted file mode 100644 index 3e36e8e00..000000000 --- a/generated/Normalizer/UlimitNormalizer.php +++ /dev/null @@ -1,69 +0,0 @@ -setName($data->{'Name'}); - } - if (property_exists($data, 'Soft')) { - $object->setSoft($data->{'Soft'}); - } - if (property_exists($data, 'Hard')) { - $object->setHard($data->{'Hard'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - if (null !== $object->getSoft()) { - $data->{'Soft'} = $object->getSoft(); - } - if (null !== $object->getHard()) { - $data->{'Hard'} = $object->getHard(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/UpdateConfigNormalizer.php b/generated/Normalizer/UpdateConfigNormalizer.php deleted file mode 100644 index bc76b0257..000000000 --- a/generated/Normalizer/UpdateConfigNormalizer.php +++ /dev/null @@ -1,68 +0,0 @@ -setParallelism($data->{'Parallelism'}); - } - if (property_exists($data, 'Delay')) { - $object->setDelay($data->{'Delay'}); - } - if (property_exists($data, 'FailureAction')) { - $object->setFailureAction($data->{'FailureAction'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getParallelism()) { - $data->{'Parallelism'} = $object->getParallelism(); - } - if (null !== $object->getDelay()) { - $data->{'Delay'} = $object->getDelay(); - } - if (null !== $object->getFailureAction()) { - $data->{'FailureAction'} = $object->getFailureAction(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/UpdateStatusNormalizer.php b/generated/Normalizer/UpdateStatusNormalizer.php deleted file mode 100644 index 3f450758b..000000000 --- a/generated/Normalizer/UpdateStatusNormalizer.php +++ /dev/null @@ -1,74 +0,0 @@ -setState($data->{'State'}); - } - if (property_exists($data, 'StartedAt')) { - $object->setStartedAt(\DateTime::createFromFormat("Y-m-d\TH:i:sP", $data->{'StartedAt'})); - } - if (property_exists($data, 'CompletedAt')) { - $object->setCompletedAt(\DateTime::createFromFormat("Y-m-d\TH:i:sP", $data->{'CompletedAt'})); - } - if (property_exists($data, 'Message')) { - $object->setMessage($data->{'Message'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getState()) { - $data->{'State'} = $object->getState(); - } - if (null !== $object->getStartedAt()) { - $data->{'StartedAt'} = $object->getStartedAt()->format("Y-m-d\TH:i:sP"); - } - if (null !== $object->getCompletedAt()) { - $data->{'CompletedAt'} = $object->getCompletedAt()->format("Y-m-d\TH:i:sP"); - } - if (null !== $object->getMessage()) { - $data->{'Message'} = $object->getMessage(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/VersionGetResponse200Normalizer.php b/generated/Normalizer/VersionGetResponse200Normalizer.php new file mode 100644 index 000000000..ce44d5f19 --- /dev/null +++ b/generated/Normalizer/VersionGetResponse200Normalizer.php @@ -0,0 +1,280 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class VersionGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\VersionGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\VersionGetResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\VersionGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($data['Version']); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('ApiVersion', $data) && $data['ApiVersion'] !== null) { + $object->setApiVersion($data['ApiVersion']); + } + elseif (\array_key_exists('ApiVersion', $data) && $data['ApiVersion'] === null) { + $object->setApiVersion(null); + } + if (\array_key_exists('MinAPIVersion', $data) && $data['MinAPIVersion'] !== null) { + $object->setMinAPIVersion($data['MinAPIVersion']); + } + elseif (\array_key_exists('MinAPIVersion', $data) && $data['MinAPIVersion'] === null) { + $object->setMinAPIVersion(null); + } + if (\array_key_exists('GitCommit', $data) && $data['GitCommit'] !== null) { + $object->setGitCommit($data['GitCommit']); + } + elseif (\array_key_exists('GitCommit', $data) && $data['GitCommit'] === null) { + $object->setGitCommit(null); + } + if (\array_key_exists('GoVersion', $data) && $data['GoVersion'] !== null) { + $object->setGoVersion($data['GoVersion']); + } + elseif (\array_key_exists('GoVersion', $data) && $data['GoVersion'] === null) { + $object->setGoVersion(null); + } + if (\array_key_exists('Os', $data) && $data['Os'] !== null) { + $object->setOs($data['Os']); + } + elseif (\array_key_exists('Os', $data) && $data['Os'] === null) { + $object->setOs(null); + } + if (\array_key_exists('Arch', $data) && $data['Arch'] !== null) { + $object->setArch($data['Arch']); + } + elseif (\array_key_exists('Arch', $data) && $data['Arch'] === null) { + $object->setArch(null); + } + if (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] !== null) { + $object->setKernelVersion($data['KernelVersion']); + } + elseif (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] === null) { + $object->setKernelVersion(null); + } + if (\array_key_exists('Experimental', $data) && $data['Experimental'] !== null) { + $object->setExperimental($data['Experimental']); + } + elseif (\array_key_exists('Experimental', $data) && $data['Experimental'] === null) { + $object->setExperimental(null); + } + if (\array_key_exists('BuildTime', $data) && $data['BuildTime'] !== null) { + $object->setBuildTime($data['BuildTime']); + } + elseif (\array_key_exists('BuildTime', $data) && $data['BuildTime'] === null) { + $object->setBuildTime(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $object->getVersion(); + } + if ($object->isInitialized('apiVersion') && null !== $object->getApiVersion()) { + $data['ApiVersion'] = $object->getApiVersion(); + } + if ($object->isInitialized('minAPIVersion') && null !== $object->getMinAPIVersion()) { + $data['MinAPIVersion'] = $object->getMinAPIVersion(); + } + if ($object->isInitialized('gitCommit') && null !== $object->getGitCommit()) { + $data['GitCommit'] = $object->getGitCommit(); + } + if ($object->isInitialized('goVersion') && null !== $object->getGoVersion()) { + $data['GoVersion'] = $object->getGoVersion(); + } + if ($object->isInitialized('os') && null !== $object->getOs()) { + $data['Os'] = $object->getOs(); + } + if ($object->isInitialized('arch') && null !== $object->getArch()) { + $data['Arch'] = $object->getArch(); + } + if ($object->isInitialized('kernelVersion') && null !== $object->getKernelVersion()) { + $data['KernelVersion'] = $object->getKernelVersion(); + } + if ($object->isInitialized('experimental') && null !== $object->getExperimental()) { + $data['Experimental'] = $object->getExperimental(); + } + if ($object->isInitialized('buildTime') && null !== $object->getBuildTime()) { + $data['BuildTime'] = $object->getBuildTime(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\VersionGetResponse200::class => false]; + } + } +} else { + class VersionGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\VersionGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\VersionGetResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\VersionGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($data['Version']); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('ApiVersion', $data) && $data['ApiVersion'] !== null) { + $object->setApiVersion($data['ApiVersion']); + } + elseif (\array_key_exists('ApiVersion', $data) && $data['ApiVersion'] === null) { + $object->setApiVersion(null); + } + if (\array_key_exists('MinAPIVersion', $data) && $data['MinAPIVersion'] !== null) { + $object->setMinAPIVersion($data['MinAPIVersion']); + } + elseif (\array_key_exists('MinAPIVersion', $data) && $data['MinAPIVersion'] === null) { + $object->setMinAPIVersion(null); + } + if (\array_key_exists('GitCommit', $data) && $data['GitCommit'] !== null) { + $object->setGitCommit($data['GitCommit']); + } + elseif (\array_key_exists('GitCommit', $data) && $data['GitCommit'] === null) { + $object->setGitCommit(null); + } + if (\array_key_exists('GoVersion', $data) && $data['GoVersion'] !== null) { + $object->setGoVersion($data['GoVersion']); + } + elseif (\array_key_exists('GoVersion', $data) && $data['GoVersion'] === null) { + $object->setGoVersion(null); + } + if (\array_key_exists('Os', $data) && $data['Os'] !== null) { + $object->setOs($data['Os']); + } + elseif (\array_key_exists('Os', $data) && $data['Os'] === null) { + $object->setOs(null); + } + if (\array_key_exists('Arch', $data) && $data['Arch'] !== null) { + $object->setArch($data['Arch']); + } + elseif (\array_key_exists('Arch', $data) && $data['Arch'] === null) { + $object->setArch(null); + } + if (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] !== null) { + $object->setKernelVersion($data['KernelVersion']); + } + elseif (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] === null) { + $object->setKernelVersion(null); + } + if (\array_key_exists('Experimental', $data) && $data['Experimental'] !== null) { + $object->setExperimental($data['Experimental']); + } + elseif (\array_key_exists('Experimental', $data) && $data['Experimental'] === null) { + $object->setExperimental(null); + } + if (\array_key_exists('BuildTime', $data) && $data['BuildTime'] !== null) { + $object->setBuildTime($data['BuildTime']); + } + elseif (\array_key_exists('BuildTime', $data) && $data['BuildTime'] === null) { + $object->setBuildTime(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $object->getVersion(); + } + if ($object->isInitialized('apiVersion') && null !== $object->getApiVersion()) { + $data['ApiVersion'] = $object->getApiVersion(); + } + if ($object->isInitialized('minAPIVersion') && null !== $object->getMinAPIVersion()) { + $data['MinAPIVersion'] = $object->getMinAPIVersion(); + } + if ($object->isInitialized('gitCommit') && null !== $object->getGitCommit()) { + $data['GitCommit'] = $object->getGitCommit(); + } + if ($object->isInitialized('goVersion') && null !== $object->getGoVersion()) { + $data['GoVersion'] = $object->getGoVersion(); + } + if ($object->isInitialized('os') && null !== $object->getOs()) { + $data['Os'] = $object->getOs(); + } + if ($object->isInitialized('arch') && null !== $object->getArch()) { + $data['Arch'] = $object->getArch(); + } + if ($object->isInitialized('kernelVersion') && null !== $object->getKernelVersion()) { + $data['KernelVersion'] = $object->getKernelVersion(); + } + if ($object->isInitialized('experimental') && null !== $object->getExperimental()) { + $data['Experimental'] = $object->getExperimental(); + } + if ($object->isInitialized('buildTime') && null !== $object->getBuildTime()) { + $data['BuildTime'] = $object->getBuildTime(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\VersionGetResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/VersionNormalizer.php b/generated/Normalizer/VersionNormalizer.php deleted file mode 100644 index ced15d304..000000000 --- a/generated/Normalizer/VersionNormalizer.php +++ /dev/null @@ -1,105 +0,0 @@ -setVersion($data->{'Version'}); - } - if (property_exists($data, 'Os')) { - $object->setOs($data->{'Os'}); - } - if (property_exists($data, 'KernelVersion')) { - $object->setKernelVersion($data->{'KernelVersion'}); - } - if (property_exists($data, 'GoVersion')) { - $object->setGoVersion($data->{'GoVersion'}); - } - if (property_exists($data, 'GitCommit')) { - $object->setGitCommit($data->{'GitCommit'}); - } - if (property_exists($data, 'Arch')) { - $object->setArch($data->{'Arch'}); - } - if (property_exists($data, 'ApiVersion')) { - $object->setApiVersion($data->{'ApiVersion'}); - } - if (property_exists($data, 'Experimental')) { - $object->setExperimental($data->{'Experimental'}); - } - if (property_exists($data, 'BuildTime')) { - $object->setBuildTime($data->{'BuildTime'}); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getVersion()) { - $data->{'Version'} = $object->getVersion(); - } - if (null !== $object->getOs()) { - $data->{'Os'} = $object->getOs(); - } - if (null !== $object->getKernelVersion()) { - $data->{'KernelVersion'} = $object->getKernelVersion(); - } - if (null !== $object->getGoVersion()) { - $data->{'GoVersion'} = $object->getGoVersion(); - } - if (null !== $object->getGitCommit()) { - $data->{'GitCommit'} = $object->getGitCommit(); - } - if (null !== $object->getArch()) { - $data->{'Arch'} = $object->getArch(); - } - if (null !== $object->getApiVersion()) { - $data->{'ApiVersion'} = $object->getApiVersion(); - } - if (null !== $object->getExperimental()) { - $data->{'Experimental'} = $object->getExperimental(); - } - if (null !== $object->getBuildTime()) { - $data->{'BuildTime'} = $object->getBuildTime(); - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/VolumeConfigNormalizer.php b/generated/Normalizer/VolumeConfigNormalizer.php deleted file mode 100644 index 1059f915b..000000000 --- a/generated/Normalizer/VolumeConfigNormalizer.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($data->{'Name'}); - } - if (property_exists($data, 'Driver')) { - $object->setDriver($data->{'Driver'}); - } - if (property_exists($data, 'DriverOpts')) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data->{'DriverOpts'} as $key => $value) { - $values[$key] = $value; - } - $object->setDriverOpts($values); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); - } - if (null !== $object->getDriver()) { - $data->{'Driver'} = $object->getDriver(); - } - if (null !== $object->getDriverOpts()) { - $values = new \stdClass(); - foreach ($object->getDriverOpts() as $key => $value) { - $values->{$key} = $value; - } - $data->{'DriverOpts'} = $values; - } - - return json_encode($data); - } -} diff --git a/generated/Normalizer/VolumeListNormalizer.php b/generated/Normalizer/VolumeListNormalizer.php deleted file mode 100644 index 198faf484..000000000 --- a/generated/Normalizer/VolumeListNormalizer.php +++ /dev/null @@ -1,77 +0,0 @@ -{'Volumes'}; - if (is_array($data->{'Volumes'})) { - $values = []; - foreach ($data->{'Volumes'} as $value_1) { - $values[] = $this->serializer->denormalize($value_1, 'Docker\\API\\Model\\Volume', 'raw', $context); - } - $value = $values; - } - if (is_null($data->{'Volumes'})) { - $value = $data->{'Volumes'}; - } - $object->setVolumes($value); - } - - return $object; - } - - public function normalize($object, $format = null, array $context = []) - { - $data = new \stdClass(); - $value = $object->getVolumes(); - if (is_array($object->getVolumes())) { - $values = []; - foreach ($object->getVolumes() as $value_1) { - $values[] = $value_1; - } - $value = $values; - } - if (is_null($object->getVolumes())) { - $value = $object->getVolumes(); - } - $data->{'Volumes'} = $value; - - return json_encode($data); - } -} diff --git a/generated/Normalizer/VolumeNormalizer.php b/generated/Normalizer/VolumeNormalizer.php index 6827b9123..0b308d1b9 100644 --- a/generated/Normalizer/VolumeNormalizer.php +++ b/generated/Normalizer/VolumeNormalizer.php @@ -2,68 +2,267 @@ namespace Docker\API\Normalizer; +use Jane\Component\JsonSchemaRuntime\Reference; +use Docker\API\Runtime\Normalizer\CheckArray; +use Docker\API\Runtime\Normalizer\ValidatorTrait; +use Symfony\Component\Serializer\Exception\InvalidArgumentException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; +use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; -use Symfony\Component\Serializer\SerializerAwareInterface; -use Symfony\Component\Serializer\SerializerAwareTrait; - -class VolumeNormalizer implements SerializerAwareInterface, DenormalizerAwareInterface, DenormalizerInterface, NormalizerAwareInterface, NormalizerInterface -{ - use SerializerAwareTrait; - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - - public function supportsDenormalization($data, $type, $format = null) +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +use Symfony\Component\HttpKernel\Kernel; +if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class VolumeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - if ($type !== 'Docker\\API\\Model\\Volume') { - return false; + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Volume::class; } - - return true; - } - - public function supportsNormalization($data, $format = null) - { - if ($data instanceof \Docker\API\Model\Volume) { - return true; + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Volume::class; } - - return false; - } - - public function denormalize($data, $class, $format = null, array $context = []) - { - $object = new \Docker\API\Model\Volume(); - if (property_exists($data, 'Name')) { - $object->setName($data->{'Name'}); + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Volume(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('Mountpoint', $data) && $data['Mountpoint'] !== null) { + $object->setMountpoint($data['Mountpoint']); + } + elseif (\array_key_exists('Mountpoint', $data) && $data['Mountpoint'] === null) { + $object->setMountpoint(null); + } + if (\array_key_exists('Status', $data) && $data['Status'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Status'] as $key => $value) { + $values[$key] = $value; + } + $object->setStatus($values); + } + elseif (\array_key_exists('Status', $data) && $data['Status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $object->setLabels($values_1); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Scope', $data) && $data['Scope'] !== null) { + $object->setScope($data['Scope']); + } + elseif (\array_key_exists('Scope', $data) && $data['Scope'] === null) { + $object->setScope(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; + } + $object->setOptions($values_2); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + if (\array_key_exists('UsageData', $data) && $data['UsageData'] !== null) { + $object->setUsageData($this->denormalizer->denormalize($data['UsageData'], \Docker\API\Model\VolumeUsageData::class, 'json', $context)); + } + elseif (\array_key_exists('UsageData', $data) && $data['UsageData'] === null) { + $object->setUsageData(null); + } + return $object; } - if (property_exists($data, 'Driver')) { - $object->setDriver($data->{'Driver'}); + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Name'] = $object->getName(); + $data['Driver'] = $object->getDriver(); + $data['Mountpoint'] = $object->getMountpoint(); + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $values = []; + foreach ($object->getStatus() as $key => $value) { + $values[$key] = $value; + } + $data['Status'] = $values; + } + $values_1 = []; + foreach ($object->getLabels() as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $data['Labels'] = $values_1; + $data['Scope'] = $object->getScope(); + $values_2 = []; + foreach ($object->getOptions() as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; + } + $data['Options'] = $values_2; + if ($object->isInitialized('usageData') && null !== $object->getUsageData()) { + $data['UsageData'] = $this->normalizer->normalize($object->getUsageData(), 'json', $context); + } + return $data; } - if (property_exists($data, 'Mountpoint')) { - $object->setMountpoint($data->{'Mountpoint'}); + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Volume::class => false]; } - - return $object; } - - public function normalize($object, $format = null, array $context = []) +} else { + class VolumeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { - $data = new \stdClass(); - if (null !== $object->getName()) { - $data->{'Name'} = $object->getName(); + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Volume::class; } - if (null !== $object->getDriver()) { - $data->{'Driver'} = $object->getDriver(); + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Volume::class; } - if (null !== $object->getMountpoint()) { - $data->{'Mountpoint'} = $object->getMountpoint(); + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Volume(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('Mountpoint', $data) && $data['Mountpoint'] !== null) { + $object->setMountpoint($data['Mountpoint']); + } + elseif (\array_key_exists('Mountpoint', $data) && $data['Mountpoint'] === null) { + $object->setMountpoint(null); + } + if (\array_key_exists('Status', $data) && $data['Status'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Status'] as $key => $value) { + $values[$key] = $value; + } + $object->setStatus($values); + } + elseif (\array_key_exists('Status', $data) && $data['Status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $object->setLabels($values_1); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Scope', $data) && $data['Scope'] !== null) { + $object->setScope($data['Scope']); + } + elseif (\array_key_exists('Scope', $data) && $data['Scope'] === null) { + $object->setScope(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; + } + $object->setOptions($values_2); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + if (\array_key_exists('UsageData', $data) && $data['UsageData'] !== null) { + $object->setUsageData($this->denormalizer->denormalize($data['UsageData'], \Docker\API\Model\VolumeUsageData::class, 'json', $context)); + } + elseif (\array_key_exists('UsageData', $data) && $data['UsageData'] === null) { + $object->setUsageData(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Name'] = $object->getName(); + $data['Driver'] = $object->getDriver(); + $data['Mountpoint'] = $object->getMountpoint(); + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $values = []; + foreach ($object->getStatus() as $key => $value) { + $values[$key] = $value; + } + $data['Status'] = $values; + } + $values_1 = []; + foreach ($object->getLabels() as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $data['Labels'] = $values_1; + $data['Scope'] = $object->getScope(); + $values_2 = []; + foreach ($object->getOptions() as $key_2 => $value_2) { + $values_2[$key_2] = $value_2; + } + $data['Options'] = $values_2; + if ($object->isInitialized('usageData') && null !== $object->getUsageData()) { + $data['UsageData'] = $this->normalizer->normalize($object->getUsageData(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Volume::class => false]; } - - return json_encode($data); } -} +} \ No newline at end of file diff --git a/generated/Normalizer/VolumeUsageDataNormalizer.php b/generated/Normalizer/VolumeUsageDataNormalizer.php new file mode 100644 index 000000000..f35ba7b73 --- /dev/null +++ b/generated/Normalizer/VolumeUsageDataNormalizer.php @@ -0,0 +1,128 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class VolumeUsageDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\VolumeUsageData::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\VolumeUsageData::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\VolumeUsageData(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($data['Size']); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + if (\array_key_exists('RefCount', $data) && $data['RefCount'] !== null) { + $object->setRefCount($data['RefCount']); + } + elseif (\array_key_exists('RefCount', $data) && $data['RefCount'] === null) { + $object->setRefCount(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Size'] = $object->getSize(); + $data['RefCount'] = $object->getRefCount(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\VolumeUsageData::class => false]; + } + } +} else { + class VolumeUsageDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\VolumeUsageData::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\VolumeUsageData::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\VolumeUsageData(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($data['Size']); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + if (\array_key_exists('RefCount', $data) && $data['RefCount'] !== null) { + $object->setRefCount($data['RefCount']); + } + elseif (\array_key_exists('RefCount', $data) && $data['RefCount'] === null) { + $object->setRefCount(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Size'] = $object->getSize(); + $data['RefCount'] = $object->getRefCount(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\VolumeUsageData::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/VolumesCreatePostBodyNormalizer.php b/generated/Normalizer/VolumesCreatePostBodyNormalizer.php new file mode 100644 index 000000000..08acdd70c --- /dev/null +++ b/generated/Normalizer/VolumesCreatePostBodyNormalizer.php @@ -0,0 +1,204 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class VolumesCreatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\VolumesCreatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\VolumesCreatePostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\VolumesCreatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('DriverOpts', $data) && $data['DriverOpts'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['DriverOpts'] as $key => $value) { + $values[$key] = $value; + } + $object->setDriverOpts($values); + } + elseif (\array_key_exists('DriverOpts', $data) && $data['DriverOpts'] === null) { + $object->setDriverOpts(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $object->setLabels($values_1); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('driverOpts') && null !== $object->getDriverOpts()) { + $values = []; + foreach ($object->getDriverOpts() as $key => $value) { + $values[$key] = $value; + } + $data['DriverOpts'] = $values; + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_1 = []; + foreach ($object->getLabels() as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $data['Labels'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\VolumesCreatePostBody::class => false]; + } + } +} else { + class VolumesCreatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\VolumesCreatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\VolumesCreatePostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\VolumesCreatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('DriverOpts', $data) && $data['DriverOpts'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['DriverOpts'] as $key => $value) { + $values[$key] = $value; + } + $object->setDriverOpts($values); + } + elseif (\array_key_exists('DriverOpts', $data) && $data['DriverOpts'] === null) { + $object->setDriverOpts(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $object->setLabels($values_1); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('driverOpts') && null !== $object->getDriverOpts()) { + $values = []; + foreach ($object->getDriverOpts() as $key => $value) { + $values[$key] = $value; + } + $data['DriverOpts'] = $values; + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_1 = []; + foreach ($object->getLabels() as $key_1 => $value_1) { + $values_1[$key_1] = $value_1; + } + $data['Labels'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\VolumesCreatePostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/VolumesGetResponse200Normalizer.php b/generated/Normalizer/VolumesGetResponse200Normalizer.php new file mode 100644 index 000000000..2ae7446dc --- /dev/null +++ b/generated/Normalizer/VolumesGetResponse200Normalizer.php @@ -0,0 +1,160 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class VolumesGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\VolumesGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\VolumesGetResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\VolumesGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { + $values = []; + foreach ($data['Volumes'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\Volume::class, 'json', $context); + } + $object->setVolumes($values); + } + elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { + $object->setVolumes(null); + } + if (\array_key_exists('Warnings', $data) && $data['Warnings'] !== null) { + $values_1 = []; + foreach ($data['Warnings'] as $value_1) { + $values_1[] = $value_1; + } + $object->setWarnings($values_1); + } + elseif (\array_key_exists('Warnings', $data) && $data['Warnings'] === null) { + $object->setWarnings(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $values = []; + foreach ($object->getVolumes() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Volumes'] = $values; + $values_1 = []; + foreach ($object->getWarnings() as $value_1) { + $values_1[] = $value_1; + } + $data['Warnings'] = $values_1; + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\VolumesGetResponse200::class => false]; + } + } +} else { + class VolumesGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\VolumesGetResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\VolumesGetResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\VolumesGetResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { + $values = []; + foreach ($data['Volumes'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\Volume::class, 'json', $context); + } + $object->setVolumes($values); + } + elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { + $object->setVolumes(null); + } + if (\array_key_exists('Warnings', $data) && $data['Warnings'] !== null) { + $values_1 = []; + foreach ($data['Warnings'] as $value_1) { + $values_1[] = $value_1; + } + $object->setWarnings($values_1); + } + elseif (\array_key_exists('Warnings', $data) && $data['Warnings'] === null) { + $object->setWarnings(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $values = []; + foreach ($object->getVolumes() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Volumes'] = $values; + $values_1 = []; + foreach ($object->getWarnings() as $value_1) { + $values_1[] = $value_1; + } + $data['Warnings'] = $values_1; + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\VolumesGetResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/VolumesPrunePostResponse200Normalizer.php b/generated/Normalizer/VolumesPrunePostResponse200Normalizer.php new file mode 100644 index 000000000..41af3a5ed --- /dev/null +++ b/generated/Normalizer/VolumesPrunePostResponse200Normalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class VolumesPrunePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\VolumesPrunePostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\VolumesPrunePostResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\VolumesPrunePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('VolumesDeleted', $data) && $data['VolumesDeleted'] !== null) { + $values = []; + foreach ($data['VolumesDeleted'] as $value) { + $values[] = $value; + } + $object->setVolumesDeleted($values); + } + elseif (\array_key_exists('VolumesDeleted', $data) && $data['VolumesDeleted'] === null) { + $object->setVolumesDeleted(null); + } + if (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] !== null) { + $object->setSpaceReclaimed($data['SpaceReclaimed']); + } + elseif (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] === null) { + $object->setSpaceReclaimed(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('volumesDeleted') && null !== $object->getVolumesDeleted()) { + $values = []; + foreach ($object->getVolumesDeleted() as $value) { + $values[] = $value; + } + $data['VolumesDeleted'] = $values; + } + if ($object->isInitialized('spaceReclaimed') && null !== $object->getSpaceReclaimed()) { + $data['SpaceReclaimed'] = $object->getSpaceReclaimed(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\VolumesPrunePostResponse200::class => false]; + } + } +} else { + class VolumesPrunePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\VolumesPrunePostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\VolumesPrunePostResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\VolumesPrunePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('VolumesDeleted', $data) && $data['VolumesDeleted'] !== null) { + $values = []; + foreach ($data['VolumesDeleted'] as $value) { + $values[] = $value; + } + $object->setVolumesDeleted($values); + } + elseif (\array_key_exists('VolumesDeleted', $data) && $data['VolumesDeleted'] === null) { + $object->setVolumesDeleted(null); + } + if (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] !== null) { + $object->setSpaceReclaimed($data['SpaceReclaimed']); + } + elseif (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] === null) { + $object->setSpaceReclaimed(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('volumesDeleted') && null !== $object->getVolumesDeleted()) { + $values = []; + foreach ($object->getVolumesDeleted() as $value) { + $values[] = $value; + } + $data['VolumesDeleted'] = $values; + } + if ($object->isInitialized('spaceReclaimed') && null !== $object->getSpaceReclaimed()) { + $data['SpaceReclaimed'] = $object->getSpaceReclaimed(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\VolumesPrunePostResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Resource/ContainerResource.php b/generated/Resource/ContainerResource.php deleted file mode 100644 index f24cd503c..000000000 --- a/generated/Resource/ContainerResource.php +++ /dev/null @@ -1,830 +0,0 @@ - last created containers, include non-running ones. - * @var string $since Show only containers created since Id, include non-running ones. - * @var string $before Show only containers created before Id, include non-running ones. - * @var bool $size 1/True/true or 0/False/false, Show the containers sizes. - * @var array $filters A JSON encoded value of the filters (a map[string][]string) to process on the containers list - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\ContainerInfo[] - */ - public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $queryParam->setDefault('all', false); - $queryParam->setDefault('limit', null); - $queryParam->setDefault('since', null); - $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); - $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'); - } - } - - return $response; - } - - /** - * Create a container. - * - * @param \Docker\API\Model\ContainerConfig $container Container to create - * @param array $parameters { - * - * @var string $name Assign the specified name to the container. Must match /?[a-zA-Z0-9_-]+. - * @var string $Content-Type Content Type of input - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\ContainerCreateResult - */ - public function create(\Docker\API\Model\ContainerConfig $container, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $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->normalize($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'); - } - } - - return $response; - } - - /** - * Return low-level information on the container id. - * - * @param string $id The container id or name - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\Container - */ - public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/containers/{id}/json'; - $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\\Container', 'json'); - } - } - - return $response; - } - - /** - * List processes running inside the container id. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var string $ps_args ps arguments to use (e.g., aux) - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\ContainerTop - */ - 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); - $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'); - } - } - - return $response; - } - - /** - * Get stdout and stderr logs from the container id. Note: This endpoint works only for containers with json-file logging driver. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var bool $follow 1/True/true or 0/False/false, return stream. Default false. - * @var bool $stdout 1/True/true or 0/False/false, show stdout log. Default false. - * @var bool $stderr 1/True/true or 0/False/false, show stderr log. Default false. - * @var int $since UNIX timestamp (integer) to filter logs. Specifying a timestamp will only output log-entries since that timestamp. Default: 0 (unfiltered) - * @var bool $timestamps 1/True/true or 0/False/false, print timestamps for every log line. - * @var string $tail Output specified number of lines at the end of logs: all or . Default all. - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function logs($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $queryParam->setDefault('follow', false); - $queryParam->setDefault('stdout', false); - $queryParam->setDefault('stderr', false); - $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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Inspect changes on a container’s filesystem. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var int $kind Kind of changes - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\ContainerChange[] - */ - 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); - $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'); - } - } - - return $response; - } - - /** - * Export the contents of container id. - * - * @param string $id The container id or name - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function export($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/containers/{id}/export'; - $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; - } - - /** - * This endpoint returns a live stream of a container’s resource usage statistics. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var bool $stream Stream stats - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - 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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Resize the TTY for container with id. The unit is number of characters. You must restart the container for the resize to take effect. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var int $h Height of the tty session - * @var int $w Width of the tty session - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - 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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Start the container id. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var string $detachKeys Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl- where is one of: a-z, @, ^, [, , or _. - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - 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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Stop the container id. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var int $t number of seconds to wait before killing the container - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - 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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Restart the container id. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var int $t number of seconds to wait before killing the container - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - 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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Send a posix signal to a container. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var string $signal Signal to send to the container, integer or string like SIGINT, defaults to SIGKILL - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - 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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Update resource configs of one or more containers. - * - * @param string $id The container id or name - * @param \Docker\API\Model\ResourceUpdate $resourceConfig Resources to update on container - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\ContainerUpdateResult - */ - public function update($id, \Docker\API\Model\ResourceUpdate $resourceConfig, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/containers/{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->normalize($resourceConfig, '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 ('200' == $response->getStatusCode()) { - return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ContainerUpdateResult', 'json'); - } - } - - return $response; - } - - /** - * Rename the container id to a new_name. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var string $name New name for the container - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - 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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Pause the container id. - * - * @param string $id The container id or name - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function pause($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/containers/{id}/pause'; - $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; - } - - /** - * Unpause the container id. - * - * @param string $id The container id or name - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function unpause($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/containers/{id}/unpause'; - $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; - } - - /** - * Attach to the container id. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var string $logs 1/True/true or 0/False/false, return logs. Default false - * @var string $stream 1/True/true or 0/False/false, return stream. Default false - * @var string $stdin 1/True/true or 0/False/false, if stream=true, attach to stdin. Default false. - * @var string $stdout 1/True/true or 0/False/false, if logs=true, return stdout log, if stream=true, attach to stdout. Default false. - * @var string $stderr 1/True/true or 0/False/false, if logs=true, return stderr log, if stream=true, attach to stderr. Default false. - * @var string $detachKeys Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl- where is one of: a-z, @, ^, [, , or _. - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function attach($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $queryParam->setDefault('logs', null); - $queryParam->setDefault('stream', null); - $queryParam->setDefault('stdin', null); - $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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Attach to the container id with a websocket. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var string $logs 1/True/true or 0/False/false, return logs. Default false - * @var string $stream 1/True/true or 0/False/false, return stream. Default false - * @var string $stdin 1/True/true or 0/False/false, if stream=true, attach to stdin. Default false. - * @var string $stdout 1/True/true or 0/False/false, if logs=true, return stdout log, if stream=true, attach to stdout. Default false. - * @var string $stderr 1/True/true or 0/False/false, if logs=true, return stderr log, if stream=true, attach to stderr. Default false. - * @var string $detachKeys Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl- where is one of: a-z, @, ^, [, , or _. - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function attachWebsocket($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $queryParam->setDefault('logs', null); - $queryParam->setDefault('stream', null); - $queryParam->setDefault('stdin', null); - $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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Block until container id stops, then returns the exit code. - * - * @param string $id The container id or name - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\ContainerWait - */ - public function wait($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/containers/{id}/wait'; - $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(); - if (self::FETCH_OBJECT == $fetch) { - if ('200' == $response->getStatusCode()) { - return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ContainerWait', 'json'); - } - } - - return $response; - } - - /** - * Remove the container id from the filesystem. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var string $v 1/True/true or 0/False/false, Remove the volumes associated to the container. Default false. - * @var string $force 1/True/true or 0/False/false, Kill then remove the container. Default false. - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - 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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Get an tar archive of a resource in the filesystem of container id. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var string $path Resource in the container’s filesystem to archive. - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - 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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Retrieving information about files and folders in a container. - * - * @param string $id The container id or name - * @param array $parameters { - * - * @var string $path Resource in the container’s filesystem to archive. - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function getArchiveInformation($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('HEAD', $url, $headers, $body); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Upload a tar archive to be extracted to a path in the filesystem of container id. - * - * @param string $id The container id or name - * @param string $inputStream The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz. - * @param array $parameters { - * - * @var string $path Path to a directory in the container to extract the archive’s contents into. - * @var string $noOverwriteDirNonDir If “1”, “true”, or “True” then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa. - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function putArchive($id, $inputStream, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $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); - $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 deleted file mode 100644 index 72de1d8aa..000000000 --- a/generated/Resource/ExecResource.php +++ /dev/null @@ -1,148 +0,0 @@ -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->normalize($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'); - } - } - - return $response; - } - - /** - * Starts a previously set up exec instance id. If detach is true, this API returns after starting the exec command. Otherwise, this API sets up an interactive session with the exec command. - * - * @param string $id Exec instance id - * @param \Docker\API\Model\ExecStartConfig $execStartConfig Exec configuration - * @param array $parameters { - * - * @var string $Content-Type Content Type Header - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function start($id, \Docker\API\Model\ExecStartConfig $execStartConfig, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $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->normalize($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; - } - - /** - * Resize the tty session used by the exec command id. - * - * @param string $id Exec instance id - * @param array $parameters { - * - * @var int $h Height of the tty session - * @var int $w Width of the tty session - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - 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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Return low-level information about the exec command id. - * - * @param string $id Exec instance id - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\ExecCommand - */ - public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/exec/{id}/json'; - $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\\ExecCommand', 'json'); - } - } - - return $response; - } -} diff --git a/generated/Resource/ImageResource.php b/generated/Resource/ImageResource.php deleted file mode 100644 index 9a9e9fb0d..000000000 --- a/generated/Resource/ImageResource.php +++ /dev/null @@ -1,495 +0,0 @@ -setDefault('all', false); - $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); - $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'); - } - } - - return $response; - } - - /** - * Build an image from Dockerfile via stdin. - * - * @param string $inputStream The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz. - * @param array $parameters { - * - * @var string $dockerfile Path within the build context to the Dockerfile. This is ignored if remote is specified and points to an individual filename. - * @var string $t A repository name (and optionally a tag) to apply to the resulting image in case of success. - * @var string $remote A Git repository URI or HTTP/HTTPS URI build source. If the URI specifies a filename, the file’s contents are placed into a file called Dockerfile. - * @var bool $q Suppress verbose build output. - * @var bool $nocache Do not use the cache when building the image. - * @var string $pull Attempt to pull the image even if an older image exists locally - * @var bool $rm Remove intermediate containers after a successful build (default behavior). - * @var bool $forcerm always remove intermediate containers (includes rm) - * @var int $memory Set memory limit for build. - * @var int $memswap Total memory (memory + swap), -1 to disable swap. - * @var int $cpushares CPU shares (relative weight). - * @var string $cpusetcpus CPUs in which to allow execution (e.g., 0-3, 0,1). - * @var int $cpuperiod The length of a CPU period in microseconds. - * @var int $cpuquota Microseconds of CPU time that the container can get in a CPU period. - * @var int $buildargs Total memory (memory + swap), -1 to disable swap. - * @var string $Content-type Set to 'application/tar'. - * @var string $X-Registry-Config A base64-url-safe-encoded Registry Auth Config JSON object - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function build($inputStream, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $queryParam->setDefault('dockerfile', null); - $queryParam->setDefault('t', null); - $queryParam->setDefault('remote', null); - $queryParam->setDefault('q', false); - $queryParam->setDefault('nocache', false); - $queryParam->setDefault('pull', null); - $queryParam->setDefault('rm', true); - $queryParam->setDefault('forcerm', false); - $queryParam->setDefault('memory', null); - $queryParam->setDefault('memswap', null); - $queryParam->setDefault('cpushares', null); - $queryParam->setDefault('cpusetcpus', null); - $queryParam->setDefault('cpuperiod', null); - $queryParam->setDefault('cpuquota', null); - $queryParam->setDefault('buildargs', null); - $queryParam->setDefault('Content-type', 'application/tar'); - $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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Create an image either by pulling it from the registry or by importing it. - * - * @param string $inputImage Image content if the value - has been specified in fromSrc query parameter - * @param array $parameters { - * - * @var string $fromImage Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. - * @var string $fromSrc Source to import. The value may be a URL from which the image can be retrieved or - to read the image from the request body. This parameter may only be used when importing an image. - * @var string $repo Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image. - * @var string $tag Tag or digest. - * @var string $X-Registry-Auth A base64-encoded AuthConfig object - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function create($inputImage, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $queryParam->setDefault('fromImage', null); - $queryParam->setDefault('fromSrc', null); - $queryParam->setDefault('repo', null); - $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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Return low-level information on the image name. - * - * @param string $name Image name or id - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\Image - */ - public function find($name, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/images/{name}/json'; - $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('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\\Image', 'json'); - } - } - - return $response; - } - - /** - * Return the history of the image name. - * - * @param string $name Image name or id - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\ImageHistoryItem[] - */ - public function history($name, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/images/{name}/history'; - $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('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\\ImageHistoryItem[]', 'json'); - } - } - - return $response; - } - - /** - * Push the image name on the registry. - * - * @param string $name Image name or id - * @param array $parameters { - * - * @var string $tag The tag to associate with the image on the registry. - * @var string $X-Registry-Auth A base64-encoded AuthConfig object - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function push($name, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Tag the image name into a repository. - * - * @param string $name Image name or id - * @param array $parameters { - * - * @var string $repo The repository to tag in. - * @var string $tag The new tag name. - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - 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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Remove the image name from the filesystem. - * - * @param string $name Image name or id - * @param array $parameters { - * - * @var string $force 1/True/true or 0/False/false, default false - * @var string $noprune 1/True/true or 0/False/false, default false. - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - 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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Search for an image on Docker Hub. - * - * @param array $parameters { - * - * @var string $term Term to search - * @var int $limit Maximum returned search results - * @var string $filters A JSON encoded value of the filters (a map[string][]string) to process on the images list. - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\ImageSearchResult[] - */ - public function search($parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $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); - $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'); - } - } - - return $response; - } - - /** - * Create a new image from a container’s changes. - * - * @param \Docker\API\Model\ContainerConfig $containerConfig The container configuration - * @param array $parameters { - * - * @var string $container Container id or name to commit - * @var string $repo Repository name for the created image - * @var string $tag Tag name for the create image - * @var string $comment Commit message - * @var string $author author (e.g., “John Hannibal Smith “) - * @var string $pause 1/True/true or 0/False/false, whether to pause the container before committing - * @var string $changes Dockerfile instructions to apply while committing - * @var string $Content-Type Content Type of input - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\CommitResult - */ - public function commit(\Docker\API\Model\ContainerConfig $containerConfig, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $queryParam->setDefault('container', null); - $queryParam->setDefault('repo', null); - $queryParam->setDefault('tag', null); - $queryParam->setDefault('comment', null); - $queryParam->setDefault('author', null); - $queryParam->setDefault('pause', null); - $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->normalize($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'); - } - } - - return $response; - } - - /** - * Get a tarball containing all images and metadata for the repository specified by name. - * - * @param string $name Image name or id - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function save($name, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/images/{name}/get'; - $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('GET', $url, $headers, $body); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Get a tarball containing all images and metadata for one or more repositories. - * - * @param array $parameters { - * - * @var array $names Image names to filter - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - 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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Load a set of images and tags into a Docker repository. See the image tarball format for more details. - * - * @param string $imagesTarball Tar archive containing images - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function load($imagesTarball, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/images/load'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $imagesTarball; - $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/MiscResource.php b/generated/Resource/MiscResource.php deleted file mode 100644 index 470760f35..000000000 --- a/generated/Resource/MiscResource.php +++ /dev/null @@ -1,159 +0,0 @@ -buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $this->serializer->normalize($authConfig, '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 ('200' == $response->getStatusCode()) { - return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\AuthResult', 'json'); - } - } - - return $response; - } - - /** - * Display system-wide information. - * - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\SystemInformation - */ - public function getSystemInformation($parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/info'; - $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\\SystemInformation', 'json'); - } - } - - return $response; - } - - /** - * Show the docker version information. - * - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\Version - */ - public function getVersion($parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/version'; - $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\\Version', 'json'); - } - } - - return $response; - } - - /** - * Ping the docker server. - * - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function ping($parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/_ping'; - $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; - } - - /** - * Get container events from docker, either in real time via streaming, or via polling (using since). - * - * @param array $parameters { - * - * @var int $since Timestamp used for polling - * @var int $until Timestamp used for polling - * @var string $filters A json encoded value of the filters (a map[string][]string) to process on the event list. - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function getEvents($parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $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); - $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 deleted file mode 100644 index 77ff0a2bf..000000000 --- a/generated/Resource/NetworkResource.php +++ /dev/null @@ -1,208 +0,0 @@ -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); - $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'); - } - } - - return $response; - } - - /** - * Remove a network. - * - * @param string $id Network id or name - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/networks/{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; - } - - /** - * Inspect network. - * - * @param string $id Network id or name - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\Network - */ - public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/networks/{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); - $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'); - } - } - - return $response; - } - - /** - * Create network. - * - * @param \Docker\API\Model\NetworkCreateConfig $networkConfig Network configuration - * @param array $parameters { - * - * @var string $Content-Type Content Type of input - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\NetworkCreateResult - */ - public function create(\Docker\API\Model\NetworkCreateConfig $networkConfig, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $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->normalize($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'); - } - } - - return $response; - } - - /** - * Connect a container to a network. - * - * @param string $id Network id or name - * @param \Docker\API\Model\ContainerConnect $container Container - * @param array $parameters { - * - * @var string $Content-Type Content Type of input - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function connect($id, \Docker\API\Model\ContainerConnect $container, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $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->normalize($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; - } - - /** - * Disconnect a container to a network. - * - * @param string $id Network id or name - * @param \Docker\API\Model\ContainerDisconnect $container Container - * @param array $parameters { - * - * @var string $Content-Type Content Type of input - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function disconnect($id, \Docker\API\Model\ContainerDisconnect $container, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $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->normalize($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 deleted file mode 100644 index 05398530c..000000000 --- a/generated/Resource/NodeResource.php +++ /dev/null @@ -1,76 +0,0 @@ -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); - $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'); - } - } - - return $response; - } - - /** - * Return low-level information on the node id. - * - * @param string $id Node id or name - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\Node - */ - public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/nodes/{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); - $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'); - } - } - - return $response; - } -} diff --git a/generated/Resource/ServiceResource.php b/generated/Resource/ServiceResource.php deleted file mode 100644 index b5ddb44ba..000000000 --- a/generated/Resource/ServiceResource.php +++ /dev/null @@ -1,167 +0,0 @@ -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); - $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'); - } - } - - return $response; - } - - /** - * Create a service. - * - * @param \Docker\API\Model\ServiceSpec $serviceSpec Service specification to create - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\ServiceCreateResponse - */ - public function create(\Docker\API\Model\ServiceSpec $serviceSpec, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/services/create'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $this->serializer->normalize($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(); - if (self::FETCH_OBJECT == $fetch) { - if ('201' == $response->getStatusCode()) { - return $this->serializer->deserialize((string) $response->getBody(), 'Docker\\API\\Model\\ServiceCreateResponse', 'json'); - } - } - - return $response; - } - - /** - * Stop and remove the service id. - * - * @param string $id Service id or name - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $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); - $promise = $this->httpClient->sendAsyncRequest($request); - if (self::FETCH_PROMISE === $fetch) { - return $promise; - } - $response = $promise->wait(); - - return $response; - } - - /** - * Get details on a service. - * - * @param string $id Service id or name - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\Service - */ - public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $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); - $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'); - } - } - - return $response; - } - - /** - * Update the service id. - * - * @param string $id Service id or name - * @param \Docker\API\Model\ServiceSpec $serviceSpec Service specification to update - * @param array $parameters { - * - * @var int $version The version number of the service object being updated. This is required to avoid conflicting writes. - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function update($id, \Docker\API\Model\ServiceSpec $serviceSpec, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $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->normalize($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 deleted file mode 100644 index a549cf937..000000000 --- a/generated/Resource/SwarmResource.php +++ /dev/null @@ -1,121 +0,0 @@ -buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $this->serializer->normalize($swarmConfig, '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; - } - - /** - * Join an existing new Swarm. - * - * @param \Docker\API\Model\SwarmJoinConfig $swarmJoinConfig Config for joining the Swarm - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function join(\Docker\API\Model\SwarmJoinConfig $swarmJoinConfig, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/swarm/join'; - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); - $body = $this->serializer->normalize($swarmJoinConfig, '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; - } - - /** - * Leave a Swarm. - * - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function leave($parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/swarm/leave'; - $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; - } - - /** - * Update a Swarm. - * - * @param \Docker\API\Model\SwarmUpdateConfig $swarmUpdateConfig Config for updating the Swarm - * @param array $parameters { - * - * @var int $version The version number of the swarm object being updated. This is required to avoid conflicting writes. - * @var bool $rotateWorkerToken Set to true (or 1) to rotate the worker join token. - * @var bool $rotateManagerToken Set to true (or 1) to rotate the manager join token. - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function update(\Docker\API\Model\SwarmUpdateConfig $swarmUpdateConfig, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $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->normalize($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 deleted file mode 100644 index 6e7cd349e..000000000 --- a/generated/Resource/TaskResource.php +++ /dev/null @@ -1,76 +0,0 @@ -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); - $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'); - } - } - - return $response; - } - - /** - * Get details on a task. - * - * @param string $id Task id or name - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\Task - */ - public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/tasks/{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); - $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'); - } - } - - return $response; - } -} diff --git a/generated/Resource/VolumeResource.php b/generated/Resource/VolumeResource.php deleted file mode 100644 index fb5b7701f..000000000 --- a/generated/Resource/VolumeResource.php +++ /dev/null @@ -1,140 +0,0 @@ -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); - $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'); - } - } - - return $response; - } - - /** - * Create a volume. - * - * @param \Docker\API\Model\VolumeConfig $volumeConfig Volume configuration - * @param array $parameters { - * - * @var string $Content-Type Content Type of input - * } - * - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\Volume - */ - public function create(\Docker\API\Model\VolumeConfig $volumeConfig, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $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->normalize($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'); - } - } - - return $response; - } - - /** - * Instruct the driver to remove the volume. - * - * @param string $name Volume name or id - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface - */ - public function remove($name, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/volumes/{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; - } - - /** - * Inspect a volume. - * - * @param string $name Volume name or id - * @param array $parameters List of parameters - * @param string $fetch Fetch mode (object or response) - * - * @return \Psr\Http\Message\ResponseInterface|\Docker\API\Model\Volume - */ - public function find($name, $parameters = [], $fetch = self::FETCH_OBJECT) - { - $queryParam = new QueryParam(); - $url = '/volumes/{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('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\\Volume', 'json'); - } - } - - return $response; - } -} diff --git a/generated/Runtime/Client/BaseEndpoint.php b/generated/Runtime/Client/BaseEndpoint.php new file mode 100644 index 000000000..4fa7ec818 --- /dev/null +++ b/generated/Runtime/Client/BaseEndpoint.php @@ -0,0 +1,67 @@ +getQueryOptionsResolver()->resolve($this->queryParameters); + $optionsResolved = array_map(function ($value) { + return null !== $value ? $value : ''; + }, $optionsResolved); + return http_build_query($optionsResolved, '', '&', PHP_QUERY_RFC3986); + } + public function getHeaders(array $baseHeaders = []): array + { + return array_merge($this->getExtraHeaders(), $baseHeaders, $this->getHeadersOptionsResolver()->resolve($this->headerParameters)); + } + protected function getQueryOptionsResolver(): OptionsResolver + { + return new OptionsResolver(); + } + protected function getHeadersOptionsResolver(): OptionsResolver + { + return new OptionsResolver(); + } + // ---------------------------------------------------------------------------------------------------- + // Used for OpenApi2 compatibility + protected function getFormBody(): array + { + return [['Content-Type' => ['application/x-www-form-urlencoded']], http_build_query($this->getFormOptionsResolver()->resolve($this->formParameters))]; + } + protected function getMultipartBody($streamFactory = null): array + { + $bodyBuilder = new MultipartStreamBuilder($streamFactory); + $formParameters = $this->getFormOptionsResolver()->resolve($this->formParameters); + foreach ($formParameters as $key => $value) { + $bodyBuilder->addResource($key, $value); + } + return [['Content-Type' => ['multipart/form-data; boundary="' . ($bodyBuilder->getBoundary() . '"')]], $bodyBuilder->build()]; + } + protected function getFormOptionsResolver(): OptionsResolver + { + return new OptionsResolver(); + } + protected function getSerializedBody(SerializerInterface $serializer): array + { + return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')]; + } +} \ No newline at end of file diff --git a/generated/Runtime/Client/Client.php b/generated/Runtime/Client/Client.php new file mode 100644 index 000000000..07ada3ab5 --- /dev/null +++ b/generated/Runtime/Client/Client.php @@ -0,0 +1,82 @@ +httpClient = $httpClient; + $this->requestFactory = $requestFactory; + $this->serializer = $serializer; + $this->streamFactory = $streamFactory; + } + public function executeEndpoint(Endpoint $endpoint, string $fetch = self::FETCH_OBJECT) + { + if (self::FETCH_RESPONSE === $fetch) { + trigger_deprecation('jane-php/open-api-common', '7.3', 'Using %s::%s method with $fetch parameter equals to response is deprecated, use %s::%s instead.', __CLASS__, __METHOD__, __CLASS__, 'executeRawEndpoint'); + return $this->executeRawEndpoint($endpoint); + } + return $endpoint->parseResponse($this->processEndpoint($endpoint), $this->serializer, $fetch); + } + public function executeRawEndpoint(Endpoint $endpoint): ResponseInterface + { + return $this->processEndpoint($endpoint); + } + private function processEndpoint(Endpoint $endpoint): ResponseInterface + { + [$bodyHeaders, $body] = $endpoint->getBody($this->serializer, $this->streamFactory); + $queryString = $endpoint->getQueryString(); + $uriGlue = false === strpos($endpoint->getUri(), '?') ? '?' : '&'; + $uri = $queryString !== '' ? $endpoint->getUri() . $uriGlue . $queryString : $endpoint->getUri(); + $request = $this->requestFactory->createRequest($endpoint->getMethod(), $uri); + if ($body) { + if ($body instanceof StreamInterface) { + $request = $request->withBody($body); + } elseif (is_resource($body)) { + $request = $request->withBody($this->streamFactory->createStreamFromResource($body)); + } elseif (strlen($body) <= 4000 && @file_exists($body)) { + // more than 4096 chars will trigger an error + $request = $request->withBody($this->streamFactory->createStreamFromFile($body)); + } else { + $request = $request->withBody($this->streamFactory->createStream($body)); + } + } + foreach ($endpoint->getHeaders($bodyHeaders) as $name => $value) { + $request = $request->withHeader($name, !is_bool($value) ? $value : ($value ? 'true' : 'false')); + } + if (count($endpoint->getAuthenticationScopes()) > 0) { + $scopes = []; + foreach ($endpoint->getAuthenticationScopes() as $scope) { + $scopes[] = $scope; + } + $request = $request->withHeader(AuthenticationRegistry::SCOPES_HEADER, $scopes); + } + return $this->httpClient->sendRequest($request); + } +} \ No newline at end of file diff --git a/generated/Runtime/Client/CustomQueryResolver.php b/generated/Runtime/Client/CustomQueryResolver.php new file mode 100644 index 000000000..d4c9df878 --- /dev/null +++ b/generated/Runtime/Client/CustomQueryResolver.php @@ -0,0 +1,9 @@ +hasHeader('Content-Type') ? current($response->getHeader('Content-Type')) : null; + return $this->transformResponseBody($response, $serializer, $contentType); + } +} \ No newline at end of file diff --git a/generated/Runtime/Normalizer/CheckArray.php b/generated/Runtime/Normalizer/CheckArray.php new file mode 100644 index 000000000..f92abf090 --- /dev/null +++ b/generated/Runtime/Normalizer/CheckArray.php @@ -0,0 +1,13 @@ += 7 || Kernel::MAJOR_VERSION === 6 && Kernel::MINOR_VERSION === 4) { + class ReferenceNormalizer implements NormalizerInterface + { + /** + * {@inheritdoc} + */ + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $ref = []; + $ref['$ref'] = (string) $object->getReferenceUri(); + return $ref; + } + /** + * {@inheritdoc} + */ + public function supportsNormalization($data, $format = null): bool + { + return $data instanceof Reference; + } + } +} else { + class ReferenceNormalizer implements NormalizerInterface + { + /** + * {@inheritdoc} + */ + public function normalize($object, $format = null, array $context = []) + { + $ref = []; + $ref['$ref'] = (string) $object->getReferenceUri(); + return $ref; + } + /** + * {@inheritdoc} + */ + public function supportsNormalization($data, $format = null): bool + { + return $data instanceof Reference; + } + } +} \ No newline at end of file diff --git a/generated/Runtime/Normalizer/ValidationException.php b/generated/Runtime/Normalizer/ValidationException.php new file mode 100644 index 000000000..c56ee80f4 --- /dev/null +++ b/generated/Runtime/Normalizer/ValidationException.php @@ -0,0 +1,20 @@ +violationList = $violationList; + parent::__construct(sprintf('Model validation failed with %d errors.', $violationList->count()), 400); + } + public function getViolationList(): ConstraintViolationListInterface + { + return $this->violationList; + } +} \ No newline at end of file diff --git a/generated/Runtime/Normalizer/ValidatorTrait.php b/generated/Runtime/Normalizer/ValidatorTrait.php new file mode 100644 index 000000000..20829be76 --- /dev/null +++ b/generated/Runtime/Normalizer/ValidatorTrait.php @@ -0,0 +1,17 @@ +validate($data, $constraint); + if ($violations->count() > 0) { + throw new ValidationException($violations); + } + } +} \ No newline at end of file diff --git a/src/Custom/ArrayDenormalizer.php b/src/Custom/ArrayDenormalizer.php deleted file mode 100644 index 5c6e3758d..000000000 --- a/src/Custom/ArrayDenormalizer.php +++ /dev/null @@ -1,43 +0,0 @@ -serializer; - $type = substr($type, 0, -2); - - return array_map( - function ($data) use ($serializer, $type, $format, $context) { - return $serializer->denormalize($data, $type, $format, $context); - }, - $data - ); - } - - /** - * {@inheritdoc} - */ - public function supportsDenormalization($data, $type, $format = null) - { - if (!($this->serializer instanceof DenormalizerInterface)) { - return false; - } - - if (!is_array($data)) { - return false; - } - - return substr($type, -2) === '[]' && $this->serializer->supportsDenormalization($data, substr($type, 0, -2), $format); - } -} \ No newline at end of file diff --git a/src/Custom/QueryParam.php b/src/Custom/QueryParam.php deleted file mode 100644 index ff8babd04..000000000 --- a/src/Custom/QueryParam.php +++ /dev/null @@ -1,76 +0,0 @@ -formParameters[$option] = true; - } - - return $this; - } - - public function setHeaderParameters(array $optionNames): QueryParam - { - foreach ($optionNames as $option) { - $this->headerParameters[$option] = true; - } - - return $this; - } - - public function buildQueryString(array $options): string - { - $options = $this->resolve($options); - - foreach ($this->formParameters as $key => $isFormParameter) { - if ($isFormParameter && isset($options[$key])) { - unset($options[$key]); - } - } - - foreach ($this->headerParameters as $key => $isHeaderParameter) { - if ($isHeaderParameter && isset($options[$key])) { - unset($options[$key]); - } - } - - return http_build_query($options); - } - - public function buildFormDataString(array $options): string - { - $options = $this->resolve($options); - $formOptions = []; - - foreach ($this->formParameters as $key => $isFormParameter) { - if ($isFormParameter && isset($options[$key])) { - $formOptions[$key] = $options[$key]; - } - } - - return http_build_query($formOptions); - } - - public function buildHeaders(array $options): array - { - $options = $this->resolve($options); - $headerOptions = []; - - foreach ($this->headerParameters as $key => $isHeaderParameter) { - if ($isHeaderParameter && isset($options[$key])) { - $headerOptions[$key] = $options[$key]; - } - } - - return $headerOptions; - } -} \ No newline at end of file diff --git a/src/Custom/Resource.php b/src/Custom/Resource.php deleted file mode 100644 index 964eb256b..000000000 --- a/src/Custom/Resource.php +++ /dev/null @@ -1,27 +0,0 @@ -httpClient = new FlexibleHttpClient($httpClient); - $this->messageFactory = $messageFactory; - $this->serializer = $serializer; - } -} \ No newline at end of file diff --git a/src/Docker.php b/src/Docker.php index 3973e5f92..8666521a0 100644 --- a/src/Docker.php +++ b/src/Docker.php @@ -2,7 +2,7 @@ namespace Docker; -use Docker\API\Normalizer\NormalizerFactory; +use Docker\API\Client; use Docker\Manager\{ContainerManager, ExecManager, ImageManager, @@ -14,9 +14,9 @@ TaskManager, VolumeManager}; use GuzzleHttp\Psr7\HttpFactory; -use Http\Message\MessageFactory; -use Http\Message\MessageFactory\GuzzleMessageFactory; use Psr\Http\Client\ClientInterface; +use Psr\Http\Message\RequestFactoryInterface; +use Psr\Http\Message\StreamFactoryInterface; use Symfony\Component\Serializer\Encoder\JsonDecode; use Symfony\Component\Serializer\Encoder\JsonEncode; use Symfony\Component\Serializer\Encoder\JsonEncoder; @@ -27,21 +27,6 @@ */ class Docker { - /** - * @var ClientInterface - */ - private $httpClient; - - /** - * @var Serializer - */ - private $serializer; - - /** - * @var MessageFactory - */ - private $messageFactory; - /** * @var ContainerManager */ @@ -95,37 +80,49 @@ class Docker /** * @param ClientInterface|null $httpClient Http client to use with Docker * @param Serializer|null $serializer Deserialize docker response into php objects - * @param HttpFactory|null $messageFactory How to create docker request (in PSR7) + * @param RequestFactoryInterface|null $messageFactory How to create docker request (in PSR7) + * @param StreamFactoryInterface|null $streamFactory How to create stream (in PSR7) */ - public function __construct(?ClientInterface $httpClient = null, ?Serializer $serializer = null, ?HttpFactory $messageFactory = null) + public function __construct( + private ?ClientInterface $httpClient = null, + private ?Serializer $serializer = null, + private ?RequestFactoryInterface $messageFactory = null, + private ?StreamFactoryInterface $streamFactory = null, + ) { - $this->httpClient = $httpClient ?: DockerClient::createFromEnv(); + if ($this->httpClient === null) { + $this->httpClient = DockerClient::createFromEnv(); + } - if ($serializer === null) { - $serializer = new Serializer( - NormalizerFactory::create(), + if ($this->serializer === null) { + $this->serializer = new Serializer( + [ + new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), + new \Docker\API\Normalizer\JaneObjectNormalizer(), + ], [ new JsonEncoder( new JsonEncode(), new JsonDecode(), - [JsonDecode::ASSOCIATIVE => false], + [JsonDecode::ASSOCIATIVE => true], ), ] ); } - if ($messageFactory === null) { - $messageFactory = new GuzzleMessageFactory(); + if ($this->messageFactory === null) { + $this->messageFactory = new HttpFactory(); } - $this->serializer = $serializer; - $this->messageFactory = $messageFactory; + if ($this->streamFactory === null) { + $this->streamFactory = new HttpFactory(); + } } public function getContainerManager(): ContainerManager { if (null === $this->containerManager) { - $this->containerManager = new ContainerManager($this->httpClient, $this->messageFactory, $this->serializer); + $this->containerManager = new ContainerManager($this->httpClient, $this->messageFactory, $this->serializer, $this->streamFactory); } return $this->containerManager; @@ -134,7 +131,7 @@ public function getContainerManager(): ContainerManager public function getImageManager(): ImageManager { if (null === $this->imageManager) { - $this->imageManager = new ImageManager($this->httpClient, $this->messageFactory, $this->serializer); + $this->imageManager = new ImageManager($this->httpClient, $this->messageFactory, $this->serializer, $this->streamFactory); } return $this->imageManager; @@ -143,7 +140,7 @@ public function getImageManager(): ImageManager public function getMiscManager(): MiscManager { if (null === $this->miscManager) { - $this->miscManager = new MiscManager($this->httpClient, $this->messageFactory, $this->serializer); + $this->miscManager = new MiscManager($this->httpClient, $this->messageFactory, $this->serializer, $this->streamFactory); } return $this->miscManager; @@ -152,7 +149,7 @@ public function getMiscManager(): MiscManager public function getExecManager(): ExecManager { if (null === $this->execManager) { - $this->execManager = new ExecManager($this->httpClient, $this->messageFactory, $this->serializer); + $this->execManager = new ExecManager($this->httpClient, $this->messageFactory, $this->serializer, $this->streamFactory); } return $this->execManager; @@ -161,7 +158,7 @@ public function getExecManager(): ExecManager public function getVolumeManager(): VolumeManager { if (null === $this->volumeManager) { - $this->volumeManager = new VolumeManager($this->httpClient, $this->messageFactory, $this->serializer); + $this->volumeManager = new VolumeManager($this->httpClient, $this->messageFactory, $this->serializer, $this->streamFactory); } return $this->volumeManager; @@ -170,7 +167,7 @@ public function getVolumeManager(): VolumeManager public function getNetworkManager(): NetworkManager { if (null === $this->networkManager) { - $this->networkManager = new NetworkManager($this->httpClient, $this->messageFactory, $this->serializer); + $this->networkManager = new NetworkManager($this->httpClient, $this->messageFactory, $this->serializer, $this->streamFactory); } return $this->networkManager; @@ -179,7 +176,7 @@ public function getNetworkManager(): NetworkManager public function getNodeManager(): NodeManager { if (null === $this->nodeManager) { - $this->nodeManager = new NodeManager($this->httpClient, $this->messageFactory, $this->serializer); + $this->nodeManager = new NodeManager($this->httpClient, $this->messageFactory, $this->serializer, $this->streamFactory); } return $this->nodeManager; @@ -188,7 +185,7 @@ public function getNodeManager(): NodeManager public function getServiceManager(): ServiceManager { if (null === $this->serviceManager) { - $this->serviceManager = new ServiceManager($this->httpClient, $this->messageFactory, $this->serializer); + $this->serviceManager = new ServiceManager($this->httpClient, $this->messageFactory, $this->serializer, $this->streamFactory); } return $this->serviceManager; @@ -197,7 +194,7 @@ public function getServiceManager(): ServiceManager public function getSwarmManager(): SwarmManager { if (null === $this->swarmManager) { - $this->swarmManager = new SwarmManager($this->httpClient, $this->messageFactory, $this->serializer); + $this->swarmManager = new SwarmManager($this->httpClient, $this->messageFactory, $this->serializer, $this->streamFactory); } return $this->swarmManager; @@ -206,7 +203,7 @@ public function getSwarmManager(): SwarmManager public function getTaskManager(): TaskManager { if (null === $this->taskManager) { - $this->taskManager = new TaskManager($this->httpClient, $this->messageFactory, $this->serializer); + $this->taskManager = new TaskManager($this->httpClient, $this->messageFactory, $this->serializer, $this->streamFactory); } return $this->taskManager; diff --git a/src/Manager/BaseManager.php b/src/Manager/BaseManager.php new file mode 100644 index 000000000..201223a11 --- /dev/null +++ b/src/Manager/BaseManager.php @@ -0,0 +1,46 @@ +httpClient = new FlexibleHttpClient($httpClient); + $this->api = new Client( + $this->httpClient, + $this->messageFactory, + $this->serializer, + $this->streamFactory, + ); + } + + protected function extractRegistryAuth(array &$parameters, array &$headerParameters): void + { + if (isset($parameters['X-Registry-Auth'])) { + if ($parameters['X-Registry-Auth'] instanceof AuthConfig) { + $parameters['X-Registry-Auth'] = base64_encode($this->serializer->serialize($parameters['X-Registry-Auth'], 'json')); + } + $headerParameters['X-Registry-Auth'] = $parameters['X-Registry-Auth']; + unset($parameters['X-Registry-Auth']); + } + } +} diff --git a/src/Manager/ContainerManager.php b/src/Manager/ContainerManager.php index 3b93f14a1..3b1be9775 100644 --- a/src/Manager/ContainerManager.php +++ b/src/Manager/ContainerManager.php @@ -2,23 +2,34 @@ namespace Docker\Manager; -use Docker\API\Resource\ContainerResource; -use Docker\Custom\QueryParam; use Docker\Stream\AttachWebsocketStream; use Docker\Stream\DockerRawStream; -class ContainerManager extends ContainerResource +class ContainerManager extends BaseManager { const FETCH_STREAM = 'stream'; /** - * {@inheritdoc} + * Attach to the container id. + * + * @param string $id The container id or name + * @param array $parameters + * { + * @var string $logs 1/True/true or 0/False/false, return logs. Default false + * @var string $stream 1/True/true or 0/False/false, return stream. Default false + * @var string $stdin 1/True/true or 0/False/false, if stream=true, attach to stdin. Default false. + * @var string $stdout 1/True/true or 0/False/false, if logs=true, return stdout log, if stream=true, attach to stdout. Default false. + * @var string $stderr 1/True/true or 0/False/false, if logs=true, return stderr log, if stream=true, attach to stderr. Default false. + * @var string $detachKeys Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl- where is one of: a-z, @, ^, [, , or _. + * } + * + * @param string $fetch Fetch mode (object or response) * * @return \Psr\Http\Message\ResponseInterface|DockerRawStream */ public function attach($id, $parameters = [], $fetch = self::FETCH_STREAM) { - $response = parent::attach($id, $parameters, $fetch); + $response = $this->api->containerAttach(urlencode($id), $parameters, self::FETCH_RESPONSE); if ($response->getStatusCode() == 200 && DockerRawStream::HEADER == $response->getHeaderLine('Content-Type')) { if ($fetch == self::FETCH_STREAM) { @@ -30,36 +41,38 @@ public function attach($id, $parameters = [], $fetch = self::FETCH_STREAM) } /** - * {@inheritdoc} + * Attach to the container id with a websocket. + * + * @param string $id The container id or name + * @param array $parameters + * { + * @var string $logs 1/True/true or 0/False/false, return logs. Default false + * @var string $stream 1/True/true or 0/False/false, return stream. Default false + * @var string $stdin 1/True/true or 0/False/false, if stream=true, attach to stdin. Default false. + * @var string $stdout 1/True/true or 0/False/false, if logs=true, return stdout log, if stream=true, attach to stdout. Default false. + * @var string $stderr 1/True/true or 0/False/false, if logs=true, return stderr log, if stream=true, attach to stderr. Default false. + * @var string $detachKeys Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl- where is one of: a-z, @, ^, [, , or _. + * } + * + * @param string $fetch Fetch mode (object or response) * * @return \Psr\Http\Message\ResponseInterface|AttachWebsocketStream */ public function attachWebsocket($id, $parameters = [], $fetch = self::FETCH_STREAM) { - $queryParam = new QueryParam(); - $queryParam->setDefault('logs', null); - $queryParam->setDefault('stream', null); - $queryParam->setDefault('stdin', null); - $queryParam->setDefault('stdout', null); - $queryParam->setDefault('stderr', null); - - $url = '/containers/{id}/attach/ws'; - $url = str_replace('{id}', $id, $url); - $url = $url . ('?' . $queryParam->buildQueryString($parameters)); - - $headers = array_merge([ - 'Host' => 'localhost', - 'Origin' => 'php://docker-php', - 'Upgrade' => 'websocket', - 'Connection' => 'Upgrade', - 'Sec-WebSocket-Version' => '13', - 'Sec-WebSocket-Key' => base64_encode(uniqid()), - ], $queryParam->buildHeaders($parameters)); - - $body = $queryParam->buildFormDataString($parameters); - - $request = $this->messageFactory->createRequest('GET', $url, $headers, $body); - $response = $this->httpClient->sendRequest($request); + $response = $this->api->executeEndpoint(new class (urlencode($id), $parameters) extends \Docker\API\Endpoint\ContainerAttachWebsocket { + public function getExtraHeaders(): array + { + return array_merge(parent::getExtraHeaders(), [ + 'Host' => 'localhost', + 'Origin' => 'php://docker-php', + 'Upgrade' => 'websocket', + 'Connection' => 'Upgrade', + 'Sec-WebSocket-Version' => '13', + 'Sec-WebSocket-Key' => base64_encode(uniqid()), + ]); + } + }, self::FETCH_RESPONSE); if ($response->getStatusCode() == 101) { if ($fetch == self::FETCH_STREAM) { @@ -75,8 +88,9 @@ public function attachWebsocket($id, $parameters = [], $fetch = self::FETCH_STRE * * @return \Psr\Http\Message\ResponseInterface|DockerRawStream|string[][] */ - public function logs($id, $parameters = [], $fetch = self::FETCH_OBJECT) { - $response = parent::logs($id, $parameters, $fetch); + public function logs($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + $response = $this->api->containerLogs(urlencode($id), $parameters, self::FETCH_RESPONSE); if ($response->getStatusCode() == 200) { if ($fetch == self::FETCH_STREAM) { @@ -106,4 +120,109 @@ public function logs($id, $parameters = [], $fetch = self::FETCH_OBJECT) { return $response; } + + public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerList($parameters, $fetch); + } + + public function create(\Docker\API\Model\ContainersCreatePostBody $container, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerCreate($container, $parameters, $fetch); + } + + public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerInspect(urlencode($id), $parameters, $fetch); + } + + public function listProcesses($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerTop(urlencode($id), $parameters, $fetch); + } + + public function changes($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerChanges(urlencode($id), $fetch); + } + + public function export($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerExport(urlencode($id), $fetch); + } + + public function stats($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerStats(urlencode($id), $parameters, $fetch); + } + + public function resize($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerResize(urlencode($id), $parameters, $fetch); + } + + public function start($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerStart(urlencode($id), $parameters, $fetch); + } + + public function stop($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerStop(urlencode($id), $parameters, $fetch); + } + + public function restart($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerRestart(urlencode($id), $parameters, $fetch); + } + + public function kill($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerKill(urlencode($id), $parameters, $fetch); + } + + public function update($id, \Docker\API\Model\ContainersIdUpdatePostBody $resourceConfig, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerUpdate(urlencode($id), $resourceConfig, $fetch); + } + + public function rename($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerRename(urlencode($id), $parameters, $fetch); + } + + public function pause($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerPause(urlencode($id), $fetch); + } + + public function unpause($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerUnpause(urlencode($id), $fetch); + } + + public function wait($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerWait(urlencode($id), $fetch); + } + + public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerDelete(urlencode($id), $parameters, $fetch); + } + + public function getArchive($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerGetArchive(urlencode($id), $parameters, $fetch); + } + + public function getArchiveInformation($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerArchiveHead(urlencode($id), $parameters, $fetch); + } + + public function putArchive($id, $inputStream, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerPutArchive(urlencode($id), $inputStream, $parameters, $fetch); + } } diff --git a/src/Manager/ExecManager.php b/src/Manager/ExecManager.php index 590293a2d..50c9cb1ad 100644 --- a/src/Manager/ExecManager.php +++ b/src/Manager/ExecManager.php @@ -2,16 +2,15 @@ namespace Docker\Manager; -use Docker\API\Resource\ExecResource; use Docker\Stream\DockerRawStream; -class ExecManager extends ExecResource +class ExecManager extends BaseManager { const FETCH_STREAM = 'stream'; - public function start($id, \Docker\API\Model\ExecStartConfig $execStartConfig, $parameters = [], $fetch = self::FETCH_OBJECT) + public function start($id, \Docker\API\Model\ExecIdStartPostBody $execStartConfig, $parameters = [], $fetch = self::FETCH_OBJECT) { - $response = parent::start($id, $execStartConfig, $parameters, $fetch); + $response = $this->api->execStart(urlencode($id), $execStartConfig, self::FETCH_RESPONSE); if ($response->getStatusCode() == 200 && DockerRawStream::HEADER == $response->getHeaderLine('Content-Type')) { if ($fetch == self::FETCH_STREAM) { @@ -22,4 +21,18 @@ public function start($id, \Docker\API\Model\ExecStartConfig $execStartConfig, $ return $response; } + public function create($id, \Docker\API\Model\ContainersIdExecPostBody $execConfig, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->containerExec(urlencode($id), $execConfig, $fetch); + } + + public function resize($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->execResize(urlencode($id), $parameters, $fetch); + } + + public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->execInspect(urlencode($id), $fetch); + } } diff --git a/src/Manager/ImageManager.php b/src/Manager/ImageManager.php index 96f849a7a..980765dca 100644 --- a/src/Manager/ImageManager.php +++ b/src/Manager/ImageManager.php @@ -2,29 +2,47 @@ namespace Docker\Manager; -use Docker\API\Model\AuthConfig; use Docker\API\Model\BuildInfo; use Docker\API\Model\CreateImageInfo; use Docker\API\Model\PushImageInfo; -use Docker\API\Resource\ImageResource; -use Docker\Custom\QueryParam; use Docker\Stream\BuildStream; use Docker\Stream\CreateImageStream; use Docker\Stream\PushStream; use Docker\Stream\TarStream; use Psr\Http\Message\StreamInterface; -class ImageManager extends ImageResource +class ImageManager extends BaseManager { const FETCH_STREAM = 'stream'; - /** - * {@inheritdoc} + * Build an image from Dockerfile via stdin. * - * @param resource|StreamInterface|string $inputStream The input stream (encoded with tar) containing the Dockerfile - * and other files for the image. + * @param BaseManager|StreamInterface|string $inputStream The input stream (encoded with tar) containing the Dockerfile + * * and other files for the image. + * @param array $parameters + * { + * @param string $fetch Fetch mode (object or response) * * @return \Psr\Http\Message\ResponseInterface|BuildInfo[]|BuildStream + *@var string $dockerfile Path within the build context to the Dockerfile. This is ignored if remote is specified and points to an individual filename. + * @var string $t A repository name (and optionally a tag) to apply to the resulting image in case of success. + * @var string $remote A Git repository URI or HTTP/HTTPS URI build source. If the URI specifies a filename, the file’s contents are placed into a file called Dockerfile. + * @var bool $q Suppress verbose build output. + * @var bool $nocache Do not use the cache when building the image. + * @var string $pull Attempt to pull the image even if an older image exists locally + * @var bool $rm Remove intermediate containers after a successful build (default behavior). + * @var bool $forcerm always remove intermediate containers (includes rm) + * @var int $memory Set memory limit for build. + * @var int $memswap Total memory (memory + swap), -1 to disable swap. + * @var int $cpushares CPU shares (relative weight). + * @var string $cpusetcpus CPUs in which to allow execution (e.g., 0-3, 0,1). + * @var int $cpuperiod The length of a CPU period in microseconds. + * @var int $cpuquota Microseconds of CPU time that the container can get in a CPU period. + * @var int $buildargs Total memory (memory + swap), -1 to disable swap. + * @var string $Content-type Set to 'application/tar'. + * @var string $X-Registry-Config A base64-url-safe-encoded Registry Auth Config JSON object + * } + * */ public function build($inputStream, $parameters = [], $fetch = self::FETCH_OBJECT) { @@ -32,7 +50,7 @@ public function build($inputStream, $parameters = [], $fetch = self::FETCH_OBJEC $inputStream = new TarStream($inputStream); } - $response = parent::build($inputStream, $parameters, $fetch); + $response = $this->api->imageBuild($inputStream, $parameters, [], self::FETCH_RESPONSE); if (200 === $response->getStatusCode()) { if (self::FETCH_STREAM === $fetch) { @@ -62,11 +80,10 @@ public function build($inputStream, $parameters = [], $fetch = self::FETCH_OBJEC */ public function create($inputStream = null, $parameters = [], $fetch = self::FETCH_OBJECT) { - if (isset($parameters['X-Registry-Auth']) && $parameters['X-Registry-Auth'] instanceof AuthConfig) { - $parameters['X-Registry-Auth'] = base64_encode($this->serializer->serialize($parameters['X-Registry-Auth'], 'json')); - } + $headerParameters = []; + $this->extractRegistryAuth($parameters, $headerParameters); - $response = parent::create($inputStream, $parameters, self::FETCH_RESPONSE); + $response = $this->api->imageCreate($inputStream ?? '', $parameters, $headerParameters, self::FETCH_RESPONSE); if (200 === $response->getStatusCode()) { if (self::FETCH_STREAM === $fetch) { @@ -92,29 +109,14 @@ public function create($inputStream = null, $parameters = [], $fetch = self::FET /** * {@inheritdoc} * - * @return \Psr\Http\Message\ResponseInterface|PushImageInfo[]|CreateImageStream + * @return \Psr\Http\Message\ResponseInterface|PushImageInfo[]|PushStream */ public function push($name, $parameters = [], $fetch = self::FETCH_OBJECT) { - if (isset($parameters['X-Registry-Auth']) && $parameters['X-Registry-Auth'] instanceof AuthConfig) { - $parameters['X-Registry-Auth'] = base64_encode($this->serializer->serialize($parameters['X-Registry-Auth'], 'json')); - } + $headerParameters = []; + $this->extractRegistryAuth($parameters, $headerParameters); - $queryParam = new QueryParam(); - $queryParam->setDefault('tag', null); - $queryParam->setDefault('X-Registry-Auth', null); - $queryParam->setHeaderParameters(['X-Registry-Auth']); - - $url = 'http://localhost/images/{name}/push'; - $url = str_replace('{name}', $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); + $response = $this->api->imagePush(urlencode($name), $parameters, $headerParameters, self::FETCH_RESPONSE); if (200 === $response->getStatusCode()) { if (self::FETCH_STREAM === $fetch) { @@ -136,4 +138,54 @@ public function push($name, $parameters = [], $fetch = self::FETCH_OBJECT) return $response; } + + public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->imageList($parameters, $fetch); + } + + public function find($name, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->imageInspect(urlencode($name), $fetch); + } + + public function history($name, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->imageHistory(urlencode($name), $fetch); + } + + public function tag($name, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->imageTag(urlencode($name), $parameters, $fetch); + } + + public function remove($name, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->imageDelete(urlencode($name), $parameters, $fetch); + } + + public function search($parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->imageSearch($parameters, $fetch); + } + + public function commit(\Docker\API\Model\Config $containerConfig, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->imageCommit($containerConfig, $parameters, $fetch); + } + + public function save($name, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->imageGet(urlencode($name), $fetch); + } + + public function saveAll($parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->imageGetAll($parameters, $fetch); + } + + public function load($imagesTarball, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->imageLoad($imagesTarball, $parameters, $fetch); + } } diff --git a/src/Manager/MiscManager.php b/src/Manager/MiscManager.php index c15117592..74df8ef22 100644 --- a/src/Manager/MiscManager.php +++ b/src/Manager/MiscManager.php @@ -2,11 +2,10 @@ namespace Docker\Manager; -use Docker\API\Model\Event; -use Docker\API\Resource\MiscResource; +use Docker\API\Model\EventsGetResponse200; use Docker\Stream\EventStream; -class MiscManager extends MiscResource +class MiscManager extends BaseManager { const FETCH_STREAM = 'stream'; @@ -15,7 +14,13 @@ class MiscManager extends MiscResource */ public function getEvents($parameters = [], $fetch = self::FETCH_OBJECT): EventStream|array|\Psr\Http\Message\ResponseInterface { - $response = parent::getEvents($parameters, self::FETCH_RESPONSE); + if (isset($parameters['since'])) { + $parameters['since'] = (string) $parameters['since']; + } + if (isset($parameters['until'])) { + $parameters['until'] = (string) $parameters['until']; + } + $response = $this->api->systemEvents($parameters, self::FETCH_RESPONSE); if (200 === $response->getStatusCode()) { if (self::FETCH_STREAM === $fetch) { @@ -26,7 +31,7 @@ public function getEvents($parameters = [], $fetch = self::FETCH_OBJECT): EventS $eventList = []; $stream = new EventStream($response->getBody(), $this->serializer); - $stream->onFrame(function (Event $event) use (&$eventList) { + $stream->onFrame(function (EventsGetResponse200 $event) use (&$eventList) { $eventList[] = $event; }); $stream->wait(); @@ -37,4 +42,24 @@ public function getEvents($parameters = [], $fetch = self::FETCH_OBJECT): EventS return $response; } + + public function checkAuthentication(\Docker\API\Model\AuthConfig $authConfig, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->systemAuth($authConfig, $fetch); + } + + public function getSystemInformation($parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->systemInfo($fetch); + } + + public function getVersion($parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->systemVersion($fetch); + } + + public function ping($parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->systemPing($fetch); + } } diff --git a/src/Manager/NetworkManager.php b/src/Manager/NetworkManager.php index 34f95d5f8..fb3e25520 100644 --- a/src/Manager/NetworkManager.php +++ b/src/Manager/NetworkManager.php @@ -2,8 +2,35 @@ namespace Docker\Manager; -use Docker\API\Resource\NetworkResource; - -class NetworkManager extends NetworkResource +class NetworkManager extends BaseManager { + public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->networkList($parameters, $fetch); + } + + public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->networkDelete(urlencode($id), $fetch); + } + + public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->networkInspect(urlencode($id), $fetch); + } + + public function create(\Docker\API\Model\NetworksCreatePostBody $networkConfig, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->networkCreate($networkConfig, $fetch); + } + + public function connect($id, \Docker\API\Model\NetworksIdConnectPostBody $container, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->networkConnect(urlencode($id), $container, $fetch); + } + + public function disconnect($id, \Docker\API\Model\NetworksIdDisconnectPostBody $container, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->networkDisconnect(urlencode($id), $container, $fetch); + } } diff --git a/src/Manager/NodeManager.php b/src/Manager/NodeManager.php index 83420ddf8..7eb492a2f 100644 --- a/src/Manager/NodeManager.php +++ b/src/Manager/NodeManager.php @@ -2,8 +2,15 @@ namespace Docker\Manager; -use Docker\API\Resource\NodeResource; - -class NodeManager extends NodeResource +class NodeManager extends BaseManager { + public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->nodeList($parameters, $fetch); + } + + public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->nodeInspect(urlencode($id), $fetch); + } } diff --git a/src/Manager/ServiceManager.php b/src/Manager/ServiceManager.php index b3e772787..e54248b4e 100644 --- a/src/Manager/ServiceManager.php +++ b/src/Manager/ServiceManager.php @@ -2,8 +2,36 @@ namespace Docker\Manager; -use Docker\API\Resource\ServiceResource; - -class ServiceManager extends ServiceResource +class ServiceManager extends BaseManager { + public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->serviceList($parameters, $fetch); + } + + public function create(\Docker\API\Model\ServicesCreatePostBody $serviceSpec, $parameters = [], $fetch = self::FETCH_OBJECT) + { + $headerParameters = []; + $this->extractRegistryAuth($parameters, $headerParameters); + + return $this->api->serviceCreate($serviceSpec, $headerParameters, $fetch); + } + + public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->serviceDelete(urlencode($id), $fetch); + } + + public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->serviceInspect(urlencode($id), $fetch); + } + + public function update($id, \Docker\API\Model\ServicesIdUpdatePostBody $serviceSpec, $parameters = [], $fetch = self::FETCH_OBJECT) + { + $headerParameters = []; + $this->extractRegistryAuth($parameters, $headerParameters); + + return $this->api->serviceUpdate(urlencode($id), $serviceSpec, $parameters, $headerParameters, $fetch); + } } diff --git a/src/Manager/SwarmManager.php b/src/Manager/SwarmManager.php index e691a5962..aa7fa3278 100644 --- a/src/Manager/SwarmManager.php +++ b/src/Manager/SwarmManager.php @@ -2,8 +2,25 @@ namespace Docker\Manager; -use Docker\API\Resource\SwarmResource; - -class SwarmManager extends SwarmResource +class SwarmManager extends BaseManager { + public function initialize(\Docker\API\Model\SwarmInitPostBody $swarmConfig, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->swarmInit($swarmConfig, $fetch); + } + + public function join(\Docker\API\Model\SwarmJoinPostBody $swarmJoinConfig, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->swarmJoin($swarmJoinConfig, $fetch); + } + + public function leave($parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->swarmLeave($parameters, $fetch); + } + + public function update(\Docker\API\Model\SwarmSpec $swarmUpdateConfig, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->swarmUpdate($swarmUpdateConfig, $parameters, $fetch); + } } diff --git a/src/Manager/TaskManager.php b/src/Manager/TaskManager.php index bce5f290b..89bf9f2b1 100644 --- a/src/Manager/TaskManager.php +++ b/src/Manager/TaskManager.php @@ -2,8 +2,15 @@ namespace Docker\Manager; -use Docker\API\Resource\TaskResource; - -class TaskManager extends TaskResource +class TaskManager extends BaseManager { + public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->taskList($parameters, $fetch); + } + + public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->taskInspect(urlencode($id), $fetch); + } } diff --git a/src/Manager/VolumeManager.php b/src/Manager/VolumeManager.php index 744c6cd62..822431596 100644 --- a/src/Manager/VolumeManager.php +++ b/src/Manager/VolumeManager.php @@ -2,8 +2,25 @@ namespace Docker\Manager; -use Docker\API\Resource\VolumeResource; - -class VolumeManager extends VolumeResource +class VolumeManager extends BaseManager { + public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->volumeList($parameters, $fetch); + } + + public function create(\Docker\API\Model\VolumesCreatePostBody $volumeConfig, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->volumeCreate($volumeConfig, $fetch); + } + + public function remove($name, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->volumeDelete(urlencode($name), $parameters, $fetch); + } + + public function find($name, $parameters = [], $fetch = self::FETCH_OBJECT) + { + return $this->api->volumeInspect(urlencode($name), $fetch); + } } diff --git a/src/Stream/BuildStream.php b/src/Stream/BuildStream.php index 3a9130a60..949268e31 100644 --- a/src/Stream/BuildStream.php +++ b/src/Stream/BuildStream.php @@ -14,6 +14,6 @@ class BuildStream extends MultiJsonStream */ protected function getDecodeClass(): string { - return 'Docker\API\Model\BuildInfo'; + return \Docker\API\Model\BuildInfo::class; } } diff --git a/src/Stream/CreateImageStream.php b/src/Stream/CreateImageStream.php index 2f370229b..720581de9 100644 --- a/src/Stream/CreateImageStream.php +++ b/src/Stream/CreateImageStream.php @@ -14,6 +14,6 @@ class CreateImageStream extends MultiJsonStream */ protected function getDecodeClass(): string { - return 'Docker\API\Model\CreateImageInfo'; + return \Docker\API\Model\CreateImageInfo::class; } } diff --git a/src/Stream/EventStream.php b/src/Stream/EventStream.php index da83d66e4..f57039489 100644 --- a/src/Stream/EventStream.php +++ b/src/Stream/EventStream.php @@ -14,6 +14,6 @@ class EventStream extends MultiJsonStream */ protected function getDecodeClass(): string { - return 'Docker\API\Model\Event'; + return \Docker\API\Model\EventsGetResponse200::class; } } diff --git a/src/Stream/PushStream.php b/src/Stream/PushStream.php index 17d81ff19..aba0782f3 100644 --- a/src/Stream/PushStream.php +++ b/src/Stream/PushStream.php @@ -14,6 +14,6 @@ class PushStream extends MultiJsonStream */ protected function getDecodeClass(): string { - return 'Docker\API\Model\PushImageInfo'; + return \Docker\API\Model\PushImageInfo::class; } } diff --git a/tests/Manager/ContainerManagerTest.php b/tests/Manager/ContainerManagerTest.php index 136f82c91..d8f624607 100644 --- a/tests/Manager/ContainerManagerTest.php +++ b/tests/Manager/ContainerManagerTest.php @@ -2,7 +2,7 @@ namespace Docker\Tests\Manager; -use Docker\API\Model\ContainerConfig; +use Docker\API\Model\ContainersCreatePostBody; use Docker\Manager\ContainerManager; use Docker\Tests\TestCase; @@ -30,7 +30,7 @@ public static function setUpBeforeClass(): void public function testAttach() { - $containerConfig = new ContainerConfig(); + $containerConfig = new ContainersCreatePostBody(); $containerConfig->setImage('busybox:latest'); $containerConfig->setCmd(['echo', '-n', 'output']); $containerConfig->setAttachStdout(true); @@ -57,7 +57,7 @@ public function testAttach() public function testAttachWebsocket() { - $containerConfig = new ContainerConfig(); + $containerConfig = new ContainersCreatePostBody(); $containerConfig->setImage('busybox:latest'); $containerConfig->setCmd(['sh']); $containerConfig->setAttachStdout(true); @@ -70,9 +70,6 @@ public function testAttachWebsocket() $containerCreateResult = $this->getManager()->create($containerConfig); $webSocketStream = $this->getManager()->attachWebsocket($containerCreateResult->getId(), [ 'stream' => true, - 'stdout' => true, - 'stderr' => true, - 'stdin' => true, ]); $this->getManager()->start($containerCreateResult->getId()); @@ -101,7 +98,7 @@ public function testAttachWebsocket() public function testLogs() { - $containerConfig = new ContainerConfig(); + $containerConfig = new ContainersCreatePostBody(); $containerConfig->setImage('busybox:latest'); $containerConfig->setCmd(['echo', '-n', 'output']); $containerConfig->setAttachStdout(true); diff --git a/tests/Manager/ExecManagerTest.php b/tests/Manager/ExecManagerTest.php index 72c14f3fa..949c83f21 100644 --- a/tests/Manager/ExecManagerTest.php +++ b/tests/Manager/ExecManagerTest.php @@ -2,10 +2,9 @@ namespace Docker\Tests\Manager; -use Docker\API\Model\ContainerConfig; -use Docker\API\Model\ExecConfig; -use Docker\API\Model\ExecStartConfig; -use Docker\Manager\ContainerManager; +use Docker\API\Model\ContainersCreatePostBody; +use Docker\API\Model\ContainersIdExecPostBody; +use Docker\API\Model\ExecIdStartPostBody; use Docker\Manager\ExecManager; use Docker\Tests\TestCase; @@ -25,14 +24,14 @@ public function testStartStream() { $createContainerResult = $this->createContainer(); - $execConfig = new ExecConfig(); + $execConfig = new ContainersIdExecPostBody(); $execConfig->setAttachStdout(true); $execConfig->setAttachStderr(true); $execConfig->setCmd(["echo", "output"]); $execCreateResult = $this->getManager()->create($createContainerResult->getId(), $execConfig); - $execStartConfig = new ExecStartConfig(); + $execStartConfig = new ExecIdStartPostBody(); $execStartConfig->setDetach(false); $execStartConfig->setTty(false); @@ -57,12 +56,12 @@ public function testExecFind() { $createContainerResult = $this->createContainer(); - $execConfig = new ExecConfig(); + $execConfig = new ContainersIdExecPostBody(); $execConfig->setCmd(["/bin/true"]); $execCreateResult = $this->getManager()->create($createContainerResult->getId(), $execConfig); - $execStartConfig = new ExecStartConfig(); + $execStartConfig = new ExecIdStartPostBody(); $execStartConfig->setDetach(false); $execStartConfig->setTty(false); @@ -70,7 +69,7 @@ public function testExecFind() $execFindResult = $this->getManager()->find($execCreateResult->getId()); - $this->assertInstanceOf('Docker\API\Model\ExecCommand', $execFindResult); + $this->assertInstanceOf(\Docker\API\Model\ExecIdJsonGetResponse200::class, $execFindResult); self::getDocker()->getContainerManager()->kill($createContainerResult->getId(), [ 'signal' => 'SIGKILL' @@ -79,7 +78,7 @@ public function testExecFind() private function createContainer() { - $containerConfig = new ContainerConfig(); + $containerConfig = new ContainersCreatePostBody(); $containerConfig->setImage('busybox:latest'); $containerConfig->setCmd(['sh']); $containerConfig->setOpenStdin(true); diff --git a/tests/Manager/ImageManagerTest.php b/tests/Manager/ImageManagerTest.php index f8c82e31e..91cfb8777 100644 --- a/tests/Manager/ImageManagerTest.php +++ b/tests/Manager/ImageManagerTest.php @@ -133,4 +133,22 @@ public function testPushObject() $this->assertIsArray($pushImageInfos); $this->assertStringContainsString("The push refers to repository [localhost:5000/test-image]", $pushImageInfos[0]->getStatus()); } + + public function testTag() + { + $contextBuilder = new ContextBuilder(); + $contextBuilder->from('ubuntu:precise'); + $contextBuilder->add('/test', 'test file content'); + + $context = $contextBuilder->getContext(); + $this->getManager()->build($context->read(), ['t' => 'localhost:5000/test-image']); + + $this->getManager()->tag('localhost:5000/test-image', ['repo' => 'localhost:5000/test-image', 'tag' => 'new-tag']); + + $image = $this->getManager()->find('localhost:5000/test-image:new-tag'); + $this->assertNotNull($image); + + $images = $this->getManager()->findAll(['filters' => json_encode(['reference' => ['localhost:5000/test-image:new-tag']])]); + $this->assertCount(1, $images); + } } diff --git a/tests/Manager/MiscManagerTest.php b/tests/Manager/MiscManagerTest.php index 6c2ecd905..43027c705 100644 --- a/tests/Manager/MiscManagerTest.php +++ b/tests/Manager/MiscManagerTest.php @@ -2,7 +2,7 @@ namespace Docker\Tests\Manager; -use Docker\API\Model\Event; +use Docker\API\Model\EventsGetResponse200; use Docker\Manager\MiscManager; use Docker\Tests\TestCase; @@ -26,7 +26,7 @@ public function testGetEventsStream() ], MiscManager::FETCH_STREAM); $lastEvent = null; - $stream->onFrame(function (Event $event) use (&$lastEvent) { + $stream->onFrame(function (EventsGetResponse200 $event) use (&$lastEvent) { $lastEvent = $event; }); @@ -35,7 +35,7 @@ public function testGetEventsStream() ]); $stream->wait(); - $this->assertInstanceOf('Docker\API\Model\Event', $lastEvent); + $this->assertInstanceOf(EventsGetResponse200::class, $lastEvent); } public function testGetEventsObject() @@ -46,6 +46,6 @@ public function testGetEventsObject() ], MiscManager::FETCH_OBJECT); $this->assertIsArray($events); - $this->assertInstanceOf('Docker\API\Model\Event', $events[0]); + $this->assertInstanceOf(EventsGetResponse200::class, $events[0]); } } diff --git a/v1.25.yaml b/v1.25.yaml new file mode 100644 index 000000000..75e401aa9 --- /dev/null +++ b/v1.25.yaml @@ -0,0 +1,7710 @@ +# A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API. +# +# This is used for generating API documentation and the types used by the +# client/server. See api/README.md for more information. +# +# Some style notes: +# - This file is used by ReDoc, which allows GitHub Flavored Markdown in +# descriptions. +# - There is no maximum line length, for ease of editing and pretty diffs. +# - operationIds are in the format "NounVerb", with a singular noun. + +swagger: "2.0" +schemes: + - "http" + - "https" +produces: + - "application/json" + - "text/plain" +consumes: + - "application/json" + - "text/plain" +basePath: "/v1.25" +info: + title: "Docker Engine API" + version: "1.25" + x-logo: + url: "https://docs.docker.com/assets/images/logo-docker-main.png" + description: | + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. + + Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. + + # Errors + + The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: + + ``` + { + "message": "page not found" + } + ``` + + # Versioning + + The API is usually changed in each release of Docker, so API calls are versioned to ensure that clients don't break. + + For Docker Engine 1.13, the API version is 1.25. To lock to this version, you prefix the URL with `/v1.25`. For example, calling `/info` is the same as calling `/v1.25/info`. + + Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. + + In previous versions of Docker, it was possible to access the API without providing a version. This behaviour is now deprecated will be removed in a future version of Docker. + + The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer Docker daemons. + + # Authentication + + Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a Base64 encoded (JSON) string with the following structure: + + ``` + { + "username": "string", + "password": "string", + "email": "string", + "serveraddress": "string" + } + ``` + + The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. + + If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: + + ``` + { + "identitytoken": "9cbaf023786cd7..." + } + ``` + +# The tags on paths define the menu sections in the ReDoc documentation, so +# the usage of tags must make sense for that: +# - They should be singular, not plural. +# - There should not be too many tags, or the menu becomes unwieldy. For +# example, it is preferable to add a path to the "System" tag instead of +# creating a tag with a single path in it. +# - The order of tags in this list defines the order in the menu. +tags: + # Primary objects + - name: "Container" + x-displayName: "Containers" + description: | + Create and manage containers. + - name: "Image" + x-displayName: "Images" + - name: "Network" + x-displayName: "Networks" + description: | + Networks are user-defined networks that containers can be attached to. See the [networking documentation](https://docs.docker.com/network/) for more information. + - name: "Volume" + x-displayName: "Volumes" + description: | + Create and manage persistent storage that can be attached to containers. + - name: "Exec" + x-displayName: "Exec" + description: | + Run new commands inside running containers. See the [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/) for more information. + + To exec a command in a container, you first need to create an exec instance, then start it. These two API endpoints are wrapped up in a single command-line command, `docker exec`. + - name: "Secret" + x-displayName: "Secrets" + # Swarm things + - name: "Swarm" + x-displayName: "Swarm" + description: | + Engines can be clustered together in a swarm. See [the swarm mode documentation](https://docs.docker.com/engine/swarm/) for more information. + - name: "Node" + x-displayName: "Nodes" + description: | + Nodes are instances of the Engine participating in a swarm. Swarm mode must be enabled for these endpoints to work. + - name: "Service" + x-displayName: "Services" + description: | + Services are the definitions of tasks to run on a swarm. Swarm mode must be enabled for these endpoints to work. + - name: "Task" + x-displayName: "Tasks" + description: | + A task is a container running on a swarm. It is the atomic scheduling unit of swarm. Swarm mode must be enabled for these endpoints to work. + # System things + - name: "Plugin" + x-displayName: "Plugins" + - name: "System" + x-displayName: "System" + +definitions: + Port: + type: "object" + description: "An open port on a container" + required: [PrivatePort, Type] + properties: + IP: + type: "string" + format: "ip-address" + PrivatePort: + type: "integer" + format: "uint16" + x-nullable: false + description: "Port on the container" + PublicPort: + type: "integer" + format: "uint16" + description: "Port exposed on the host" + Type: + type: "string" + x-nullable: false + enum: ["tcp", "udp"] + example: + PrivatePort: 8080 + PublicPort: 80 + Type: "tcp" + + MountPoint: + type: "object" + description: | + MountPoint represents a mount point configuration inside the container. + This is used for reporting the mountpoints in use by a container. + properties: + Type: + description: | + The mount type: + + - `bind` a mount of a file or directory from the host into the container. + - `volume` a docker volume with the given `Name`. + - `tmpfs` a `tmpfs`. + type: "string" + enum: + - "bind" + - "volume" + - "tmpfs" + example: "volume" + Name: + description: | + Name is the name reference to the underlying data defined by `Source` + e.g., the volume name. + type: "string" + example: "myvolume" + Source: + description: | + Source location of the mount. + + For volumes, this contains the storage location of the volume (within + `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains + the source (host) part of the bind-mount. For `tmpfs` mount points, this + field is empty. + type: "string" + example: "/var/lib/docker/volumes/myvolume/_data" + Destination: + description: | + Destination is the path relative to the container root (`/`) where + the `Source` is mounted inside the container. + type: "string" + example: "/usr/share/nginx/html/" + Driver: + description: | + Driver is the volume driver used to create the volume (if it is a volume). + type: "string" + example: "local" + Mode: + description: | + Mode is a comma separated list of options supplied by the user when + creating the bind/volume mount. + + The default is platform-specific (`"z"` on Linux, empty on Windows). + type: "string" + example: "z" + RW: + description: | + Whether the mount is mounted writable (read-write). + type: "boolean" + example: true + Propagation: + description: | + Propagation describes how mounts are propagated from the host into the + mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) + for details. This field is not used on Windows. + type: "string" + example: "" + + DeviceMapping: + type: "object" + description: "A device mapping between the host and container" + properties: + PathOnHost: + type: "string" + PathInContainer: + type: "string" + CgroupPermissions: + type: "string" + example: + PathOnHost: "/dev/deviceName" + PathInContainer: "/dev/deviceName" + CgroupPermissions: "mrw" + + ThrottleDevice: + type: "object" + properties: + Path: + description: "Device path" + type: "string" + Rate: + description: "Rate" + type: "integer" + format: "int64" + minimum: 0 + + Mount: + type: "object" + properties: + Target: + description: "Container path." + type: "string" + Source: + description: "Mount source (e.g. a volume name, a host path)." + Type: + description: | + The mount type. Available types: + + - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. + - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. + - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. + type: "string" + enum: + - "bind" + - "volume" + - "tmpfs" + ReadOnly: + description: "Whether the mount should be read-only." + type: "boolean" + BindOptions: + description: "Optional configuration for the `bind` type." + type: "object" + properties: + Propagation: + description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`." + enum: + - "private" + - "rprivate" + - "shared" + - "rshared" + - "slave" + - "rslave" + VolumeOptions: + description: "Optional configuration for the `volume` type." + type: "object" + properties: + NoCopy: + description: "Populate volume with data from the target." + type: "boolean" + default: false + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + DriverConfig: + description: "Map of driver specific options" + type: "object" + properties: + Name: + description: "Name of the driver to use to create the volume." + type: "string" + Options: + description: "key/value map of driver specific options." + type: "object" + additionalProperties: + type: "string" + TmpfsOptions: + description: "Optional configuration for the `tmpfs` type." + type: "object" + properties: + SizeBytes: + description: "The size for the tmpfs mount in bytes." + type: "integer" + format: "int64" + Mode: + description: "The permission mode for the tmpfs mount in an integer." + type: "integer" + RestartPolicy: + description: | + The behavior to apply when the container exits. The default is not to restart. + + An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + type: "object" + properties: + Name: + type: "string" + description: | + - `always` Always restart + - `unless-stopped` Restart always except when the user has manually stopped the container + - `on-failure` Restart only when the container exit code is non-zero + enum: + - "always" + - "unless-stopped" + - "on-failure" + MaximumRetryCount: + type: "integer" + description: "If `on-failure` is used, the number of times to retry before giving up" + default: {} + + Resources: + description: "A container's resources (cgroups config, ulimits, etc)" + type: "object" + properties: + # Applicable to all platforms + CpuShares: + description: "An integer value representing this container's relative CPU weight versus other containers." + type: "integer" + Memory: + description: "Memory limit in bytes." + type: "integer" + default: 0 + # Applicable to UNIX platforms + CgroupParent: + description: "Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist." + type: "string" + BlkioWeight: + description: "Block IO weight (relative weight)." + type: "integer" + minimum: 0 + maximum: 1000 + BlkioWeightDevice: + description: | + Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. + type: "array" + items: + type: "object" + properties: + Path: + type: "string" + Weight: + type: "integer" + minimum: 0 + BlkioDeviceReadBps: + description: | + Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceWriteBps: + description: | + Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceReadIOps: + description: | + Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceWriteIOps: + description: | + Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + CpuPeriod: + description: "The length of a CPU period in microseconds." + type: "integer" + format: "int64" + CpuQuota: + description: "Microseconds of CPU time that the container can get in a CPU period." + type: "integer" + format: "int64" + CpuRealtimePeriod: + description: "The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks." + type: "integer" + format: "int64" + CpuRealtimeRuntime: + description: "The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks." + type: "integer" + format: "int64" + CpusetCpus: + description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)" + type: "string" + CpusetMems: + description: "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems." + type: "string" + Devices: + description: "A list of devices to add to the container." + type: "array" + items: + $ref: "#/definitions/DeviceMapping" + DiskQuota: + description: "Disk limit (in bytes)." + type: "integer" + format: "int64" + KernelMemory: + description: "Kernel memory limit in bytes." + type: "integer" + format: "int64" + MemoryReservation: + description: "Memory soft limit in bytes." + type: "integer" + format: "int64" + MemorySwap: + description: "Total memory limit (memory + swap). Set as `-1` to enable unlimited swap." + type: "integer" + format: "int64" + MemorySwappiness: + description: "Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100." + type: "integer" + format: "int64" + minimum: 0 + maximum: 100 + NanoCpus: + description: "CPU quota in units of 10-9 CPUs." + type: "integer" + format: "int64" + OomKillDisable: + description: "Disable OOM Killer for the container." + type: "boolean" + PidsLimit: + description: "Tune a container's pids limit. Set -1 for unlimited." + type: "integer" + format: "int64" + Ulimits: + description: | + A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + type: "array" + items: + type: "object" + properties: + Name: + description: "Name of ulimit" + type: "string" + Soft: + description: "Soft limit" + type: "integer" + Hard: + description: "Hard limit" + type: "integer" + # Applicable to Windows + CpuCount: + description: | + The number of usable CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + type: "integer" + format: "int64" + CpuPercent: + description: | + The usable percentage of the available CPUs (Windows only). + + On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + type: "integer" + format: "int64" + IOMaximumIOps: + description: "Maximum IOps for the container system drive (Windows only)" + type: "integer" + format: "int64" + IOMaximumBandwidth: + description: "Maximum IO in bytes per second for the container system drive (Windows only)" + type: "integer" + format: "int64" + + HostConfig: + description: "Container configuration that depends on the host we are running on" + allOf: + - $ref: "#/definitions/Resources" + - type: "object" + properties: + # Applicable to all platforms + Binds: + type: "array" + description: | + A list of volume bindings for this container. Each volume binding is a string in one of these forms: + + - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + - `host-src:container-dest:ro` to make the bind-mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. + - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. + - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path. + items: + type: "string" + ContainerIDFile: + type: "string" + description: "Path to a file where the container ID is written" + LogConfig: + type: "object" + description: "The logging configuration for this container" + properties: + Type: + type: "string" + enum: + - "json-file" + - "syslog" + - "journald" + - "gelf" + - "fluentd" + - "awslogs" + - "splunk" + - "etwlogs" + - "none" + Config: + type: "object" + additionalProperties: + type: "string" + NetworkMode: + type: "string" + description: "Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken + as a custom network's name to which this container should connect to." + PortBindings: + type: "object" + description: "A map of exposed container ports and the host port they should map to." + additionalProperties: + type: "object" + properties: + HostIp: + type: "string" + description: "The host IP address" + HostPort: + type: "string" + description: "The host port number, as a string" + RestartPolicy: + $ref: "#/definitions/RestartPolicy" + AutoRemove: + type: "boolean" + description: "Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set." + VolumeDriver: + type: "string" + description: "Driver that this container uses to mount volumes." + VolumesFrom: + type: "array" + description: "A list of volumes to inherit from another container, specified in the form `[:]`." + items: + type: "string" + Mounts: + description: "Specification for mounts to be added to the container." + type: "array" + items: + $ref: "#/definitions/Mount" + + # Applicable to UNIX platforms + CapAdd: + type: "array" + description: "A list of kernel capabilities to add to the container." + items: + type: "string" + CapDrop: + type: "array" + description: "A list of kernel capabilities to drop from the container." + items: + type: "string" + Dns: + type: "array" + description: "A list of DNS servers for the container to use." + items: + type: "string" + DnsOptions: + type: "array" + description: "A list of DNS options." + items: + type: "string" + DnsSearch: + type: "array" + description: "A list of DNS search domains." + items: + type: "string" + ExtraHosts: + type: "array" + description: | + A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`. + items: + type: "string" + GroupAdd: + type: "array" + description: "A list of additional groups that the container process will run as." + items: + type: "string" + IpcMode: + type: "string" + description: "IPC namespace to use for the container." + Cgroup: + type: "string" + description: "Cgroup to use for the container." + Links: + type: "array" + description: "A list of links for the container in the form `container_name:alias`." + items: + type: "string" + OomScoreAdj: + type: "integer" + description: "An integer value containing the score given to the container in order to tune OOM killer preferences." + PidMode: + type: "string" + description: | + Set the PID (Process) Namespace mode for the container. It can be either: + + - `"container:"`: joins another container's PID namespace + - `"host"`: use the host's PID namespace inside the container + Privileged: + type: "boolean" + description: "Gives the container full access to the host." + PublishAllPorts: + type: "boolean" + description: "Allocates a random host port for all of a container's exposed ports." + ReadonlyRootfs: + type: "boolean" + description: "Mount the container's root filesystem as read only." + SecurityOpt: + type: "array" + description: "A list of string values to customize labels for MLS + systems, such as SELinux." + items: + type: "string" + StorageOpt: + type: "object" + description: | + Storage driver options for this container, in the form `{"size": "120G"}`. + additionalProperties: + type: "string" + Tmpfs: + type: "object" + description: | + A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ "/run": "rw,noexec,nosuid,size=65536k" }`. + additionalProperties: + type: "string" + UTSMode: + type: "string" + description: "UTS namespace to use for the container." + UsernsMode: + type: "string" + description: "Sets the usernamespace mode for the container when usernamespace remapping option is enabled." + ShmSize: + type: "integer" + description: "Size of `/dev/shm` in bytes. If omitted, the system uses 64MB." + minimum: 0 + Sysctls: + type: "object" + description: | + A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}` + additionalProperties: + type: "string" + Runtime: + type: "string" + description: "Runtime to use with this container." + # Applicable to Windows + ConsoleSize: + type: "array" + description: "Initial console size, as an `[height, width]` array. (Windows only)" + minItems: 2 + maxItems: 2 + items: + type: "integer" + minimum: 0 + Isolation: + type: "string" + description: "Isolation technology of the container. (Windows only)" + enum: + - "default" + - "process" + - "hyperv" + + Config: + description: "Configuration for a container that is portable between hosts" + type: "object" + properties: + Hostname: + description: "The hostname to use for the container, as a valid RFC 1123 hostname." + type: "string" + Domainname: + description: "The domain name to use for the container." + type: "string" + User: + description: "The user that commands are run as inside the container." + type: "string" + AttachStdin: + description: "Whether to attach to `stdin`." + type: "boolean" + default: false + AttachStdout: + description: "Whether to attach to `stdout`." + type: "boolean" + default: true + AttachStderr: + description: "Whether to attach to `stderr`." + type: "boolean" + default: true + ExposedPorts: + description: | + An object mapping ports to an empty object in the form: + + `{"/": {}}` + type: "object" + additionalProperties: + type: "object" + enum: + - {} + default: {} + Tty: + description: "Attach standard streams to a TTY, including `stdin` if it is not closed." + type: "boolean" + default: false + OpenStdin: + description: "Open `stdin`" + type: "boolean" + default: false + StdinOnce: + description: "Close `stdin` after one attached client disconnects" + type: "boolean" + default: false + Env: + description: | + A list of environment variables to set inside the container in the form `["VAR=value", ...]` + type: "array" + items: + type: "string" + Cmd: + description: "Command to run specified as a string or an array of strings." + type: + - "array" + - "string" + items: + type: "string" + Healthcheck: + description: "A test to perform to check that the container is healthy." + type: "object" + properties: + Test: + description: | + The test to perform. Possible values are: + + - `{}` inherit healthcheck from image or parent image + - `{"NONE"}` disable healthcheck + - `{"CMD", args...}` exec arguments directly + - `{"CMD-SHELL", command}` run command with system's default shell + type: "array" + items: + type: "string" + Interval: + description: "The time to wait between checks in nanoseconds. 0 means inherit." + type: "integer" + Timeout: + description: "The time to wait before considering the check to have hung. 0 means inherit." + type: "integer" + Retries: + description: "The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit." + type: "integer" + ArgsEscaped: + description: "Command is already escaped (Windows only)" + type: "boolean" + Image: + description: "The name of the image to use when creating the container" + type: "string" + Volumes: + description: "An object mapping mount point paths inside the container to empty objects." + type: "object" + properties: + additionalProperties: + type: "object" + enum: + - {} + default: {} + WorkingDir: + description: "The working directory for commands to run in." + type: "string" + Entrypoint: + description: | + The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + type: + - "array" + - "string" + items: + type: "string" + NetworkDisabled: + description: "Disable networking for the container." + type: "boolean" + MacAddress: + description: "MAC address of the container." + type: "string" + OnBuild: + description: "`ONBUILD` metadata that were defined in the image's `Dockerfile`." + type: "array" + items: + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + StopSignal: + description: "Signal to stop a container as a string or unsigned integer." + type: "string" + default: "SIGTERM" + StopTimeout: + description: "Timeout to stop a container in seconds." + type: "integer" + default: 10 + Shell: + description: "Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell." + type: "array" + items: + type: "string" + + NetworkConfig: + description: "TODO: check is correct" + type: "object" + properties: + Bridge: + type: "string" + Gateway: + type: "string" + Address: + type: "string" + IPPrefixLen: + type: "integer" + MacAddress: + type: "string" + PortMapping: + type: "string" + Ports: + type: "array" + items: + $ref: "#/definitions/Port" + + GraphDriver: + description: "Information about this container's graph driver." + type: "object" + properties: + Name: + type: "string" + Data: + type: "object" + additionalProperties: + type: "string" + + Image: + type: "object" + properties: + Id: + type: "string" + RepoTags: + type: "array" + items: + type: "string" + RepoDigests: + type: "array" + items: + type: "string" + Parent: + type: "string" + Comment: + type: "string" + Created: + type: "string" + Container: + type: "string" + ContainerConfig: + $ref: "#/definitions/Config" + DockerVersion: + type: "string" + Author: + type: "string" + Config: + $ref: "#/definitions/Config" + Architecture: + type: "string" + Os: + type: "string" + Size: + type: "integer" + format: "int64" + VirtualSize: + type: "integer" + format: "int64" + GraphDriver: + $ref: "#/definitions/GraphDriver" + RootFS: + type: "object" + properties: + Type: + type: "string" + Layers: + type: "array" + items: + type: "string" + + ImageSummary: + type: "object" + required: + - Id + - ParentId + - RepoTags + - RepoDigests + - Created + - Size + - SharedSize + - VirtualSize + - Labels + - Containers + properties: + Id: + type: "string" + x-nullable: false + ParentId: + type: "string" + x-nullable: false + RepoTags: + type: "array" + x-nullable: false + items: + type: "string" + RepoDigests: + type: "array" + x-nullable: false + items: + type: "string" + Created: + type: "integer" + x-nullable: false + Size: + type: "integer" + x-nullable: false + SharedSize: + type: "integer" + x-nullable: false + VirtualSize: + type: "integer" + x-nullable: false + Labels: + type: "object" + x-nullable: false + additionalProperties: + type: "string" + Containers: + x-nullable: false + type: "integer" + + AuthConfig: + type: "object" + properties: + username: + type: "string" + password: + type: "string" + email: + type: "string" + serveraddress: + type: "string" + example: + username: "hannibal" + password: "xxxx" + serveraddress: "https://index.docker.io/v1/" + + ProcessConfig: + type: "object" + properties: + privileged: + type: "boolean" + user: + type: "string" + tty: + type: "boolean" + entrypoint: + type: "string" + arguments: + type: "array" + items: + type: "string" + + Volume: + type: "object" + required: [Name, Driver, Mountpoint, Labels, Scope, Options] + properties: + Name: + type: "string" + description: "Name of the volume." + x-nullable: false + Driver: + type: "string" + description: "Name of the volume driver used by the volume." + x-nullable: false + Mountpoint: + type: "string" + description: "Mount path of the volume on the host." + x-nullable: false + Status: + type: "object" + description: | + Low-level details about the volume, provided by the volume driver. + Details are returned as a map with key/value pairs: + `{"key":"value","key2":"value2"}`. + + The `Status` field is optional, and is omitted if the volume driver + does not support this feature. + additionalProperties: + type: "object" + Labels: + type: "object" + description: "User-defined key/value metadata." + x-nullable: false + additionalProperties: + type: "string" + Scope: + type: "string" + description: "The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level." + default: "local" + x-nullable: false + enum: ["local", "global"] + Options: + type: "object" + description: "The driver specific options used when creating the volume." + additionalProperties: + type: "string" + UsageData: + type: "object" + required: [Size, RefCount] + properties: + Size: + type: "integer" + description: "The disk space used by the volume (local driver only)" + default: -1 + x-nullable: false + RefCount: + type: "integer" + default: -1 + description: "The number of containers referencing this volume." + x-nullable: false + + example: + Name: "tardis" + Driver: "custom" + Mountpoint: "/var/lib/docker/volumes/tardis" + Status: + hello: "world" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Scope: "local" + + Network: + type: "object" + properties: + Name: + type: "string" + Id: + type: "string" + Created: + type: "string" + format: "dateTime" + Scope: + type: "string" + Driver: + type: "string" + EnableIPv6: + type: "boolean" + IPAM: + $ref: "#/definitions/IPAM" + Internal: + type: "boolean" + Containers: + type: "object" + additionalProperties: + $ref: "#/definitions/NetworkContainer" + Options: + type: "object" + additionalProperties: + type: "string" + Labels: + type: "object" + additionalProperties: + type: "string" + example: + Name: "net01" + Id: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99" + Created: "2016-10-19T04:33:30.360899459Z" + Scope: "local" + Driver: "bridge" + EnableIPv6: false + IPAM: + Driver: "default" + Config: + - Subnet: "172.19.0.0/16" + Gateway: "172.19.0.1" + Options: + foo: "bar" + Internal: false + Containers: + 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c: + Name: "test" + EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a" + MacAddress: "02:42:ac:13:00:02" + IPv4Address: "172.19.0.2/16" + IPv6Address: "" + Options: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + IPAM: + type: "object" + properties: + Driver: + description: "Name of the IPAM driver to use." + type: "string" + default: "default" + Config: + description: "List of IPAM configuration options, specified as a map: `{\"Subnet\": , \"IPRange\": , \"Gateway\": , \"AuxAddress\": }`" + type: "array" + items: + type: "object" + additionalProperties: + type: "string" + Options: + description: "Driver-specific options, specified as a map." + type: "array" + items: + type: "object" + additionalProperties: + type: "string" + NetworkContainer: + type: "object" + properties: + EndpointID: + type: "string" + MacAddress: + type: "string" + IPv4Address: + type: "string" + IPv6Address: + type: "string" + + BuildInfo: + type: "object" + properties: + id: + type: "string" + stream: + type: "string" + error: + type: "string" + errorDetail: + $ref: "#/definitions/ErrorDetail" + status: + type: "string" + progress: + type: "string" + progressDetail: + $ref: "#/definitions/ProgressDetail" + + CreateImageInfo: + type: "object" + properties: + error: + type: "string" + status: + type: "string" + progress: + type: "string" + progressDetail: + $ref: "#/definitions/ProgressDetail" + + PushImageInfo: + type: "object" + properties: + error: + type: "string" + status: + type: "string" + progress: + type: "string" + progressDetail: + $ref: "#/definitions/ProgressDetail" + ErrorDetail: + type: "object" + properties: + code: + type: "integer" + message: + type: "string" + ProgressDetail: + type: "object" + properties: + code: + type: "integer" + message: + type: "integer" + + ErrorResponse: + description: "Represents an error." + type: "object" + required: ["message"] + properties: + message: + description: "The error message." + type: "string" + x-nullable: false + example: + message: "Something went wrong." + + IdResponse: + description: "Response to an API call that returns just an Id" + type: "object" + required: ["Id"] + properties: + Id: + description: "The id of the newly created object." + type: "string" + x-nullable: false + + EndpointSettings: + description: "Configuration for a network endpoint." + type: "object" + properties: + IPAMConfig: + description: "IPAM configurations for the endpoint" + type: "object" + properties: + IPv4Address: + type: "string" + IPv6Address: + type: "string" + LinkLocalIPs: + type: "array" + items: + type: "string" + Links: + type: "array" + items: + type: "string" + Aliases: + type: "array" + items: + type: "string" + NetworkID: + type: "string" + EndpointID: + type: "string" + Gateway: + type: "string" + IPAddress: + type: "string" + IPPrefixLen: + type: "integer" + IPv6Gateway: + type: "string" + GlobalIPv6Address: + type: "string" + GlobalIPv6PrefixLen: + type: "integer" + format: "int64" + MacAddress: + type: "string" + + PluginMount: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Source, Destination, Type, Options] + properties: + Name: + type: "string" + x-nullable: false + Description: + type: "string" + x-nullable: false + Settable: + type: "array" + items: + type: "string" + Source: + type: "string" + Destination: + type: "string" + x-nullable: false + Type: + type: "string" + x-nullable: false + Options: + type: "array" + items: + type: "string" + + PluginDevice: + type: "object" + required: [Name, Description, Settable, Path] + x-nullable: false + properties: + Name: + type: "string" + x-nullable: false + Description: + type: "string" + x-nullable: false + Settable: + type: "array" + items: + type: "string" + Path: + type: "string" + + PluginEnv: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Value] + properties: + Name: + x-nullable: false + type: "string" + Description: + x-nullable: false + type: "string" + Settable: + type: "array" + items: + type: "string" + Value: + type: "string" + + PluginInterfaceType: + type: "object" + x-nullable: false + required: [Prefix, Capability, Version] + properties: + Prefix: + type: "string" + x-nullable: false + Capability: + type: "string" + x-nullable: false + Version: + type: "string" + x-nullable: false + + Plugin: + description: "A plugin for the Engine API" + type: "object" + required: [Settings, Enabled, Config, Name] + properties: + Id: + type: "string" + Name: + type: "string" + x-nullable: false + Enabled: + description: "True when the plugin is running. False when the plugin is not running, only installed." + type: "boolean" + x-nullable: false + Settings: + description: "Settings that can be modified by users." + type: "object" + x-nullable: false + required: [Args, Devices, Env, Mounts] + properties: + Mounts: + type: "array" + items: + $ref: "#/definitions/PluginMount" + Env: + type: "array" + items: + type: "string" + Args: + type: "array" + items: + type: "string" + Devices: + type: "array" + items: + $ref: "#/definitions/PluginDevice" + Config: + description: "The config of a plugin." + type: "object" + x-nullable: false + required: + - Description + - Documentation + - Interface + - Entrypoint + - WorkDir + - Network + - Linux + - PropagatedMount + - Mounts + - Env + - Args + properties: + Description: + type: "string" + x-nullable: false + Documentation: + type: "string" + x-nullable: false + Interface: + description: "The interface between Docker and the plugin" + x-nullable: false + type: "object" + required: [Types, Socket] + properties: + Types: + type: "array" + items: + $ref: "#/definitions/PluginInterfaceType" + Socket: + type: "string" + x-nullable: false + Entrypoint: + type: "array" + items: + type: "string" + WorkDir: + type: "string" + x-nullable: false + User: + type: "object" + x-nullable: false + properties: + UID: + type: "integer" + format: "uint32" + GID: + type: "integer" + format: "uint32" + Network: + type: "object" + x-nullable: false + required: [Type] + properties: + Type: + x-nullable: false + type: "string" + Linux: + type: "object" + x-nullable: false + required: [Capabilities, AllowAllDevices, Devices] + properties: + Capabilities: + type: "array" + items: + type: "string" + AllowAllDevices: + type: "boolean" + x-nullable: false + Devices: + type: "array" + items: + $ref: "#/definitions/PluginDevice" + PropagatedMount: + type: "string" + x-nullable: false + Mounts: + type: "array" + items: + $ref: "#/definitions/PluginMount" + Env: + type: "array" + items: + $ref: "#/definitions/PluginEnv" + Args: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Value] + properties: + Name: + x-nullable: false + type: "string" + Description: + x-nullable: false + type: "string" + Settable: + type: "array" + items: + type: "string" + Value: + type: "array" + items: + type: "string" + rootfs: + type: "object" + properties: + type: + type: "string" + diff_ids: + type: "array" + items: + type: "string" + example: + Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" + Name: "tiborvass/sample-volume-plugin" + Tag: "latest" + Active: true + Settings: + Env: + - "DEBUG=0" + Args: null + Devices: null + Config: + Description: "A sample volume plugin for Docker" + Documentation: "https://docs.docker.com/engine/extend/plugins/" + Interface: + Types: + - "docker.volumedriver/1.0" + Socket: "plugins.sock" + Entrypoint: + - "/usr/bin/sample-volume-plugin" + - "/data" + WorkDir: "" + User: {} + Network: + Type: "" + Linux: + Capabilities: null + AllowAllDevices: false + Devices: null + Mounts: null + PropagatedMount: "/data" + Env: + - Name: "DEBUG" + Description: "If set, prints debug messages" + Settable: null + Value: "0" + Args: + Name: "args" + Description: "command line arguments" + Settable: null + Value: [] + + NodeSpec: + type: "object" + properties: + Name: + description: "Name for the node." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Role: + description: "Role of the node." + type: "string" + enum: + - "worker" + - "manager" + Availability: + description: "Availability of the node." + type: "string" + enum: + - "active" + - "pause" + - "drain" + example: + Availability: "active" + Name: "node-name" + Role: "manager" + Labels: + foo: "bar" + Node: + type: "object" + properties: + ID: + type: "string" + Version: + type: "object" + properties: + Index: + type: "integer" + format: "int64" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/NodeSpec" + Description: + type: "object" + properties: + Hostname: + type: "string" + Platform: + type: "object" + properties: + Architecture: + type: "string" + OS: + type: "string" + Resources: + type: "object" + properties: + NanoCPUs: + type: "integer" + format: "int64" + MemoryBytes: + type: "integer" + format: "int64" + Engine: + type: "object" + properties: + EngineVersion: + type: "string" + Labels: + type: "object" + additionalProperties: + type: "string" + Plugins: + type: "array" + items: + type: "object" + properties: + Type: + type: "string" + Name: + type: "string" + example: + ID: "24ifsmvkjbyhk" + Version: + Index: 8 + CreatedAt: "2016-06-07T20:31:11.853781916Z" + UpdatedAt: "2016-06-07T20:31:11.999868824Z" + Spec: + Name: "my-node" + Role: "manager" + Availability: "active" + Labels: + foo: "bar" + Description: + Hostname: "bf3067039e47" + Platform: + Architecture: "x86_64" + OS: "linux" + Resources: + NanoCPUs: 4000000000 + MemoryBytes: 8272408576 + Engine: + EngineVersion: "1.13.0" + Labels: + foo: "bar" + Plugins: + - Type: "Volume" + Name: "local" + - Type: "Network" + Name: "bridge" + - Type: "Network" + Name: "null" + - Type: "Network" + Name: "overlay" + Status: + State: "ready" + Addr: "172.17.0.2" + ManagerStatus: + Leader: true + Reachability: "reachable" + Addr: "172.17.0.2:2377" + SwarmSpec: + description: "User modifiable swarm configuration." + type: "object" + properties: + Name: + description: "Name of the swarm." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Orchestration: + description: "Orchestration configuration." + type: "object" + properties: + TaskHistoryRetentionLimit: + description: "The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks." + type: "integer" + format: "int64" + Raft: + description: "Raft configuration." + type: "object" + properties: + SnapshotInterval: + description: "The number of log entries between snapshots." + type: "integer" + format: "int64" + KeepOldSnapshots: + description: "The number of snapshots to keep beyond the current snapshot." + type: "integer" + format: "int64" + LogEntriesForSlowFollowers: + description: "The number of log entries to keep around to sync up slow followers after a snapshot is created." + type: "integer" + format: "int64" + ElectionTick: + description: | + The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`. + + A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + type: "integer" + HeartbeatTick: + description: | + The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. + + A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + type: "integer" + Dispatcher: + description: "Dispatcher configuration." + type: "object" + properties: + HeartbeatPeriod: + description: "The delay for an agent to send a heartbeat to the dispatcher." + type: "integer" + format: "int64" + CAConfig: + description: "CA configuration." + type: "object" + properties: + NodeCertExpiry: + description: "The duration node certificates are issued for." + type: "integer" + format: "int64" + ExternalCAs: + description: "Configuration for forwarding signing requests to an external certificate authority." + type: "array" + items: + type: "object" + properties: + Protocol: + description: "Protocol for communication with the external CA (currently only `cfssl` is supported)." + type: "string" + enum: + - "cfssl" + default: "cfssl" + URL: + description: "URL where certificate signing requests should be sent." + type: "string" + Options: + description: "An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver." + type: "object" + additionalProperties: + type: "string" + EncryptionConfig: + description: "Parameters related to encryption-at-rest." + type: "object" + properties: + AutoLockManagers: + description: "If set, generate a key and use it to lock data stored on the managers." + type: "boolean" + TaskDefaults: + description: "Defaults for creating tasks in this cluster." + type: "object" + properties: + LogDriver: + description: | + The log driver to use for tasks created in the orchestrator if unspecified by a service. + + Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated. + type: "object" + properties: + Name: + type: "string" + Options: + type: "object" + additionalProperties: + type: "string" + example: + Name: "default" + Orchestration: + TaskHistoryRetentionLimit: 10 + Raft: + SnapshotInterval: 10000 + LogEntriesForSlowFollowers: 500 + HeartbeatTick: 1 + ElectionTick: 3 + Dispatcher: + HeartbeatPeriod: 5000000000 + CAConfig: + NodeCertExpiry: 7776000000000000 + JoinTokens: + Worker: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx" + Manager: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" + EncryptionConfig: + AutoLockManagers: false + # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but + # without `JoinTokens`. + ClusterInfo: + type: "object" + properties: + ID: + description: "The ID of the swarm." + type: "string" + Version: + type: "object" + properties: + Index: + type: "integer" + format: "int64" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/SwarmSpec" + TaskSpec: + description: "User modifiable task configuration." + type: "object" + properties: + ContainerSpec: + type: "object" + properties: + Image: + description: "The image name to use for the container." + type: "string" + Command: + description: "The command to be run in the image." + type: "array" + items: + type: "string" + Args: + description: "Arguments to the command." + type: "array" + items: + type: "string" + Env: + description: "A list of environment variables in the form `VAR=value`." + type: "array" + items: + type: "string" + Dir: + description: "The working directory for commands to run in." + type: "string" + User: + description: "The user inside the container." + type: "string" + Labels: + description: "User-defined key/value data." + type: "object" + additionalProperties: + type: "string" + TTY: + description: "Whether a pseudo-TTY should be allocated." + type: "boolean" + Mounts: + description: "Specification for mounts to be added to containers created as part of the service." + type: "array" + items: + $ref: "#/definitions/Mount" + StopGracePeriod: + description: "Amount of time to wait for the container to terminate before forcefully killing it." + type: "integer" + format: "int64" + DNSConfig: + description: "Specification for DNS related configurations in resolver configuration file (`resolv.conf`)." + type: "object" + properties: + Nameservers: + description: "The IP addresses of the name servers." + type: "array" + items: + type: "string" + Search: + description: "A search list for host-name lookup." + type: "array" + items: + type: "string" + Options: + description: "A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.)." + type: "array" + items: + type: "string" + Resources: + description: "Resource requirements which apply to each individual container created as part of the service." + type: "object" + properties: + Limits: + description: "Define resources limits." + type: "object" + properties: + NanoCPUs: + description: "CPU limit in units of 10-9 CPU shares." + type: "integer" + format: "int64" + MemoryBytes: + description: "Memory limit in Bytes." + type: "integer" + format: "int64" + Reservations: + description: "Define resources reservation." + properties: + NanoCPUs: + description: "CPU reservation in units of 10-9 CPU shares." + type: "integer" + format: "int64" + MemoryBytes: + description: "Memory reservation in Bytes." + type: "integer" + format: "int64" + RestartPolicy: + description: "Specification for the restart policy which applies to containers created as part of this service." + type: "object" + properties: + Condition: + description: "Condition for restart." + type: "string" + enum: + - "none" + - "on-failure" + - "any" + Delay: + description: "Delay between restart attempts." + type: "integer" + format: "int64" + MaxAttempts: + description: "Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)." + type: "integer" + format: "int64" + default: 0 + Window: + description: "Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded)." + type: "integer" + format: "int64" + default: 0 + Placement: + type: "object" + properties: + Constraints: + description: "An array of constraints." + type: "array" + items: + type: "string" + ForceUpdate: + description: "A counter that triggers an update even if no relevant parameters have been changed." + type: "integer" + Networks: + type: "array" + items: + type: "object" + properties: + Target: + type: "string" + Aliases: + type: "array" + items: + type: "string" + LogDriver: + description: "Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified." + type: "object" + properties: + Name: + type: "string" + Options: + type: "object" + additionalProperties: + type: "string" + TaskState: + type: "string" + enum: + - "new" + - "allocated" + - "pending" + - "assigned" + - "accepted" + - "preparing" + - "ready" + - "starting" + - "running" + - "complete" + - "shutdown" + - "failed" + - "rejected" + Task: + type: "object" + properties: + ID: + description: "The ID of the task." + type: "string" + Version: + type: "object" + properties: + Index: + type: "integer" + format: "int64" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Name: + description: "Name of the task." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Spec: + $ref: "#/definitions/TaskSpec" + ServiceID: + description: "The ID of the service this task is part of." + type: "string" + Slot: + type: "integer" + NodeID: + description: "The ID of the node that this task is on." + type: "string" + Status: + type: "object" + properties: + Timestamp: + type: "string" + format: "dateTime" + State: + $ref: "#/definitions/TaskState" + Message: + type: "string" + Err: + type: "string" + ContainerStatus: + type: "object" + properties: + ContainerID: + type: "string" + PID: + type: "integer" + ExitCode: + type: "integer" + DesiredState: + $ref: "#/definitions/TaskState" + example: + ID: "0kzzo1i0y4jz6027t0k7aezc7" + Version: + Index: 71 + CreatedAt: "2016-06-07T21:07:31.171892745Z" + UpdatedAt: "2016-06-07T21:07:31.376370513Z" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:31.290032978Z" + State: "running" + Message: "started" + ContainerStatus: + ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" + PID: 677 + DesiredState: "running" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.10/16" + ServiceSpec: + description: "User modifiable configuration for a service." + type: object + properties: + Name: + description: "Name of the service." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + TaskTemplate: + $ref: "#/definitions/TaskSpec" + Mode: + description: "Scheduling mode for the service." + type: "object" + properties: + Replicated: + type: "object" + properties: + Replicas: + type: "integer" + format: "int64" + Global: + type: "object" + UpdateConfig: + description: "Specification for the update strategy of the service." + type: "object" + properties: + Parallelism: + description: "Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism)." + type: "integer" + format: "int64" + Delay: + description: "Amount of time between updates, in nanoseconds." + type: "integer" + format: "int64" + FailureAction: + description: "Action to take if an updated task fails to run, or stops running during the update." + type: "string" + enum: + - "continue" + - "pause" + Monitor: + description: "Amount of time to monitor each updated task for failures, in nanoseconds." + type: "integer" + format: "int64" + MaxFailureRatio: + description: "The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1." + type: "number" + default: 0 + Networks: + description: "Array of network names or IDs to attach the service to." + type: "array" + items: + type: "object" + properties: + Target: + type: "string" + Aliases: + type: "array" + items: + type: "string" + EndpointSpec: + $ref: "#/definitions/EndpointSpec" + EndpointPortConfig: + type: "object" + properties: + Name: + type: "string" + Protocol: + type: "string" + enum: + - "tcp" + - "udp" + TargetPort: + description: "The port inside the container." + type: "integer" + PublishedPort: + description: "The port on the swarm hosts." + type: "integer" + EndpointSpec: + description: "Properties that can be configured to access and load balance a service." + type: "object" + properties: + Mode: + description: "The mode of resolution to use for internal load balancing between tasks." + type: "string" + enum: + - "vip" + - "dnsrr" + default: "vip" + Ports: + description: "List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used." + type: "array" + items: + $ref: "#/definitions/EndpointPortConfig" + Service: + type: "object" + properties: + ID: + type: "string" + Version: + type: "object" + properties: + Index: + type: "integer" + format: "int64" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/ServiceSpec" + Endpoint: + type: "object" + properties: + Spec: + $ref: "#/definitions/EndpointSpec" + Ports: + type: "array" + items: + $ref: "#/definitions/EndpointPortConfig" + VirtualIPs: + type: "array" + items: + type: "object" + properties: + NetworkID: + type: "string" + Addr: + type: "string" + UpdateStatus: + description: "The status of a service update." + type: "object" + properties: + State: + type: "string" + enum: + - "updating" + - "paused" + - "completed" + StartedAt: + type: "string" + format: "dateTime" + CompletedAt: + type: "string" + format: "dateTime" + Message: + type: "string" + example: + ID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Version: + Index: 19 + CreatedAt: "2016-06-07T21:05:51.880065305Z" + UpdatedAt: "2016-06-07T21:07:29.962229872Z" + Spec: + Name: "hopeful_cori" + TaskTemplate: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ForceUpdate: 0 + Mode: + Replicated: + Replicas: 1 + UpdateConfig: + Parallelism: 1 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + EndpointSpec: + Mode: "vip" + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + Endpoint: + Spec: + Mode: "vip" + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + VirtualIPs: + - + NetworkID: "4qvuz4ko70xaltuqbt8956gd1" + Addr: "10.255.0.2/16" + - + NetworkID: "4qvuz4ko70xaltuqbt8956gd1" + Addr: "10.255.0.3/16" + ImageDeleteResponse: + type: "object" + properties: + Untagged: + description: "The image ID of an image that was untagged" + type: "string" + Deleted: + description: "The image ID of an image that was deleted" + type: "string" + ServiceUpdateResponse: + type: "object" + properties: + Warnings: + description: "Optional warning messages" + type: "array" + items: + type: "string" + example: + Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" + ContainerSummary: + type: "array" + items: + type: "object" + properties: + Id: + description: "The ID of this container" + type: "string" + x-go-name: "ID" + Names: + description: "The names that this container has been given" + type: "array" + items: + type: "string" + Image: + description: "The name of the image used when creating this container" + type: "string" + ImageID: + description: "The ID of the image that this container was created from" + type: "string" + Command: + description: "Command to run when starting the container" + type: "string" + Created: + description: "When the container was created" + type: "integer" + format: "int64" + Ports: + description: "The ports exposed by this container" + type: "array" + items: + $ref: "#/definitions/Port" + SizeRw: + description: "The size of files that have been created or changed by this container" + type: "integer" + format: "int64" + SizeRootFs: + description: "The total size of all the files in this container" + type: "integer" + format: "int64" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + State: + description: "The state of this container (e.g. `Exited`)" + type: "string" + Status: + description: "Additional human-readable status of this container (e.g. `Exit 0`)" + type: "string" + HostConfig: + type: "object" + properties: + NetworkMode: + type: "string" + NetworkSettings: + description: "A summary of the container's network settings" + type: "object" + properties: + Networks: + type: "object" + additionalProperties: + $ref: "#/definitions/EndpointSettings" + Mounts: + type: "array" + items: + $ref: "#/definitions/MountPoint" + SecretSpec: + type: "object" + properties: + Name: + description: "User-defined name of the secret." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Data: + description: "Base64-url-safe-encoded secret data" + type: "array" + items: + type: "string" + Secret: + type: "object" + properties: + ID: + type: "string" + Version: + type: "object" + properties: + Index: + type: "integer" + format: "int64" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/ServiceSpec" +paths: + /containers/json: + get: + summary: "List containers" + operationId: "ContainerList" + produces: + - "application/json" + parameters: + - name: "all" + in: "query" + description: "Return all containers. By default, only running containers are shown" + type: "boolean" + default: false + - name: "limit" + in: "query" + description: "Return this number of most recently created containers, including non-running ones." + type: "integer" + - name: "size" + in: "query" + description: "Return the size of container as fields `SizeRw` and `SizeRootFs`." + type: "boolean" + default: false + - name: "filters" + in: "query" + description: | + Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{"status": ["paused"]}` will only return paused containers. + + Available filters: + - `exited=` containers with exit code of `` + - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) + - `label=key` or `label="key=value"` of a container label + - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) + - `id=` a container's ID + - `name=` a container's name + - `is-task=`(`true`|`false`) + - `ancestor`=(`[:]`, ``, or ``) + - `before`=(`` or ``) + - `since`=(`` or ``) + - `volume`=(`` or ``) + - `network`=(`` or ``) + - `health`=(`starting`|`healthy`|`unhealthy`|`none`) + type: "string" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/ContainerSummary" + examples: + application/json: + - Id: "8dfafdbc3a40" + Names: + - "/boring_feynman" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 1" + Created: 1367854155 + State: "Exited" + Status: "Exit 0" + Ports: + - PrivatePort: 2222 + PublicPort: 3333 + Type: "tcp" + Labels: + com.example.vendor: "Acme" + com.example.license: "GPL" + com.example.version: "1.0" + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.2" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:02" + Mounts: + - Name: "fac362...80535" + Source: "/data" + Destination: "/data" + Driver: "local" + Mode: "ro,Z" + RW: false + Propagation: "" + - Id: "9cd87474be90" + Names: + - "/coolName" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 222222" + Created: 1367854155 + State: "Exited" + Status: "Exit 0" + Ports: [] + Labels: {} + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.8" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:08" + Mounts: [] + - Id: "3176a2479c92" + Names: + - "/sleepy_dog" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 3333333333333333" + Created: 1367854154 + State: "Exited" + Status: "Exit 0" + Ports: [] + Labels: {} + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.6" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:06" + Mounts: [] + - Id: "4cb07b47f9fb" + Names: + - "/running_cat" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 444444444444444444444444444444444" + Created: 1367854152 + State: "Exited" + Status: "Exit 0" + Ports: [] + Labels: {} + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.5" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:05" + Mounts: [] + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Container"] + /containers/create: + post: + summary: "Create a container" + operationId: "ContainerCreate" + consumes: + - "application/json" + - "application/octet-stream" + produces: + - "application/json" + parameters: + - name: "name" + in: "query" + description: "Assign the specified name to the container. Must match `/?[a-zA-Z0-9_-]+`." + type: "string" + pattern: "/?[a-zA-Z0-9_-]+" + - name: "body" + in: "body" + description: "Container to create" + schema: + allOf: + - $ref: "#/definitions/Config" + - type: "object" + properties: + HostConfig: + $ref: "#/definitions/HostConfig" + NetworkingConfig: + description: "This container's networking configuration." + type: "object" + properties: + EndpointsConfig: + description: "A mapping of network name to endpoint configuration for that network." + type: "object" + additionalProperties: + $ref: "#/definitions/EndpointSettings" + example: + Hostname: "" + Domainname: "" + User: "" + AttachStdin: false + AttachStdout: true + AttachStderr: true + Tty: false + OpenStdin: false + StdinOnce: false + Env: + - "FOO=bar" + - "BAZ=quux" + Cmd: + - "date" + Entrypoint: "" + Image: "ubuntu" + Labels: + com.example.vendor: "Acme" + com.example.license: "GPL" + com.example.version: "1.0" + Volumes: + /volumes/data: {} + WorkingDir: "" + NetworkDisabled: false + MacAddress: "12:34:56:78:9a:bc" + ExposedPorts: + 22/tcp: {} + StopSignal: "SIGTERM" + StopTimeout: 10 + HostConfig: + Binds: + - "/tmp:/tmp" + Links: + - "redis3:redis" + Memory: 0 + MemorySwap: 0 + MemoryReservation: 0 + KernelMemory: 0 + NanoCpus: 500000 + CpuPercent: 80 + CpuShares: 512 + CpuPeriod: 100000 + CpuRealtimePeriod: 1000000 + CpuRealtimeRuntime: 10000 + CpuQuota: 50000 + CpusetCpus: "0,1" + CpusetMems: "0,1" + MaximumIOps: 0 + MaximumIOBps: 0 + BlkioWeight: 300 + BlkioWeightDevice: + - {} + BlkioDeviceReadBps: + - {} + BlkioDeviceReadIOps: + - {} + BlkioDeviceWriteBps: + - {} + BlkioDeviceWriteIOps: + - {} + MemorySwappiness: 60 + OomKillDisable: false + OomScoreAdj: 500 + PidMode: "" + PidsLimit: -1 + PortBindings: + 22/tcp: + - HostPort: "11022" + PublishAllPorts: false + Privileged: false + ReadonlyRootfs: false + Dns: + - "8.8.8.8" + DnsOptions: + - "" + DnsSearch: + - "" + VolumesFrom: + - "parent" + - "other:ro" + CapAdd: + - "NET_ADMIN" + CapDrop: + - "MKNOD" + GroupAdd: + - "newgroup" + RestartPolicy: + Name: "" + MaximumRetryCount: 0 + AutoRemove: true + NetworkMode: "bridge" + Devices: [] + Ulimits: + - {} + LogConfig: + Type: "json-file" + Config: {} + SecurityOpt: [] + StorageOpt: {} + CgroupParent: "" + VolumeDriver: "" + ShmSize: 67108864 + NetworkingConfig: + EndpointsConfig: + isolated_nw: + IPAMConfig: + IPv4Address: "172.20.30.33" + IPv6Address: "2001:db8:abcd::3033" + LinkLocalIPs: + - "169.254.34.68" + - "fe80::3468" + Links: + - "container_1" + - "container_2" + Aliases: + - "server_x" + - "server_y" + + required: true + responses: + 201: + description: "Container created successfully" + schema: + type: "object" + required: [Id, Warnings] + properties: + Id: + description: "The ID of the created container" + type: "string" + x-nullable: false + Warnings: + description: "Warnings encountered when creating the container" + type: "array" + x-nullable: false + items: + type: "string" + examples: + application/json: + Id: "e90e34656806" + Warnings: [] + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such image" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such image: c2ada9df5af8" + 406: + description: "impossible to attach" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Container"] + /containers/{id}/json: + get: + summary: "Inspect a container" + description: "Return low-level information about a container." + operationId: "ContainerInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + properties: + Id: + description: "The ID of the container" + type: "string" + Created: + description: "The time the container was created" + type: "string" + Path: + description: "The path to the command being run" + type: "string" + Args: + description: "The arguments to the command being run" + type: "array" + items: + type: "string" + State: + description: "The state of the container." + type: "object" + properties: + Status: + description: "The status of the container. For example, `running` or `exited`." + type: "string" + Running: + description: "Whether this container is running." + type: "boolean" + Paused: + description: "Whether this container is paused." + type: "boolean" + Restarting: + description: "Whether this container is restarting." + type: "boolean" + OOMKilled: + description: "Whether this container has been killed because it ran out of memory." + type: "boolean" + Dead: + type: "boolean" + Pid: + description: "The process ID of this container" + type: "integer" + ExitCode: + description: "The last exit code of this container" + type: "integer" + Error: + type: "string" + StartedAt: + description: "The time when this container was last started." + type: "string" + FinishedAt: + description: "The time when this container last exited." + type: "string" + Image: + description: "The container's image" + type: "string" + ResolvConfPath: + type: "string" + HostnamePath: + type: "string" + HostsPath: + type: "string" + LogPath: + type: "string" + Node: + description: "TODO" + type: "object" + Name: + type: "string" + RestartCount: + type: "integer" + Driver: + type: "string" + MountLabel: + type: "string" + ProcessLabel: + type: "string" + AppArmorProfile: + type: "string" + ExecIDs: + type: "string" + HostConfig: + $ref: "#/definitions/HostConfig" + GraphDriver: + $ref: "#/definitions/GraphDriver" + SizeRw: + description: "The size of files that have been created or changed by this container." + type: "integer" + format: "int64" + SizeRootFs: + description: "The total size of all the files in this container." + type: "integer" + format: "int64" + Mounts: + type: "array" + items: + $ref: "#/definitions/MountPoint" + Config: + $ref: "#/definitions/Config" + NetworkSettings: + $ref: "#/definitions/NetworkConfig" + examples: + application/json: + AppArmorProfile: "" + Args: + - "-c" + - "exit 9" + Config: + AttachStderr: true + AttachStdin: false + AttachStdout: true + Cmd: + - "/bin/sh" + - "-c" + - "exit 9" + Domainname: "" + Env: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + Hostname: "ba033ac44011" + Image: "ubuntu" + Labels: + com.example.vendor: "Acme" + com.example.license: "GPL" + com.example.version: "1.0" + MacAddress: "" + NetworkDisabled: false + OpenStdin: false + StdinOnce: false + Tty: false + User: "" + Volumes: + /volumes/data: {} + WorkingDir: "" + StopSignal: "SIGTERM" + StopTimeout: 10 + Created: "2015-01-06T15:47:31.485331387Z" + Driver: "overlay2" + HostConfig: + MaximumIOps: 0 + MaximumIOBps: 0 + BlkioWeight: 0 + BlkioWeightDevice: + - {} + BlkioDeviceReadBps: + - {} + BlkioDeviceWriteBps: + - {} + BlkioDeviceReadIOps: + - {} + BlkioDeviceWriteIOps: + - {} + ContainerIDFile: "" + CpusetCpus: "" + CpusetMems: "" + CpuPercent: 80 + CpuShares: 0 + CpuPeriod: 100000 + CpuRealtimePeriod: 1000000 + CpuRealtimeRuntime: 10000 + Devices: [] + IpcMode: "" + Memory: 0 + MemorySwap: 0 + MemoryReservation: 0 + KernelMemory: 0 + OomKillDisable: false + OomScoreAdj: 500 + NetworkMode: "bridge" + PidMode: "" + PortBindings: {} + Privileged: false + ReadonlyRootfs: false + PublishAllPorts: false + RestartPolicy: + MaximumRetryCount: 2 + Name: "on-failure" + LogConfig: + Type: "json-file" + Sysctls: + net.ipv4.ip_forward: "1" + Ulimits: + - {} + VolumeDriver: "" + ShmSize: 67108864 + HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname" + HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts" + LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log" + Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39" + Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2" + MountLabel: "" + Name: "/boring_euclid" + NetworkSettings: + Bridge: "" + SandboxID: "" + HairpinMode: false + LinkLocalIPv6Address: "" + LinkLocalIPv6PrefixLen: 0 + SandboxKey: "" + SecondaryIPAddresses: null + SecondaryIPv6Addresses: null + EndpointID: "" + Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + IPAddress: "" + IPPrefixLen: 0 + IPv6Gateway: "" + MacAddress: "" + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.2" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:12:00:02" + Path: "/bin/sh" + ProcessLabel: "" + ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf" + RestartCount: 1 + State: + Error: "" + ExitCode: 9 + FinishedAt: "2015-01-06T15:47:32.080254511Z" + OOMKilled: false + Dead: false + Paused: false + Pid: 0 + Restarting: false + Running: true + StartedAt: "2015-01-06T15:47:32.072697474Z" + Status: "running" + Mounts: + - Name: "fac362...80535" + Source: "/data" + Destination: "/data" + Driver: "local" + Mode: "ro,Z" + RW: false + Propagation: "" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "size" + in: "query" + type: "boolean" + default: false + description: "Return the size of container as fields `SizeRw` and `SizeRootFs`" + tags: ["Container"] + /containers/{id}/top: + get: + summary: "List processes running inside a container" + description: "On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows." + operationId: "ContainerTop" + responses: + 200: + description: "no error" + schema: + type: "object" + properties: + Titles: + description: "The ps column titles" + type: "array" + items: + type: "string" + Processes: + description: "Each process running in the container, where each is process is an array of values corresponding to the titles" + type: "array" + items: + type: "array" + items: + type: "string" + examples: + application/json: + Titles: + - "UID" + - "PID" + - "PPID" + - "C" + - "STIME" + - "TTY" + - "TIME" + - "CMD" + Processes: + - + - "root" + - "13642" + - "882" + - "0" + - "17:03" + - "pts/0" + - "00:00:00" + - "/bin/bash" + - + - "root" + - "13735" + - "13642" + - "0" + - "17:06" + - "pts/0" + - "00:00:00" + - "sleep 10" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "ps_args" + in: "query" + description: "The arguments to pass to `ps`. For example, `aux`" + type: "string" + default: "-ef" + tags: ["Container"] + /containers/{id}/logs: + get: + summary: "Get container logs" + description: | + Get `stdout` and `stderr` logs from a container. + + Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. + operationId: "ContainerLogs" + responses: + 101: + description: "logs returned as a stream" + schema: + type: "string" + format: "binary" + 200: + description: "logs returned as a string in response body" + schema: + type: "string" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "follow" + in: "query" + description: | + Return the logs as a stream. + + This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Return logs from `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Return logs from `stderr`" + type: "boolean" + default: false + - name: "since" + in: "query" + description: "Only return logs since this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "timestamps" + in: "query" + description: "Add timestamps to every log line" + type: "boolean" + default: false + - name: "tail" + in: "query" + description: "Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines." + type: "string" + default: "all" + tags: ["Container"] + /containers/{id}/changes: + get: + summary: "Get changes on a container’s filesystem" + description: | + Returns which files in a container's filesystem have been added, deleted, or modified. The `Kind` of modification can be one of: + + - `0`: Modified + - `1`: Added + - `2`: Deleted + operationId: "ContainerChanges" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + type: "object" + properties: + Path: + description: "Path to file that has changed" + type: "string" + Kind: + description: "Kind of change" + type: "integer" + enum: + - 0 + - 1 + - 2 + examples: + application/json: + - Path: "/dev" + Kind: 0 + - Path: "/dev/kmsg" + Kind: 1 + - Path: "/test" + Kind: 1 + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/export: + get: + summary: "Export a container" + description: "Export the contents of a container as a tarball." + operationId: "ContainerExport" + produces: + - "application/octet-stream" + responses: + 200: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/stats: + get: + summary: "Get container stats based on resource usage" + description: | + This endpoint returns a live stream of a container’s resource usage statistics. + + The `precpu_stats` is the CPU statistic of last read, which is used for calculating the CPU usage percentage. It is not the same as the `cpu_stats` field. + operationId: "ContainerStats" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + examples: + application/json: + read: "2015-01-08T22:57:31.547920715Z" + pids_stats: + current: 3 + networks: + eth0: + rx_bytes: 5338 + rx_dropped: 0 + rx_errors: 0 + rx_packets: 36 + tx_bytes: 648 + tx_dropped: 0 + tx_errors: 0 + tx_packets: 8 + eth5: + rx_bytes: 4641 + rx_dropped: 0 + rx_errors: 0 + rx_packets: 26 + tx_bytes: 690 + tx_dropped: 0 + tx_errors: 0 + tx_packets: 9 + memory_stats: + stats: + total_pgmajfault: 0 + cache: 0 + mapped_file: 0 + total_inactive_file: 0 + pgpgout: 414 + rss: 6537216 + total_mapped_file: 0 + writeback: 0 + unevictable: 0 + pgpgin: 477 + total_unevictable: 0 + pgmajfault: 0 + total_rss: 6537216 + total_rss_huge: 6291456 + total_writeback: 0 + total_inactive_anon: 0 + rss_huge: 6291456 + hierarchical_memory_limit: 67108864 + total_pgfault: 964 + total_active_file: 0 + active_anon: 6537216 + total_active_anon: 6537216 + total_pgpgout: 414 + total_cache: 0 + inactive_anon: 0 + active_file: 0 + pgfault: 964 + inactive_file: 0 + total_pgpgin: 477 + max_usage: 6651904 + usage: 6537216 + failcnt: 0 + limit: 67108864 + blkio_stats: {} + cpu_stats: + cpu_usage: + percpu_usage: + - 8646879 + - 24472255 + - 36438778 + - 30657443 + usage_in_usermode: 50000000 + total_usage: 100215355 + usage_in_kernelmode: 30000000 + system_cpu_usage: 739306590000000 + throttling_data: + periods: 0 + throttled_periods: 0 + throttled_time: 0 + precpu_stats: + cpu_usage: + percpu_usage: + - 8646879 + - 24350896 + - 36438778 + - 30657443 + usage_in_usermode: 50000000 + total_usage: 100093996 + usage_in_kernelmode: 30000000 + system_cpu_usage: 9492140000000 + throttling_data: + periods: 0 + throttled_periods: 0 + throttled_time: 0 + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "stream" + in: "query" + description: "Stream the output. If false, the stats will be output once and then it will disconnect." + type: "boolean" + default: true + tags: ["Container"] + /containers/{id}/resize: + post: + summary: "Resize a container TTY" + description: "Resize the TTY for a container. You must restart the container for the resize to take effect." + operationId: "ContainerResize" + consumes: + - "application/octet-stream" + produces: + - "text/plain" + responses: + 200: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "cannot resize container" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "h" + in: "query" + required: true + description: "Height of the tty session in characters" + type: "integer" + - name: "w" + in: "query" + required: true + description: "Width of the tty session in characters" + type: "integer" + tags: ["Container"] + /containers/{id}/start: + post: + summary: "Start a container" + operationId: "ContainerStart" + responses: + 204: + description: "no error" + 304: + description: "container already started" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`." + type: "string" + tags: ["Container"] + /containers/{id}/stop: + post: + summary: "Stop a container" + operationId: "ContainerStop" + responses: + 204: + description: "no error" + 304: + description: "container already stopped" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "t" + in: "query" + description: "Number of seconds to wait before killing the container" + type: "integer" + tags: ["Container"] + /containers/{id}/restart: + post: + summary: "Restart a container" + operationId: "ContainerRestart" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "t" + in: "query" + description: "Number of seconds to wait before killing the container" + type: "integer" + tags: ["Container"] + /containers/{id}/kill: + post: + summary: "Kill a container" + description: "Send a POSIX signal to a container, defaulting to killing to the container." + operationId: "ContainerKill" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "signal" + in: "query" + description: "Signal to send to the container as an integer or string (e.g. `SIGINT`)" + type: "string" + default: "SIGKILL" + tags: ["Container"] + /containers/{id}/update: + post: + summary: "Update a container" + description: "Change various configuration options of a container without having to recreate it." + operationId: "ContainerUpdate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "The container has been updated." + schema: + type: "object" + properties: + Warnings: + type: "array" + items: + type: "string" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "update" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/Resources" + - type: "object" + properties: + RestartPolicy: + $ref: "#/definitions/RestartPolicy" + example: + BlkioWeight: 300 + CpuShares: 512 + CpuPeriod: 100000 + CpuQuota: 50000 + CpuRealtimePeriod: 1000000 + CpuRealtimeRuntime: 10000 + CpusetCpus: "0,1" + CpusetMems: "0" + Memory: 314572800 + MemorySwap: 514288000 + MemoryReservation: 209715200 + KernelMemory: 52428800 + RestartPolicy: + MaximumRetryCount: 4 + Name: "on-failure" + tags: ["Container"] + /containers/{id}/rename: + post: + summary: "Rename a container" + operationId: "ContainerRename" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "name already in use" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "name" + in: "query" + required: true + description: "New name for the container" + type: "string" + tags: ["Container"] + /containers/{id}/pause: + post: + summary: "Pause a container" + description: | + Use the cgroups freezer to suspend all processes in a container. + + Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. + operationId: "ContainerPause" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/unpause: + post: + summary: "Unpause a container" + description: "Resume a container which has been paused." + operationId: "ContainerUnpause" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/attach: + post: + summary: "Attach to a container" + description: | + Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached. + + Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything. + + See [the documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details. + + ### Hijacking + + This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket. + + This is the response from the daemon for an attach request: + + ``` + HTTP/1.1 200 OK + Content-Type: application/vnd.docker.raw-stream + + [STREAM] + ``` + + After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server. + + To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers. + + For example, the client sends this request to upgrade the connection: + + ``` + POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 + Upgrade: tcp + Connection: Upgrade + ``` + + The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream: + + ``` + HTTP/1.1 101 UPGRADED + Content-Type: application/vnd.docker.raw-stream + Connection: Upgrade + Upgrade: tcp + + [STREAM] + ``` + + ### Stream format + + When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload. + + The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`). + + It is encoded on the first eight bytes like this: + + ```go + header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} + ``` + + `STREAM_TYPE` can be: + + - 0: `stdin` (is written on `stdout`) + - 1: `stdout` + - 2: `stderr` + + `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian. + + Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`. + + The simplest way to implement this protocol is the following: + + 1. Read 8 bytes. + 2. Choose `stdout` or `stderr` depending on the first byte. + 3. Extract the frame size from the last four bytes. + 4. Read the extracted size and output it on the correct output. + 5. Goto 1. + + ### Stream format when using a TTY + + When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`. + + operationId: "ContainerAttach" + produces: + - "application/vnd.docker.raw-stream" + responses: + 101: + description: "no error, hints proxy about hijacking" + 200: + description: "no error, no upgrade header found" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: "Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`." + type: "string" + - name: "logs" + in: "query" + description: | + Replay previous logs from the container. + + This is useful for attaching to a container that has started and you want to output everything since the container started. + + If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output. + type: "boolean" + default: false + - name: "stream" + in: "query" + description: "Stream attached streams from the time the request was made onwards" + type: "boolean" + default: false + - name: "stdin" + in: "query" + description: "Attach to `stdin`" + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Attach to `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Attach to `stderr`" + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/attach/ws: + get: + summary: "Attach to a container via a websocket" + operationId: "ContainerAttachWebsocket" + responses: + 101: + description: "no error, hints proxy about hijacking" + 200: + description: "no error, no upgrade header found" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: "Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`." + type: "string" + - name: "logs" + in: "query" + description: "Return logs" + type: "boolean" + default: false + - name: "stream" + in: "query" + description: "Return stream" + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/wait: + post: + summary: "Wait for a container" + description: "Block until a container stops, then returns the exit code." + operationId: "ContainerWait" + produces: ["application/json"] + responses: + 200: + description: "The container has exit." + schema: + type: "object" + required: [StatusCode] + properties: + StatusCode: + description: "Exit code of the container" + type: "integer" + x-nullable: false + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}: + delete: + summary: "Remove a container" + operationId: "ContainerDelete" + responses: + 204: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "v" + in: "query" + description: "Remove anonymous volumes associated with the container." + type: "boolean" + default: false + - name: "force" + in: "query" + description: "If the container is running, kill it before removing it." + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/archive: + head: + summary: "Get information about files in a container" + description: "A response header `X-Docker-Container-Path-Stat` is return containing a base64 - encoded JSON object with some filesystem header information about the path." + operationId: "ContainerArchiveHead" + responses: + 200: + description: "no error" + headers: + X-Docker-Container-Path-Stat: + type: "string" + description: "TODO" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Container or path does not exist" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Resource in the container’s filesystem to archive." + type: "string" + tags: ["Container"] + get: + summary: "Get an archive of a filesystem resource in a container" + description: "Get an tar archive of a resource in the filesystem of container id." + operationId: "ContainerGetArchive" + produces: + - "application/x-tar" + responses: + 200: + description: "no error" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Container or path does not exist" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Resource in the container’s filesystem to archive." + type: "string" + tags: ["Container"] + put: + summary: "Extract an archive of files or folders to a directory in a container" + description: | + Upload a tar archive to be extracted to a path in the filesystem of container id. + `path` parameter is asserted to be a directory. If it exists as a file, 400 error + will be returned with message "not a directory". + operationId: "ContainerPutArchive" + consumes: + - "application/x-tar" + - "application/octet-stream" + responses: + 200: + description: "The content was extracted successfully" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "not a directory" + 403: + description: "Permission denied, the volume or container rootfs is marked as read-only." + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "No such container or path does not exist inside the container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Path to a directory in the container to extract the archive’s contents into. " + type: "string" + - name: "noOverwriteDirNonDir" + in: "query" + description: "If “1”, “true”, or “True” then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa." + type: "string" + - name: "inputStream" + in: "body" + required: true + description: "The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." + schema: + type: "string" + tags: ["Container"] + /containers/prune: + post: + summary: "Delete stopped containers" + produces: + - "application/json" + operationId: "ContainerPrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + properties: + ContainersDeleted: + description: "Container IDs that were deleted" + type: "array" + items: + type: "string" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Container"] + /images/json: + get: + summary: "List Images" + description: "Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image." + operationId: "ImageList" + produces: + - "application/json" + responses: + 200: + description: "Summary image data for the images matching the query" + schema: + type: "array" + items: + $ref: "#/definitions/ImageSummary" + examples: + application/json: + - Id: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8" + ParentId: "" + RepoTags: + - "ubuntu:12.04" + - "ubuntu:precise" + RepoDigests: + - "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787" + Created: 1474925151 + Size: 103579269 + VirtualSize: 103579269 + SharedSize: 0 + Labels: {} + Containers: 2 + - Id: "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175" + ParentId: "" + RepoTags: + - "ubuntu:12.10" + - "ubuntu:quantal" + RepoDigests: + - "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7" + - "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3" + Created: 1403128455 + Size: 172064416 + VirtualSize: 172064416 + SharedSize: 0 + Labels: {} + Containers: 5 + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "all" + in: "query" + description: "Show all images. Only images from a final layer (no children) are shown by default." + type: "boolean" + default: false + - name: "filters" + in: "query" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. + + Available filters: + - `dangling=true` + - `label=key` or `label="key=value"` of an image label + - `before`=(`[:]`, `` or ``) + - `since`=(`[:]`, `` or ``) + - `reference`=(`[:]`) + type: "string" + - name: "digests" + in: "query" + description: "Show digest information as a `RepoDigests` field on each image." + type: "boolean" + default: false + tags: ["Image"] + /build: + post: + summary: "Build an image" + description: | + Build an image from a tar archive with a `Dockerfile` in it. + + The `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/). + + The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output. + + The build is canceled if the client drops the connection by quitting or being killed. + operationId: "ImageBuild" + consumes: + - "application/octet-stream" + produces: + - "application/json" + parameters: + - name: "inputStream" + in: "body" + description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." + schema: + type: "string" + format: "binary" + - name: "dockerfile" + in: "query" + description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`." + type: "string" + default: "Dockerfile" + - name: "t" + in: "query" + description: "A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters." + type: "string" + - name: "remote" + in: "query" + description: "A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball." + type: "string" + - name: "q" + in: "query" + description: "Suppress verbose build output." + type: "boolean" + default: false + - name: "nocache" + in: "query" + description: "Do not use the cache when building the image." + type: "boolean" + default: false + - name: "cachefrom" + in: "query" + description: "JSON array of images used for build cache resolution." + type: "string" + - name: "pull" + in: "query" + description: "Attempt to pull the image even if an older image exists locally." + type: "string" + - name: "rm" + in: "query" + description: "Remove intermediate containers after a successful build." + type: "boolean" + default: true + - name: "forcerm" + in: "query" + description: "Always remove intermediate containers, even upon failure." + type: "boolean" + default: false + - name: "memory" + in: "query" + description: "Set memory limit for build." + type: "integer" + - name: "memswap" + in: "query" + description: "Total memory (memory + swap). Set as `-1` to disable swap." + type: "integer" + - name: "cpushares" + in: "query" + description: "CPU shares (relative weight)." + type: "integer" + - name: "cpusetcpus" + in: "query" + description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)." + type: "string" + - name: "cpuperiod" + in: "query" + description: "The length of a CPU period in microseconds." + type: "integer" + - name: "cpuquota" + in: "query" + description: "Microseconds of CPU time that the container can get in a CPU period." + type: "integer" + - name: "buildargs" + in: "query" + description: "JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)" + type: "integer" + - name: "shmsize" + in: "query" + description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." + type: "integer" + - name: "squash" + in: "query" + description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*" + type: "boolean" + - name: "labels" + in: "query" + description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs." + type: "string" + - name: "networkmode" + in: "query" + description: "Sets the networking mode for the run commands during build. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name to which this container should connect to." + type: "string" + - name: "Content-type" + in: "header" + type: "string" + enum: + - "application/tar" + default: "application/tar" + - name: "X-Registry-Config" + in: "header" + description: | + This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. + + The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: + + ``` + { + "docker.example.com": { + "username": "janedoe", + "password": "hunter2" + }, + "https://index.docker.io/v1/": { + "username": "mobydock", + "password": "conta1n3rize14" + } + } + ``` + + Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API. + type: "string" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Image"] + /images/create: + post: + summary: "Create an image" + description: "Create an image by either pulling it from a registry or importing it." + operationId: "ImageCreate" + consumes: + - "text/plain" + - "application/octet-stream" + produces: + - "application/json" + responses: + 200: + description: "no error" + 404: + description: "repository does not exist or no read access" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "fromImage" + in: "query" + description: "Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed." + type: "string" + - name: "fromSrc" + in: "query" + description: "Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image." + type: "string" + - name: "repo" + in: "query" + description: "Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image." + type: "string" + - name: "tag" + in: "query" + description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled." + type: "string" + - name: "inputImage" + in: "body" + description: "Image content if the value `-` has been specified in fromSrc query parameter" + schema: + type: "string" + required: false + - name: "X-Registry-Auth" + in: "header" + description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)" + type: "string" + tags: ["Image"] + /images/{name}/json: + get: + summary: "Inspect an image" + description: "Return low-level information about an image." + operationId: "ImageInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/Image" + examples: + application/json: + Id: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" + Container: "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a" + Comment: "" + Os: "linux" + Architecture: "amd64" + Parent: "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" + ContainerConfig: + Tty: false + Hostname: "e611e15f9c9d" + Domainname: "" + AttachStdout: false + PublishService: "" + AttachStdin: false + OpenStdin: false + StdinOnce: false + NetworkDisabled: false + OnBuild: [] + Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" + User: "" + WorkingDir: "" + MacAddress: "" + AttachStderr: false + Labels: + com.example.license: "GPL" + com.example.version: "1.0" + com.example.vendor: "Acme" + Env: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + Cmd: + - "/bin/sh" + - "-c" + - "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0" + DockerVersion: "1.9.0-dev" + VirtualSize: 188359297 + Size: 0 + Author: "" + Created: "2015-09-10T08:30:53.26995814Z" + GraphDriver: + Name: "aufs" + RepoDigests: + - "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf" + RepoTags: + - "example:1.0" + - "example:latest" + - "example:stable" + Config: + Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" + NetworkDisabled: false + OnBuild: [] + StdinOnce: false + PublishService: "" + AttachStdin: false + OpenStdin: false + Domainname: "" + AttachStdout: false + Tty: false + Hostname: "e611e15f9c9d" + Cmd: + - "/bin/bash" + Env: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + Labels: + com.example.vendor: "Acme" + com.example.version: "1.0" + com.example.license: "GPL" + MacAddress: "" + AttachStderr: false + WorkingDir: "" + User: "" + RootFS: + Type: "layers" + Layers: + - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6" + - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such image: someimage (tag: latest)" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or id" + type: "string" + required: true + tags: ["Image"] + /images/{name}/history: + get: + summary: "Get the history of an image" + description: "Return parent layers of an image." + operationId: "ImageHistory" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "array" + items: + type: "object" + properties: + Id: + type: "string" + Created: + type: "integer" + format: "int64" + CreatedBy: + type: "string" + Tags: + type: "array" + items: + type: "string" + Size: + type: "integer" + format: "int64" + Comment: + type: "string" + examples: + application/json: + - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710" + Created: 1398108230 + CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /" + Tags: + - "ubuntu:lucid" + - "ubuntu:10.04" + Size: 182964289 + Comment: "" + - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8" + Created: 1398108222 + CreatedBy: "/bin/sh -c #(nop) MAINTAINER Tianon Gravi - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http://archive.ubuntu.com/ubuntu/" + Tags: [] + Size: 0 + Comment: "" + - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" + Created: 1371157430 + CreatedBy: "" + Tags: + - "scratch12:latest" + - "scratch:latest" + Size: 0 + Comment: "Imported from -" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + tags: ["Image"] + /images/{name}/push: + post: + summary: "Push an image" + description: | + Push an image to a registry. + + If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, `registry.example.com/myimage:latest`. + + The push is cancelled if the HTTP connection is closed. + operationId: "ImagePush" + consumes: + - "application/octet-stream" + responses: + 200: + description: "No error" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + Name of the image to push. For example, `registry.example.com/myimage`. + The image must be present in the local image store with the same name. + + The name should be provided without tag; if a tag is provided, it + is ignored. For example, `registry.example.com/myimage:latest` is + considered equivalent to `registry.example.com/myimage`. + + Use the `tag` parameter to specify the tag to push. + type: "string" + required: true + - name: "tag" + in: "query" + description: | + Tag of the image to push. For example, `latest`. If no tag is provided, + all tags of the given image that are present in the local image store + are pushed. + type: "string" + - name: "X-Registry-Auth" + in: "header" + description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)" + type: "string" + required: true + tags: ["Image"] + /images/{name}/tag: + post: + summary: "Tag an image" + description: "Tag an image so that it becomes part of a repository." + operationId: "ImageTag" + responses: + 201: + description: "No error" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID to tag." + type: "string" + required: true + - name: "repo" + in: "query" + description: "The repository to tag in. For example, `someuser/someimage`." + type: "string" + - name: "tag" + in: "query" + description: "The name of the new tag." + type: "string" + tags: ["Image"] + /images/{name}: + delete: + summary: "Remove an image" + description: | + Remove an image, along with any untagged parent images that were referenced by that image. + + Images can't be removed if they have descendant images, are being used by a running container or are being used by a build. + operationId: "ImageDelete" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "array" + items: + $ref: "#/definitions/ImageDeleteResponse" + examples: + application/json: + - Untagged: "3e2f21a89f" + - Deleted: "3e2f21a89f" + - Deleted: "53b4f83ac9" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + - name: "force" + in: "query" + description: "Remove the image even if it is being used by stopped containers or has other tags" + type: "boolean" + default: false + - name: "noprune" + in: "query" + description: "Do not delete untagged parent images" + type: "boolean" + default: false + tags: ["Image"] + /images/search: + get: + summary: "Search images" + description: "Search for an image on Docker Hub." + operationId: "ImageSearch" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "array" + items: + type: "object" + properties: + description: + type: "string" + is_official: + type: "boolean" + is_automated: + type: "boolean" + name: + type: "string" + star_count: + type: "integer" + examples: + application/json: + - description: "" + is_official: false + is_automated: false + name: "wma55/u1210sshd" + star_count: 0 + - description: "" + is_official: false + is_automated: false + name: "jdswinbank/sshd" + star_count: 0 + - description: "" + is_official: false + is_automated: false + name: "vgauthier/sshd" + star_count: 0 + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "term" + in: "query" + description: "Term to search" + type: "string" + required: true + - name: "limit" + in: "query" + description: "Maximum number of results to return" + type: "integer" + - name: "filters" + in: "query" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: + + - `stars=` + - `is-automated=(true|false)` + - `is-official=(true|false)` + type: "string" + tags: ["Image"] + /images/prune: + post: + summary: "Delete unused images" + produces: + - "application/json" + operationId: "ImagePrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `dangling=` When set to `true` (or `1`), prune only + unused *and* untagged images. When set to `false` + (or `0`), all unused images are pruned. + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + properties: + ImagesDeleted: + description: "Images that were deleted" + type: "array" + items: + $ref: "#/definitions/ImageDeleteResponse" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Image"] + /auth: + post: + summary: "Check auth configuration" + description: "Validate credentials for a registry and, if available, get an identity token for accessing the registry without password." + operationId: "SystemAuth" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "An identity token was generated successfully." + schema: + type: "object" + required: [Status] + properties: + Status: + description: "The status of the authentication" + type: "string" + x-nullable: false + IdentityToken: + description: "An opaque token used to authenticate a user after a successful login" + type: "string" + x-nullable: false + examples: + application/json: + Status: "Login Succeeded" + IdentityToken: "9cbaf023786cd7..." + 204: + description: "No error" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "authConfig" + in: "body" + description: "Authentication to check" + schema: + $ref: "#/definitions/AuthConfig" + tags: ["System"] + /info: + get: + summary: "Get system information" + operationId: "SystemInfo" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "object" + properties: + Architecture: + type: "string" + Containers: + type: "integer" + ContainersRunning: + type: "integer" + ContainersStopped: + type: "integer" + ContainersPaused: + type: "integer" + CpuCfsPeriod: + type: "boolean" + CpuCfsQuota: + type: "boolean" + Debug: + type: "boolean" + DiscoveryBackend: + type: "string" + DockerRootDir: + type: "string" + Driver: + type: "string" + DriverStatus: + type: "array" + items: + type: "array" + items: + type: "string" + SystemStatus: + type: "array" + items: + type: "array" + items: + type: "string" + Plugins: + type: "object" + properties: + Volume: + type: "array" + items: + type: "string" + Network: + type: "array" + items: + type: "string" + ExperimentalBuild: + type: "boolean" + HttpProxy: + type: "string" + HttpsProxy: + type: "string" + ID: + type: "string" + IPv4Forwarding: + type: "boolean" + Images: + type: "integer" + IndexServerAddress: + type: "string" + InitPath: + type: "string" + InitSha1: + type: "string" + KernelVersion: + type: "string" + Labels: + type: "array" + items: + type: "string" + MemTotal: + type: "integer" + MemoryLimit: + type: "boolean" + NCPU: + type: "integer" + NEventsListener: + type: "integer" + NFd: + type: "integer" + NGoroutines: + type: "integer" + Name: + type: "string" + NoProxy: + type: "string" + OomKillDisable: + type: "boolean" + OSType: + type: "string" + OomScoreAdj: + type: "integer" + OperatingSystem: + type: "string" + RegistryConfig: + type: "object" + properties: + IndexConfigs: + type: "object" + additionalProperties: + type: "object" + properties: + Mirrors: + type: "array" + items: + type: "string" + Name: + type: "string" + Official: + type: "boolean" + Secure: + type: "boolean" + InsecureRegistryCIDRs: + type: "array" + items: + type: "string" + SwapLimit: + type: "boolean" + SystemTime: + type: "string" + ServerVersion: + type: "string" + examples: + application/json: + Architecture: "x86_64" + ClusterStore: "etcd://localhost:2379" + CgroupDriver: "cgroupfs" + Containers: 11 + ContainersRunning: 7 + ContainersStopped: 3 + ContainersPaused: 1 + CpuCfsPeriod: true + CpuCfsQuota: true + Debug: false + DockerRootDir: "/var/lib/docker" + Driver: "btrfs" + DriverStatus: + - + - "" + ExperimentalBuild: false + HttpProxy: "http://test:test@localhost:8080" + HttpsProxy: "https://test:test@localhost:8080" + ID: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS" + IPv4Forwarding: true + Images: 16 + IndexServerAddress: "https://index.docker.io/v1/" + InitPath: "/usr/bin/docker" + InitSha1: "" + KernelMemory: true + KernelVersion: "3.12.0-1-amd64" + Labels: + - "storage=ssd" + MemTotal: 2099236864 + MemoryLimit: true + NCPU: 1 + NEventsListener: 0 + NFd: 11 + NGoroutines: 21 + Name: "prod-server-42" + NoProxy: "9.81.1.160" + OomKillDisable: true + OSType: "linux" + OperatingSystem: "Boot2Docker" + Plugins: + Volume: + - "local" + Network: + - "null" + - "host" + - "bridge" + RegistryConfig: + IndexConfigs: + docker.io: + Name: "docker.io" + Official: true + Secure: true + InsecureRegistryCIDRs: + - "127.0.0.0/8" + SecurityOptions: + - Key: "Name" + Value: "seccomp" + - Key: "Profile" + Value: "default" + - Key: "Name" + Value: "apparmor" + - Key: "Name" + Value: "selinux" + - Key: "Name" + Value: "userns" + ServerVersion: "1.9.0" + SwapLimit: false + SystemStatus: + - + - "State" + - "Healthy" + SystemTime: "2015-03-10T11:11:23.730591467-07:00" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["System"] + /version: + get: + summary: "Get version" + description: "Returns the version of Docker that is running and various information about the system that Docker is running on." + operationId: "SystemVersion" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + properties: + Version: + type: "string" + ApiVersion: + type: "string" + MinAPIVersion: + type: "string" + GitCommit: + type: "string" + GoVersion: + type: "string" + Os: + type: "string" + Arch: + type: "string" + KernelVersion: + type: "string" + Experimental: + type: "boolean" + BuildTime: + type: "string" + examples: + application/json: + Version: "1.13.0" + Os: "linux" + KernelVersion: "3.19.0-23-generic" + GoVersion: "go1.6.3" + GitCommit: "deadbee" + Arch: "amd64" + ApiVersion: "1.25" + MinAPIVersion: "1.12" + BuildTime: "2016-06-14T07:09:13.444803460+00:00" + Experimental: true + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["System"] + /_ping: + get: + summary: "Ping" + description: "This is a dummy endpoint you can use to test if the server is accessible." + operationId: "SystemPing" + produces: + - "text/plain" + responses: + 200: + description: "no error" + schema: + type: "string" + example: "OK" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["System"] + /commit: + post: + summary: "Create a new image from a container" + operationId: "ImageCommit" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IdResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "containerConfig" + in: "body" + description: "The container configuration" + schema: + $ref: "#/definitions/Config" + - name: "container" + in: "query" + description: "The ID or name of the container to commit" + type: "string" + - name: "repo" + in: "query" + description: "Repository name for the created image" + type: "string" + - name: "tag" + in: "query" + description: "Tag name for the create image" + type: "string" + - name: "comment" + in: "query" + description: "Commit message" + type: "string" + - name: "author" + in: "query" + description: "Author of the image (e.g., `John Hannibal Smith `)" + type: "string" + - name: "pause" + in: "query" + description: "Whether to pause the container before committing" + type: "boolean" + default: true + - name: "changes" + in: "query" + description: "`Dockerfile` instructions to apply while committing" + type: "string" + tags: ["Image"] + /events: + get: + summary: "Monitor events" + description: | + Stream real-time events from the server. + + Various objects within Docker report events when something happens to them. + + Containers report these events: `attach, commit, copy, create, destroy, detach, die, exec_create, exec_detach, exec_start, export, kill, oom, pause, rename, resize, restart, start, stop, top, unpause, update` + + Images report these events: `delete, import, load, pull, push, save, tag, untag` + + Volumes report these events: `create, mount, unmount, destroy` + + Networks report these events: `create, connect, disconnect, destroy` + + The Docker daemon reports these events: `reload` + + operationId: "SystemEvents" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + properties: + Type: + description: "The type of object emitting the event" + type: "string" + Action: + description: "The type of event" + type: "string" + Actor: + type: "object" + properties: + ID: + description: "The ID of the object emitting the event" + type: "string" + Attributes: + description: "Various key/value attributes of the object, depending on its type" + type: "object" + additionalProperties: + type: "string" + time: + description: "Timestamp of event" + type: "integer" + timeNano: + description: "Timestamp of event, with nanosecond accuracy" + type: "integer" + format: "int64" + examples: + application/json: + Type: "container" + Action: "create" + Actor: + ID: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" + Attributes: + com.example.some-label: "some-label-value" + image: "alpine" + name: "my-container" + time: 1461943101 + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "since" + in: "query" + description: "Show events created since this timestamp then stream new events." + type: "string" + - name: "until" + in: "query" + description: "Show events created until this timestamp then stop streaming." + type: "string" + - name: "filters" + in: "query" + description: | + A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: + + - `container=` container name or ID + - `event=` event type + - `image=` image name or ID + - `label=` image or container label + - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, or `daemon` + - `volume=` volume name or ID + - `network=` network name or ID + - `daemon=` daemon name or ID + type: "string" + tags: ["System"] + /system/df: + get: + summary: "Get data usage information" + operationId: "SystemDataUsage" + responses: + 200: + description: "no error" + schema: + type: "object" + properties: + LayersSize: + type: "integer" + format: "int64" + Images: + type: "array" + items: + $ref: "#/definitions/ImageSummary" + Containers: + type: "array" + items: + $ref: "#/definitions/ContainerSummary" + Volumes: + type: "array" + items: + $ref: "#/definitions/Volume" + example: + LayersSize: 1092588 + Images: + - + Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" + ParentId: "" + RepoTags: + - "busybox:latest" + RepoDigests: + - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6" + Created: 1466724217 + Size: 1092588 + SharedSize: 0 + VirtualSize: 1092588 + Labels: {} + Containers: 1 + Containers: + - + Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148" + Names: + - "/top" + Image: "busybox" + ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" + Command: "top" + Created: 1472592424 + Ports: [] + SizeRootFs: 1092588 + Labels: {} + State: "exited" + Status: "Exited (0) 56 minutes ago" + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + IPAMConfig: null + Links: null + Aliases: null + NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92" + EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a" + Gateway: "172.18.0.1" + IPAddress: "172.18.0.2" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:12:00:02" + Mounts: [] + Volumes: + - + Name: "my-volume" + Driver: "local" + Mountpoint: "" + Labels: null + Scope: "" + Options: null + UsageData: + Size: 0 + RefCount: 0 + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["System"] + /images/{name}/get: + get: + summary: "Export an image" + description: | + Get a tarball containing all images and metadata for a repository. + + If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced. + + ### Image tarball format + + An image tarball contains one directory per image layer (named using its long ID), each containing these files: + + - `VERSION`: currently `1.0` - the file format version + - `json`: detailed layer information, similar to `docker inspect layer_id` + - `layer.tar`: A tarfile containing the filesystem changes in this layer + + The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. + + If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs. + + ```json + { + "hello-world": { + "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" + } + } + ``` + operationId: "ImageGet" + produces: + - "application/x-tar" + responses: + 200: + description: "no error" + schema: + type: "string" + format: "binary" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + tags: ["Image"] + /images/get: + get: + summary: "Export several images" + description: | + Get a tarball containing all images and metadata for several image repositories. + + For each value of the `names` parameter: if it is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID. + + For details on the format, see [the export image endpoint](#operation/ImageGet). + operationId: "ImageGetAll" + produces: + - "application/x-tar" + responses: + 200: + description: "no error" + schema: + type: "string" + format: "binary" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "names" + in: "query" + description: "Image names to filter by" + type: "array" + items: + type: "string" + tags: ["Image"] + /images/load: + post: + summary: "Import images" + description: | + Load a set of images and tags into a repository. + + For details on the format, see [the export image endpoint](#operation/ImageGet). + operationId: "ImageLoad" + consumes: + - "application/x-tar" + produces: + - "application/json" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "imagesTarball" + in: "body" + description: "Tar archive containing images" + schema: + type: "string" + format: "binary" + - name: "quiet" + in: "query" + description: "Suppress progress details during load." + type: "boolean" + default: false + tags: ["Image"] + /containers/{id}/exec: + post: + summary: "Create an exec instance" + description: "Run a command inside a running container." + operationId: "ContainerExec" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IdResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "container is paused" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "execConfig" + in: "body" + description: "Exec configuration" + schema: + type: "object" + properties: + AttachStdin: + type: "boolean" + description: "Attach to `stdin` of the exec command." + AttachStdout: + type: "boolean" + description: "Attach to `stdout` of the exec command." + AttachStderr: + type: "boolean" + description: "Attach to `stderr` of the exec command." + DetachKeys: + type: "string" + description: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`." + Tty: + type: "boolean" + description: "Allocate a pseudo-TTY." + Env: + description: "A list of environment variables in the form `[\"VAR=value\", ...]`." + type: "array" + items: + type: "string" + Cmd: + type: "array" + description: "Command to run, as a string or array of strings." + items: + type: "string" + Privileged: + type: "boolean" + description: "Runs the exec process with extended privileges." + default: false + User: + type: "string" + description: "The user, and optionally, group to run the exec process inside the container. Format is one of: `user`, `user:group`, `uid`, or `uid:gid`." + example: + AttachStdin: false + AttachStdout: true + AttachStderr: true + DetachKeys: "ctrl-p,ctrl-q" + Tty: false + Cmd: + - "date" + Env: + - "FOO=bar" + - "BAZ=quux" + required: true + - name: "id" + in: "path" + description: "ID or name of container" + type: "string" + required: true + tags: ["Exec"] + /exec/{id}/start: + post: + summary: "Start an exec instance" + description: "Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command." + operationId: "ExecStart" + consumes: + - "application/json" + produces: + - "application/vnd.docker.raw-stream" + responses: + 200: + description: "No error" + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Container is stopped or paused" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "execStartConfig" + in: "body" + schema: + type: "object" + properties: + Detach: + type: "boolean" + description: "Detach from the command." + Tty: + type: "boolean" + description: "Allocate a pseudo-TTY." + example: + Detach: false + Tty: false + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + tags: ["Exec"] + /exec/{id}/resize: + post: + summary: "Resize an exec instance" + description: "Resize the TTY session used by an exec instance. This endpoint only works if `tty` was specified as part of creating and starting the exec instance." + operationId: "ExecResize" + responses: + 200: + description: "No error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + - name: "h" + in: "query" + required: true + description: "Height of the TTY session in characters" + type: "integer" + - name: "w" + in: "query" + required: true + description: "Width of the TTY session in characters" + type: "integer" + tags: ["Exec"] + /exec/{id}/json: + get: + summary: "Inspect an exec instance" + description: "Return low-level information about an exec instance." + operationId: "ExecInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "object" + properties: + ID: + type: "string" + Running: + type: "boolean" + ExitCode: + type: "integer" + ProcessConfig: + $ref: "#/definitions/ProcessConfig" + OpenStdin: + type: "boolean" + OpenStderr: + type: "boolean" + OpenStdout: + type: "boolean" + ContainerID: + type: "string" + Pid: + type: "integer" + description: "The system process ID for the exec process." + examples: + application/json: + CanRemove: false + ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126" + DetachKeys: "" + ExitCode: 2 + ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b" + OpenStderr: true + OpenStdin: true + OpenStdout: true + ProcessConfig: + arguments: + - "-c" + - "exit 2" + entrypoint: "sh" + privileged: false + tty: true + user: "1000" + Running: false + Pid: 42000 + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + tags: ["Exec"] + + /volumes: + get: + summary: "List volumes" + operationId: "VolumeList" + produces: ["application/json"] + responses: + 200: + description: "Summary volume data that matches the query" + schema: + type: "object" + required: [Volumes, Warnings] + properties: + Volumes: + type: "array" + x-nullable: false + description: "List of volumes" + items: + $ref: "#/definitions/Volume" + Warnings: + type: "array" + x-nullable: false + description: "Warnings that occurred when fetching the list of volumes" + items: + type: "string" + + examples: + application/json: + Volumes: + - Name: "tardis" + Driver: "local" + Mountpoint: "/var/lib/docker/volumes/tardis" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Scope: "local" + Options: + device: "tmpfs" + o: "size=100m,uid=1000" + type: "tmpfs" + Warnings: [] + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + JSON encoded value of the filters (a `map[string][]string`) to + process on the volumes list. Available filters: + + - `name=` Matches all or part of a volume name. + - `dangling=` When set to `true` (or `1`), returns all + volumes that are not in use by a container. When set to `false` + (or `0`), only volumes that are in use by one or more + containers are returned. + - `driver=` Matches all or part of a volume + driver name. + type: "string" + format: "json" + tags: ["Volume"] + + /volumes/create: + post: + summary: "Create a volume" + operationId: "VolumeCreate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 201: + description: "The volume was created successfully" + schema: + $ref: "#/definitions/Volume" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "volumeConfig" + in: "body" + required: true + description: "Volume configuration" + schema: + type: "object" + properties: + Name: + description: "The new volume's name. If not specified, Docker generates a name." + type: "string" + x-nullable: false + Driver: + description: "Name of the volume driver to use." + type: "string" + default: "local" + x-nullable: false + DriverOpts: + description: "A mapping of driver options and values. These options are passed directly to the driver and are driver specific." + type: "object" + additionalProperties: + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + Name: "tardis" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Driver: "custom" + tags: ["Volume"] + + /volumes/{name}: + get: + summary: "Inspect a volume" + operationId: "VolumeInspect" + produces: ["application/json"] + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/Volume" + 404: + description: "No such volume" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + required: true + description: "Volume name or ID" + type: "string" + tags: ["Volume"] + + delete: + summary: "Remove a volume" + description: "Instruct the driver to remove the volume." + operationId: "VolumeDelete" + responses: + 204: + description: "The volume was removed" + 404: + description: "No such volume or volume driver" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Volume is in use and cannot be removed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + required: true + description: "Volume name or ID" + type: "string" + - name: "force" + in: "query" + description: "Force the removal of the volume" + type: "boolean" + default: false + tags: ["Volume"] + /volumes/prune: + post: + summary: "Delete unused volumes" + produces: + - "application/json" + operationId: "VolumePrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + properties: + VolumesDeleted: + description: "Volumes that were deleted" + type: "array" + items: + type: "string" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Volume"] + /networks: + get: + summary: "List networks" + operationId: "NetworkList" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "array" + items: + $ref: "#/definitions/Network" + examples: + application/json: + - Name: "bridge" + Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566" + Created: "2016-10-19T06:21:00.416543526Z" + Scope: "local" + Driver: "bridge" + EnableIPv6: false + Internal: false + IPAM: + Driver: "default" + Config: + - + Subnet: "172.17.0.0/16" + Containers: + 39b69226f9d79f5634485fb236a23b2fe4e96a0a94128390a7fbbcc167065867: + EndpointID: "ed2419a97c1d9954d05b46e462e7002ea552f216e9b136b80a7db8d98b442eda" + MacAddress: "02:42:ac:11:00:02" + IPv4Address: "172.17.0.2/16" + IPv6Address: "" + Options: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + - Name: "none" + Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794" + Created: "0001-01-01T00:00:00Z" + Scope: "local" + Driver: "null" + EnableIPv6: false + Internal: false + IPAM: + Driver: "default" + Config: [] + Containers: {} + Options: {} + - Name: "host" + Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e" + Created: "0001-01-01T00:00:00Z" + Scope: "local" + Driver: "host" + EnableIPv6: false + Internal: false + IPAM: + Driver: "default" + Config: [] + Containers: {} + Options: {} + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters: + + - `driver=` Matches a network's driver. + - `id=` Matches all or part of a network ID. + - `label=` or `label==` of a network label. + - `name=` Matches all or part of a network name. + - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. + type: "string" + tags: ["Network"] + + /networks/{id}: + get: + summary: "Inspect a network" + operationId: "NetworkInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/Network" + 404: + description: "Network not found" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + tags: ["Network"] + + delete: + summary: "Remove a network" + operationId: "NetworkDelete" + responses: + 204: + description: "No error" + 404: + description: "no such network" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + tags: ["Network"] + + /networks/create: + post: + summary: "Create a network" + operationId: "NetworkCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "No error" + schema: + type: "object" + properties: + Id: + description: "The ID of the created network." + type: "string" + Warning: + type: "string" + example: + Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30" + Warning: "" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 403: + description: "operation not supported for pre-defined networks" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "plugin not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "networkConfig" + in: "body" + description: "Network configuration" + required: true + schema: + type: "object" + required: ["Name"] + properties: + Name: + description: "The network's name." + type: "string" + CheckDuplicate: + description: "Check for networks with duplicate names." + type: "boolean" + Driver: + description: "Name of the network driver plugin to use." + type: "string" + default: "bridge" + Internal: + description: "Restrict external access to the network." + type: "boolean" + IPAM: + description: "Optional custom IP scheme for the network." + $ref: "#/definitions/IPAM" + EnableIPv6: + description: "Enable IPv6 on the network." + type: "boolean" + Options: + description: "Network specific options to be used by the drivers." + type: "object" + additionalProperties: + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + Name: "isolated_nw" + CheckDuplicate: false + Driver: "bridge" + EnableIPv6: true + IPAM: + Driver: "default" + Config: + - Subnet: "172.20.0.0/16" + IPRange: "172.20.10.0/24" + Gateway: "172.20.10.11" + - Subnet: "2001:db8:abcd::/64" + Gateway: "2001:db8:abcd::1011" + Options: + foo: "bar" + Internal: true + Options: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + tags: ["Network"] + + /networks/{id}/connect: + post: + summary: "Connect a container to a network" + operationId: "NetworkConnect" + consumes: + - "application/octet-stream" + responses: + 200: + description: "No error" + 403: + description: "Operation not supported for swarm scoped networks" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Network or container not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + - name: "container" + in: "body" + required: true + schema: + type: "object" + properties: + Container: + type: "string" + description: "The ID or name of the container to connect to the network." + EndpointConfig: + $ref: "#/definitions/EndpointSettings" + example: + Container: "3613f73ba0e4" + EndpointConfig: + IPAMConfig: + IPv4Address: "172.24.56.89" + IPv6Address: "2001:db8::5689" + tags: ["Network"] + + /networks/{id}/disconnect: + post: + summary: "Disconnect a container from a network" + operationId: "NetworkDisconnect" + consumes: + - "application/json" + responses: + 200: + description: "No error" + 403: + description: "Operation not supported for swarm scoped networks" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Network or container not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + - name: "container" + in: "body" + required: true + schema: + type: "object" + properties: + Container: + type: "string" + description: "The ID or name of the container to disconnect from the network." + Force: + type: "boolean" + description: "Force the container to disconnect from the network." + tags: ["Network"] + /networks/prune: + post: + summary: "Delete unused networks" + consumes: + - "application/json" + produces: + - "application/json" + operationId: "NetworkPrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + properties: + VolumesDeleted: + description: "Networks that were deleted" + type: "array" + items: + type: "string" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Network"] + /plugins: + get: + summary: "List plugins" + operationId: "PluginList" + description: "Returns information about installed plugins." + produces: ["application/json"] + responses: + 200: + description: "No error" + schema: + type: "array" + items: + $ref: "#/definitions/Plugin" + example: + - Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" + Name: "tiborvass/sample-volume-plugin" + Tag: "latest" + Active: true + Settings: + Env: + - "DEBUG=0" + Args: null + Devices: null + Config: + Description: "A sample volume plugin for Docker" + Documentation: "https://docs.docker.com/engine/extend/plugins/" + Interface: + Types: + - "docker.volumedriver/1.0" + Socket: "plugins.sock" + Entrypoint: + - "/usr/bin/sample-volume-plugin" + - "/data" + WorkDir: "" + User: {} + Network: + Type: "" + Linux: + Capabilities: null + AllowAllDevices: false + Devices: null + Mounts: null + PropagatedMount: "/data" + Env: + - Name: "DEBUG" + Description: "If set, prints debug messages" + Settable: null + Value: "0" + Args: + Name: "args" + Description: "command line arguments" + Settable: null + Value: [] + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Plugin"] + + /plugins/privileges: + get: + summary: "Get plugin privileges" + operationId: "GetPluginPrivileges" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + description: "Describes a permission the user has to accept upon installing the plugin." + type: "object" + properties: + Name: + type: "string" + Description: + type: "string" + Value: + type: "array" + items: + type: "string" + example: + - Name: "network" + Description: "" + Value: + - "host" + - Name: "mount" + Description: "" + Value: + - "/data" + - Name: "device" + Description: "" + Value: + - "/dev/cpu_dma_latency" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "query" + description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." + required: true + type: "string" + tags: + - "Plugin" + + /plugins/pull: + post: + summary: "Install a plugin" + operationId: "PluginPull" + description: | + Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). + produces: + - "application/json" + responses: + 204: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "remote" + in: "query" + description: | + Remote reference for plugin to install. + + The `:latest` tag is optional, and is used as the default if omitted. + required: true + type: "string" + - name: "name" + in: "query" + description: | + Local name for the pulled plugin. + + The `:latest` tag is optional, and is used as the default if omitted. + required: false + type: "string" + - name: "X-Registry-Auth" + in: "header" + description: "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)" + type: "string" + - name: "body" + in: "body" + schema: + type: "array" + items: + description: "Describes a permission accepted by the user upon installing the plugin." + type: "object" + properties: + Name: + type: "string" + Description: + type: "string" + Value: + type: "array" + items: + type: "string" + example: + - Name: "network" + Description: "" + Value: + - "host" + - Name: "mount" + Description: "" + Value: + - "/data" + - Name: "device" + Description: "" + Value: + - "/dev/cpu_dma_latency" + tags: ["Plugin"] + /plugins/{name}/json: + get: + summary: "Inspect a plugin" + operationId: "PluginInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Plugin" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." + required: true + type: "string" + tags: ["Plugin"] + /plugins/{name}: + delete: + summary: "Remove a plugin" + operationId: "PluginDelete" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Plugin" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." + required: true + type: "string" + - name: "force" + in: "query" + description: "Disable the plugin before removing. This may result in issues if the plugin is in use by a container." + type: "boolean" + default: false + tags: ["Plugin"] + /plugins/{name}/enable: + post: + summary: "Enable a plugin" + operationId: "PluginEnable" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." + required: true + type: "string" + - name: "timeout" + in: "query" + description: "Set the HTTP client timeout (in seconds)" + type: "integer" + default: 0 + tags: ["Plugin"] + /plugins/{name}/disable: + post: + summary: "Disable a plugin" + operationId: "PluginDisable" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." + required: true + type: "string" + tags: ["Plugin"] + /plugins/create: + post: + summary: "Create a plugin" + operationId: "PluginCreate" + consumes: + - "application/x-tar" + responses: + 204: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "query" + description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." + required: true + type: "string" + - name: "tarContext" + in: "body" + description: "Path to tar containing plugin rootfs and manifest" + schema: + type: "string" + format: "binary" + tags: ["Plugin"] + /plugins/{name}/push: + post: + summary: "Push a plugin" + operationId: "PluginPush" + description: | + Push a plugin to the registry. + parameters: + - name: "name" + in: "path" + description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." + required: true + type: "string" + responses: + 200: + description: "no error" + 404: + description: "plugin not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Plugin"] + /plugins/{name}/set: + post: + summary: "Configure a plugin" + operationId: "PluginSet" + consumes: + - "application/json" + parameters: + - name: "name" + in: "path" + description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." + required: true + type: "string" + - name: "body" + in: "body" + schema: + type: "array" + items: + type: "string" + example: ["DEBUG=1"] + responses: + 204: + description: "No error" + 404: + description: "Plugin not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Plugin"] + /nodes: + get: + summary: "List nodes" + operationId: "NodeList" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Node" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `id=` + - `label=` + - `membership=`(`accepted`|`pending`)` + - `name=` + - `role=`(`manager`|`worker`)` + type: "string" + tags: ["Node"] + /nodes/{id}: + get: + summary: "Inspect a node" + operationId: "NodeInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Node" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID or name of the node" + type: "string" + required: true + tags: ["Node"] + delete: + summary: "Delete a node" + operationId: "NodeDelete" + responses: + 200: + description: "no error" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID or name of the node" + type: "string" + required: true + - name: "force" + in: "query" + description: "Force remove a node from the swarm" + default: false + type: "boolean" + tags: ["Node"] + /nodes/{id}/update: + post: + summary: "Update a node" + operationId: "NodeUpdate" + responses: + 200: + description: "no error" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID of the node" + type: "string" + required: true + - name: "body" + in: "body" + schema: + $ref: "#/definitions/NodeSpec" + - name: "version" + in: "query" + description: "The version number of the node object being updated. This is required to avoid conflicting writes." + type: "integer" + format: "int64" + required: true + tags: ["Node"] + /swarm: + get: + summary: "Inspect swarm" + operationId: "SwarmInspect" + responses: + 200: + description: "no error" + schema: + allOf: + - $ref: "#/definitions/ClusterInfo" + - type: "object" + properties: + JoinTokens: + description: "The tokens workers and managers need to join the swarm." + type: "object" + properties: + Worker: + description: "The token workers can use to join the swarm." + type: "string" + Manager: + description: "The token managers can use to join the swarm." + type: "string" + example: + CreatedAt: "2016-08-15T16:00:20.349727406Z" + Spec: + Dispatcher: + HeartbeatPeriod: 5000000000 + Orchestration: + TaskHistoryRetentionLimit: 10 + CAConfig: + NodeCertExpiry: 7776000000000000 + Raft: + LogEntriesForSlowFollowers: 500 + HeartbeatTick: 1 + SnapshotInterval: 10000 + ElectionTick: 3 + TaskDefaults: {} + EncryptionConfig: + AutoLockManagers: false + Name: "default" + JoinTokens: + Worker: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-6qmn92w6bu3jdvnglku58u11a" + Manager: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-8llk83c4wm9lwioey2s316r9l" + ID: "70ilmkj2f6sp2137c753w2nmt" + UpdatedAt: "2016-08-15T16:32:09.623207604Z" + Version: + Index: 51 + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Swarm"] + /swarm/init: + post: + summary: "Initialize a new swarm" + operationId: "SwarmInit" + produces: + - "application/json" + - "text/plain" + responses: + 200: + description: "no error" + schema: + description: "The node ID" + type: "string" + example: "7v2t30z9blmxuhnyo6s4cpenp" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 406: + description: "node is already part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + type: "object" + properties: + ListenAddr: + description: "Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used." + type: "string" + AdvertiseAddr: + description: "Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible." + type: "string" + ForceNewCluster: + description: "Force creation of a new swarm." + type: "boolean" + Spec: + $ref: "#/definitions/SwarmSpec" + example: + ListenAddr: "0.0.0.0:2377" + AdvertiseAddr: "192.168.1.1:2377" + ForceNewCluster: false + Spec: + Orchestration: {} + Raft: {} + Dispatcher: {} + CAConfig: {} + EncryptionConfig: + AutoLockManagers: false + tags: ["Swarm"] + /swarm/join: + post: + summary: "Join an existing swarm" + operationId: "SwarmJoin" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is already part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + type: "object" + properties: + ListenAddr: + description: "Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP)." + type: "string" + AdvertiseAddr: + description: "Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible." + type: "string" + RemoteAddrs: + description: "Addresses of manager nodes already participating in the swarm." + type: "string" + JoinToken: + description: "Secret token for joining this swarm." + type: "string" + example: + ListenAddr: "0.0.0.0:2377" + AdvertiseAddr: "192.168.1.1:2377" + RemoteAddrs: + - "node1:2377" + JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" + tags: ["Swarm"] + /swarm/leave: + post: + summary: "Leave a swarm" + operationId: "SwarmLeave" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "force" + description: "Force leave swarm, even if this is the last manager or that it will break the cluster." + in: "query" + type: "boolean" + default: false + tags: ["Swarm"] + /swarm/update: + post: + summary: "Update a swarm" + operationId: "SwarmUpdate" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + $ref: "#/definitions/SwarmSpec" + - name: "version" + in: "query" + description: "The version number of the swarm object being updated. This is required to avoid conflicting writes." + type: "integer" + format: "int64" + required: true + - name: "rotateWorkerToken" + in: "query" + description: "Rotate the worker join token." + type: "boolean" + default: false + - name: "rotateManagerToken" + in: "query" + description: "Rotate the manager join token." + type: "boolean" + default: false + - name: "rotateManagerUnlockKey" + in: "query" + description: "Rotate the manager unlock key." + type: "boolean" + default: false + tags: ["Swarm"] + /swarm/unlockkey: + get: + summary: "Get the unlock key" + operationId: "SwarmUnlockkey" + consumes: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + properties: + UnlockKey: + description: "The swarm's unlock key." + type: "string" + example: + UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Swarm"] + /swarm/unlock: + post: + summary: "Unlock a locked manager" + operationId: "SwarmUnlock" + consumes: + - "application/json" + produces: + - "application/json" + parameters: + - name: "body" + in: "body" + required: true + schema: + type: "object" + properties: + UnlockKey: + description: "The swarm's unlock key." + type: "string" + example: + UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Swarm"] + /services: + get: + summary: "List services" + operationId: "ServiceList" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Service" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters: + + - `id=` + - `name=` + - `label=` + tags: ["Service"] + /services/create: + post: + summary: "Create a service" + operationId: "ServiceCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + type: "object" + properties: + ID: + description: "The ID of the created service." + type: "string" + Warning: + description: "Optional warning message" + type: "string" + example: + ID: "ak7w3gjqoa3kuz8xcpnyy0pvl" + Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" + 403: + description: "network is not eligible for services" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "name conflicts with an existing service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "server error or node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/ServiceSpec" + - type: "object" + example: + Name: "web" + TaskTemplate: + ContainerSpec: + Image: "nginx:alpine" + Mounts: + - + ReadOnly: true + Source: "web-data" + Target: "/usr/share/nginx/html" + Type: "volume" + VolumeOptions: + DriverConfig: {} + Labels: + com.example.something: "something-value" + User: "33" + DNSConfig: + Nameservers: ["8.8.8.8"] + Search: ["example.org"] + Options: ["timeout:3"] + LogDriver: + Name: "json-file" + Options: + max-file: "3" + max-size: "10M" + Placement: {} + Resources: + Limits: + MemoryBytes: 104857600 + Reservations: {} + RestartPolicy: + Condition: "on-failure" + Delay: 10000000000 + MaxAttempts: 10 + Mode: + Replicated: + Replicas: 4 + UpdateConfig: + Delay: 30000000000 + Parallelism: 2 + FailureAction: "pause" + EndpointSpec: + Ports: + - + Protocol: "tcp" + PublishedPort: 8080 + TargetPort: 80 + Labels: + foo: "bar" + - name: "X-Registry-Auth" + in: "header" + description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)" + type: "string" + tags: ["Service"] + /services/{id}: + get: + summary: "Inspect a service" + operationId: "ServiceInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Service" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + tags: ["Service"] + delete: + summary: "Delete a service" + operationId: "ServiceDelete" + responses: + 200: + description: "no error" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + tags: ["Service"] + /services/{id}/update: + post: + summary: "Update a service" + operationId: "ServiceUpdate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/ImageDeleteResponse" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + - name: "body" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/ServiceSpec" + - type: "object" + example: + Name: "top" + TaskTemplate: + ContainerSpec: + Image: "busybox" + Args: + - "top" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ForceUpdate: 0 + Mode: + Replicated: + Replicas: 1 + UpdateConfig: + Parallelism: 1 + Monitor: 15000000000 + MaxFailureRatio: 0.15 + EndpointSpec: + Mode: "vip" + + - name: "version" + in: "query" + description: "The version number of the service object being updated. This is required to avoid conflicting writes." + required: true + type: "integer" + - name: "registryAuthFrom" + in: "query" + type: "string" + description: "If the X-Registry-Auth header is not specified, this parameter indicates where to find registry authorization credentials. The valid values are `spec` and `previous-spec`." + default: "spec" + - name: "X-Registry-Auth" + in: "header" + description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)" + type: "string" + + tags: ["Service"] + /services/{id}/logs: + get: + summary: "Get service logs" + description: | + Get `stdout` and `stderr` logs from a service. + + **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers. + operationId: "ServiceLogs" + produces: + - "application/vnd.docker.raw-stream" + - "application/json" + responses: + 101: + description: "logs returned as a stream" + schema: + type: "string" + format: "binary" + 200: + description: "logs returned as a string in response body" + schema: + type: "string" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "details" + in: "query" + description: "Show extra details provided to logs." + type: "boolean" + default: false + - name: "follow" + in: "query" + description: | + Return the logs as a stream. + + This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Return logs from `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Return logs from `stderr`" + type: "boolean" + default: false + - name: "since" + in: "query" + description: "Only return logs since this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "timestamps" + in: "query" + description: "Add timestamps to every log line" + type: "boolean" + default: false + - name: "tail" + in: "query" + description: "Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines." + type: "string" + default: "all" + tags: ["Service"] + /tasks: + get: + summary: "List tasks" + operationId: "TaskList" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Task" + example: + - ID: "0kzzo1i0y4jz6027t0k7aezc7" + Version: + Index: 71 + CreatedAt: "2016-06-07T21:07:31.171892745Z" + UpdatedAt: "2016-06-07T21:07:31.376370513Z" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:31.290032978Z" + State: "running" + Message: "started" + ContainerStatus: + ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" + PID: 677 + DesiredState: "running" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.10/16" + - ID: "1yljwbmlr8er2waf8orvqpwms" + Version: + Index: 30 + CreatedAt: "2016-06-07T21:07:30.019104782Z" + UpdatedAt: "2016-06-07T21:07:30.231958098Z" + Name: "hopeful_cori" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:30.202183143Z" + State: "shutdown" + Message: "shutdown" + ContainerStatus: + ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213" + DesiredState: "shutdown" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.5/16" + + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters: + + - `id=` + - `name=` + - `service=` + - `node=` + - `label=key` or `label="key=value"` + - `desired-state=(running | shutdown | accepted)` + tags: ["Task"] + /tasks/{id}: + get: + summary: "Inspect a task" + operationId: "TaskInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Task" + 404: + description: "no such task" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID of the task" + required: true + type: "string" + tags: ["Task"] + /secrets: + get: + summary: "List secrets" + operationId: "SecretList" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Secret" + example: + - ID: "ktnbjxoalbkvbvedmg1urrz8h" + Version: + Index: 11 + CreatedAt: "2016-11-05T01:20:17.327670065Z" + UpdatedAt: "2016-11-05T01:20:17.327670065Z" + Spec: + Name: "app-dev.crt" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Available filters: + + - `names=` + tags: ["Secret"] + /secrets/create: + post: + summary: "Create a secret" + operationId: "SecretCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + type: "object" + properties: + ID: + description: "The ID of the created secret." + type: "string" + example: + ID: "ktnbjxoalbkvbvedmg1urrz8h" + 406: + description: "server error or node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "name conflicts with an existing object" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + schema: + allOf: + - $ref: "#/definitions/SecretSpec" + - type: "object" + example: + Name: "app-key.crt" + Labels: + foo: "bar" + Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" + tags: ["Secret"] + /secrets/{id}: + get: + summary: "Inspect a secret" + operationId: "SecretInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Secret" + example: + ID: "ktnbjxoalbkvbvedmg1urrz8h" + Version: + Index: 11 + CreatedAt: "2016-11-05T01:20:17.327670065Z" + UpdatedAt: "2016-11-05T01:20:17.327670065Z" + Spec: + Name: "app-dev.crt" + 404: + description: "secret not found" + schema: + $ref: "#/definitions/ErrorResponse" + 406: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + description: "ID of the secret" + tags: ["Secret"] + delete: + summary: "Delete a secret" + operationId: "SecretDelete" + produces: + - "application/json" + responses: + 204: + description: "no error" + 404: + description: "secret not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + description: "ID of the secret" + tags: ["Secret"] From 2ef4adc3a44a4727538b881645d8a15966df0271 Mon Sep 17 00:00:00 2001 From: Eugene Kazakov Date: Thu, 9 Jan 2025 18:16:07 +0100 Subject: [PATCH 3/5] Update Docker API to v1.47 --- .jane-openapi | 2 +- README.md | 2 +- generated/Client.php | 1539 +- generated/Endpoint/BuildPrune.php | 83 + generated/Endpoint/ConfigCreate.php | 63 + generated/Endpoint/ConfigDelete.php | 64 + generated/Endpoint/ConfigInspect.php | 64 + generated/Endpoint/ConfigList.php | 79 + generated/Endpoint/ConfigUpdate.php | 88 + ...nerGetArchive.php => ContainerArchive.php} | 16 +- ...chiveHead.php => ContainerArchiveInfo.php} | 31 +- generated/Endpoint/ContainerAttach.php | 58 +- .../Endpoint/ContainerAttachWebsocket.php | 31 +- generated/Endpoint/ContainerChanges.php | 13 +- generated/Endpoint/ContainerCreate.php | 46 +- generated/Endpoint/ContainerDelete.php | 10 +- generated/Endpoint/ContainerKill.php | 21 +- generated/Endpoint/ContainerList.php | 43 +- generated/Endpoint/ContainerLogs.php | 21 +- generated/Endpoint/ContainerPause.php | 7 +- generated/Endpoint/ContainerPrune.php | 2 + generated/Endpoint/ContainerResize.php | 6 +- generated/Endpoint/ContainerRestart.php | 4 +- generated/Endpoint/ContainerStart.php | 21 +- generated/Endpoint/ContainerStats.php | 39 +- generated/Endpoint/ContainerStop.php | 8 +- generated/Endpoint/ContainerTop.php | 16 +- generated/Endpoint/ContainerUpdate.php | 12 +- generated/Endpoint/ContainerWait.php | 34 +- generated/Endpoint/DistributionInspect.php | 60 + generated/Endpoint/ExecResize.php | 18 +- generated/Endpoint/ExecStart.php | 13 +- generated/Endpoint/GetPluginPrivileges.php | 24 +- generated/Endpoint/ImageBuild.php | 39 +- generated/Endpoint/ImageCommit.php | 4 +- generated/Endpoint/ImageCreate.php | 61 +- generated/Endpoint/ImageDelete.php | 10 +- generated/Endpoint/ImageGetAll.php | 11 +- generated/Endpoint/ImageInspect.php | 4 +- generated/Endpoint/ImageList.php | 17 +- generated/Endpoint/ImageLoad.php | 2 +- generated/Endpoint/ImagePrune.php | 5 +- generated/Endpoint/ImagePush.php | 23 +- generated/Endpoint/ImageSearch.php | 3 +- generated/Endpoint/NetworkConnect.php | 6 +- generated/Endpoint/NetworkCreate.php | 4 +- generated/Endpoint/NetworkDelete.php | 4 + generated/Endpoint/NetworkInspect.php | 21 +- generated/Endpoint/NetworkList.php | 18 +- generated/Endpoint/NetworkPrune.php | 2 + generated/Endpoint/NodeDelete.php | 4 + generated/Endpoint/NodeInspect.php | 4 + generated/Endpoint/NodeList.php | 5 + generated/Endpoint/NodeUpdate.php | 26 +- generated/Endpoint/PluginCreate.php | 16 +- generated/Endpoint/PluginDelete.php | 18 +- generated/Endpoint/PluginDisable.php | 30 +- generated/Endpoint/PluginEnable.php | 20 +- generated/Endpoint/PluginInspect.php | 5 +- generated/Endpoint/PluginList.php | 27 + generated/Endpoint/PluginPull.php | 12 +- generated/Endpoint/PluginPush.php | 7 +- generated/Endpoint/PluginSet.php | 12 +- generated/Endpoint/PluginUpgrade.php | 98 + ...PutArchive.php => PutContainerArchive.php} | 36 +- generated/Endpoint/SecretCreate.php | 12 +- generated/Endpoint/SecretDelete.php | 4 + generated/Endpoint/SecretInspect.php | 8 +- generated/Endpoint/SecretList.php | 12 +- generated/Endpoint/SecretUpdate.php | 88 + generated/Endpoint/ServiceCreate.php | 27 +- generated/Endpoint/ServiceDelete.php | 4 + generated/Endpoint/ServiceInspect.php | 19 +- generated/Endpoint/ServiceList.php | 17 +- generated/Endpoint/ServiceLogs.php | 26 +- generated/Endpoint/ServiceUpdate.php | 55 +- generated/Endpoint/Session.php | 50 + generated/Endpoint/SwarmInit.php | 8 +- generated/Endpoint/SwarmInspect.php | 12 +- generated/Endpoint/SwarmLeave.php | 14 +- generated/Endpoint/SwarmUnlock.php | 4 + generated/Endpoint/SwarmUnlockkey.php | 4 + generated/Endpoint/SwarmUpdate.php | 22 +- generated/Endpoint/SystemAuth.php | 14 +- generated/Endpoint/SystemDataUsage.php | 20 + generated/Endpoint/SystemEvents.php | 38 +- generated/Endpoint/SystemInfo.php | 4 +- generated/Endpoint/SystemPingHead.php | 46 + generated/Endpoint/SystemVersion.php | 4 +- generated/Endpoint/TaskInspect.php | 4 + generated/Endpoint/TaskList.php | 15 +- generated/Endpoint/TaskLogs.php | 96 + generated/Endpoint/VolumeCreate.php | 4 +- generated/Endpoint/VolumeList.php | 11 +- generated/Endpoint/VolumePrune.php | 2 + generated/Endpoint/VolumeUpdate.php | 88 + ...BuildPruneInternalServerErrorException.php | 29 + .../ConfigCreateConflictException.php | 29 + ...figCreateInternalServerErrorException.php} | 2 +- ...onfigCreateServiceUnavailableException.php | 29 + ...nfigDeleteInternalServerErrorException.php | 29 + ....php => ConfigDeleteNotFoundException.php} | 4 +- ...onfigDeleteServiceUnavailableException.php | 29 + ...figInspectInternalServerErrorException.php | 29 + .../ConfigInspectNotFoundException.php | 29 + ...nfigInspectServiceUnavailableException.php | 29 + ...ConfigListInternalServerErrorException.php | 29 + .../ConfigListServiceUnavailableException.php | 29 + .../ConfigUpdateBadRequestException.php | 29 + ...nfigUpdateInternalServerErrorException.php | 29 + .../ConfigUpdateNotFoundException.php | 29 + ...onfigUpdateServiceUnavailableException.php | 29 + ...> ContainerArchiveBadRequestException.php} | 2 +- ...ntainerArchiveInfoBadRequestException.php} | 2 +- ...chiveInfoInternalServerErrorException.php} | 2 +- ...ContainerArchiveInfoNotFoundException.php} | 2 +- ...nerArchiveInternalServerErrorException.php | 29 + ... => ContainerArchiveNotFoundException.php} | 2 +- .../ContainerDeleteConflictException.php | 29 + .../ContainerKillConflictException.php | 29 + .../ContainerWaitBadRequestException.php | 29 + ...onInspectInternalServerErrorException.php} | 2 +- ...stributionInspectUnauthorizedException.php | 29 + .../ImageBuildBadRequestException.php | 29 + .../NetworkConnectBadRequestException.php | 29 + .../NetworkConnectForbiddenException.php | 2 +- .../NetworkCreateForbiddenException.php | 4 +- .../NetworkDeleteForbiddenException.php | 29 + ...orkInspectInternalServerErrorException.php | 29 + .../NodeDeleteServiceUnavailableException.php | 29 + ...NodeInspectServiceUnavailableException.php | 29 + ...> NodeListServiceUnavailableException.php} | 2 +- .../NodeUpdateBadRequestException.php | 29 + .../NodeUpdateServiceUnavailableException.php | 29 + .../Exception/NotAcceptableException.php | 11 - .../PluginDisableNotFoundException.php | 29 + .../PluginEnableNotFoundException.php | 29 + ...ginUpgradeInternalServerErrorException.php | 29 + .../PluginUpgradeNotFoundException.php | 29 + ...utContainerArchiveBadRequestException.php} | 2 +- ...PutContainerArchiveForbiddenException.php} | 2 +- ...nerArchiveInternalServerErrorException.php | 29 + ... PutContainerArchiveNotFoundException.php} | 2 +- .../SecretCreateNotAcceptableException.php | 29 - ...ecretCreateServiceUnavailableException.php | 29 + ...ecretDeleteServiceUnavailableException.php | 29 + ...cretInspectServiceUnavailableException.php | 29 + .../SecretListServiceUnavailableException.php | 29 + .../SecretUpdateBadRequestException.php | 29 + ...cretUpdateInternalServerErrorException.php | 29 + .../SecretUpdateNotFoundException.php | 29 + ...ecretUpdateServiceUnavailableException.php | 29 + .../ServiceCreateBadRequestException.php | 29 + ...rviceCreateServiceUnavailableException.php | 2 +- ...rviceDeleteServiceUnavailableException.php | 29 + ...viceInspectServiceUnavailableException.php | 29 + ...ServiceListServiceUnavailableException.php | 29 + .../ServiceLogsNotFoundException.php | 2 +- ...ServiceLogsServiceUnavailableException.php | 29 + .../ServiceUpdateBadRequestException.php | 29 + ...rviceUpdateServiceUnavailableException.php | 29 + .../Exception/SessionBadRequestException.php | 29 + .../SessionInternalServerErrorException.php | 29 + ... SwarmInitServiceUnavailableException.php} | 2 +- .../SwarmInspectNotFoundException.php | 29 + ...warmInspectServiceUnavailableException.php | 29 + ...SwarmUnlockServiceUnavailableException.php | 29 + ...rmUnlockkeyServiceUnavailableException.php | 29 + .../SystemAuthUnauthorizedException.php | 29 + .../SystemEventsBadRequestException.php | 29 + ...emPingHeadInternalServerErrorException.php | 29 + ...TaskInspectServiceUnavailableException.php | 29 + .../TaskListServiceUnavailableException.php | 29 + .../TaskLogsInternalServerErrorException.php | 29 + .../Exception/TaskLogsNotFoundException.php | 29 + .../TaskLogsServiceUnavailableException.php | 29 + generated/Exception/UnauthorizedException.php | 11 + .../VolumeUpdateBadRequestException.php | 29 + ...lumeUpdateInternalServerErrorException.php | 29 + .../VolumeUpdateNotFoundException.php | 29 + ...olumeUpdateServiceUnavailableException.php | 29 + generated/Model/Address.php | 71 + generated/Model/BuildCache.php | 344 + generated/Model/BuildInfo.php | 28 + generated/Model/BuildPrunePostResponse200.php | 71 + generated/Model/ClusterInfo.php | 297 +- generated/Model/ClusterInfoVersion.php | 43 - generated/Model/ClusterVolume.php | 256 + generated/Model/ClusterVolumeInfo.php | 154 + .../Model/ClusterVolumePublishStatusItem.php | 120 + generated/Model/ClusterVolumeSpec.php | 89 + .../Model/ClusterVolumeSpecAccessMode.php | 334 + ...pecAccessModeAccessibilityRequirements.php | 83 + ...usterVolumeSpecAccessModeCapacityRange.php | 83 + ...ClusterVolumeSpecAccessModeSecretsItem.php | 89 + ...esCreatePostResponse201.php => Commit.php} | 28 +- generated/Model/Config.php | 704 +- generated/Model/ConfigHealthcheck.php | 145 - generated/Model/ConfigReference.php | 52 + generated/Model/ConfigSpec.php | 133 + generated/Model/ConfigVolumes.php | 43 - generated/Model/ConfigsCreatePostBody.php | 133 + generated/Model/ContainerConfig.php | 769 + ...nse201.php => ContainerCreateResponse.php} | 2 +- ...esponse200State.php => ContainerState.php} | 152 +- ...ontainerStatus.php => ContainerStatus.php} | 2 +- ...erSummaryItem.php => ContainerSummary.php} | 22 +- .../Model/ContainerSummaryHostConfig.php | 71 + ...hp => ContainerSummaryNetworkSettings.php} | 2 +- generated/Model/ContainerWaitExitError.php | 43 + ...ponse200.php => ContainerWaitResponse.php} | 30 +- generated/Model/ContainerdInfo.php | 101 + generated/Model/ContainerdInfoNamespaces.php | 113 + generated/Model/ContainersCreatePostBody.php | 242 +- ...ntainersCreatePostBodyNetworkingConfig.php | 43 - generated/Model/ContainersIdExecPostBody.php | 110 +- .../Model/ContainersIdJsonGetResponse200.php | 220 +- .../Model/ContainersIdTopGetResponse200.php | 34 +- .../Model/ContainersIdUpdatePostBody.php | 746 +- generated/Model/CreateImageInfo.php | 56 + generated/Model/DeviceRequest.php | 161 + generated/Model/DistributionInspect.php | 77 + .../Model/{GraphDriver.php => Driver.php} | 28 +- generated/Model/DriverData.php | 83 + ...sIPAMConfig.php => EndpointIPAMConfig.php} | 2 +- generated/Model/EndpointPortConfig.php | 55 + generated/Model/EndpointSettings.php | 199 +- generated/Model/EndpointSpec.php | 34 +- ...iptionEngine.php => EngineDescription.php} | 8 +- ...m.php => EngineDescriptionPluginsItem.php} | 2 +- ...GetResponse200Actor.php => EventActor.php} | 8 +- ...ntsGetResponse200.php => EventMessage.php} | 74 +- generated/Model/ExecIdJsonGetResponse200.php | 56 + generated/Model/ExecIdStartPostBody.php | 28 + ...sponse200Item.php => FilesystemChange.php} | 57 +- generated/Model/GenericResourcesItem.php | 71 + ...nericResourcesItemDiscreteResourceSpec.php | 71 + .../GenericResourcesItemNamedResourceSpec.php | 71 + generated/Model/Health.php | 117 + generated/Model/HealthConfig.php | 234 + generated/Model/HealthcheckResult.php | 157 + generated/Model/HostConfig.php | 1670 +- generated/Model/IPAM.php | 53 +- generated/Model/IPAMConfig.php | 127 + generated/Model/Image.php | 491 - generated/Model/ImageConfig.php | 973 ++ ...sponse.php => ImageDeleteResponseItem.php} | 2 +- ...sCreatePostResponse201.php => ImageID.php} | 8 +- generated/Model/ImageInspect.php | 660 + generated/Model/ImageInspectMetadata.php | 58 + ...ImageRootFS.php => ImageInspectRootFS.php} | 2 +- generated/Model/ImageManifestSummary.php | 253 + .../ImageManifestSummaryAttestationData.php | 43 + .../Model/ImageManifestSummaryImageData.php | 105 + .../ImageManifestSummaryImageDataSize.php | 64 + generated/Model/ImageManifestSummarySize.php | 107 + generated/Model/ImageSummary.php | 402 +- .../Model/ImagesPrunePostResponse200.php | 6 +- .../Model/ImagesSearchGetResponse200Item.php | 43 +- generated/Model/IndexInfo.php | 163 + generated/Model/InfoGetResponse200.php | 1163 -- generated/Model/InfoGetResponse200Plugins.php | 71 - .../InfoGetResponse200RegistryConfig.php | 71 - ...ponse200RegistryConfigIndexConfigsItem.php | 127 - ...sponse200JoinTokens.php => JoinTokens.php} | 2 +- ...NodeDescriptionResources.php => Limit.php} | 30 +- generated/Model/ManagerStatus.php | 99 + generated/Model/Mount.php | 44 +- generated/Model/MountBindOptions.php | 140 +- generated/Model/MountPoint.php | 6 + generated/Model/MountTmpfsOptions.php | 40 + generated/Model/MountVolumeOptions.php | 28 + generated/Model/Network.php | 358 +- ...ksItem.php => NetworkAttachmentConfig.php} | 42 +- generated/Model/NetworkConfig.php | 211 - generated/Model/NetworkContainer.php | 28 + ...ponse201.php => NetworkCreateResponse.php} | 8 +- generated/Model/NetworkSettings.php | 780 + generated/Model/NetworkingConfig.php | 52 + generated/Model/NetworksCreatePostBody.php | 238 +- .../Model/NetworksPrunePostResponse200.php | 14 +- generated/Model/Node.php | 241 +- generated/Model/NodeDescription.php | 104 +- generated/Model/NodeStatus.php | 99 + generated/Model/OCIDescriptor.php | 99 + generated/Model/OCIPlatform.php | 173 + .../{SecretVersion.php => ObjectVersion.php} | 2 +- generated/Model/PeerInfo.php | 71 + generated/Model/PeerNode.php | 71 + ...deDescriptionPlatform.php => Platform.php} | 42 +- generated/Model/Plugin.php | 34 +- generated/Model/PluginConfig.php | 84 + generated/Model/PluginConfigInterface.php | 28 + ...llPostBodyItem.php => PluginPrivilege.php} | 2 +- generated/Model/PluginsInfo.php | 127 + generated/Model/Port.php | 6 +- ...igPortBindingsItem.php => PortBinding.php} | 14 +- .../{ServiceVersion.php => PortStatus.php} | 20 +- generated/Model/ProgressDetail.php | 28 +- generated/Model/RegistryServiceConfig.php | 353 + ...ResourcesLimits.php => ResourceObject.php} | 48 +- generated/Model/Resources.php | 728 +- generated/Model/RestartPolicy.php | 18 +- generated/Model/Runtime.php | 153 + generated/Model/Secret.php | 78 +- generated/Model/SecretSpec.php | 95 +- generated/Model/SecretsCreatePostBody.php | 95 +- generated/Model/Service.php | 136 +- generated/Model/ServiceCreateResponse.php | 80 + generated/Model/ServiceJobStatus.php | 107 + generated/Model/ServiceServiceStatus.php | 126 + generated/Model/ServiceSpec.php | 53 +- generated/Model/ServiceSpecMode.php | 68 + .../Model/ServiceSpecModeReplicatedJob.php | 77 + generated/Model/ServiceSpecRollbackConfig.php | 219 + generated/Model/ServiceSpecUpdateConfig.php | 176 +- generated/Model/ServicesCreatePostBody.php | 53 +- generated/Model/ServicesIdUpdatePostBody.php | 53 +- generated/Model/Swarm.php | 392 + generated/Model/SwarmGetResponse200.php | 183 - generated/Model/SwarmInfo.php | 279 + generated/Model/SwarmInitPostBody.php | 255 +- generated/Model/SwarmJoinPostBody.php | 151 +- generated/Model/SwarmSpecCAConfig.php | 139 +- .../SwarmSpecCAConfigExternalCAsItem.php | 105 +- generated/Model/SwarmSpecEncryptionConfig.php | 34 +- generated/Model/SwarmSpecOrchestration.php | 34 +- generated/Model/SwarmSpecRaft.php | 73 +- generated/Model/SwarmSpecTaskDefaults.php | 18 +- .../Model/SwarmSpecTaskDefaultsLogDriver.php | 40 +- generated/Model/SystemDfGetResponse200.php | 34 +- generated/Model/SystemInfo.php | 2297 +++ .../SystemInfoDefaultAddressPoolsItem.php | 71 + ...onGetResponse200.php => SystemVersion.php} | 200 +- .../Model/SystemVersionComponentsItem.php | 117 + ...stConfig.php => SystemVersionPlatform.php} | 16 +- generated/Model/TLSInfo.php | 105 + generated/Model/Task.php | 160 +- generated/Model/TaskSpec.php | 334 +- generated/Model/TaskSpecContainerSpec.php | 666 +- .../TaskSpecContainerSpecConfigsItem.php | 178 + .../TaskSpecContainerSpecConfigsItemFile.php | 127 + .../Model/TaskSpecContainerSpecDNSConfig.php | 34 +- .../Model/TaskSpecContainerSpecPrivileges.php | 155 + ...skSpecContainerSpecPrivilegesAppArmor.php} | 20 +- ...cContainerSpecPrivilegesCredentialSpec.php | 192 + ...cContainerSpecPrivilegesSELinuxContext.php | 155 + ...TaskSpecContainerSpecPrivilegesSeccomp.php | 71 + .../TaskSpecContainerSpecSecretsItem.php | 114 + .../TaskSpecContainerSpecSecretsItemFile.php | 127 + ...p => TaskSpecContainerSpecUlimitsItem.php} | 56 +- .../Model/TaskSpecNetworkAttachmentSpec.php | 43 + generated/Model/TaskSpecNetworksItem.php | 71 - generated/Model/TaskSpecPlacement.php | 196 +- .../TaskSpecPlacementPreferencesItem.php | 43 + ...TaskSpecPlacementPreferencesItemSpread.php | 43 + generated/Model/TaskSpecPluginSpec.php | 127 + generated/Model/TaskSpecResources.php | 54 +- .../Model/TaskSpecResourcesReservations.php | 71 - generated/Model/TaskSpecRestartPolicy.php | 68 +- generated/Model/TaskStatus.php | 44 +- generated/Model/TaskVersion.php | 43 - generated/Model/Volume.php | 130 +- ...tePostBody.php => VolumeCreateOptions.php} | 64 +- ...Response200.php => VolumeListResponse.php} | 8 +- generated/Model/VolumeUsageData.php | 74 +- generated/Model/VolumesNamePutBody.php | 43 + generated/Normalizer/AddressNormalizer.php | 136 + generated/Normalizer/BuildCacheNormalizer.php | 314 + generated/Normalizer/BuildInfoNormalizer.php | 18 + .../BuildPrunePostResponse200Normalizer.php | 152 + .../Normalizer/ClusterInfoNormalizer.php | 110 +- .../ClusterVolumeInfoNormalizer.php | 220 + ...alizer.php => ClusterVolumeNormalizer.php} | 86 +- ...usterVolumePublishStatusItemNormalizer.php | 170 + ...odeAccessibilityRequirementsNormalizer.php | 200 + ...eSpecAccessModeCapacityRangeNormalizer.php | 136 + .../ClusterVolumeSpecAccessModeNormalizer.php | 242 + ...umeSpecAccessModeSecretsItemNormalizer.php | 136 + .../ClusterVolumeSpecNormalizer.php | 136 + ...201Normalizer.php => CommitNormalizer.php} | 44 +- generated/Normalizer/ConfigNormalizer.php | 656 +- ...izer.php => ConfigReferenceNormalizer.php} | 44 +- generated/Normalizer/ConfigSpecNormalizer.php | 188 + .../ConfigsCreatePostBodyNormalizer.php | 188 + .../Normalizer/ContainerConfigNormalizer.php | 678 + ... => ContainerCreateResponseNormalizer.php} | 20 +- ...lizer.php => ContainerStateNormalizer.php} | 38 +- ...izer.php => ContainerStatusNormalizer.php} | 20 +- .../ContainerSummaryHostConfigNormalizer.php | 152 + ...ainerSummaryNetworkSettingsNormalizer.php} | 20 +- ...zer.php => ContainerSummaryNormalizer.php} | 28 +- .../ContainerWaitExitErrorNormalizer.php | 118 + ...hp => ContainerWaitResponseNormalizer.php} | 38 +- .../ContainerdInfoNamespacesNormalizer.php | 136 + .../Normalizer/ContainerdInfoNormalizer.php | 136 + .../ContainersCreatePostBodyNormalizer.php | 256 +- .../ContainersIdExecPostBodyNormalizer.php | 116 +- ...ntainersIdJsonGetResponse200Normalizer.php | 108 +- .../ContainersIdUpdatePostBodyNormalizer.php | 148 +- .../Normalizer/CreateImageInfoNormalizer.php | 36 + .../Normalizer/DeviceRequestNormalizer.php | 254 + .../DistributionInspectNormalizer.php | 144 + ...ormalizer.php => DriverDataNormalizer.php} | 48 +- generated/Normalizer/DriverNormalizer.php | 148 + ...r.php => EndpointIPAMConfigNormalizer.php} | 20 +- .../EndpointPortConfigNormalizer.php | 18 + .../Normalizer/EndpointSettingsNormalizer.php | 96 +- ...er.php => EngineDescriptionNormalizer.php} | 24 +- ...ngineDescriptionPluginsItemNormalizer.php} | 20 +- ...ormalizer.php => EventActorNormalizer.php} | 20 +- ...malizer.php => EventMessageNormalizer.php} | 42 +- .../ExecIdJsonGetResponse200Normalizer.php | 36 + .../ExecIdStartPostBodyNormalizer.php | 34 + ...zer.php => FilesystemChangeNormalizer.php} | 58 +- ...rcesItemDiscreteResourceSpecNormalizer.php | 136 + ...ourcesItemNamedResourceSpecNormalizer.php} | 56 +- ...php => GenericResourcesItemNormalizer.php} | 84 +- ...malizer.php => HealthConfigNormalizer.php} | 56 +- generated/Normalizer/HealthNormalizer.php | 170 + .../HealthcheckResultNormalizer.php | 172 + generated/Normalizer/HostConfigNormalizer.php | 864 +- generated/Normalizer/IPAMConfigNormalizer.php | 188 + generated/Normalizer/IPAMNormalizer.php | 72 +- .../Normalizer/ImageConfigNormalizer.php | 678 + ... => ImageDeleteResponseItemNormalizer.php} | 20 +- ...01Normalizer.php => ImageIDNormalizer.php} | 20 +- .../ImageInspectMetadataNormalizer.php | 118 + ...malizer.php => ImageInspectNormalizer.php} | 122 +- ...r.php => ImageInspectRootFSNormalizer.php} | 28 +- ...ifestSummaryAttestationDataNormalizer.php} | 44 +- ...mageManifestSummaryImageDataNormalizer.php | 158 + ...ManifestSummaryImageDataSizeNormalizer.php | 114 + .../ImageManifestSummaryNormalizer.php | 206 + .../ImageManifestSummarySizeNormalizer.php | 128 + .../Normalizer/ImageSummaryNormalizer.php | 42 +- ...ameHistoryGetResponse200ItemNormalizer.php | 64 +- .../ImagesPrunePostResponse200Normalizer.php | 4 +- ...Normalizer.php => IndexInfoNormalizer.php} | 80 +- ...GetResponse200RegistryConfigNormalizer.php | 168 - generated/Normalizer/JaneObjectNormalizer.php | 826 +- ...ormalizer.php => JoinTokensNormalizer.php} | 20 +- ...rcesNormalizer.php => LimitNormalizer.php} | 38 +- .../Normalizer/ManagerStatusNormalizer.php | 154 + .../Normalizer/MountBindOptionsNormalizer.php | 72 + generated/Normalizer/MountNormalizer.php | 18 + .../MountTmpfsOptionsNormalizer.php | 50 + .../MountVolumeOptionsNormalizer.php | 18 + ... => NetworkAttachmentConfigNormalizer.php} | 54 +- .../Normalizer/NetworkConfigNormalizer.php | 242 - .../Normalizer/NetworkContainerNormalizer.php | 18 + ...hp => NetworkCreateResponseNormalizer.php} | 36 +- generated/Normalizer/NetworkNormalizer.php | 124 + .../Normalizer/NetworkSettingsNormalizer.php | 504 + ...zer.php => NetworkingConfigNormalizer.php} | 20 +- .../NetworksCreatePostBodyNormalizer.php | 126 +- ...NetworksPrunePostResponse200Normalizer.php | 32 +- .../Normalizer/NodeDescriptionNormalizer.php | 30 +- generated/Normalizer/NodeNormalizer.php | 40 +- generated/Normalizer/NodeStatusNormalizer.php | 154 + .../Normalizer/OCIDescriptorNormalizer.php | 154 + .../Normalizer/OCIPlatformNormalizer.php | 206 + ...alizer.php => ObjectVersionNormalizer.php} | 20 +- generated/Normalizer/PeerInfoNormalizer.php | 136 + generated/Normalizer/PeerNodeNormalizer.php | 136 + ...mNormalizer.php => PlatformNormalizer.php} | 20 +- .../PluginConfigInterfaceNormalizer.php | 18 + .../Normalizer/PluginConfigNormalizer.php | 46 + generated/Normalizer/PluginNormalizer.php | 18 + ...izer.php => PluginPrivilegeNormalizer.php} | 20 +- ...rmalizer.php => PluginsInfoNormalizer.php} | 88 +- ...rmalizer.php => PortBindingNormalizer.php} | 20 +- generated/Normalizer/PortStatusNormalizer.php | 134 + .../Normalizer/ProgressDetailNormalizer.php | 48 +- .../RegistryServiceConfigNormalizer.php | 270 + ...lizer.php => ResourceObjectNormalizer.php} | 54 +- generated/Normalizer/ResourcesNormalizer.php | 148 +- generated/Normalizer/RuntimeNormalizer.php | 186 + generated/Normalizer/SecretNormalizer.php | 8 +- generated/Normalizer/SecretSpecNormalizer.php | 60 +- .../SecretsCreatePostBodyNormalizer.php | 60 +- .../ServiceCreateResponseNormalizer.php | 152 + .../Normalizer/ServiceJobStatusNormalizer.php | 136 + generated/Normalizer/ServiceNormalizer.php | 40 +- .../ServiceServiceStatusNormalizer.php | 154 + .../Normalizer/ServiceSpecModeNormalizer.php | 36 + ...ServiceSpecModeReplicatedJobNormalizer.php | 136 + .../Normalizer/ServiceSpecNormalizer.php | 22 +- .../ServiceSpecRollbackConfigNormalizer.php | 214 + .../ServiceSpecUpdateConfigNormalizer.php | 18 + .../ServicesCreatePostBodyNormalizer.php | 22 +- .../ServicesIdUpdatePostBodyNormalizer.php | 22 +- generated/Normalizer/SwarmInfoNormalizer.php | 278 + .../SwarmInitPostBodyNormalizer.php | 88 + .../SwarmJoinPostBodyNormalizer.php | 42 +- generated/Normalizer/SwarmNormalizer.php | 314 + ...mSpecCAConfigExternalCAsItemNormalizer.php | 18 + .../SwarmSpecCAConfigNormalizer.php | 54 + .../SystemDfGetResponse200Normalizer.php | 82 +- ...mInfoDefaultAddressPoolsItemNormalizer.php | 136 + ...ormalizer.php => SystemInfoNormalizer.php} | 1406 +- .../SystemVersionComponentsItemNormalizer.php | 146 + ...alizer.php => SystemVersionNormalizer.php} | 72 +- ...hp => SystemVersionPlatformNormalizer.php} | 44 +- generated/Normalizer/TLSInfoNormalizer.php | 154 + generated/Normalizer/TaskNormalizer.php | 56 +- ...ContainerSpecConfigsItemFileNormalizer.php | 172 + ...SpecContainerSpecConfigsItemNormalizer.php | 172 + .../TaskSpecContainerSpecNormalizer.php | 602 +- ...tainerSpecPrivilegesAppArmorNormalizer.php | 118 + ...SpecPrivilegesCredentialSpecNormalizer.php | 154 + ...kSpecContainerSpecPrivilegesNormalizer.php | 190 + ...SpecPrivilegesSELinuxContextNormalizer.php | 190 + ...ntainerSpecPrivilegesSeccompNormalizer.php | 136 + ...ContainerSpecSecretsItemFileNormalizer.php | 172 + ...SpecContainerSpecSecretsItemNormalizer.php | 154 + ...pecContainerSpecUlimitsItemNormalizer.php} | 84 +- ...askSpecNetworkAttachmentSpecNormalizer.php | 118 + generated/Normalizer/TaskSpecNormalizer.php | 58 +- .../TaskSpecPlacementNormalizer.php | 86 + ...SpecPlacementPreferencesItemNormalizer.php | 118 + ...cementPreferencesItemSpreadNormalizer.php} | 44 +- .../TaskSpecPluginSpecNormalizer.php | 188 + .../TaskSpecResourcesNormalizer.php | 8 +- ...askSpecResourcesReservationsNormalizer.php | 136 - generated/Normalizer/TaskStatusNormalizer.php | 22 +- ....php => VolumeCreateOptionsNormalizer.php} | 38 +- ...r.php => VolumeListResponseNormalizer.php} | 60 +- generated/Normalizer/VolumeNormalizer.php | 36 + ...r.php => VolumesNamePutBodyNormalizer.php} | 44 +- src/Manager/ContainerManager.php | 8 +- src/Manager/ImageManager.php | 2 +- src/Manager/MiscManager.php | 4 +- src/Manager/NetworkManager.php | 2 +- src/Manager/ServiceManager.php | 2 +- src/Manager/VolumeManager.php | 2 +- src/Stream/EventStream.php | 2 +- tests/Manager/MiscManagerTest.php | 8 +- v1.25.yaml | 7710 --------- v1.47.yaml | 12939 ++++++++++++++++ 540 files changed, 58003 insertions(+), 18268 deletions(-) create mode 100644 generated/Endpoint/BuildPrune.php create mode 100644 generated/Endpoint/ConfigCreate.php create mode 100644 generated/Endpoint/ConfigDelete.php create mode 100644 generated/Endpoint/ConfigInspect.php create mode 100644 generated/Endpoint/ConfigList.php create mode 100644 generated/Endpoint/ConfigUpdate.php rename generated/Endpoint/{ContainerGetArchive.php => ContainerArchive.php} (67%) rename generated/Endpoint/{ContainerArchiveHead.php => ContainerArchiveInfo.php} (73%) create mode 100644 generated/Endpoint/DistributionInspect.php create mode 100644 generated/Endpoint/PluginUpgrade.php rename generated/Endpoint/{ContainerPutArchive.php => PutContainerArchive.php} (68%) create mode 100644 generated/Endpoint/SecretUpdate.php create mode 100644 generated/Endpoint/Session.php create mode 100644 generated/Endpoint/SystemPingHead.php create mode 100644 generated/Endpoint/TaskLogs.php create mode 100644 generated/Endpoint/VolumeUpdate.php create mode 100644 generated/Exception/BuildPruneInternalServerErrorException.php create mode 100644 generated/Exception/ConfigCreateConflictException.php rename generated/Exception/{ContainerGetArchiveInternalServerErrorException.php => ConfigCreateInternalServerErrorException.php} (88%) create mode 100644 generated/Exception/ConfigCreateServiceUnavailableException.php create mode 100644 generated/Exception/ConfigDeleteInternalServerErrorException.php rename generated/Exception/{ContainerCreateNotAcceptableException.php => ConfigDeleteNotFoundException.php} (84%) create mode 100644 generated/Exception/ConfigDeleteServiceUnavailableException.php create mode 100644 generated/Exception/ConfigInspectInternalServerErrorException.php create mode 100644 generated/Exception/ConfigInspectNotFoundException.php create mode 100644 generated/Exception/ConfigInspectServiceUnavailableException.php create mode 100644 generated/Exception/ConfigListInternalServerErrorException.php create mode 100644 generated/Exception/ConfigListServiceUnavailableException.php create mode 100644 generated/Exception/ConfigUpdateBadRequestException.php create mode 100644 generated/Exception/ConfigUpdateInternalServerErrorException.php create mode 100644 generated/Exception/ConfigUpdateNotFoundException.php create mode 100644 generated/Exception/ConfigUpdateServiceUnavailableException.php rename generated/Exception/{ContainerPutArchiveBadRequestException.php => ContainerArchiveBadRequestException.php} (90%) rename generated/Exception/{ContainerArchiveHeadBadRequestException.php => ContainerArchiveInfoBadRequestException.php} (91%) rename generated/Exception/{ContainerArchiveHeadInternalServerErrorException.php => ContainerArchiveInfoInternalServerErrorException.php} (92%) rename generated/Exception/{ContainerArchiveHeadNotFoundException.php => ContainerArchiveInfoNotFoundException.php} (92%) create mode 100644 generated/Exception/ContainerArchiveInternalServerErrorException.php rename generated/Exception/{ContainerGetArchiveNotFoundException.php => ContainerArchiveNotFoundException.php} (91%) create mode 100644 generated/Exception/ContainerDeleteConflictException.php create mode 100644 generated/Exception/ContainerKillConflictException.php create mode 100644 generated/Exception/ContainerWaitBadRequestException.php rename generated/Exception/{ContainerPutArchiveInternalServerErrorException.php => DistributionInspectInternalServerErrorException.php} (92%) create mode 100644 generated/Exception/DistributionInspectUnauthorizedException.php create mode 100644 generated/Exception/ImageBuildBadRequestException.php create mode 100644 generated/Exception/NetworkConnectBadRequestException.php create mode 100644 generated/Exception/NetworkDeleteForbiddenException.php create mode 100644 generated/Exception/NetworkInspectInternalServerErrorException.php create mode 100644 generated/Exception/NodeDeleteServiceUnavailableException.php create mode 100644 generated/Exception/NodeInspectServiceUnavailableException.php rename generated/Exception/{SecretInspectNotAcceptableException.php => NodeListServiceUnavailableException.php} (90%) create mode 100644 generated/Exception/NodeUpdateBadRequestException.php create mode 100644 generated/Exception/NodeUpdateServiceUnavailableException.php delete mode 100644 generated/Exception/NotAcceptableException.php create mode 100644 generated/Exception/PluginDisableNotFoundException.php create mode 100644 generated/Exception/PluginEnableNotFoundException.php create mode 100644 generated/Exception/PluginUpgradeInternalServerErrorException.php create mode 100644 generated/Exception/PluginUpgradeNotFoundException.php rename generated/Exception/{ContainerGetArchiveBadRequestException.php => PutContainerArchiveBadRequestException.php} (91%) rename generated/Exception/{ContainerPutArchiveForbiddenException.php => PutContainerArchiveForbiddenException.php} (92%) create mode 100644 generated/Exception/PutContainerArchiveInternalServerErrorException.php rename generated/Exception/{ContainerPutArchiveNotFoundException.php => PutContainerArchiveNotFoundException.php} (92%) delete mode 100644 generated/Exception/SecretCreateNotAcceptableException.php create mode 100644 generated/Exception/SecretCreateServiceUnavailableException.php create mode 100644 generated/Exception/SecretDeleteServiceUnavailableException.php create mode 100644 generated/Exception/SecretInspectServiceUnavailableException.php create mode 100644 generated/Exception/SecretListServiceUnavailableException.php create mode 100644 generated/Exception/SecretUpdateBadRequestException.php create mode 100644 generated/Exception/SecretUpdateInternalServerErrorException.php create mode 100644 generated/Exception/SecretUpdateNotFoundException.php create mode 100644 generated/Exception/SecretUpdateServiceUnavailableException.php create mode 100644 generated/Exception/ServiceCreateBadRequestException.php create mode 100644 generated/Exception/ServiceDeleteServiceUnavailableException.php create mode 100644 generated/Exception/ServiceInspectServiceUnavailableException.php create mode 100644 generated/Exception/ServiceListServiceUnavailableException.php create mode 100644 generated/Exception/ServiceLogsServiceUnavailableException.php create mode 100644 generated/Exception/ServiceUpdateBadRequestException.php create mode 100644 generated/Exception/ServiceUpdateServiceUnavailableException.php create mode 100644 generated/Exception/SessionBadRequestException.php create mode 100644 generated/Exception/SessionInternalServerErrorException.php rename generated/Exception/{SwarmInitNotAcceptableException.php => SwarmInitServiceUnavailableException.php} (90%) create mode 100644 generated/Exception/SwarmInspectNotFoundException.php create mode 100644 generated/Exception/SwarmInspectServiceUnavailableException.php create mode 100644 generated/Exception/SwarmUnlockServiceUnavailableException.php create mode 100644 generated/Exception/SwarmUnlockkeyServiceUnavailableException.php create mode 100644 generated/Exception/SystemAuthUnauthorizedException.php create mode 100644 generated/Exception/SystemEventsBadRequestException.php create mode 100644 generated/Exception/SystemPingHeadInternalServerErrorException.php create mode 100644 generated/Exception/TaskInspectServiceUnavailableException.php create mode 100644 generated/Exception/TaskListServiceUnavailableException.php create mode 100644 generated/Exception/TaskLogsInternalServerErrorException.php create mode 100644 generated/Exception/TaskLogsNotFoundException.php create mode 100644 generated/Exception/TaskLogsServiceUnavailableException.php create mode 100644 generated/Exception/UnauthorizedException.php create mode 100644 generated/Exception/VolumeUpdateBadRequestException.php create mode 100644 generated/Exception/VolumeUpdateInternalServerErrorException.php create mode 100644 generated/Exception/VolumeUpdateNotFoundException.php create mode 100644 generated/Exception/VolumeUpdateServiceUnavailableException.php create mode 100644 generated/Model/Address.php create mode 100644 generated/Model/BuildCache.php create mode 100644 generated/Model/BuildPrunePostResponse200.php delete mode 100644 generated/Model/ClusterInfoVersion.php create mode 100644 generated/Model/ClusterVolume.php create mode 100644 generated/Model/ClusterVolumeInfo.php create mode 100644 generated/Model/ClusterVolumePublishStatusItem.php create mode 100644 generated/Model/ClusterVolumeSpec.php create mode 100644 generated/Model/ClusterVolumeSpecAccessMode.php create mode 100644 generated/Model/ClusterVolumeSpecAccessModeAccessibilityRequirements.php create mode 100644 generated/Model/ClusterVolumeSpecAccessModeCapacityRange.php create mode 100644 generated/Model/ClusterVolumeSpecAccessModeSecretsItem.php rename generated/Model/{ServicesCreatePostResponse201.php => Commit.php} (56%) delete mode 100644 generated/Model/ConfigHealthcheck.php create mode 100644 generated/Model/ConfigReference.php create mode 100644 generated/Model/ConfigSpec.php delete mode 100644 generated/Model/ConfigVolumes.php create mode 100644 generated/Model/ConfigsCreatePostBody.php create mode 100644 generated/Model/ContainerConfig.php rename generated/Model/{ContainersCreatePostResponse201.php => ContainerCreateResponse.php} (97%) rename generated/Model/{ContainersIdJsonGetResponse200State.php => ContainerState.php} (62%) rename generated/Model/{TaskStatusContainerStatus.php => ContainerStatus.php} (98%) rename generated/Model/{ContainerSummaryItem.php => ContainerSummary.php} (92%) create mode 100644 generated/Model/ContainerSummaryHostConfig.php rename generated/Model/{ContainerSummaryItemNetworkSettings.php => ContainerSummaryNetworkSettings.php} (95%) create mode 100644 generated/Model/ContainerWaitExitError.php rename generated/Model/{ContainersIdWaitPostResponse200.php => ContainerWaitResponse.php} (54%) create mode 100644 generated/Model/ContainerdInfo.php create mode 100644 generated/Model/ContainerdInfoNamespaces.php delete mode 100644 generated/Model/ContainersCreatePostBodyNetworkingConfig.php create mode 100644 generated/Model/DeviceRequest.php create mode 100644 generated/Model/DistributionInspect.php rename generated/Model/{GraphDriver.php => Driver.php} (62%) create mode 100644 generated/Model/DriverData.php rename generated/Model/{EndpointSettingsIPAMConfig.php => EndpointIPAMConfig.php} (98%) rename generated/Model/{NodeDescriptionEngine.php => EngineDescription.php} (88%) rename generated/Model/{NodeDescriptionEnginePluginsItem.php => EngineDescriptionPluginsItem.php} (96%) rename generated/Model/{EventsGetResponse200Actor.php => EventActor.php} (96%) rename generated/Model/{EventsGetResponse200.php => EventMessage.php} (66%) rename generated/Model/{ContainersIdChangesGetResponse200Item.php => FilesystemChange.php} (57%) create mode 100644 generated/Model/GenericResourcesItem.php create mode 100644 generated/Model/GenericResourcesItemDiscreteResourceSpec.php create mode 100644 generated/Model/GenericResourcesItemNamedResourceSpec.php create mode 100644 generated/Model/Health.php create mode 100644 generated/Model/HealthConfig.php create mode 100644 generated/Model/HealthcheckResult.php create mode 100644 generated/Model/IPAMConfig.php delete mode 100644 generated/Model/Image.php create mode 100644 generated/Model/ImageConfig.php rename generated/Model/{ImageDeleteResponse.php => ImageDeleteResponseItem.php} (97%) rename generated/Model/{SecretsCreatePostResponse201.php => ImageID.php} (81%) create mode 100644 generated/Model/ImageInspect.php create mode 100644 generated/Model/ImageInspectMetadata.php rename generated/Model/{ImageRootFS.php => ImageInspectRootFS.php} (97%) create mode 100644 generated/Model/ImageManifestSummary.php create mode 100644 generated/Model/ImageManifestSummaryAttestationData.php create mode 100644 generated/Model/ImageManifestSummaryImageData.php create mode 100644 generated/Model/ImageManifestSummaryImageDataSize.php create mode 100644 generated/Model/ImageManifestSummarySize.php create mode 100644 generated/Model/IndexInfo.php delete mode 100644 generated/Model/InfoGetResponse200.php delete mode 100644 generated/Model/InfoGetResponse200Plugins.php delete mode 100644 generated/Model/InfoGetResponse200RegistryConfig.php delete mode 100644 generated/Model/InfoGetResponse200RegistryConfigIndexConfigsItem.php rename generated/Model/{SwarmGetResponse200JoinTokens.php => JoinTokens.php} (97%) rename generated/Model/{NodeDescriptionResources.php => Limit.php} (64%) create mode 100644 generated/Model/ManagerStatus.php rename generated/Model/{ServiceSpecNetworksItem.php => NetworkAttachmentConfig.php} (50%) delete mode 100644 generated/Model/NetworkConfig.php rename generated/Model/{NetworksCreatePostResponse201.php => NetworkCreateResponse.php} (86%) create mode 100644 generated/Model/NetworkSettings.php create mode 100644 generated/Model/NetworkingConfig.php create mode 100644 generated/Model/NodeStatus.php create mode 100644 generated/Model/OCIDescriptor.php create mode 100644 generated/Model/OCIPlatform.php rename generated/Model/{SecretVersion.php => ObjectVersion.php} (97%) create mode 100644 generated/Model/PeerInfo.php create mode 100644 generated/Model/PeerNode.php rename generated/Model/{NodeDescriptionPlatform.php => Platform.php} (59%) rename generated/Model/{PluginsPullPostBodyItem.php => PluginPrivilege.php} (98%) create mode 100644 generated/Model/PluginsInfo.php rename generated/Model/{HostConfigPortBindingsItem.php => PortBinding.php} (74%) rename generated/Model/{ServiceVersion.php => PortStatus.php} (51%) create mode 100644 generated/Model/RegistryServiceConfig.php rename generated/Model/{TaskSpecResourcesLimits.php => ResourceObject.php} (53%) create mode 100644 generated/Model/Runtime.php create mode 100644 generated/Model/ServiceCreateResponse.php create mode 100644 generated/Model/ServiceJobStatus.php create mode 100644 generated/Model/ServiceServiceStatus.php create mode 100644 generated/Model/ServiceSpecModeReplicatedJob.php create mode 100644 generated/Model/ServiceSpecRollbackConfig.php create mode 100644 generated/Model/Swarm.php delete mode 100644 generated/Model/SwarmGetResponse200.php create mode 100644 generated/Model/SwarmInfo.php create mode 100644 generated/Model/SystemInfo.php create mode 100644 generated/Model/SystemInfoDefaultAddressPoolsItem.php rename generated/Model/{VersionGetResponse200.php => SystemVersion.php} (54%) create mode 100644 generated/Model/SystemVersionComponentsItem.php rename generated/Model/{ContainerSummaryItemHostConfig.php => SystemVersionPlatform.php} (56%) create mode 100644 generated/Model/TLSInfo.php create mode 100644 generated/Model/TaskSpecContainerSpecConfigsItem.php create mode 100644 generated/Model/TaskSpecContainerSpecConfigsItemFile.php create mode 100644 generated/Model/TaskSpecContainerSpecPrivileges.php rename generated/Model/{NodeVersion.php => TaskSpecContainerSpecPrivilegesAppArmor.php} (54%) create mode 100644 generated/Model/TaskSpecContainerSpecPrivilegesCredentialSpec.php create mode 100644 generated/Model/TaskSpecContainerSpecPrivilegesSELinuxContext.php create mode 100644 generated/Model/TaskSpecContainerSpecPrivilegesSeccomp.php create mode 100644 generated/Model/TaskSpecContainerSpecSecretsItem.php create mode 100644 generated/Model/TaskSpecContainerSpecSecretsItemFile.php rename generated/Model/{PluginsPrivilegesGetResponse200Item.php => TaskSpecContainerSpecUlimitsItem.php} (54%) create mode 100644 generated/Model/TaskSpecNetworkAttachmentSpec.php delete mode 100644 generated/Model/TaskSpecNetworksItem.php create mode 100644 generated/Model/TaskSpecPlacementPreferencesItem.php create mode 100644 generated/Model/TaskSpecPlacementPreferencesItemSpread.php create mode 100644 generated/Model/TaskSpecPluginSpec.php delete mode 100644 generated/Model/TaskSpecResourcesReservations.php delete mode 100644 generated/Model/TaskVersion.php rename generated/Model/{VolumesCreatePostBody.php => VolumeCreateOptions.php} (65%) rename generated/Model/{VolumesGetResponse200.php => VolumeListResponse.php} (85%) create mode 100644 generated/Model/VolumesNamePutBody.php create mode 100644 generated/Normalizer/AddressNormalizer.php create mode 100644 generated/Normalizer/BuildCacheNormalizer.php create mode 100644 generated/Normalizer/BuildPrunePostResponse200Normalizer.php create mode 100644 generated/Normalizer/ClusterVolumeInfoNormalizer.php rename generated/Normalizer/{SwarmGetResponse200Normalizer.php => ClusterVolumeNormalizer.php} (67%) create mode 100644 generated/Normalizer/ClusterVolumePublishStatusItemNormalizer.php create mode 100644 generated/Normalizer/ClusterVolumeSpecAccessModeAccessibilityRequirementsNormalizer.php create mode 100644 generated/Normalizer/ClusterVolumeSpecAccessModeCapacityRangeNormalizer.php create mode 100644 generated/Normalizer/ClusterVolumeSpecAccessModeNormalizer.php create mode 100644 generated/Normalizer/ClusterVolumeSpecAccessModeSecretsItemNormalizer.php create mode 100644 generated/Normalizer/ClusterVolumeSpecNormalizer.php rename generated/Normalizer/{ServicesCreatePostResponse201Normalizer.php => CommitNormalizer.php} (71%) rename generated/Normalizer/{ServiceVersionNormalizer.php => ConfigReferenceNormalizer.php} (69%) create mode 100644 generated/Normalizer/ConfigSpecNormalizer.php create mode 100644 generated/Normalizer/ConfigsCreatePostBodyNormalizer.php create mode 100644 generated/Normalizer/ContainerConfigNormalizer.php rename generated/Normalizer/{ContainersCreatePostResponse201Normalizer.php => ContainerCreateResponseNormalizer.php} (85%) rename generated/Normalizer/{ContainersIdJsonGetResponse200StateNormalizer.php => ContainerStateNormalizer.php} (87%) rename generated/Normalizer/{TaskStatusContainerStatusNormalizer.php => ContainerStatusNormalizer.php} (87%) create mode 100644 generated/Normalizer/ContainerSummaryHostConfigNormalizer.php rename generated/Normalizer/{ContainerSummaryItemNetworkSettingsNormalizer.php => ContainerSummaryNetworkSettingsNormalizer.php} (84%) rename generated/Normalizer/{ContainerSummaryItemNormalizer.php => ContainerSummaryNormalizer.php} (94%) create mode 100644 generated/Normalizer/ContainerWaitExitErrorNormalizer.php rename generated/Normalizer/{ContainersIdWaitPostResponse200Normalizer.php => ContainerWaitResponseNormalizer.php} (68%) create mode 100644 generated/Normalizer/ContainerdInfoNamespacesNormalizer.php create mode 100644 generated/Normalizer/ContainerdInfoNormalizer.php create mode 100644 generated/Normalizer/DeviceRequestNormalizer.php create mode 100644 generated/Normalizer/DistributionInspectNormalizer.php rename generated/Normalizer/{GraphDriverNormalizer.php => DriverDataNormalizer.php} (76%) create mode 100644 generated/Normalizer/DriverNormalizer.php rename generated/Normalizer/{EndpointSettingsIPAMConfigNormalizer.php => EndpointIPAMConfigNormalizer.php} (88%) rename generated/Normalizer/{NodeDescriptionEngineNormalizer.php => EngineDescriptionNormalizer.php} (88%) rename generated/Normalizer/{NodeDescriptionEnginePluginsItemNormalizer.php => EngineDescriptionPluginsItemNormalizer.php} (84%) rename generated/Normalizer/{EventsGetResponse200ActorNormalizer.php => EventActorNormalizer.php} (87%) rename generated/Normalizer/{EventsGetResponse200Normalizer.php => EventMessageNormalizer.php} (82%) rename generated/Normalizer/{ConfigVolumesNormalizer.php => FilesystemChangeNormalizer.php} (64%) create mode 100644 generated/Normalizer/GenericResourcesItemDiscreteResourceSpecNormalizer.php rename generated/Normalizer/{ContainersIdChangesGetResponse200ItemNormalizer.php => GenericResourcesItemNamedResourceSpecNormalizer.php} (74%) rename generated/Normalizer/{TaskSpecNetworksItemNormalizer.php => GenericResourcesItemNormalizer.php} (53%) rename generated/Normalizer/{ConfigHealthcheckNormalizer.php => HealthConfigNormalizer.php} (73%) create mode 100644 generated/Normalizer/HealthNormalizer.php create mode 100644 generated/Normalizer/HealthcheckResultNormalizer.php create mode 100644 generated/Normalizer/IPAMConfigNormalizer.php create mode 100644 generated/Normalizer/ImageConfigNormalizer.php rename generated/Normalizer/{ImageDeleteResponseNormalizer.php => ImageDeleteResponseItemNormalizer.php} (88%) rename generated/Normalizer/{SecretsCreatePostResponse201Normalizer.php => ImageIDNormalizer.php} (82%) create mode 100644 generated/Normalizer/ImageInspectMetadataNormalizer.php rename generated/Normalizer/{ImageNormalizer.php => ImageInspectNormalizer.php} (82%) rename generated/Normalizer/{ImageRootFSNormalizer.php => ImageInspectRootFSNormalizer.php} (84%) rename generated/Normalizer/{TaskVersionNormalizer.php => ImageManifestSummaryAttestationDataNormalizer.php} (69%) create mode 100644 generated/Normalizer/ImageManifestSummaryImageDataNormalizer.php create mode 100644 generated/Normalizer/ImageManifestSummaryImageDataSizeNormalizer.php create mode 100644 generated/Normalizer/ImageManifestSummaryNormalizer.php create mode 100644 generated/Normalizer/ImageManifestSummarySizeNormalizer.php rename generated/Normalizer/{InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer.php => IndexInfoNormalizer.php} (87%) delete mode 100644 generated/Normalizer/InfoGetResponse200RegistryConfigNormalizer.php rename generated/Normalizer/{SwarmGetResponse200JoinTokensNormalizer.php => JoinTokensNormalizer.php} (85%) rename generated/Normalizer/{NodeDescriptionResourcesNormalizer.php => LimitNormalizer.php} (78%) create mode 100644 generated/Normalizer/ManagerStatusNormalizer.php rename generated/Normalizer/{ServiceSpecNetworksItemNormalizer.php => NetworkAttachmentConfigNormalizer.php} (72%) delete mode 100644 generated/Normalizer/NetworkConfigNormalizer.php rename generated/Normalizer/{NetworksCreatePostResponse201Normalizer.php => NetworkCreateResponseNormalizer.php} (75%) create mode 100644 generated/Normalizer/NetworkSettingsNormalizer.php rename generated/Normalizer/{ContainersCreatePostBodyNetworkingConfigNormalizer.php => NetworkingConfigNormalizer.php} (84%) create mode 100644 generated/Normalizer/NodeStatusNormalizer.php create mode 100644 generated/Normalizer/OCIDescriptorNormalizer.php create mode 100644 generated/Normalizer/OCIPlatformNormalizer.php rename generated/Normalizer/{SecretVersionNormalizer.php => ObjectVersionNormalizer.php} (88%) create mode 100644 generated/Normalizer/PeerInfoNormalizer.php create mode 100644 generated/Normalizer/PeerNodeNormalizer.php rename generated/Normalizer/{NodeDescriptionPlatformNormalizer.php => PlatformNormalizer.php} (86%) rename generated/Normalizer/{PluginsPullPostBodyItemNormalizer.php => PluginPrivilegeNormalizer.php} (88%) rename generated/Normalizer/{InfoGetResponse200PluginsNormalizer.php => PluginsInfoNormalizer.php} (63%) rename generated/Normalizer/{HostConfigPortBindingsItemNormalizer.php => PortBindingNormalizer.php} (85%) create mode 100644 generated/Normalizer/PortStatusNormalizer.php create mode 100644 generated/Normalizer/RegistryServiceConfigNormalizer.php rename generated/Normalizer/{TaskSpecResourcesLimitsNormalizer.php => ResourceObjectNormalizer.php} (66%) create mode 100644 generated/Normalizer/RuntimeNormalizer.php create mode 100644 generated/Normalizer/ServiceCreateResponseNormalizer.php create mode 100644 generated/Normalizer/ServiceJobStatusNormalizer.php create mode 100644 generated/Normalizer/ServiceServiceStatusNormalizer.php create mode 100644 generated/Normalizer/ServiceSpecModeReplicatedJobNormalizer.php create mode 100644 generated/Normalizer/ServiceSpecRollbackConfigNormalizer.php create mode 100644 generated/Normalizer/SwarmInfoNormalizer.php create mode 100644 generated/Normalizer/SwarmNormalizer.php create mode 100644 generated/Normalizer/SystemInfoDefaultAddressPoolsItemNormalizer.php rename generated/Normalizer/{InfoGetResponse200Normalizer.php => SystemInfoNormalizer.php} (55%) create mode 100644 generated/Normalizer/SystemVersionComponentsItemNormalizer.php rename generated/Normalizer/{VersionGetResponse200Normalizer.php => SystemVersionNormalizer.php} (77%) rename generated/Normalizer/{NodeVersionNormalizer.php => SystemVersionPlatformNormalizer.php} (69%) create mode 100644 generated/Normalizer/TLSInfoNormalizer.php create mode 100644 generated/Normalizer/TaskSpecContainerSpecConfigsItemFileNormalizer.php create mode 100644 generated/Normalizer/TaskSpecContainerSpecConfigsItemNormalizer.php create mode 100644 generated/Normalizer/TaskSpecContainerSpecPrivilegesAppArmorNormalizer.php create mode 100644 generated/Normalizer/TaskSpecContainerSpecPrivilegesCredentialSpecNormalizer.php create mode 100644 generated/Normalizer/TaskSpecContainerSpecPrivilegesNormalizer.php create mode 100644 generated/Normalizer/TaskSpecContainerSpecPrivilegesSELinuxContextNormalizer.php create mode 100644 generated/Normalizer/TaskSpecContainerSpecPrivilegesSeccompNormalizer.php create mode 100644 generated/Normalizer/TaskSpecContainerSpecSecretsItemFileNormalizer.php create mode 100644 generated/Normalizer/TaskSpecContainerSpecSecretsItemNormalizer.php rename generated/Normalizer/{PluginsPrivilegesGetResponse200ItemNormalizer.php => TaskSpecContainerSpecUlimitsItemNormalizer.php} (58%) create mode 100644 generated/Normalizer/TaskSpecNetworkAttachmentSpecNormalizer.php create mode 100644 generated/Normalizer/TaskSpecPlacementPreferencesItemNormalizer.php rename generated/Normalizer/{ContainerSummaryItemHostConfigNormalizer.php => TaskSpecPlacementPreferencesItemSpreadNormalizer.php} (64%) create mode 100644 generated/Normalizer/TaskSpecPluginSpecNormalizer.php delete mode 100644 generated/Normalizer/TaskSpecResourcesReservationsNormalizer.php rename generated/Normalizer/{VolumesCreatePostBodyNormalizer.php => VolumeCreateOptionsNormalizer.php} (79%) rename generated/Normalizer/{VolumesGetResponse200Normalizer.php => VolumeListResponseNormalizer.php} (73%) rename generated/Normalizer/{ClusterInfoVersionNormalizer.php => VolumesNamePutBodyNormalizer.php} (69%) delete mode 100644 v1.25.yaml create mode 100644 v1.47.yaml diff --git a/.jane-openapi b/.jane-openapi index 1807bf269..07adee3c0 100644 --- a/.jane-openapi +++ b/.jane-openapi @@ -4,5 +4,5 @@ return [ 'directory' => 'generated/', 'namespace' => 'Docker\\API', 'strict' => false, - 'openapi-file' => __DIR__ . '/v1.25.yaml', + 'openapi-file' => __DIR__ . '/v1.47.yaml', ]; diff --git a/README.md b/README.md index 3b9e01ba3..e697f655d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Docker PHP **Docker PHP** (for lack of a better name) is a [Docker](http://docker.com/) client written in PHP. This library aim to reach 100% API support of the Docker Engine. -The test suite currently passes against the [Docker Remote API v1.25](https://docs.docker.com/reference/api/engine/version/v1.25/). +The test suite currently passes against the [Docker Remote API v1.47](https://docs.docker.com/reference/api/engine/version/v1.47/). [![Documentation Status](https://readthedocs.org/projects/docker-php/badge/?version=latest)](http://docker-php.readthedocs.org/en/latest/) [![Latest Version](https://img.shields.io/github/release/plesk/docker-php.svg?style=flat-square)](https://github.com/plesk/docker-php/releases) diff --git a/generated/Client.php b/generated/Client.php index 3fa464f84..8f290afc1 100644 --- a/generated/Client.php +++ b/generated/Client.php @@ -5,56 +5,89 @@ class Client extends \Docker\API\Runtime\Client\Client { /** - * + * Returns a list of containers. For details on the format, see the + [inspect endpoint](#operation/ContainerInspect). + + Note that it uses a different, smaller representation of a container + than inspecting a single container. For example, the list of linked + containers is not propagated . + * * @param array $queryParameters { - * @var bool $all Return all containers. By default, only running containers are shown - * @var int $limit Return this number of most recently created containers, including non-running ones. + * @var bool $all Return all containers. By default, only running containers are shown. + + * @var int $limit Return this number of most recently created containers, including + non-running ones. + * @var bool $size Return the size of container as fields `SizeRw` and `SizeRootFs`. - * @var string $filters Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{"status": ["paused"]}` will only return paused containers. + + * @var string $filters Filters to process on the container list, encoded as JSON (a + `map[string][]string`). For example, `{"status": ["paused"]}` will + only return paused containers. Available filters: + + - `ancestor`=(`[:]`, ``, or ``) + - `before`=(`` or ``) + - `expose`=(`[/]`|`/[]`) - `exited=` containers with exit code of `` - - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) - - `label=key` or `label="key=value"` of a container label - - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) + - `health`=(`starting`|`healthy`|`unhealthy`|`none`) - `id=` a container's ID - - `name=` a container's name + - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) - `is-task=`(`true`|`false`) - - `ancestor`=(`[:]`, ``, or ``) - - `before`=(`` or ``) + - `label=key` or `label="key=value"` of a container label + - `name=` a container's name + - `network`=(`` or ``) + - `publish`=(`[/]`|`/[]`) - `since`=(`` or ``) + - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) - `volume`=(`` or ``) - - `network`=(`` or ``) - - `health`=(`starting`|`healthy`|`unhealthy`|`none`) * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\ContainerListBadRequestException * @throws \Docker\API\Exception\ContainerListInternalServerErrorException * - * @return null|\Docker\API\Model\ContainerSummaryItem[]|\Psr\Http\Message\ResponseInterface + * @return null|\Docker\API\Model\ContainerSummary[]|\Psr\Http\Message\ResponseInterface */ public function containerList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerList($queryParameters), $fetch); } /** - * - * - * @param \Docker\API\Model\ContainersCreatePostBody $body Container to create - * @param array $queryParameters { - * @var string $name Assign the specified name to the container. Must match `/?[a-zA-Z0-9_-]+`. - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ContainerCreateBadRequestException - * @throws \Docker\API\Exception\ContainerCreateNotFoundException - * @throws \Docker\API\Exception\ContainerCreateNotAcceptableException - * @throws \Docker\API\Exception\ContainerCreateConflictException - * @throws \Docker\API\Exception\ContainerCreateInternalServerErrorException - * - * @return null|\Docker\API\Model\ContainersCreatePostResponse201|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param \Docker\API\Model\ContainersCreatePostBody $body Container to create + * @param array $queryParameters { + * @var string $name Assign the specified name to the container. Must match + `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. + + * @var string $platform Platform in the format `os[/arch[/variant]]` used for image lookup. + + When specified, the daemon checks if the requested image is present + in the local image cache with the given OS and Architecture, and + otherwise returns a `404` status. + + If the option is not set, the host's native OS and Architecture are + used to look up the image in the image cache. However, if no platform + is passed and the given image does exist in the local image cache, + but its OS or architecture does not match, the container is created + with the available image, and a warning is added to the `Warnings` + field in the response, for example; + + WARNING: The requested image's platform (linux/arm64/v8) does not + match the detected host platform (linux/amd64) and no + specific platform was requested + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerCreateBadRequestException + * @throws \Docker\API\Exception\ContainerCreateNotFoundException + * @throws \Docker\API\Exception\ContainerCreateConflictException + * @throws \Docker\API\Exception\ContainerCreateInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainerCreateResponse|\Psr\Http\Message\ResponseInterface + */ public function containerCreate(\Docker\API\Model\ContainersCreatePostBody $body, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerCreate($body, $queryParameters), $fetch); @@ -77,18 +110,20 @@ public function containerInspect(string $id, array $queryParameters = [], string return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerInspect($id, $queryParameters), $fetch); } /** - * On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. - * - * @param string $id ID or name of the container - * @param array $queryParameters { - * @var string $ps_args The arguments to pass to `ps`. For example, `aux` - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ContainerTopNotFoundException - * @throws \Docker\API\Exception\ContainerTopInternalServerErrorException - * - * @return null|\Docker\API\Model\ContainersIdTopGetResponse200|\Psr\Http\Message\ResponseInterface - */ + * On Unix systems, this is done by running the `ps` command. This endpoint + is not supported on Windows. + + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $ps_args The arguments to pass to `ps`. For example, `aux` + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerTopNotFoundException + * @throws \Docker\API\Exception\ContainerTopInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersIdTopGetResponse200|\Psr\Http\Message\ResponseInterface + */ public function containerTop(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerTop($id, $queryParameters), $fetch); @@ -96,20 +131,21 @@ public function containerTop(string $id, array $queryParameters = [], string $fe /** * Get `stdout` and `stderr` logs from a container. - Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. + Note: This endpoint works only for containers with the `json-file` or + `journald` logging driver. * * @param string $id ID or name of the container * @param array $queryParameters { - * @var bool $follow Return the logs as a stream. - - This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). - + * @var bool $follow Keep connection after returning logs. * @var bool $stdout Return logs from `stdout` * @var bool $stderr Return logs from `stderr` * @var int $since Only return logs since this time, as a UNIX timestamp + * @var int $until Only return logs before this time, as a UNIX timestamp * @var bool $timestamps Add timestamps to every log line - * @var string $tail Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. + * @var string $tail Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\ContainerLogsNotFoundException @@ -122,11 +158,12 @@ public function containerLogs(string $id, array $queryParameters = [], string $f return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerLogs($id, $queryParameters), $fetch); } /** - * Returns which files in a container's filesystem have been added, deleted, or modified. The `Kind` of modification can be one of: + * Returns which files in a container's filesystem have been added, deleted, + or modified. The `Kind` of modification can be one of: - - `0`: Modified - - `1`: Added - - `2`: Deleted + - `0`: Modified ("C") + - `1`: Added ("A") + - `2`: Deleted ("D") * * @param string $id ID or name of the container @@ -134,7 +171,7 @@ public function containerLogs(string $id, array $queryParameters = [], string $f * @throws \Docker\API\Exception\ContainerChangesNotFoundException * @throws \Docker\API\Exception\ContainerChangesInternalServerErrorException * - * @return null|\Docker\API\Model\ContainersIdChangesGetResponse200Item[]|\Psr\Http\Message\ResponseInterface + * @return null|\Docker\API\Model\FilesystemChange[]|\Psr\Http\Message\ResponseInterface */ public function containerChanges(string $id, string $fetch = self::FETCH_OBJECT) { @@ -155,14 +192,42 @@ public function containerExport(string $id, string $fetch = self::FETCH_OBJECT) return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerExport($id), $fetch); } /** - * This endpoint returns a live stream of a container’s resource usage statistics. + * This endpoint returns a live stream of a container’s resource usage + statistics. - The `precpu_stats` is the CPU statistic of last read, which is used for calculating the CPU usage percentage. It is not the same as the `cpu_stats` field. + The `precpu_stats` is the CPU statistic of the *previous* read, and is + used to calculate the CPU usage percentage. It is not an exact copy + of the `cpu_stats` field. + + If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is + nil then for compatibility with older daemons the length of the + corresponding `cpu_usage.percpu_usage` array should be used. + + On a cgroup v2 host, the following fields are not set + * `blkio_stats`: all fields other than `io_service_bytes_recursive` + * `cpu_stats`: `cpu_usage.percpu_usage` + * `memory_stats`: `max_usage` and `failcnt` + Also, `memory_stats.stats` fields are incompatible with cgroup v1. + + To calculate the values shown by the `stats` command of the docker cli tool + the following formulas can be used: + * used_memory = `memory_stats.usage - memory_stats.stats.cache` + * available_memory = `memory_stats.limit` + * Memory usage % = `(used_memory / available_memory) * 100.0` + * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` + * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` + * number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` + * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` * * @param string $id ID or name of the container * @param array $queryParameters { - * @var bool $stream Stream the output. If false, the stats will be output once and then it will disconnect. + * @var bool $stream Stream the output. If false, the stats will be output once and then + it will disconnect. + + * @var bool $one-shot Only get a single stat instead of waiting for 2 cycles. Must be used + with `stream=false`. + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\ContainerStatsNotFoundException @@ -175,12 +240,12 @@ public function containerStats(string $id, array $queryParameters = [], string $ return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerStats($id, $queryParameters), $fetch); } /** - * Resize the TTY for a container. You must restart the container for the resize to take effect. + * Resize the TTY for a container. * * @param string $id ID or name of the container * @param array $queryParameters { - * @var int $h Height of the tty session in characters - * @var int $w Width of the tty session in characters + * @var int $h Height of the TTY session in characters + * @var int $w Width of the TTY session in characters * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\ContainerResizeNotFoundException @@ -193,18 +258,21 @@ public function containerResize(string $id, array $queryParameters = [], string return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerResize($id, $queryParameters), $fetch); } /** - * - * - * @param string $id ID or name of the container - * @param array $queryParameters { - * @var string $detachKeys Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ContainerStartNotFoundException - * @throws \Docker\API\Exception\ContainerStartInternalServerErrorException - * - * @return null|\Docker\API\Model\ErrorResponse|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $detachKeys Override the key sequence for detaching a container. Format is a + single character `[a-Z]` or `ctrl-` where `` is one + of: `a-z`, `@`, `^`, `[`, `,` or `_`. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerStartNotFoundException + * @throws \Docker\API\Exception\ContainerStartInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ public function containerStart(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerStart($id, $queryParameters), $fetch); @@ -214,13 +282,14 @@ public function containerStart(string $id, array $queryParameters = [], string $ * * @param string $id ID or name of the container * @param array $queryParameters { + * @var string $signal Signal to send to the container as an integer or string (e.g. `SIGINT`). * @var int $t Number of seconds to wait before killing the container * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\ContainerStopNotFoundException * @throws \Docker\API\Exception\ContainerStopInternalServerErrorException * - * @return null|\Docker\API\Model\ErrorResponse|\Psr\Http\Message\ResponseInterface + * @return null|\Psr\Http\Message\ResponseInterface */ public function containerStop(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { @@ -231,6 +300,7 @@ public function containerStop(string $id, array $queryParameters = [], string $f * * @param string $id ID or name of the container * @param array $queryParameters { + * @var string $signal Signal to send to the container as an integer or string (e.g. `SIGINT`). * @var int $t Number of seconds to wait before killing the container * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -244,33 +314,39 @@ public function containerRestart(string $id, array $queryParameters = [], string return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerRestart($id, $queryParameters), $fetch); } /** - * Send a POSIX signal to a container, defaulting to killing to the container. - * - * @param string $id ID or name of the container - * @param array $queryParameters { - * @var string $signal Signal to send to the container as an integer or string (e.g. `SIGINT`) - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ContainerKillNotFoundException - * @throws \Docker\API\Exception\ContainerKillInternalServerErrorException - * - * @return null|\Psr\Http\Message\ResponseInterface - */ + * Send a POSIX signal to a container, defaulting to killing to the + container. + + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $signal Signal to send to the container as an integer or string (e.g. `SIGINT`). + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerKillNotFoundException + * @throws \Docker\API\Exception\ContainerKillConflictException + * @throws \Docker\API\Exception\ContainerKillInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ public function containerKill(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerKill($id, $queryParameters), $fetch); } /** - * Change various configuration options of a container without having to recreate it. - * - * @param string $id ID or name of the container - * @param \Docker\API\Model\ContainersIdUpdatePostBody $update - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ContainerUpdateNotFoundException - * @throws \Docker\API\Exception\ContainerUpdateInternalServerErrorException - * - * @return null|\Docker\API\Model\ContainersIdUpdatePostResponse200|\Psr\Http\Message\ResponseInterface - */ + * Change various configuration options of a container without having to + recreate it. + + * + * @param string $id ID or name of the container + * @param \Docker\API\Model\ContainersIdUpdatePostBody $update + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerUpdateNotFoundException + * @throws \Docker\API\Exception\ContainerUpdateInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainersIdUpdatePostResponse200|\Psr\Http\Message\ResponseInterface + */ public function containerUpdate(string $id, \Docker\API\Model\ContainersIdUpdatePostBody $update, string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerUpdate($id, $update), $fetch); @@ -294,9 +370,12 @@ public function containerRename(string $id, array $queryParameters = [], string return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerRename($id, $queryParameters), $fetch); } /** - * Use the cgroups freezer to suspend all processes in a container. + * Use the freezer cgroup to suspend all processes in a container. - Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. + Traditionally, when suspending a process the `SIGSTOP` signal is used, + which is observable by the process being suspended. With the freezer + cgroup the process is unaware, and unable to capture, that it is being + suspended, and subsequently resumed. * * @param string $id ID or name of the container @@ -325,15 +404,20 @@ public function containerUnpause(string $id, string $fetch = self::FETCH_OBJECT) return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerUnpause($id), $fetch); } /** - * Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached. + * Attach to a container to read its output or send it input. You can attach + to the same container multiple times and you can reattach to containers + that have been detached. - Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything. + Either the `stream` or `logs` parameter must be `true` for this endpoint + to do anything. - See [the documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details. + See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) + for more details. ### Hijacking - This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket. + This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, + and `stderr` on the same socket. This is the response from the daemon for an attach request: @@ -344,9 +428,11 @@ public function containerUnpause(string $id, string $fetch = self::FETCH_OBJECT) [STREAM] ``` - After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server. + After the headers and two new lines, the TCP connection can now be used + for raw, bidirectional communication between the client and server. - To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers. + To hint potential proxies about connection hijacking, the Docker client + can also optionally send connection upgrade headers. For example, the client sends this request to upgrade the connection: @@ -356,7 +442,8 @@ public function containerUnpause(string $id, string $fetch = self::FETCH_OBJECT) Connection: Upgrade ``` - The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream: + The Docker daemon will respond with a `101 UPGRADED` response, and will + similarly follow with the raw stream: ``` HTTP/1.1 101 UPGRADED @@ -369,9 +456,15 @@ public function containerUnpause(string $id, string $fetch = self::FETCH_OBJECT) ### Stream format - When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload. + When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), + the HTTP Content-Type header is set to application/vnd.docker.multiplexed-stream + and the stream over the hijacked connected is multiplexed to separate out + `stdout` and `stderr`. The stream consists of a series of frames, each + containing a header and a payload. - The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`). + The header contains the information which the stream writes (`stdout` or + `stderr`). It also contains the size of the associated frame encoded in + the last four bytes (`uint32`). It is encoded on the first eight bytes like this: @@ -385,9 +478,11 @@ public function containerUnpause(string $id, string $fetch = self::FETCH_OBJECT) - 1: `stdout` - 2: `stderr` - `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian. + `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size + encoded as big endian. - Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`. + Following the header is the payload, which is the specified number of + bytes of `STREAM_TYPE`. The simplest way to implement this protocol is the following: @@ -399,19 +494,29 @@ public function containerUnpause(string $id, string $fetch = self::FETCH_OBJECT) ### Stream format when using a TTY - When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`. + When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), + the stream is not multiplexed. The data exchanged over the hijacked + connection is simply the raw data from the process PTY and client's + `stdin`. * * @param string $id ID or name of the container * @param array $queryParameters { - * @var string $detachKeys Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + * @var string $detachKeys Override the key sequence for detaching a container.Format is a single + character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, + `@`, `^`, `[`, `,` or `_`. + * @var bool $logs Replay previous logs from the container. - This is useful for attaching to a container that has started and you want to output everything since the container started. + This is useful for attaching to a container that has started and you + want to output everything since the container started. - If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output. + If `stream` is also enabled, once all the previous output has been + returned, it will seamlessly transition into streaming current + output. + + * @var bool $stream Stream attached streams from the time the request was made onwards. - * @var bool $stream Stream attached streams from the time the request was made onwards * @var bool $stdin Attach to `stdin` * @var bool $stdout Attach to `stdout` * @var bool $stderr Attach to `stderr` @@ -428,38 +533,51 @@ public function containerAttach(string $id, array $queryParameters = [], string return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerAttach($id, $queryParameters), $fetch); } /** - * - * - * @param string $id ID or name of the container - * @param array $queryParameters { - * @var string $detachKeys Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`. - * @var bool $logs Return logs - * @var bool $stream Return stream - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ContainerAttachWebsocketBadRequestException - * @throws \Docker\API\Exception\ContainerAttachWebsocketNotFoundException - * @throws \Docker\API\Exception\ContainerAttachWebsocketInternalServerErrorException - * - * @return null|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $detachKeys Override the key sequence for detaching a container.Format is a single + character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, + `@`, `^`, `[`, `,`, or `_`. + + * @var bool $logs Return logs + * @var bool $stream Return stream + * @var bool $stdin Attach to `stdin` + * @var bool $stdout Attach to `stdout` + * @var bool $stderr Attach to `stderr` + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerAttachWebsocketBadRequestException + * @throws \Docker\API\Exception\ContainerAttachWebsocketNotFoundException + * @throws \Docker\API\Exception\ContainerAttachWebsocketInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ public function containerAttachWebsocket(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerAttachWebsocket($id, $queryParameters), $fetch); } /** - * Block until a container stops, then returns the exit code. - * - * @param string $id ID or name of the container - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ContainerWaitNotFoundException - * @throws \Docker\API\Exception\ContainerWaitInternalServerErrorException - * - * @return null|\Docker\API\Model\ContainersIdWaitPostResponse200|\Psr\Http\Message\ResponseInterface - */ - public function containerWait(string $id, string $fetch = self::FETCH_OBJECT) + * Block until a container stops, then returns the exit code. + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $condition Wait until a container state reaches the given condition. + + Defaults to `not-running` if omitted or empty. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerWaitBadRequestException + * @throws \Docker\API\Exception\ContainerWaitNotFoundException + * @throws \Docker\API\Exception\ContainerWaitInternalServerErrorException + * + * @return null|\Docker\API\Model\ContainerWaitResponse|\Psr\Http\Message\ResponseInterface + */ + public function containerWait(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerWait($id), $fetch); + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerWait($id, $queryParameters), $fetch); } /** * @@ -468,10 +586,12 @@ public function containerWait(string $id, string $fetch = self::FETCH_OBJECT) * @param array $queryParameters { * @var bool $v Remove anonymous volumes associated with the container. * @var bool $force If the container is running, kill it before removing it. + * @var bool $link Remove the specified link associated with the container. * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\ContainerDeleteBadRequestException * @throws \Docker\API\Exception\ContainerDeleteNotFoundException + * @throws \Docker\API\Exception\ContainerDeleteConflictException * @throws \Docker\API\Exception\ContainerDeleteInternalServerErrorException * * @return null|\Psr\Http\Message\ResponseInterface @@ -481,40 +601,43 @@ public function containerDelete(string $id, array $queryParameters = [], string return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerDelete($id, $queryParameters), $fetch); } /** - * Get an tar archive of a resource in the filesystem of container id. + * Get a tar archive of a resource in the filesystem of container id. * * @param string $id ID or name of the container * @param array $queryParameters { * @var string $path Resource in the container’s filesystem to archive. * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ContainerGetArchiveBadRequestException - * @throws \Docker\API\Exception\ContainerGetArchiveNotFoundException - * @throws \Docker\API\Exception\ContainerGetArchiveInternalServerErrorException + * @throws \Docker\API\Exception\ContainerArchiveBadRequestException + * @throws \Docker\API\Exception\ContainerArchiveNotFoundException + * @throws \Docker\API\Exception\ContainerArchiveInternalServerErrorException * * @return null|\Psr\Http\Message\ResponseInterface */ - public function containerGetArchive(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + public function containerArchive(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerGetArchive($id, $queryParameters), $fetch); + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerArchive($id, $queryParameters), $fetch); } /** - * A response header `X-Docker-Container-Path-Stat` is return containing a base64 - encoded JSON object with some filesystem header information about the path. - * - * @param string $id ID or name of the container - * @param array $queryParameters { - * @var string $path Resource in the container’s filesystem to archive. - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ContainerArchiveHeadBadRequestException - * @throws \Docker\API\Exception\ContainerArchiveHeadNotFoundException - * @throws \Docker\API\Exception\ContainerArchiveHeadInternalServerErrorException - * - * @return null|\Psr\Http\Message\ResponseInterface - */ - public function containerArchiveHead(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + * A response header `X-Docker-Container-Path-Stat` is returned, containing + a base64 - encoded JSON object with some filesystem header information + about the path. + + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $path Resource in the container’s filesystem to archive. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ContainerArchiveInfoBadRequestException + * @throws \Docker\API\Exception\ContainerArchiveInfoNotFoundException + * @throws \Docker\API\Exception\ContainerArchiveInfoInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function containerArchiveInfo(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerArchiveHead($id, $queryParameters), $fetch); + return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerArchiveInfo($id, $queryParameters), $fetch); } /** * Upload a tar archive to be extracted to a path in the filesystem of container id. @@ -523,22 +646,31 @@ public function containerArchiveHead(string $id, array $queryParameters = [], st * * @param string $id ID or name of the container - * @param string $inputStream The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz. + * @param string|resource|\Psr\Http\Message\StreamInterface $inputStream The input stream must be a tar archive compressed with one of the + following algorithms: `identity` (no compression), `gzip`, `bzip2`, + or `xz`. + * @param array $queryParameters { * @var string $path Path to a directory in the container to extract the archive’s contents into. - * @var string $noOverwriteDirNonDir If “1”, “true”, or “True” then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa. + * @var string $noOverwriteDirNonDir If `1`, `true`, or `True` then it will be an error if unpacking the + given content would cause an existing directory to be replaced with + a non-directory and vice versa. + + * @var string $copyUIDGID If `1`, `true`, then it will copy UID/GID maps to the dest file or + dir + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ContainerPutArchiveBadRequestException - * @throws \Docker\API\Exception\ContainerPutArchiveForbiddenException - * @throws \Docker\API\Exception\ContainerPutArchiveNotFoundException - * @throws \Docker\API\Exception\ContainerPutArchiveInternalServerErrorException + * @throws \Docker\API\Exception\PutContainerArchiveBadRequestException + * @throws \Docker\API\Exception\PutContainerArchiveForbiddenException + * @throws \Docker\API\Exception\PutContainerArchiveNotFoundException + * @throws \Docker\API\Exception\PutContainerArchiveInternalServerErrorException * * @return null|\Psr\Http\Message\ResponseInterface */ - public function containerPutArchive(string $id, string $inputStream, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + public function putContainerArchive(string $id, $inputStream, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerPutArchive($id, $inputStream, $queryParameters), $fetch); + return $this->executeEndpoint(new \Docker\API\Endpoint\PutContainerArchive($id, $inputStream, $queryParameters), $fetch); } /** * @@ -547,6 +679,8 @@ public function containerPutArchive(string $id, string $inputStream, array $quer * @var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: + - `until=` Prune containers created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune containers with (or without, in case `label!=...` is used) the specified labels. * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -563,16 +697,21 @@ public function containerPrune(array $queryParameters = [], string $fetch = self * * @param array $queryParameters { * @var bool $all Show all images. Only images from a final layer (no children) are shown by default. - * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to + process on the images list. Available filters: + + - `before`=(`[:]`, `` or ``) - `dangling=true` - `label=key` or `label="key=value"` of an image label - - `before`=(`[:]`, `` or ``) - - `since`=(`[:]`, `` or ``) - `reference`=(`[:]`) + - `since`=(`[:]`, `` or ``) + - `until=` + * @var bool $shared-size Compute and show shared size as a `SharedSize` field on each image. * @var bool $digests Show digest information as a `RepoDigests` field on each image. + * @var bool $manifests Include `Manifests` in the image summary. * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\ImageListInternalServerErrorException @@ -597,6 +736,7 @@ public function imageList(array $queryParameters = [], string $fetch = self::FET * @param array $queryParameters { * @var string $dockerfile Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`. * @var string $t A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters. + * @var string $extrahosts Extra hosts to add to /etc/hosts * @var string $remote A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball. * @var bool $q Suppress verbose build output. * @var bool $nocache Do not use the cache when building the image. @@ -610,11 +750,28 @@ public function imageList(array $queryParameters = [], string $fetch = self::FET * @var string $cpusetcpus CPUs in which to allow execution (e.g., `0-3`, `0,1`). * @var int $cpuperiod The length of a CPU period in microseconds. * @var int $cpuquota Microseconds of CPU time that the container can get in a CPU period. - * @var int $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) + * @var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. + + For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded. + + [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) + * @var int $shmsize Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB. * @var bool $squash Squash the resulting images layers into a single layer. *(Experimental release only.)* * @var string $labels Arbitrary key/value labels to set on the image, as a JSON map of string pairs. - * @var string $networkmode Sets the networking mode for the run commands during build. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name to which this container should connect to. + * @var string $networkmode Sets the networking mode for the run commands during build. Supported + standard values are: `bridge`, `host`, `none`, and `container:`. + Any other value is taken as a custom network's name or ID to which this + container should connect to. + + * @var string $platform Platform in the format os[/arch[/variant]] + * @var string $target Target build stage + * @var string $outputs BuildKit output configuration + * @var string $version Version of the builder backend to use. + + - `1` is the first generation classic (deprecated) builder in the Docker daemon (default) + - `2` is [BuildKit](https://github.com/moby/buildkit) + * } * @param array $headerParameters { * @var string $Content-type @@ -639,6 +796,7 @@ public function imageList(array $queryParameters = [], string $fetch = self::FET * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImageBuildBadRequestException * @throws \Docker\API\Exception\ImageBuildInternalServerErrorException * * @return null|\Psr\Http\Message\ResponseInterface @@ -648,24 +806,82 @@ public function imageBuild($inputStream, array $queryParameters = [], array $hea return $this->executeEndpoint(new \Docker\API\Endpoint\ImageBuild($inputStream, $queryParameters, $headerParameters), $fetch); } /** - * Create an image by either pulling it from a registry or importing it. - * - * @param string $inputImage Image content if the value `-` has been specified in fromSrc query parameter - * @param array $queryParameters { - * @var string $fromImage Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed. - * @var string $fromSrc Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image. - * @var string $repo Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image. - * @var string $tag Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled. - * } - * @param array $headerParameters { - * @var string $X-Registry-Auth A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication) - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ImageCreateNotFoundException - * @throws \Docker\API\Exception\ImageCreateInternalServerErrorException - * - * @return null|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param array $queryParameters { + * @var int $keep-storage Amount of disk space in bytes to keep for cache + * @var bool $all Remove all types of build cache + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to + process on the list of build cache objects. + + Available filters: + + - `until=` remove cache older than ``. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon's local time. + - `id=` + - `parent=` + - `type=` + - `description=` + - `inuse` + - `shared` + - `private` + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\BuildPruneInternalServerErrorException + * + * @return null|\Docker\API\Model\BuildPrunePostResponse200|\Psr\Http\Message\ResponseInterface + */ + public function buildPrune(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\BuildPrune($queryParameters), $fetch); + } + /** + * Pull or import an image. + * + * @param string $inputImage Image content if the value `-` has been specified in fromSrc query parameter + * @param array $queryParameters { + * @var string $fromImage Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed. + * @var string $fromSrc Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image. + * @var string $repo Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image. + * @var string $tag Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled. + * @var string $message Set commit message for imported image. + * @var array $changes Apply `Dockerfile` instructions to the image that is created, + for example: `changes=ENV DEBUG=true`. + Note that `ENV DEBUG=true` should be URI component encoded. + + Supported `Dockerfile` instructions: + `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR` + + * @var string $platform Platform in the format os[/arch[/variant]]. + + When used in combination with the `fromImage` option, the daemon checks + if the given image is present in the local image cache with the given + OS and Architecture, and otherwise attempts to pull the image. If the + option is not set, the host's native OS and Architecture are used. + If the given image does not exist in the local image cache, the daemon + attempts to pull the image with the host's native OS and Architecture. + If the given image does exists in the local image cache, but its OS or + architecture does not match, a warning is produced. + + When used with the `fromSrc` option to import an image from an archive, + this option sets the platform information for the imported image. If + the option is not set, the host's native OS and Architecture are used + for the imported image. + + * } + * @param array $headerParameters { + * @var string $X-Registry-Auth A base64url-encoded auth configuration. + + Refer to the [authentication section](#section/Authentication) for + details. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ImageCreateNotFoundException + * @throws \Docker\API\Exception\ImageCreateInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ public function imageCreate(string $inputImage, array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\ImageCreate($inputImage, $queryParameters, $headerParameters), $fetch); @@ -678,7 +894,7 @@ public function imageCreate(string $inputImage, array $queryParameters = [], arr * @throws \Docker\API\Exception\ImageInspectNotFoundException * @throws \Docker\API\Exception\ImageInspectInternalServerErrorException * - * @return null|\Docker\API\Model\Image|\Psr\Http\Message\ResponseInterface + * @return null|\Docker\API\Model\ImageInspect|\Psr\Http\Message\ResponseInterface */ public function imageInspect(string $name, string $fetch = self::FETCH_OBJECT) { @@ -701,7 +917,9 @@ public function imageHistory(string $name, string $fetch = self::FETCH_OBJECT) /** * Push an image to a registry. - If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, `registry.example.com/myimage:latest`. + If you wish to push an image on to a private registry, that image must + already have a tag which references the registry. For example, + `registry.example.com/myimage:latest`. The push is cancelled if the HTTP connection is closed. @@ -720,9 +938,23 @@ public function imageHistory(string $name, string $fetch = self::FETCH_OBJECT) all tags of the given image that are present in the local image store are pushed. + * @var string $platform JSON-encoded OCI platform to select the platform-variant to push. + If not provided, all available variants will attempt to be pushed. + + If the daemon provides a multi-platform image store, this selects + the platform-variant to push to the registry. If the image is + a single-platform image, or if the multi-platform image does not + provide a variant matching the given platform, an error is returned. + + Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + * } * @param array $headerParameters { - * @var string $X-Registry-Auth A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication) + * @var string $X-Registry-Auth A base64url-encoded auth configuration. + + Refer to the [authentication section](#section/Authentication) for + details. + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\ImagePushNotFoundException @@ -755,9 +987,11 @@ public function imageTag(string $name, array $queryParameters = [], string $fetc return $this->executeEndpoint(new \Docker\API\Endpoint\ImageTag($name, $queryParameters), $fetch); } /** - * Remove an image, along with any untagged parent images that were referenced by that image. + * Remove an image, along with any untagged parent images that were + referenced by that image. - Images can't be removed if they have descendant images, are being used by a running container or are being used by a build. + Images can't be removed if they have descendant images, are being + used by a running container or are being used by a build. * * @param string $name Image name or ID @@ -770,7 +1004,7 @@ public function imageTag(string $name, array $queryParameters = [], string $fetc * @throws \Docker\API\Exception\ImageDeleteConflictException * @throws \Docker\API\Exception\ImageDeleteInternalServerErrorException * - * @return null|\Docker\API\Model\ImageDeleteResponse[]|\Psr\Http\Message\ResponseInterface + * @return null|\Docker\API\Model\ImageDeleteResponseItem[]|\Psr\Http\Message\ResponseInterface */ public function imageDelete(string $name, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { @@ -784,9 +1018,8 @@ public function imageDelete(string $name, array $queryParameters = [], string $f * @var int $limit Maximum number of results to return * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - - `stars=` - - `is-automated=(true|false)` - `is-official=(true|false)` + - `stars=` Matches images that has at least 'number' stars. * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -802,12 +1035,13 @@ public function imageSearch(array $queryParameters = [], string $fetch = self::F * * * @param array $queryParameters { - * @var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + * @var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - Available filters: - `dangling=` When set to `true` (or `1`), prune only unused *and* untagged images. When set to `false` (or `0`), all unused images are pruned. + - `until=` Prune images created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune images with (or without, in case `label!=...` is used) the specified labels. * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -820,14 +1054,17 @@ public function imagePrune(array $queryParameters = [], string $fetch = self::FE return $this->executeEndpoint(new \Docker\API\Endpoint\ImagePrune($queryParameters), $fetch); } /** - * Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. - * - * @param \Docker\API\Model\AuthConfig $authConfig Authentication to check - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\SystemAuthInternalServerErrorException - * - * @return null|\Docker\API\Model\AuthPostResponse200|\Psr\Http\Message\ResponseInterface - */ + * Validate credentials for a registry and, if available, get an identity + token for accessing the registry without password. + + * + * @param \Docker\API\Model\AuthConfig $authConfig Authentication to check + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SystemAuthUnauthorizedException + * @throws \Docker\API\Exception\SystemAuthInternalServerErrorException + * + * @return null|\Docker\API\Model\AuthPostResponse200|\Psr\Http\Message\ResponseInterface + */ public function systemAuth(\Docker\API\Model\AuthConfig $authConfig, string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\SystemAuth($authConfig), $fetch); @@ -836,7 +1073,7 @@ public function systemAuth(\Docker\API\Model\AuthConfig $authConfig, string $fet * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\SystemInfoInternalServerErrorException * - * @return null|\Docker\API\Model\InfoGetResponse200|\Psr\Http\Message\ResponseInterface + * @return null|\Docker\API\Model\SystemInfo|\Psr\Http\Message\ResponseInterface */ public function systemInfo(string $fetch = self::FETCH_OBJECT) { @@ -846,7 +1083,7 @@ public function systemInfo(string $fetch = self::FETCH_OBJECT) * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\SystemVersionInternalServerErrorException * - * @return null|\Docker\API\Model\VersionGetResponse200|\Psr\Http\Message\ResponseInterface + * @return null|\Docker\API\Model\SystemVersion|\Psr\Http\Message\ResponseInterface */ public function systemVersion(string $fetch = self::FETCH_OBJECT) { @@ -862,10 +1099,20 @@ public function systemPing(string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\SystemPing(), $fetch); } + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SystemPingHeadInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function systemPingHead(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SystemPingHead(), $fetch); + } /** * * - * @param \Docker\API\Model\Config $containerConfig The container configuration + * @param \Docker\API\Model\ContainerConfig $containerConfig The container configuration * @param array $queryParameters { * @var string $container The ID or name of the container to commit * @var string $repo Repository name for the created image @@ -881,7 +1128,7 @@ public function systemPing(string $fetch = self::FETCH_OBJECT) * * @return null|\Docker\API\Model\IdResponse|\Psr\Http\Message\ResponseInterface */ - public function imageCommit(\Docker\API\Model\Config $containerConfig, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + public function imageCommit(\Docker\API\Model\ContainerConfig $containerConfig, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\ImageCommit($containerConfig, $queryParameters), $fetch); } @@ -890,50 +1137,72 @@ public function imageCommit(\Docker\API\Model\Config $containerConfig, array $qu Various objects within Docker report events when something happens to them. - Containers report these events: `attach, commit, copy, create, destroy, detach, die, exec_create, exec_detach, exec_start, export, kill, oom, pause, rename, resize, restart, start, stop, top, unpause, update` + Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, `update`, and `prune` - Images report these events: `delete, import, load, pull, push, save, tag, untag` + Images report these events: `create`, `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` - Volumes report these events: `create, mount, unmount, destroy` + Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune` - Networks report these events: `create, connect, disconnect, destroy` + Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune` The Docker daemon reports these events: `reload` + Services report these events: `create`, `update`, and `remove` + + Nodes report these events: `create`, `update`, and `remove` + + Secrets report these events: `create`, `update`, and `remove` + + Configs report these events: `create`, `update`, and `remove` + + The Builder reports `prune` events + * * @param array $queryParameters { * @var string $since Show events created since this timestamp then stream new events. * @var string $until Show events created until this timestamp then stop streaming. * @var string $filters A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: + - `config=` config name or ID - `container=` container name or ID + - `daemon=` daemon name or ID - `event=` event type - `image=` image name or ID - `label=` image or container label - - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, or `daemon` - - `volume=` volume name or ID - `network=` network name or ID - - `daemon=` daemon name or ID + - `node=` node ID + - `plugin`= plugin name or ID + - `scope`= local or swarm + - `secret=` secret name or ID + - `service=` service name or ID + - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config` + - `volume=` volume name * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SystemEventsBadRequestException * @throws \Docker\API\Exception\SystemEventsInternalServerErrorException * - * @return null|\Docker\API\Model\EventsGetResponse200|\Psr\Http\Message\ResponseInterface + * @return null|\Docker\API\Model\EventMessage|\Psr\Http\Message\ResponseInterface */ public function systemEvents(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\SystemEvents($queryParameters), $fetch); } /** + * + * + * @param array $queryParameters { + * @var array $type Object types, for which to compute and return data. + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\SystemDataUsageInternalServerErrorException * * @return null|\Docker\API\Model\SystemDfGetResponse200|\Psr\Http\Message\ResponseInterface */ - public function systemDataUsage(string $fetch = self::FETCH_OBJECT) + public function systemDataUsage(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \Docker\API\Endpoint\SystemDataUsage(), $fetch); + return $this->executeEndpoint(new \Docker\API\Endpoint\SystemDataUsage($queryParameters), $fetch); } /** * Get a tarball containing all images and metadata for a repository. @@ -972,11 +1241,16 @@ public function imageGet(string $name, string $fetch = self::FETCH_OBJECT) return $this->executeEndpoint(new \Docker\API\Endpoint\ImageGet($name), $fetch); } /** - * Get a tarball containing all images and metadata for several image repositories. + * Get a tarball containing all images and metadata for several image + repositories. - For each value of the `names` parameter: if it is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID. + For each value of the `names` parameter: if it is a specific name and + tag (e.g. `ubuntu:latest`), then only that image (and its parents) are + returned; if it is an image ID, similarly only that image (and its parents) + are returned and there would be no names referenced in the 'repositories' + file for this image ID. - For details on the format, see [the export image endpoint](#operation/ImageGet). + For details on the format, see the [export image endpoint](#operation/ImageGet). * * @param array $queryParameters { @@ -994,7 +1268,7 @@ public function imageGetAll(array $queryParameters = [], string $fetch = self::F /** * Load a set of images and tags into a repository. - For details on the format, see [the export image endpoint](#operation/ImageGet). + For details on the format, see the [export image endpoint](#operation/ImageGet). * * @param string|resource|\Psr\Http\Message\StreamInterface $imagesTarball Tar archive containing images @@ -1027,35 +1301,40 @@ public function containerExec(string $id, \Docker\API\Model\ContainersIdExecPost return $this->executeEndpoint(new \Docker\API\Endpoint\ContainerExec($id, $execConfig), $fetch); } /** - * Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command. - * - * @param string $id Exec instance ID - * @param \Docker\API\Model\ExecIdStartPostBody $execStartConfig - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ExecStartNotFoundException - * @throws \Docker\API\Exception\ExecStartConflictException - * - * @return null|\Psr\Http\Message\ResponseInterface - */ + * Starts a previously set up exec instance. If detach is true, this endpoint + returns immediately after starting the command. Otherwise, it sets up an + interactive session with the command. + + * + * @param string $id Exec instance ID + * @param \Docker\API\Model\ExecIdStartPostBody $execStartConfig + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ExecStartNotFoundException + * @throws \Docker\API\Exception\ExecStartConflictException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ public function execStart(string $id, \Docker\API\Model\ExecIdStartPostBody $execStartConfig, string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\ExecStart($id, $execStartConfig), $fetch); } /** - * Resize the TTY session used by an exec instance. This endpoint only works if `tty` was specified as part of creating and starting the exec instance. - * - * @param string $id Exec instance ID - * @param array $queryParameters { - * @var int $h Height of the TTY session in characters - * @var int $w Width of the TTY session in characters - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ExecResizeBadRequestException - * @throws \Docker\API\Exception\ExecResizeNotFoundException - * @throws \Docker\API\Exception\ExecResizeInternalServerErrorException - * - * @return null|\Psr\Http\Message\ResponseInterface - */ + * Resize the TTY session used by an exec instance. This endpoint only works + if `tty` was specified as part of creating and starting the exec instance. + + * + * @param string $id Exec instance ID + * @param array $queryParameters { + * @var int $h Height of the TTY session in characters + * @var int $w Width of the TTY session in characters + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ExecResizeBadRequestException + * @throws \Docker\API\Exception\ExecResizeNotFoundException + * @throws \Docker\API\Exception\ExecResizeInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ public function execResize(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\ExecResize($id, $queryParameters), $fetch); @@ -1081,19 +1360,20 @@ public function execInspect(string $id, string $fetch = self::FETCH_OBJECT) * @var string $filters JSON encoded value of the filters (a `map[string][]string`) to process on the volumes list. Available filters: - - `name=` Matches all or part of a volume name. - `dangling=` When set to `true` (or `1`), returns all volumes that are not in use by a container. When set to `false` (or `0`), only volumes that are in use by one or more containers are returned. - - `driver=` Matches all or part of a volume - driver name. + - `driver=` Matches volumes based on their driver. + - `label=` or `label=:` Matches volumes based on + the presence of a `label` alone or a `label` and a value. + - `name=` Matches all or part of a volume name. * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\VolumeListInternalServerErrorException * - * @return null|\Docker\API\Model\VolumesGetResponse200|\Psr\Http\Message\ResponseInterface + * @return null|\Docker\API\Model\VolumeListResponse|\Psr\Http\Message\ResponseInterface */ public function volumeList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { @@ -1102,13 +1382,13 @@ public function volumeList(array $queryParameters = [], string $fetch = self::FE /** * * - * @param \Docker\API\Model\VolumesCreatePostBody $volumeConfig Volume configuration + * @param \Docker\API\Model\VolumeCreateOptions $volumeConfig Volume configuration * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\VolumeCreateInternalServerErrorException * * @return null|\Docker\API\Model\Volume|\Psr\Http\Message\ResponseInterface */ - public function volumeCreate(\Docker\API\Model\VolumesCreatePostBody $volumeConfig, string $fetch = self::FETCH_OBJECT) + public function volumeCreate(\Docker\API\Model\VolumeCreateOptions $volumeConfig, string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\VolumeCreate($volumeConfig), $fetch); } @@ -1147,10 +1427,37 @@ public function volumeInspect(string $name, string $fetch = self::FETCH_OBJECT) /** * * + * @param string $name The name or ID of the volume + * @param \Docker\API\Model\VolumesNamePutBody $body The spec of the volume to update. Currently, only Availability may + change. All other fields must remain unchanged. + + * @param array $queryParameters { + * @var int $version The version number of the volume being updated. This is required to + avoid conflicting writes. Found in the volume's `ClusterVolume` + field. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\VolumeUpdateBadRequestException + * @throws \Docker\API\Exception\VolumeUpdateNotFoundException + * @throws \Docker\API\Exception\VolumeUpdateInternalServerErrorException + * @throws \Docker\API\Exception\VolumeUpdateServiceUnavailableException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function volumeUpdate(string $name, \Docker\API\Model\VolumesNamePutBody $body, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\VolumeUpdate($name, $body, $queryParameters), $fetch); + } + /** + * + * * @param array $queryParameters { * @var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune volumes with (or without, in case `label!=...` is used) the specified labels. + - `all` (`all=true`) - Consider all (local) volumes for pruning and not just anonymous volumes. * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -1163,15 +1470,29 @@ public function volumePrune(array $queryParameters = [], string $fetch = self::F return $this->executeEndpoint(new \Docker\API\Endpoint\VolumePrune($queryParameters), $fetch); } /** - * + * Returns a list of networks. For details on the format, see the + [network inspect endpoint](#operation/NetworkInspect). + + Note that it uses a different, smaller representation of a network than + inspecting a single network. For example, the list of containers attached + to the network is not propagated in API versions 1.28 and up. + * * @param array $queryParameters { - * @var string $filters JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters: + * @var string $filters JSON encoded value of the filters (a `map[string][]string`) to process + on the networks list. + Available filters: + + - `dangling=` When set to `true` (or `1`), returns all + networks that are not in use by a container. When set to `false` + (or `0`), only networks that are in use by one or more + containers are returned. - `driver=` Matches a network's driver. - `id=` Matches all or part of a network ID. - `label=` or `label==` of a network label. - `name=` Matches all or part of a network name. + - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`). - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. * } @@ -1189,6 +1510,7 @@ public function networkList(array $queryParameters = [], string $fetch = self::F * * @param string $id Network ID or name * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\NetworkDeleteForbiddenException * @throws \Docker\API\Exception\NetworkDeleteNotFoundException * @throws \Docker\API\Exception\NetworkDeleteInternalServerErrorException * @@ -1202,14 +1524,19 @@ public function networkDelete(string $id, string $fetch = self::FETCH_OBJECT) * * * @param string $id Network ID or name + * @param array $queryParameters { + * @var bool $verbose Detailed inspect output for troubleshooting + * @var string $scope Filter the network by scope (swarm, global, or local) + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\NetworkInspectNotFoundException + * @throws \Docker\API\Exception\NetworkInspectInternalServerErrorException * * @return null|\Docker\API\Model\Network|\Psr\Http\Message\ResponseInterface */ - public function networkInspect(string $id, string $fetch = self::FETCH_OBJECT) + public function networkInspect(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \Docker\API\Endpoint\NetworkInspect($id), $fetch); + return $this->executeEndpoint(new \Docker\API\Endpoint\NetworkInspect($id, $queryParameters), $fetch); } /** * @@ -1221,18 +1548,19 @@ public function networkInspect(string $id, string $fetch = self::FETCH_OBJECT) * @throws \Docker\API\Exception\NetworkCreateNotFoundException * @throws \Docker\API\Exception\NetworkCreateInternalServerErrorException * - * @return null|\Docker\API\Model\NetworksCreatePostResponse201|\Psr\Http\Message\ResponseInterface + * @return null|\Docker\API\Model\NetworkCreateResponse|\Psr\Http\Message\ResponseInterface */ public function networkCreate(\Docker\API\Model\NetworksCreatePostBody $networkConfig, string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\NetworkCreate($networkConfig), $fetch); } /** - * + * The network must be either a local-scoped network or a swarm-scoped network with the `attachable` option set. A network cannot be re-attached to a running container * * @param string $id Network ID or name * @param \Docker\API\Model\NetworksIdConnectPostBody $container * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\NetworkConnectBadRequestException * @throws \Docker\API\Exception\NetworkConnectForbiddenException * @throws \Docker\API\Exception\NetworkConnectNotFoundException * @throws \Docker\API\Exception\NetworkConnectInternalServerErrorException @@ -1266,6 +1594,8 @@ public function networkDisconnect(string $id, \Docker\API\Model\NetworksIdDiscon * @var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: + - `until=` Prune networks created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune networks with (or without, in case `label!=...` is used) the specified labels. * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) @@ -1278,35 +1608,50 @@ public function networkPrune(array $queryParameters = [], string $fetch = self:: return $this->executeEndpoint(new \Docker\API\Endpoint\NetworkPrune($queryParameters), $fetch); } /** - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\PluginListInternalServerErrorException - * - * @return null|\Docker\API\Model\Plugin[]|\Psr\Http\Message\ResponseInterface - */ - public function pluginList(string $fetch = self::FETCH_OBJECT) + * Returns information about installed plugins. + * + * @param array $queryParameters { + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to + process on the plugin list. + + Available filters: + + - `capability=` + - `enable=|` + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginListInternalServerErrorException + * + * @return null|\Docker\API\Model\Plugin[]|\Psr\Http\Message\ResponseInterface + */ + public function pluginList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \Docker\API\Endpoint\PluginList(), $fetch); + return $this->executeEndpoint(new \Docker\API\Endpoint\PluginList($queryParameters), $fetch); } /** - * - * - * @param array $queryParameters { - * @var string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\GetPluginPrivilegesInternalServerErrorException - * - * @return null|\Docker\API\Model\PluginsPrivilegesGetResponse200Item[]|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param array $queryParameters { + * @var string $remote The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\GetPluginPrivilegesInternalServerErrorException + * + * @return null|\Docker\API\Model\PluginPrivilege[]|\Psr\Http\Message\ResponseInterface + */ public function getPluginPrivileges(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\GetPluginPrivileges($queryParameters), $fetch); } /** - * Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). + * Pulls and installs a plugin. After the plugin is installed, it can be + enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). * - * @param array $body + * @param \Docker\API\Model\PluginPrivilege[] $body * @param array $queryParameters { * @var string $remote Remote reference for plugin to install. @@ -1318,7 +1663,12 @@ public function getPluginPrivileges(array $queryParameters = [], string $fetch = * } * @param array $headerParameters { - * @var string $X-Registry-Auth A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication) + * @var string $X-Registry-Auth A base64url-encoded auth configuration to use when pulling a plugin + from a registry. + + Refer to the [authentication section](#section/Authentication) for + details. + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\PluginPullInternalServerErrorException @@ -1330,106 +1680,160 @@ public function pluginPull(array $body, array $queryParameters = [], array $head return $this->executeEndpoint(new \Docker\API\Endpoint\PluginPull($body, $queryParameters, $headerParameters), $fetch); } /** - * - * - * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\PluginInspectNotFoundException - * @throws \Docker\API\Exception\PluginInspectInternalServerErrorException - * - * @return null|\Docker\API\Model\Plugin|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginInspectNotFoundException + * @throws \Docker\API\Exception\PluginInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\Plugin|\Psr\Http\Message\ResponseInterface + */ public function pluginInspect(string $name, string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\PluginInspect($name), $fetch); } /** - * - * - * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - * @param array $queryParameters { - * @var bool $force Disable the plugin before removing. This may result in issues if the plugin is in use by a container. - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\PluginDeleteNotFoundException - * @throws \Docker\API\Exception\PluginDeleteInternalServerErrorException - * - * @return null|\Docker\API\Model\Plugin|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * @param array $queryParameters { + * @var bool $force Disable the plugin before removing. This may result in issues if the + plugin is in use by a container. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginDeleteNotFoundException + * @throws \Docker\API\Exception\PluginDeleteInternalServerErrorException + * + * @return null|\Docker\API\Model\Plugin|\Psr\Http\Message\ResponseInterface + */ public function pluginDelete(string $name, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\PluginDelete($name, $queryParameters), $fetch); } /** - * - * - * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - * @param array $queryParameters { - * @var int $timeout Set the HTTP client timeout (in seconds) - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\PluginEnableInternalServerErrorException - * - * @return null|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * @param array $queryParameters { + * @var int $timeout Set the HTTP client timeout (in seconds) + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginEnableNotFoundException + * @throws \Docker\API\Exception\PluginEnableInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ public function pluginEnable(string $name, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\PluginEnable($name, $queryParameters), $fetch); } /** - * - * - * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\PluginDisableInternalServerErrorException - * - * @return null|\Psr\Http\Message\ResponseInterface - */ - public function pluginDisable(string $name, string $fetch = self::FETCH_OBJECT) + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * @param array $queryParameters { + * @var bool $force Force disable a plugin even if still in use. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginDisableNotFoundException + * @throws \Docker\API\Exception\PluginDisableInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function pluginDisable(string $name, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \Docker\API\Endpoint\PluginDisable($name), $fetch); + return $this->executeEndpoint(new \Docker\API\Endpoint\PluginDisable($name, $queryParameters), $fetch); } /** - * - * - * @param string|resource|\Psr\Http\Message\StreamInterface $tarContext Path to tar containing plugin rootfs and manifest - * @param array $queryParameters { - * @var string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\PluginCreateInternalServerErrorException - * - * @return null|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * @param \Docker\API\Model\PluginPrivilege[] $body + * @param array $queryParameters { + * @var string $remote Remote reference to upgrade to. + + The `:latest` tag is optional, and is used as the default if omitted. + + * } + * @param array $headerParameters { + * @var string $X-Registry-Auth A base64url-encoded auth configuration to use when pulling a plugin + from a registry. + + Refer to the [authentication section](#section/Authentication) for + details. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginUpgradeNotFoundException + * @throws \Docker\API\Exception\PluginUpgradeInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function pluginUpgrade(string $name, array $body, array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\PluginUpgrade($name, $body, $queryParameters, $headerParameters), $fetch); + } + /** + * + * + * @param string|resource|\Psr\Http\Message\StreamInterface $tarContext Path to tar containing plugin rootfs and manifest + * @param array $queryParameters { + * @var string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginCreateInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ public function pluginCreate($tarContext, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\PluginCreate($tarContext, $queryParameters), $fetch); } /** - * Push a plugin to the registry. - * - * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\PluginPushNotFoundException - * @throws \Docker\API\Exception\PluginPushInternalServerErrorException - * - * @return null|\Psr\Http\Message\ResponseInterface - */ + * Push a plugin to the registry. + + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginPushNotFoundException + * @throws \Docker\API\Exception\PluginPushInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ public function pluginPush(string $name, string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\PluginPush($name), $fetch); } /** - * - * - * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - * @param array $body - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\PluginSetNotFoundException - * @throws \Docker\API\Exception\PluginSetInternalServerErrorException - * - * @return null|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * @param array $body + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\PluginSetNotFoundException + * @throws \Docker\API\Exception\PluginSetInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ public function pluginSet(string $name, array $body, string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\PluginSet($name, $body), $fetch); @@ -1445,11 +1849,13 @@ public function pluginSet(string $name, array $body, string $fetch = self::FETCH - `label=` - `membership=`(`accepted`|`pending`)` - `name=` + - `node.label=` - `role=`(`manager`|`worker`)` * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\NodeListInternalServerErrorException + * @throws \Docker\API\Exception\NodeListServiceUnavailableException * * @return null|\Docker\API\Model\Node[]|\Psr\Http\Message\ResponseInterface */ @@ -1467,6 +1873,7 @@ public function nodeList(array $queryParameters = [], string $fetch = self::FETC * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\NodeDeleteNotFoundException * @throws \Docker\API\Exception\NodeDeleteInternalServerErrorException + * @throws \Docker\API\Exception\NodeDeleteServiceUnavailableException * * @return null|\Psr\Http\Message\ResponseInterface */ @@ -1481,6 +1888,7 @@ public function nodeDelete(string $id, array $queryParameters = [], string $fetc * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\NodeInspectNotFoundException * @throws \Docker\API\Exception\NodeInspectInternalServerErrorException + * @throws \Docker\API\Exception\NodeInspectServiceUnavailableException * * @return null|\Docker\API\Model\Node|\Psr\Http\Message\ResponseInterface */ @@ -1489,28 +1897,34 @@ public function nodeInspect(string $id, string $fetch = self::FETCH_OBJECT) return $this->executeEndpoint(new \Docker\API\Endpoint\NodeInspect($id), $fetch); } /** - * - * - * @param string $id The ID of the node - * @param \Docker\API\Model\NodeSpec $body - * @param array $queryParameters { - * @var int $version The version number of the node object being updated. This is required to avoid conflicting writes. - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\NodeUpdateNotFoundException - * @throws \Docker\API\Exception\NodeUpdateInternalServerErrorException - * - * @return null|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param string $id The ID of the node + * @param \Docker\API\Model\NodeSpec $body + * @param array $queryParameters { + * @var int $version The version number of the node object being updated. This is required + to avoid conflicting writes. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\NodeUpdateBadRequestException + * @throws \Docker\API\Exception\NodeUpdateNotFoundException + * @throws \Docker\API\Exception\NodeUpdateInternalServerErrorException + * @throws \Docker\API\Exception\NodeUpdateServiceUnavailableException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ public function nodeUpdate(string $id, \Docker\API\Model\NodeSpec $body, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\NodeUpdate($id, $body, $queryParameters), $fetch); } /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SwarmInspectNotFoundException * @throws \Docker\API\Exception\SwarmInspectInternalServerErrorException + * @throws \Docker\API\Exception\SwarmInspectServiceUnavailableException * - * @return null|\Docker\API\Model\SwarmGetResponse200|\Psr\Http\Message\ResponseInterface + * @return null|\Docker\API\Model\Swarm|\Psr\Http\Message\ResponseInterface */ public function swarmInspect(string $fetch = self::FETCH_OBJECT) { @@ -1522,8 +1936,8 @@ public function swarmInspect(string $fetch = self::FETCH_OBJECT) * @param \Docker\API\Model\SwarmInitPostBody $body * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\SwarmInitBadRequestException - * @throws \Docker\API\Exception\SwarmInitNotAcceptableException * @throws \Docker\API\Exception\SwarmInitInternalServerErrorException + * @throws \Docker\API\Exception\SwarmInitServiceUnavailableException * * @return null|\Psr\Http\Message\ResponseInterface */ @@ -1547,38 +1961,42 @@ public function swarmJoin(\Docker\API\Model\SwarmJoinPostBody $body, string $fet return $this->executeEndpoint(new \Docker\API\Endpoint\SwarmJoin($body), $fetch); } /** - * - * - * @param array $queryParameters { - * @var bool $force Force leave swarm, even if this is the last manager or that it will break the cluster. - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\SwarmLeaveInternalServerErrorException - * @throws \Docker\API\Exception\SwarmLeaveServiceUnavailableException - * - * @return null|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param array $queryParameters { + * @var bool $force Force leave swarm, even if this is the last manager or that it will + break the cluster. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SwarmLeaveInternalServerErrorException + * @throws \Docker\API\Exception\SwarmLeaveServiceUnavailableException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ public function swarmLeave(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\SwarmLeave($queryParameters), $fetch); } /** - * - * - * @param \Docker\API\Model\SwarmSpec $body - * @param array $queryParameters { - * @var int $version The version number of the swarm object being updated. This is required to avoid conflicting writes. - * @var bool $rotateWorkerToken Rotate the worker join token. - * @var bool $rotateManagerToken Rotate the manager join token. - * @var bool $rotateManagerUnlockKey Rotate the manager unlock key. - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\SwarmUpdateBadRequestException - * @throws \Docker\API\Exception\SwarmUpdateInternalServerErrorException - * @throws \Docker\API\Exception\SwarmUpdateServiceUnavailableException - * - * @return null|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param \Docker\API\Model\SwarmSpec $body + * @param array $queryParameters { + * @var int $version The version number of the swarm object being updated. This is + required to avoid conflicting writes. + + * @var bool $rotateWorkerToken Rotate the worker join token. + * @var bool $rotateManagerToken Rotate the manager join token. + * @var bool $rotateManagerUnlockKey Rotate the manager unlock key. + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SwarmUpdateBadRequestException + * @throws \Docker\API\Exception\SwarmUpdateInternalServerErrorException + * @throws \Docker\API\Exception\SwarmUpdateServiceUnavailableException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ public function swarmUpdate(\Docker\API\Model\SwarmSpec $body, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\SwarmUpdate($body, $queryParameters), $fetch); @@ -1586,6 +2004,7 @@ public function swarmUpdate(\Docker\API\Model\SwarmSpec $body, array $queryParam /** * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\SwarmUnlockkeyInternalServerErrorException + * @throws \Docker\API\Exception\SwarmUnlockkeyServiceUnavailableException * * @return null|\Docker\API\Model\SwarmUnlockkeyGetResponse200|\Psr\Http\Message\ResponseInterface */ @@ -1599,6 +2018,7 @@ public function swarmUnlockkey(string $fetch = self::FETCH_OBJECT) * @param \Docker\API\Model\SwarmUnlockPostBody $body * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\SwarmUnlockInternalServerErrorException + * @throws \Docker\API\Exception\SwarmUnlockServiceUnavailableException * * @return null|\Psr\Http\Message\ResponseInterface */ @@ -1610,15 +2030,22 @@ public function swarmUnlock(\Docker\API\Model\SwarmUnlockPostBody $body, string * * * @param array $queryParameters { - * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters: + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to + process on the services list. + + Available filters: - `id=` - - `name=` - `label=` + - `mode=["replicated"|"global"]` + - `name=` + + * @var bool $status Include service status, with count of running and desired tasks. * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\ServiceListInternalServerErrorException + * @throws \Docker\API\Exception\ServiceListServiceUnavailableException * * @return null|\Docker\API\Model\Service[]|\Psr\Http\Message\ResponseInterface */ @@ -1627,20 +2054,26 @@ public function serviceList(array $queryParameters = [], string $fetch = self::F return $this->executeEndpoint(new \Docker\API\Endpoint\ServiceList($queryParameters), $fetch); } /** - * - * - * @param \Docker\API\Model\ServicesCreatePostBody $body - * @param array $headerParameters { - * @var string $X-Registry-Auth A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication) - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ServiceCreateForbiddenException - * @throws \Docker\API\Exception\ServiceCreateConflictException - * @throws \Docker\API\Exception\ServiceCreateInternalServerErrorException - * @throws \Docker\API\Exception\ServiceCreateServiceUnavailableException - * - * @return null|\Docker\API\Model\ServicesCreatePostResponse201|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param \Docker\API\Model\ServicesCreatePostBody $body + * @param array $headerParameters { + * @var string $X-Registry-Auth A base64url-encoded auth configuration for pulling from private + registries. + + Refer to the [authentication section](#section/Authentication) for + details. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ServiceCreateBadRequestException + * @throws \Docker\API\Exception\ServiceCreateForbiddenException + * @throws \Docker\API\Exception\ServiceCreateConflictException + * @throws \Docker\API\Exception\ServiceCreateInternalServerErrorException + * @throws \Docker\API\Exception\ServiceCreateServiceUnavailableException + * + * @return null|\Docker\API\Model\ServiceCreateResponse|\Psr\Http\Message\ResponseInterface + */ public function serviceCreate(\Docker\API\Model\ServicesCreatePostBody $body, array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\ServiceCreate($body, $headerParameters), $fetch); @@ -1652,6 +2085,7 @@ public function serviceCreate(\Docker\API\Model\ServicesCreatePostBody $body, ar * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\ServiceDeleteNotFoundException * @throws \Docker\API\Exception\ServiceDeleteInternalServerErrorException + * @throws \Docker\API\Exception\ServiceDeleteServiceUnavailableException * * @return null|\Psr\Http\Message\ResponseInterface */ @@ -1663,60 +2097,84 @@ public function serviceDelete(string $id, string $fetch = self::FETCH_OBJECT) * * * @param string $id ID or name of service. + * @param array $queryParameters { + * @var bool $insertDefaults Fill empty fields with default values. + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\ServiceInspectNotFoundException * @throws \Docker\API\Exception\ServiceInspectInternalServerErrorException + * @throws \Docker\API\Exception\ServiceInspectServiceUnavailableException * * @return null|\Docker\API\Model\Service|\Psr\Http\Message\ResponseInterface */ - public function serviceInspect(string $id, string $fetch = self::FETCH_OBJECT) + public function serviceInspect(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) { - return $this->executeEndpoint(new \Docker\API\Endpoint\ServiceInspect($id), $fetch); + return $this->executeEndpoint(new \Docker\API\Endpoint\ServiceInspect($id, $queryParameters), $fetch); } /** - * - * - * @param string $id ID or name of service. - * @param \Docker\API\Model\ServicesIdUpdatePostBody $body - * @param array $queryParameters { - * @var int $version The version number of the service object being updated. This is required to avoid conflicting writes. - * @var string $registryAuthFrom If the X-Registry-Auth header is not specified, this parameter indicates where to find registry authorization credentials. The valid values are `spec` and `previous-spec`. - * } - * @param array $headerParameters { - * @var string $X-Registry-Auth A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication) - * } - * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\ServiceUpdateNotFoundException - * @throws \Docker\API\Exception\ServiceUpdateInternalServerErrorException - * - * @return null|\Docker\API\Model\ImageDeleteResponse|\Psr\Http\Message\ResponseInterface - */ + * + * + * @param string $id ID or name of service. + * @param \Docker\API\Model\ServicesIdUpdatePostBody $body + * @param array $queryParameters { + * @var int $version The version number of the service object being updated. This is + required to avoid conflicting writes. + This version number should be the value as currently set on the + service *before* the update. You can find the current version by + calling `GET /services/{id}` + + * @var string $registryAuthFrom If the `X-Registry-Auth` header is not specified, this parameter + indicates where to find registry authorization credentials. + + * @var string $rollback Set to this parameter to `previous` to cause a server-side rollback + to the previous service spec. The supplied spec will be ignored in + this case. + + * } + * @param array $headerParameters { + * @var string $X-Registry-Auth A base64url-encoded auth configuration for pulling from private + registries. + + Refer to the [authentication section](#section/Authentication) for + details. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ServiceUpdateBadRequestException + * @throws \Docker\API\Exception\ServiceUpdateNotFoundException + * @throws \Docker\API\Exception\ServiceUpdateInternalServerErrorException + * @throws \Docker\API\Exception\ServiceUpdateServiceUnavailableException + * + * @return null|\Docker\API\Model\ServiceUpdateResponse|\Psr\Http\Message\ResponseInterface + */ public function serviceUpdate(string $id, \Docker\API\Model\ServicesIdUpdatePostBody $body, array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\ServiceUpdate($id, $body, $queryParameters, $headerParameters), $fetch); } /** - * Get `stdout` and `stderr` logs from a service. + * Get `stdout` and `stderr` logs from a service. See also + [`/containers/{id}/logs`](#operation/ContainerLogs). - **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers. + **Note**: This endpoint works only for services with the `local`, + `json-file` or `journald` logging drivers. * - * @param string $id ID or name of the container + * @param string $id ID or name of the service * @param array $queryParameters { - * @var bool $details Show extra details provided to logs. - * @var bool $follow Return the logs as a stream. - - This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). - + * @var bool $details Show service context and extra details provided to logs. + * @var bool $follow Keep connection after returning logs. * @var bool $stdout Return logs from `stdout` * @var bool $stderr Return logs from `stderr` * @var int $since Only return logs since this time, as a UNIX timestamp * @var bool $timestamps Add timestamps to every log line - * @var string $tail Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. + * @var string $tail Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\ServiceLogsNotFoundException * @throws \Docker\API\Exception\ServiceLogsInternalServerErrorException + * @throws \Docker\API\Exception\ServiceLogsServiceUnavailableException * * @return null|\Psr\Http\Message\ResponseInterface */ @@ -1728,18 +2186,22 @@ public function serviceLogs(string $id, array $queryParameters = [], string $fet * * * @param array $queryParameters { - * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters: + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to + process on the tasks list. + Available filters: + + - `desired-state=(running | shutdown | accepted)` - `id=` + - `label=key` or `label="key=value"` - `name=` - - `service=` - `node=` - - `label=key` or `label="key=value"` - - `desired-state=(running | shutdown | accepted)` + - `service=` * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\TaskListInternalServerErrorException + * @throws \Docker\API\Exception\TaskListServiceUnavailableException * * @return null|\Docker\API\Model\Task[]|\Psr\Http\Message\ResponseInterface */ @@ -1754,6 +2216,7 @@ public function taskList(array $queryParameters = [], string $fetch = self::FETC * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\TaskInspectNotFoundException * @throws \Docker\API\Exception\TaskInspectInternalServerErrorException + * @throws \Docker\API\Exception\TaskInspectServiceUnavailableException * * @return null|\Docker\API\Model\Task|\Psr\Http\Message\ResponseInterface */ @@ -1762,16 +2225,54 @@ public function taskInspect(string $id, string $fetch = self::FETCH_OBJECT) return $this->executeEndpoint(new \Docker\API\Endpoint\TaskInspect($id), $fetch); } /** + * Get `stdout` and `stderr` logs from a task. + See also [`/containers/{id}/logs`](#operation/ContainerLogs). + + **Note**: This endpoint works only for services with the `local`, + `json-file` or `journald` logging drivers. + + * + * @param string $id ID of the task + * @param array $queryParameters { + * @var bool $details Show task context and extra details provided to logs. + * @var bool $follow Keep connection after returning logs. + * @var bool $stdout Return logs from `stdout` + * @var bool $stderr Return logs from `stderr` + * @var int $since Only return logs since this time, as a UNIX timestamp + * @var bool $timestamps Add timestamps to every log line + * @var string $tail Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\TaskLogsNotFoundException + * @throws \Docker\API\Exception\TaskLogsInternalServerErrorException + * @throws \Docker\API\Exception\TaskLogsServiceUnavailableException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function taskLogs(string $id, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\TaskLogs($id, $queryParameters), $fetch); + } + /** * * * @param array $queryParameters { - * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Available filters: + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to + process on the secrets list. + Available filters: + + - `id=` + - `label= or label==value` + - `name=` - `names=` * } * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\SecretListInternalServerErrorException + * @throws \Docker\API\Exception\SecretListServiceUnavailableException * * @return null|\Docker\API\Model\Secret[]|\Psr\Http\Message\ResponseInterface */ @@ -1784,11 +2285,11 @@ public function secretList(array $queryParameters = [], string $fetch = self::FE * * @param \Docker\API\Model\SecretsCreatePostBody $body * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) - * @throws \Docker\API\Exception\SecretCreateNotAcceptableException * @throws \Docker\API\Exception\SecretCreateConflictException * @throws \Docker\API\Exception\SecretCreateInternalServerErrorException + * @throws \Docker\API\Exception\SecretCreateServiceUnavailableException * - * @return null|\Docker\API\Model\SecretsCreatePostResponse201|\Psr\Http\Message\ResponseInterface + * @return null|\Docker\API\Model\IdResponse|\Psr\Http\Message\ResponseInterface */ public function secretCreate(\Docker\API\Model\SecretsCreatePostBody $body, string $fetch = self::FETCH_OBJECT) { @@ -1801,6 +2302,7 @@ public function secretCreate(\Docker\API\Model\SecretsCreatePostBody $body, stri * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\SecretDeleteNotFoundException * @throws \Docker\API\Exception\SecretDeleteInternalServerErrorException + * @throws \Docker\API\Exception\SecretDeleteServiceUnavailableException * * @return null|\Psr\Http\Message\ResponseInterface */ @@ -1814,8 +2316,8 @@ public function secretDelete(string $id, string $fetch = self::FETCH_OBJECT) * @param string $id ID of the secret * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) * @throws \Docker\API\Exception\SecretInspectNotFoundException - * @throws \Docker\API\Exception\SecretInspectNotAcceptableException * @throws \Docker\API\Exception\SecretInspectInternalServerErrorException + * @throws \Docker\API\Exception\SecretInspectServiceUnavailableException * * @return null|\Docker\API\Model\Secret|\Psr\Http\Message\ResponseInterface */ @@ -1823,6 +2325,151 @@ public function secretInspect(string $id, string $fetch = self::FETCH_OBJECT) { return $this->executeEndpoint(new \Docker\API\Endpoint\SecretInspect($id), $fetch); } + /** + * + * + * @param string $id The ID or name of the secret + * @param \Docker\API\Model\SecretSpec $body The spec of the secret to update. Currently, only the Labels field + can be updated. All other fields must remain unchanged from the + [SecretInspect endpoint](#operation/SecretInspect) response values. + + * @param array $queryParameters { + * @var int $version The version number of the secret object being updated. This is + required to avoid conflicting writes. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SecretUpdateBadRequestException + * @throws \Docker\API\Exception\SecretUpdateNotFoundException + * @throws \Docker\API\Exception\SecretUpdateInternalServerErrorException + * @throws \Docker\API\Exception\SecretUpdateServiceUnavailableException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function secretUpdate(string $id, \Docker\API\Model\SecretSpec $body, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\SecretUpdate($id, $body, $queryParameters), $fetch); + } + /** + * + * + * @param array $queryParameters { + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to + process on the configs list. + + Available filters: + + - `id=` + - `label= or label==value` + - `name=` + - `names=` + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ConfigListInternalServerErrorException + * @throws \Docker\API\Exception\ConfigListServiceUnavailableException + * + * @return null|\Docker\API\Model\Config[]|\Psr\Http\Message\ResponseInterface + */ + public function configList(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ConfigList($queryParameters), $fetch); + } + /** + * + * + * @param \Docker\API\Model\ConfigsCreatePostBody $body + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ConfigCreateConflictException + * @throws \Docker\API\Exception\ConfigCreateInternalServerErrorException + * @throws \Docker\API\Exception\ConfigCreateServiceUnavailableException + * + * @return null|\Docker\API\Model\IdResponse|\Psr\Http\Message\ResponseInterface + */ + public function configCreate(\Docker\API\Model\ConfigsCreatePostBody $body, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ConfigCreate($body), $fetch); + } + /** + * + * + * @param string $id ID of the config + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ConfigDeleteNotFoundException + * @throws \Docker\API\Exception\ConfigDeleteInternalServerErrorException + * @throws \Docker\API\Exception\ConfigDeleteServiceUnavailableException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function configDelete(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ConfigDelete($id), $fetch); + } + /** + * + * + * @param string $id ID of the config + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ConfigInspectNotFoundException + * @throws \Docker\API\Exception\ConfigInspectInternalServerErrorException + * @throws \Docker\API\Exception\ConfigInspectServiceUnavailableException + * + * @return null|\Docker\API\Model\Config|\Psr\Http\Message\ResponseInterface + */ + public function configInspect(string $id, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ConfigInspect($id), $fetch); + } + /** + * + * + * @param string $id The ID or name of the config + * @param \Docker\API\Model\ConfigSpec $body The spec of the config to update. Currently, only the Labels field + can be updated. All other fields must remain unchanged from the + [ConfigInspect endpoint](#operation/ConfigInspect) response values. + + * @param array $queryParameters { + * @var int $version The version number of the config object being updated. This is + required to avoid conflicting writes. + + * } + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\ConfigUpdateBadRequestException + * @throws \Docker\API\Exception\ConfigUpdateNotFoundException + * @throws \Docker\API\Exception\ConfigUpdateInternalServerErrorException + * @throws \Docker\API\Exception\ConfigUpdateServiceUnavailableException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function configUpdate(string $id, \Docker\API\Model\ConfigSpec $body, array $queryParameters = [], string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\ConfigUpdate($id, $body, $queryParameters), $fetch); + } + /** + * Return image digest and platform information by contacting the registry. + * + * @param string $name Image name or id + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\DistributionInspectUnauthorizedException + * @throws \Docker\API\Exception\DistributionInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\DistributionInspect|\Psr\Http\Message\ResponseInterface + */ + public function distributionInspect(string $name, string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\DistributionInspect($name), $fetch); + } + /** + * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) + * @throws \Docker\API\Exception\SessionBadRequestException + * @throws \Docker\API\Exception\SessionInternalServerErrorException + * + * @return null|\Psr\Http\Message\ResponseInterface + */ + public function session(string $fetch = self::FETCH_OBJECT) + { + return $this->executeEndpoint(new \Docker\API\Endpoint\Session(), $fetch); + } public static function create($httpClient = null, array $additionalPlugins = [], array $additionalNormalizers = []) { if (null === $httpClient) { diff --git a/generated/Endpoint/BuildPrune.php b/generated/Endpoint/BuildPrune.php new file mode 100644 index 000000000..91f6a8875 --- /dev/null +++ b/generated/Endpoint/BuildPrune.php @@ -0,0 +1,83 @@ +` remove cache older than ``. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon's local time. + - `id=` + - `parent=` + - `type=` + - `description=` + - `inuse` + - `shared` + - `private` + + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/build/prune'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['keep-storage', 'all', 'filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('keep-storage', ['int']); + $optionsResolver->addAllowedTypes('all', ['bool']); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\BuildPruneInternalServerErrorException + * + * @return null|\Docker\API\Model\BuildPrunePostResponse200 + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\BuildPrunePostResponse200', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\BuildPruneInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ConfigCreate.php b/generated/Endpoint/ConfigCreate.php new file mode 100644 index 000000000..f15acc034 --- /dev/null +++ b/generated/Endpoint/ConfigCreate.php @@ -0,0 +1,63 @@ +body = $body; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return '/configs/create'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ConfigCreateConflictException + * @throws \Docker\API\Exception\ConfigCreateInternalServerErrorException + * @throws \Docker\API\Exception\ConfigCreateServiceUnavailableException + * + * @return null|\Docker\API\Model\IdResponse + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (201 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\IdResponse', 'json'); + } + if (409 === $status) { + throw new \Docker\API\Exception\ConfigCreateConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ConfigCreateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (503 === $status) { + throw new \Docker\API\Exception\ConfigCreateServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ConfigDelete.php b/generated/Endpoint/ConfigDelete.php new file mode 100644 index 000000000..e6c3bae41 --- /dev/null +++ b/generated/Endpoint/ConfigDelete.php @@ -0,0 +1,64 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'DELETE'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/configs/{id}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ConfigDeleteNotFoundException + * @throws \Docker\API\Exception\ConfigDeleteInternalServerErrorException + * @throws \Docker\API\Exception\ConfigDeleteServiceUnavailableException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\ConfigDeleteNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ConfigDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (503 === $status) { + throw new \Docker\API\Exception\ConfigDeleteServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ConfigInspect.php b/generated/Endpoint/ConfigInspect.php new file mode 100644 index 000000000..b450c11d0 --- /dev/null +++ b/generated/Endpoint/ConfigInspect.php @@ -0,0 +1,64 @@ +id = $id; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/configs/{id}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ConfigInspectNotFoundException + * @throws \Docker\API\Exception\ConfigInspectInternalServerErrorException + * @throws \Docker\API\Exception\ConfigInspectServiceUnavailableException + * + * @return null|\Docker\API\Model\Config + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Config', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\ConfigInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ConfigInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (503 === $status) { + throw new \Docker\API\Exception\ConfigInspectServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ConfigList.php b/generated/Endpoint/ConfigList.php new file mode 100644 index 000000000..8a4486ffc --- /dev/null +++ b/generated/Endpoint/ConfigList.php @@ -0,0 +1,79 @@ +` + - `label= or label==value` + - `name=` + - `names=` + + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return '/configs'; + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ConfigListInternalServerErrorException + * @throws \Docker\API\Exception\ConfigListServiceUnavailableException + * + * @return null|\Docker\API\Model\Config[] + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\Config[]', 'json'); + } + if (500 === $status) { + throw new \Docker\API\Exception\ConfigListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (503 === $status) { + throw new \Docker\API\Exception\ConfigListServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ConfigUpdate.php b/generated/Endpoint/ConfigUpdate.php new file mode 100644 index 000000000..32fc00e03 --- /dev/null +++ b/generated/Endpoint/ConfigUpdate.php @@ -0,0 +1,88 @@ +id = $id; + $this->body = $body; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/configs/{id}/update'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['version']); + $optionsResolver->setRequired(['version']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('version', ['int']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\ConfigUpdateBadRequestException + * @throws \Docker\API\Exception\ConfigUpdateNotFoundException + * @throws \Docker\API\Exception\ConfigUpdateInternalServerErrorException + * @throws \Docker\API\Exception\ConfigUpdateServiceUnavailableException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (400 === $status) { + throw new \Docker\API\Exception\ConfigUpdateBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\ConfigUpdateNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\ConfigUpdateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (503 === $status) { + throw new \Docker\API\Exception\ConfigUpdateServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerGetArchive.php b/generated/Endpoint/ContainerArchive.php similarity index 67% rename from generated/Endpoint/ContainerGetArchive.php rename to generated/Endpoint/ContainerArchive.php index be0d9afb2..f4f7251b3 100644 --- a/generated/Endpoint/ContainerGetArchive.php +++ b/generated/Endpoint/ContainerArchive.php @@ -2,11 +2,11 @@ namespace Docker\API\Endpoint; -class ContainerGetArchive extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint +class ContainerArchive extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { protected $id; /** - * Get an tar archive of a resource in the filesystem of container id. + * Get a tar archive of a resource in the filesystem of container id. * * @param string $id ID or name of the container * @param array $queryParameters { @@ -47,9 +47,9 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver /** * {@inheritdoc} * - * @throws \Docker\API\Exception\ContainerGetArchiveBadRequestException - * @throws \Docker\API\Exception\ContainerGetArchiveNotFoundException - * @throws \Docker\API\Exception\ContainerGetArchiveInternalServerErrorException + * @throws \Docker\API\Exception\ContainerArchiveBadRequestException + * @throws \Docker\API\Exception\ContainerArchiveNotFoundException + * @throws \Docker\API\Exception\ContainerArchiveInternalServerErrorException * * @return null */ @@ -61,13 +61,13 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re return null; } if (400 === $status) { - throw new \Docker\API\Exception\ContainerGetArchiveBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + throw new \Docker\API\Exception\ContainerArchiveBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } if (404 === $status) { - throw new \Docker\API\Exception\ContainerGetArchiveNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + throw new \Docker\API\Exception\ContainerArchiveNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } if (500 === $status) { - throw new \Docker\API\Exception\ContainerGetArchiveInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + throw new \Docker\API\Exception\ContainerArchiveInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } } public function getAuthenticationScopes(): array diff --git a/generated/Endpoint/ContainerArchiveHead.php b/generated/Endpoint/ContainerArchiveInfo.php similarity index 73% rename from generated/Endpoint/ContainerArchiveHead.php rename to generated/Endpoint/ContainerArchiveInfo.php index e4493ef35..03bdbd97a 100644 --- a/generated/Endpoint/ContainerArchiveHead.php +++ b/generated/Endpoint/ContainerArchiveInfo.php @@ -2,17 +2,20 @@ namespace Docker\API\Endpoint; -class ContainerArchiveHead extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint +class ContainerArchiveInfo extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { protected $id; /** - * A response header `X-Docker-Container-Path-Stat` is return containing a base64 - encoded JSON object with some filesystem header information about the path. - * - * @param string $id ID or name of the container - * @param array $queryParameters { - * @var string $path Resource in the container’s filesystem to archive. - * } - */ + * A response header `X-Docker-Container-Path-Stat` is returned, containing + a base64 - encoded JSON object with some filesystem header information + about the path. + + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $path Resource in the container’s filesystem to archive. + * } + */ public function __construct(string $id, array $queryParameters = []) { $this->id = $id; @@ -47,9 +50,9 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver /** * {@inheritdoc} * - * @throws \Docker\API\Exception\ContainerArchiveHeadBadRequestException - * @throws \Docker\API\Exception\ContainerArchiveHeadNotFoundException - * @throws \Docker\API\Exception\ContainerArchiveHeadInternalServerErrorException + * @throws \Docker\API\Exception\ContainerArchiveInfoBadRequestException + * @throws \Docker\API\Exception\ContainerArchiveInfoNotFoundException + * @throws \Docker\API\Exception\ContainerArchiveInfoInternalServerErrorException * * @return null */ @@ -61,13 +64,13 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re return null; } if (400 === $status) { - throw new \Docker\API\Exception\ContainerArchiveHeadBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + throw new \Docker\API\Exception\ContainerArchiveInfoBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } if (404 === $status) { - throw new \Docker\API\Exception\ContainerArchiveHeadNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + throw new \Docker\API\Exception\ContainerArchiveInfoNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } if (500 === $status) { - throw new \Docker\API\Exception\ContainerArchiveHeadInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + throw new \Docker\API\Exception\ContainerArchiveInfoInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } } public function getAuthenticationScopes(): array diff --git a/generated/Endpoint/ContainerAttach.php b/generated/Endpoint/ContainerAttach.php index 173695de8..4b8751afb 100644 --- a/generated/Endpoint/ContainerAttach.php +++ b/generated/Endpoint/ContainerAttach.php @@ -6,15 +6,20 @@ class ContainerAttach extends \Docker\API\Runtime\Client\BaseEndpoint implements { protected $id; /** - * Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached. + * Attach to a container to read its output or send it input. You can attach + to the same container multiple times and you can reattach to containers + that have been detached. - Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything. + Either the `stream` or `logs` parameter must be `true` for this endpoint + to do anything. - See [the documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details. + See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) + for more details. ### Hijacking - This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket. + This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, + and `stderr` on the same socket. This is the response from the daemon for an attach request: @@ -25,9 +30,11 @@ class ContainerAttach extends \Docker\API\Runtime\Client\BaseEndpoint implements [STREAM] ``` - After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server. + After the headers and two new lines, the TCP connection can now be used + for raw, bidirectional communication between the client and server. - To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers. + To hint potential proxies about connection hijacking, the Docker client + can also optionally send connection upgrade headers. For example, the client sends this request to upgrade the connection: @@ -37,7 +44,8 @@ class ContainerAttach extends \Docker\API\Runtime\Client\BaseEndpoint implements Connection: Upgrade ``` - The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream: + The Docker daemon will respond with a `101 UPGRADED` response, and will + similarly follow with the raw stream: ``` HTTP/1.1 101 UPGRADED @@ -50,9 +58,15 @@ class ContainerAttach extends \Docker\API\Runtime\Client\BaseEndpoint implements ### Stream format - When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload. + When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), + the HTTP Content-Type header is set to application/vnd.docker.multiplexed-stream + and the stream over the hijacked connected is multiplexed to separate out + `stdout` and `stderr`. The stream consists of a series of frames, each + containing a header and a payload. - The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`). + The header contains the information which the stream writes (`stdout` or + `stderr`). It also contains the size of the associated frame encoded in + the last four bytes (`uint32`). It is encoded on the first eight bytes like this: @@ -66,9 +80,11 @@ class ContainerAttach extends \Docker\API\Runtime\Client\BaseEndpoint implements - 1: `stdout` - 2: `stderr` - `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian. + `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size + encoded as big endian. - Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`. + Following the header is the payload, which is the specified number of + bytes of `STREAM_TYPE`. The simplest way to implement this protocol is the following: @@ -80,19 +96,29 @@ class ContainerAttach extends \Docker\API\Runtime\Client\BaseEndpoint implements ### Stream format when using a TTY - When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`. + When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), + the stream is not multiplexed. The data exchanged over the hijacked + connection is simply the raw data from the process PTY and client's + `stdin`. * * @param string $id ID or name of the container * @param array $queryParameters { - * @var string $detachKeys Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + * @var string $detachKeys Override the key sequence for detaching a container.Format is a single + character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, + `@`, `^`, `[`, `,` or `_`. + * @var bool $logs Replay previous logs from the container. - This is useful for attaching to a container that has started and you want to output everything since the container started. + This is useful for attaching to a container that has started and you + want to output everything since the container started. + + If `stream` is also enabled, once all the previous output has been + returned, it will seamlessly transition into streaming current + output. - If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output. + * @var bool $stream Stream attached streams from the time the request was made onwards. - * @var bool $stream Stream attached streams from the time the request was made onwards * @var bool $stdin Attach to `stdin` * @var bool $stdout Attach to `stdout` * @var bool $stderr Attach to `stderr` diff --git a/generated/Endpoint/ContainerAttachWebsocket.php b/generated/Endpoint/ContainerAttachWebsocket.php index e733ed6bb..fb5266488 100644 --- a/generated/Endpoint/ContainerAttachWebsocket.php +++ b/generated/Endpoint/ContainerAttachWebsocket.php @@ -6,15 +6,21 @@ class ContainerAttachWebsocket extends \Docker\API\Runtime\Client\BaseEndpoint i { protected $id; /** - * - * - * @param string $id ID or name of the container - * @param array $queryParameters { - * @var string $detachKeys Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`. - * @var bool $logs Return logs - * @var bool $stream Return stream - * } - */ + * + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $detachKeys Override the key sequence for detaching a container.Format is a single + character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, + `@`, `^`, `[`, `,`, or `_`. + + * @var bool $logs Return logs + * @var bool $stream Return stream + * @var bool $stdin Attach to `stdin` + * @var bool $stdout Attach to `stdout` + * @var bool $stderr Attach to `stderr` + * } + */ public function __construct(string $id, array $queryParameters = []) { $this->id = $id; @@ -40,12 +46,15 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['detachKeys', 'logs', 'stream']); + $optionsResolver->setDefined(['detachKeys', 'logs', 'stream', 'stdin', 'stdout', 'stderr']); $optionsResolver->setRequired([]); - $optionsResolver->setDefaults(['logs' => false, 'stream' => false]); + $optionsResolver->setDefaults(['logs' => false, 'stream' => false, 'stdin' => false, 'stdout' => false, 'stderr' => false]); $optionsResolver->addAllowedTypes('detachKeys', ['string']); $optionsResolver->addAllowedTypes('logs', ['bool']); $optionsResolver->addAllowedTypes('stream', ['bool']); + $optionsResolver->addAllowedTypes('stdin', ['bool']); + $optionsResolver->addAllowedTypes('stdout', ['bool']); + $optionsResolver->addAllowedTypes('stderr', ['bool']); return $optionsResolver; } /** diff --git a/generated/Endpoint/ContainerChanges.php b/generated/Endpoint/ContainerChanges.php index 02f116dd7..3f4a6cd8b 100644 --- a/generated/Endpoint/ContainerChanges.php +++ b/generated/Endpoint/ContainerChanges.php @@ -6,11 +6,12 @@ class ContainerChanges extends \Docker\API\Runtime\Client\BaseEndpoint implement { protected $id; /** - * Returns which files in a container's filesystem have been added, deleted, or modified. The `Kind` of modification can be one of: + * Returns which files in a container's filesystem have been added, deleted, + or modified. The `Kind` of modification can be one of: - - `0`: Modified - - `1`: Added - - `2`: Deleted + - `0`: Modified ("C") + - `1`: Added ("A") + - `2`: Deleted ("D") * * @param string $id ID or name of the container @@ -42,14 +43,14 @@ public function getExtraHeaders(): array * @throws \Docker\API\Exception\ContainerChangesNotFoundException * @throws \Docker\API\Exception\ContainerChangesInternalServerErrorException * - * @return null|\Docker\API\Model\ContainersIdChangesGetResponse200Item[] + * @return null|\Docker\API\Model\FilesystemChange[] */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\ContainersIdChangesGetResponse200Item[]', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\FilesystemChange[]', 'json'); } if (404 === $status) { throw new \Docker\API\Exception\ContainerChangesNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ContainerCreate.php b/generated/Endpoint/ContainerCreate.php index bb8bf668a..0d35ac669 100644 --- a/generated/Endpoint/ContainerCreate.php +++ b/generated/Endpoint/ContainerCreate.php @@ -5,13 +5,32 @@ class ContainerCreate extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { /** - * - * - * @param \Docker\API\Model\ContainersCreatePostBody $body Container to create - * @param array $queryParameters { - * @var string $name Assign the specified name to the container. Must match `/?[a-zA-Z0-9_-]+`. - * } - */ + * + * + * @param \Docker\API\Model\ContainersCreatePostBody $body Container to create + * @param array $queryParameters { + * @var string $name Assign the specified name to the container. Must match + `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. + + * @var string $platform Platform in the format `os[/arch[/variant]]` used for image lookup. + + When specified, the daemon checks if the requested image is present + in the local image cache with the given OS and Architecture, and + otherwise returns a `404` status. + + If the option is not set, the host's native OS and Architecture are + used to look up the image in the image cache. However, if no platform + is passed and the given image does exist in the local image cache, + but its OS or architecture does not match, the container is created + with the available image, and a warning is added to the `Warnings` + field in the response, for example; + + WARNING: The requested image's platform (linux/arm64/v8) does not + match the detected host platform (linux/amd64) and no + specific platform was requested + + * } + */ public function __construct(\Docker\API\Model\ContainersCreatePostBody $body, array $queryParameters = []) { $this->body = $body; @@ -37,10 +56,11 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['name']); + $optionsResolver->setDefined(['name', 'platform']); $optionsResolver->setRequired([]); - $optionsResolver->setDefaults([]); + $optionsResolver->setDefaults(['platform' => '']); $optionsResolver->addAllowedTypes('name', ['string']); + $optionsResolver->addAllowedTypes('platform', ['string']); return $optionsResolver; } /** @@ -48,18 +68,17 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * * @throws \Docker\API\Exception\ContainerCreateBadRequestException * @throws \Docker\API\Exception\ContainerCreateNotFoundException - * @throws \Docker\API\Exception\ContainerCreateNotAcceptableException * @throws \Docker\API\Exception\ContainerCreateConflictException * @throws \Docker\API\Exception\ContainerCreateInternalServerErrorException * - * @return null|\Docker\API\Model\ContainersCreatePostResponse201 + * @return null|\Docker\API\Model\ContainerCreateResponse */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (201 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\ContainersCreatePostResponse201', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\ContainerCreateResponse', 'json'); } if (400 === $status) { throw new \Docker\API\Exception\ContainerCreateBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); @@ -67,9 +86,6 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (404 === $status) { throw new \Docker\API\Exception\ContainerCreateNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } - if (406 === $status) { - throw new \Docker\API\Exception\ContainerCreateNotAcceptableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); - } if (409 === $status) { throw new \Docker\API\Exception\ContainerCreateConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } diff --git a/generated/Endpoint/ContainerDelete.php b/generated/Endpoint/ContainerDelete.php index d1cdd07f2..6b2ed4f4d 100644 --- a/generated/Endpoint/ContainerDelete.php +++ b/generated/Endpoint/ContainerDelete.php @@ -12,6 +12,7 @@ class ContainerDelete extends \Docker\API\Runtime\Client\BaseEndpoint implements * @param array $queryParameters { * @var bool $v Remove anonymous volumes associated with the container. * @var bool $force If the container is running, kill it before removing it. + * @var bool $link Remove the specified link associated with the container. * } */ public function __construct(string $id, array $queryParameters = []) @@ -39,11 +40,12 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['v', 'force']); + $optionsResolver->setDefined(['v', 'force', 'link']); $optionsResolver->setRequired([]); - $optionsResolver->setDefaults(['v' => false, 'force' => false]); + $optionsResolver->setDefaults(['v' => false, 'force' => false, 'link' => false]); $optionsResolver->addAllowedTypes('v', ['bool']); $optionsResolver->addAllowedTypes('force', ['bool']); + $optionsResolver->addAllowedTypes('link', ['bool']); return $optionsResolver; } /** @@ -51,6 +53,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * * @throws \Docker\API\Exception\ContainerDeleteBadRequestException * @throws \Docker\API\Exception\ContainerDeleteNotFoundException + * @throws \Docker\API\Exception\ContainerDeleteConflictException * @throws \Docker\API\Exception\ContainerDeleteInternalServerErrorException * * @return null @@ -68,6 +71,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (404 === $status) { throw new \Docker\API\Exception\ContainerDeleteNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (409 === $status) { + throw new \Docker\API\Exception\ContainerDeleteConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } if (500 === $status) { throw new \Docker\API\Exception\ContainerDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } diff --git a/generated/Endpoint/ContainerKill.php b/generated/Endpoint/ContainerKill.php index 4a9f2e313..3921da149 100644 --- a/generated/Endpoint/ContainerKill.php +++ b/generated/Endpoint/ContainerKill.php @@ -6,13 +6,16 @@ class ContainerKill extends \Docker\API\Runtime\Client\BaseEndpoint implements \ { protected $id; /** - * Send a POSIX signal to a container, defaulting to killing to the container. - * - * @param string $id ID or name of the container - * @param array $queryParameters { - * @var string $signal Signal to send to the container as an integer or string (e.g. `SIGINT`) - * } - */ + * Send a POSIX signal to a container, defaulting to killing to the + container. + + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $signal Signal to send to the container as an integer or string (e.g. `SIGINT`). + + * } + */ public function __construct(string $id, array $queryParameters = []) { $this->id = $id; @@ -48,6 +51,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * {@inheritdoc} * * @throws \Docker\API\Exception\ContainerKillNotFoundException + * @throws \Docker\API\Exception\ContainerKillConflictException * @throws \Docker\API\Exception\ContainerKillInternalServerErrorException * * @return null @@ -62,6 +66,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (404 === $status) { throw new \Docker\API\Exception\ContainerKillNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (409 === $status) { + throw new \Docker\API\Exception\ContainerKillConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } if (500 === $status) { throw new \Docker\API\Exception\ContainerKillInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } diff --git a/generated/Endpoint/ContainerList.php b/generated/Endpoint/ContainerList.php index 5bf793db1..f3f912112 100644 --- a/generated/Endpoint/ContainerList.php +++ b/generated/Endpoint/ContainerList.php @@ -5,28 +5,43 @@ class ContainerList extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { /** - * + * Returns a list of containers. For details on the format, see the + [inspect endpoint](#operation/ContainerInspect). + + Note that it uses a different, smaller representation of a container + than inspecting a single container. For example, the list of linked + containers is not propagated . + * * @param array $queryParameters { - * @var bool $all Return all containers. By default, only running containers are shown - * @var int $limit Return this number of most recently created containers, including non-running ones. + * @var bool $all Return all containers. By default, only running containers are shown. + + * @var int $limit Return this number of most recently created containers, including + non-running ones. + * @var bool $size Return the size of container as fields `SizeRw` and `SizeRootFs`. - * @var string $filters Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{"status": ["paused"]}` will only return paused containers. + + * @var string $filters Filters to process on the container list, encoded as JSON (a + `map[string][]string`). For example, `{"status": ["paused"]}` will + only return paused containers. Available filters: + + - `ancestor`=(`[:]`, ``, or ``) + - `before`=(`` or ``) + - `expose`=(`[/]`|`/[]`) - `exited=` containers with exit code of `` - - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) - - `label=key` or `label="key=value"` of a container label - - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) + - `health`=(`starting`|`healthy`|`unhealthy`|`none`) - `id=` a container's ID - - `name=` a container's name + - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) - `is-task=`(`true`|`false`) - - `ancestor`=(`[:]`, ``, or ``) - - `before`=(`` or ``) + - `label=key` or `label="key=value"` of a container label + - `name=` a container's name + - `network`=(`` or ``) + - `publish`=(`[/]`|`/[]`) - `since`=(`` or ``) + - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) - `volume`=(`` or ``) - - `network`=(`` or ``) - - `health`=(`starting`|`healthy`|`unhealthy`|`none`) * } */ @@ -69,14 +84,14 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * @throws \Docker\API\Exception\ContainerListBadRequestException * @throws \Docker\API\Exception\ContainerListInternalServerErrorException * - * @return null|\Docker\API\Model\ContainerSummaryItem[] + * @return null|\Docker\API\Model\ContainerSummary[] */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\ContainerSummaryItem[]', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\ContainerSummary[]', 'json'); } if (400 === $status) { throw new \Docker\API\Exception\ContainerListBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ContainerLogs.php b/generated/Endpoint/ContainerLogs.php index 921d7df4f..6d94f88ad 100644 --- a/generated/Endpoint/ContainerLogs.php +++ b/generated/Endpoint/ContainerLogs.php @@ -8,20 +8,21 @@ class ContainerLogs extends \Docker\API\Runtime\Client\BaseEndpoint implements \ /** * Get `stdout` and `stderr` logs from a container. - Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. + Note: This endpoint works only for containers with the `json-file` or + `journald` logging driver. * * @param string $id ID or name of the container * @param array $queryParameters { - * @var bool $follow Return the logs as a stream. - - This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). - + * @var bool $follow Keep connection after returning logs. * @var bool $stdout Return logs from `stdout` * @var bool $stderr Return logs from `stderr` * @var int $since Only return logs since this time, as a UNIX timestamp + * @var int $until Only return logs before this time, as a UNIX timestamp * @var bool $timestamps Add timestamps to every log line - * @var string $tail Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. + * @var string $tail Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + * } */ public function __construct(string $id, array $queryParameters = []) @@ -49,13 +50,14 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['follow', 'stdout', 'stderr', 'since', 'timestamps', 'tail']); + $optionsResolver->setDefined(['follow', 'stdout', 'stderr', 'since', 'until', 'timestamps', 'tail']); $optionsResolver->setRequired([]); - $optionsResolver->setDefaults(['follow' => false, 'stdout' => false, 'stderr' => false, 'since' => 0, 'timestamps' => false, 'tail' => 'all']); + $optionsResolver->setDefaults(['follow' => false, 'stdout' => false, 'stderr' => false, 'since' => 0, 'until' => 0, 'timestamps' => false, 'tail' => 'all']); $optionsResolver->addAllowedTypes('follow', ['bool']); $optionsResolver->addAllowedTypes('stdout', ['bool']); $optionsResolver->addAllowedTypes('stderr', ['bool']); $optionsResolver->addAllowedTypes('since', ['int']); + $optionsResolver->addAllowedTypes('until', ['int']); $optionsResolver->addAllowedTypes('timestamps', ['bool']); $optionsResolver->addAllowedTypes('tail', ['string']); return $optionsResolver; @@ -72,9 +74,6 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re { $status = $response->getStatusCode(); $body = (string) $response->getBody(); - if (101 === $status) { - return json_decode($body); - } if (200 === $status) { return json_decode($body); } diff --git a/generated/Endpoint/ContainerPause.php b/generated/Endpoint/ContainerPause.php index 7b94433f5..dbd13afab 100644 --- a/generated/Endpoint/ContainerPause.php +++ b/generated/Endpoint/ContainerPause.php @@ -6,9 +6,12 @@ class ContainerPause extends \Docker\API\Runtime\Client\BaseEndpoint implements { protected $id; /** - * Use the cgroups freezer to suspend all processes in a container. + * Use the freezer cgroup to suspend all processes in a container. - Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. + Traditionally, when suspending a process the `SIGSTOP` signal is used, + which is observable by the process being suspended. With the freezer + cgroup the process is unaware, and unable to capture, that it is being + suspended, and subsequently resumed. * * @param string $id ID or name of the container diff --git a/generated/Endpoint/ContainerPrune.php b/generated/Endpoint/ContainerPrune.php index 0fb79aa6f..60a57b5da 100644 --- a/generated/Endpoint/ContainerPrune.php +++ b/generated/Endpoint/ContainerPrune.php @@ -11,6 +11,8 @@ class ContainerPrune extends \Docker\API\Runtime\Client\BaseEndpoint implements * @var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: + - `until=` Prune containers created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune containers with (or without, in case `label!=...` is used) the specified labels. * } */ diff --git a/generated/Endpoint/ContainerResize.php b/generated/Endpoint/ContainerResize.php index 6eee10023..58458768e 100644 --- a/generated/Endpoint/ContainerResize.php +++ b/generated/Endpoint/ContainerResize.php @@ -6,12 +6,12 @@ class ContainerResize extends \Docker\API\Runtime\Client\BaseEndpoint implements { protected $id; /** - * Resize the TTY for a container. You must restart the container for the resize to take effect. + * Resize the TTY for a container. * * @param string $id ID or name of the container * @param array $queryParameters { - * @var int $h Height of the tty session in characters - * @var int $w Width of the tty session in characters + * @var int $h Height of the TTY session in characters + * @var int $w Width of the TTY session in characters * } */ public function __construct(string $id, array $queryParameters = []) diff --git a/generated/Endpoint/ContainerRestart.php b/generated/Endpoint/ContainerRestart.php index d58b7b8e4..9cb04cdb9 100644 --- a/generated/Endpoint/ContainerRestart.php +++ b/generated/Endpoint/ContainerRestart.php @@ -10,6 +10,7 @@ class ContainerRestart extends \Docker\API\Runtime\Client\BaseEndpoint implement * * @param string $id ID or name of the container * @param array $queryParameters { + * @var string $signal Signal to send to the container as an integer or string (e.g. `SIGINT`). * @var int $t Number of seconds to wait before killing the container * } */ @@ -38,9 +39,10 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['t']); + $optionsResolver->setDefined(['signal', 't']); $optionsResolver->setRequired([]); $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('signal', ['string']); $optionsResolver->addAllowedTypes('t', ['int']); return $optionsResolver; } diff --git a/generated/Endpoint/ContainerStart.php b/generated/Endpoint/ContainerStart.php index 23d2db884..1fc3ef17c 100644 --- a/generated/Endpoint/ContainerStart.php +++ b/generated/Endpoint/ContainerStart.php @@ -6,13 +6,16 @@ class ContainerStart extends \Docker\API\Runtime\Client\BaseEndpoint implements { protected $id; /** - * - * - * @param string $id ID or name of the container - * @param array $queryParameters { - * @var string $detachKeys Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. - * } - */ + * + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $detachKeys Override the key sequence for detaching a container. Format is a + single character `[a-Z]` or `ctrl-` where `` is one + of: `a-z`, `@`, `^`, `[`, `,` or `_`. + + * } + */ public function __construct(string $id, array $queryParameters = []) { $this->id = $id; @@ -50,7 +53,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * @throws \Docker\API\Exception\ContainerStartNotFoundException * @throws \Docker\API\Exception\ContainerStartInternalServerErrorException * - * @return null|\Docker\API\Model\ErrorResponse + * @return null */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { @@ -60,7 +63,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re return null; } if (304 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'); + return null; } if (404 === $status) { throw new \Docker\API\Exception\ContainerStartNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ContainerStats.php b/generated/Endpoint/ContainerStats.php index 2f59f6628..2eb8f38a8 100644 --- a/generated/Endpoint/ContainerStats.php +++ b/generated/Endpoint/ContainerStats.php @@ -6,14 +6,42 @@ class ContainerStats extends \Docker\API\Runtime\Client\BaseEndpoint implements { protected $id; /** - * This endpoint returns a live stream of a container’s resource usage statistics. + * This endpoint returns a live stream of a container’s resource usage + statistics. - The `precpu_stats` is the CPU statistic of last read, which is used for calculating the CPU usage percentage. It is not the same as the `cpu_stats` field. + The `precpu_stats` is the CPU statistic of the *previous* read, and is + used to calculate the CPU usage percentage. It is not an exact copy + of the `cpu_stats` field. + + If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is + nil then for compatibility with older daemons the length of the + corresponding `cpu_usage.percpu_usage` array should be used. + + On a cgroup v2 host, the following fields are not set + * `blkio_stats`: all fields other than `io_service_bytes_recursive` + * `cpu_stats`: `cpu_usage.percpu_usage` + * `memory_stats`: `max_usage` and `failcnt` + Also, `memory_stats.stats` fields are incompatible with cgroup v1. + + To calculate the values shown by the `stats` command of the docker cli tool + the following formulas can be used: + * used_memory = `memory_stats.usage - memory_stats.stats.cache` + * available_memory = `memory_stats.limit` + * Memory usage % = `(used_memory / available_memory) * 100.0` + * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` + * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` + * number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` + * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` * * @param string $id ID or name of the container * @param array $queryParameters { - * @var bool $stream Stream the output. If false, the stats will be output once and then it will disconnect. + * @var bool $stream Stream the output. If false, the stats will be output once and then + it will disconnect. + + * @var bool $one-shot Only get a single stat instead of waiting for 2 cycles. Must be used + with `stream=false`. + * } */ public function __construct(string $id, array $queryParameters = []) @@ -41,10 +69,11 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['stream']); + $optionsResolver->setDefined(['stream', 'one-shot']); $optionsResolver->setRequired([]); - $optionsResolver->setDefaults(['stream' => true]); + $optionsResolver->setDefaults(['stream' => true, 'one-shot' => false]); $optionsResolver->addAllowedTypes('stream', ['bool']); + $optionsResolver->addAllowedTypes('one-shot', ['bool']); return $optionsResolver; } /** diff --git a/generated/Endpoint/ContainerStop.php b/generated/Endpoint/ContainerStop.php index b75f5bbe6..46294929c 100644 --- a/generated/Endpoint/ContainerStop.php +++ b/generated/Endpoint/ContainerStop.php @@ -10,6 +10,7 @@ class ContainerStop extends \Docker\API\Runtime\Client\BaseEndpoint implements \ * * @param string $id ID or name of the container * @param array $queryParameters { + * @var string $signal Signal to send to the container as an integer or string (e.g. `SIGINT`). * @var int $t Number of seconds to wait before killing the container * } */ @@ -38,9 +39,10 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['t']); + $optionsResolver->setDefined(['signal', 't']); $optionsResolver->setRequired([]); $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('signal', ['string']); $optionsResolver->addAllowedTypes('t', ['int']); return $optionsResolver; } @@ -50,7 +52,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * @throws \Docker\API\Exception\ContainerStopNotFoundException * @throws \Docker\API\Exception\ContainerStopInternalServerErrorException * - * @return null|\Docker\API\Model\ErrorResponse + * @return null */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { @@ -60,7 +62,7 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re return null; } if (304 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'); + return null; } if (404 === $status) { throw new \Docker\API\Exception\ContainerStopNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ContainerTop.php b/generated/Endpoint/ContainerTop.php index 0c1e48dae..f366126e9 100644 --- a/generated/Endpoint/ContainerTop.php +++ b/generated/Endpoint/ContainerTop.php @@ -6,13 +6,15 @@ class ContainerTop extends \Docker\API\Runtime\Client\BaseEndpoint implements \D { protected $id; /** - * On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. - * - * @param string $id ID or name of the container - * @param array $queryParameters { - * @var string $ps_args The arguments to pass to `ps`. For example, `aux` - * } - */ + * On Unix systems, this is done by running the `ps` command. This endpoint + is not supported on Windows. + + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $ps_args The arguments to pass to `ps`. For example, `aux` + * } + */ public function __construct(string $id, array $queryParameters = []) { $this->id = $id; diff --git a/generated/Endpoint/ContainerUpdate.php b/generated/Endpoint/ContainerUpdate.php index dacbf92ae..49ce443fe 100644 --- a/generated/Endpoint/ContainerUpdate.php +++ b/generated/Endpoint/ContainerUpdate.php @@ -6,11 +6,13 @@ class ContainerUpdate extends \Docker\API\Runtime\Client\BaseEndpoint implements { protected $id; /** - * Change various configuration options of a container without having to recreate it. - * - * @param string $id ID or name of the container - * @param \Docker\API\Model\ContainersIdUpdatePostBody $update - */ + * Change various configuration options of a container without having to + recreate it. + + * + * @param string $id ID or name of the container + * @param \Docker\API\Model\ContainersIdUpdatePostBody $update + */ public function __construct(string $id, \Docker\API\Model\ContainersIdUpdatePostBody $update) { $this->id = $id; diff --git a/generated/Endpoint/ContainerWait.php b/generated/Endpoint/ContainerWait.php index 4c038c475..841198007 100644 --- a/generated/Endpoint/ContainerWait.php +++ b/generated/Endpoint/ContainerWait.php @@ -6,13 +6,20 @@ class ContainerWait extends \Docker\API\Runtime\Client\BaseEndpoint implements \ { protected $id; /** - * Block until a container stops, then returns the exit code. - * - * @param string $id ID or name of the container - */ - public function __construct(string $id) + * Block until a container stops, then returns the exit code. + * + * @param string $id ID or name of the container + * @param array $queryParameters { + * @var string $condition Wait until a container state reaches the given condition. + + Defaults to `not-running` if omitted or empty. + + * } + */ + public function __construct(string $id, array $queryParameters = []) { $this->id = $id; + $this->queryParameters = $queryParameters; } use \Docker\API\Runtime\Client\EndpointTrait; public function getMethod(): string @@ -31,20 +38,33 @@ public function getExtraHeaders(): array { return ['Accept' => ['application/json']]; } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['condition']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['condition' => 'not-running']); + $optionsResolver->addAllowedTypes('condition', ['string']); + return $optionsResolver; + } /** * {@inheritdoc} * + * @throws \Docker\API\Exception\ContainerWaitBadRequestException * @throws \Docker\API\Exception\ContainerWaitNotFoundException * @throws \Docker\API\Exception\ContainerWaitInternalServerErrorException * - * @return null|\Docker\API\Model\ContainersIdWaitPostResponse200 + * @return null|\Docker\API\Model\ContainerWaitResponse */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\ContainersIdWaitPostResponse200', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\ContainerWaitResponse', 'json'); + } + if (400 === $status) { + throw new \Docker\API\Exception\ContainerWaitBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } if (404 === $status) { throw new \Docker\API\Exception\ContainerWaitNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/DistributionInspect.php b/generated/Endpoint/DistributionInspect.php new file mode 100644 index 000000000..050476e30 --- /dev/null +++ b/generated/Endpoint/DistributionInspect.php @@ -0,0 +1,60 @@ +name = $name; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/distribution/{name}/json'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\DistributionInspectUnauthorizedException + * @throws \Docker\API\Exception\DistributionInspectInternalServerErrorException + * + * @return null|\Docker\API\Model\DistributionInspect + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return $serializer->deserialize($body, 'Docker\API\Model\DistributionInspect', 'json'); + } + if (401 === $status) { + throw new \Docker\API\Exception\DistributionInspectUnauthorizedException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\DistributionInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ExecResize.php b/generated/Endpoint/ExecResize.php index 2f516fb41..417bc6a8e 100644 --- a/generated/Endpoint/ExecResize.php +++ b/generated/Endpoint/ExecResize.php @@ -6,14 +6,16 @@ class ExecResize extends \Docker\API\Runtime\Client\BaseEndpoint implements \Doc { protected $id; /** - * Resize the TTY session used by an exec instance. This endpoint only works if `tty` was specified as part of creating and starting the exec instance. - * - * @param string $id Exec instance ID - * @param array $queryParameters { - * @var int $h Height of the TTY session in characters - * @var int $w Width of the TTY session in characters - * } - */ + * Resize the TTY session used by an exec instance. This endpoint only works + if `tty` was specified as part of creating and starting the exec instance. + + * + * @param string $id Exec instance ID + * @param array $queryParameters { + * @var int $h Height of the TTY session in characters + * @var int $w Width of the TTY session in characters + * } + */ public function __construct(string $id, array $queryParameters = []) { $this->id = $id; diff --git a/generated/Endpoint/ExecStart.php b/generated/Endpoint/ExecStart.php index 3e78194a0..00a5cb1ab 100644 --- a/generated/Endpoint/ExecStart.php +++ b/generated/Endpoint/ExecStart.php @@ -6,11 +6,14 @@ class ExecStart extends \Docker\API\Runtime\Client\BaseEndpoint implements \Dock { protected $id; /** - * Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command. - * - * @param string $id Exec instance ID - * @param \Docker\API\Model\ExecIdStartPostBody $execStartConfig - */ + * Starts a previously set up exec instance. If detach is true, this endpoint + returns immediately after starting the command. Otherwise, it sets up an + interactive session with the command. + + * + * @param string $id Exec instance ID + * @param \Docker\API\Model\ExecIdStartPostBody $execStartConfig + */ public function __construct(string $id, \Docker\API\Model\ExecIdStartPostBody $execStartConfig) { $this->id = $id; diff --git a/generated/Endpoint/GetPluginPrivileges.php b/generated/Endpoint/GetPluginPrivileges.php index 48f76976f..2faaa27a7 100644 --- a/generated/Endpoint/GetPluginPrivileges.php +++ b/generated/Endpoint/GetPluginPrivileges.php @@ -5,12 +5,14 @@ class GetPluginPrivileges extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { /** - * - * - * @param array $queryParameters { - * @var string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - * } - */ + * + * + * @param array $queryParameters { + * @var string $remote The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * } + */ public function __construct(array $queryParameters = []) { $this->queryParameters = $queryParameters; @@ -35,10 +37,10 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['name']); - $optionsResolver->setRequired(['name']); + $optionsResolver->setDefined(['remote']); + $optionsResolver->setRequired(['remote']); $optionsResolver->setDefaults([]); - $optionsResolver->addAllowedTypes('name', ['string']); + $optionsResolver->addAllowedTypes('remote', ['string']); return $optionsResolver; } /** @@ -46,14 +48,14 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * * @throws \Docker\API\Exception\GetPluginPrivilegesInternalServerErrorException * - * @return null|\Docker\API\Model\PluginsPrivilegesGetResponse200Item[] + * @return null|\Docker\API\Model\PluginPrivilege[] */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\PluginsPrivilegesGetResponse200Item[]', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\PluginPrivilege[]', 'json'); } if (500 === $status) { throw new \Docker\API\Exception\GetPluginPrivilegesInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ImageBuild.php b/generated/Endpoint/ImageBuild.php index 4ccdb8ffb..fd01f5e49 100644 --- a/generated/Endpoint/ImageBuild.php +++ b/generated/Endpoint/ImageBuild.php @@ -18,6 +18,7 @@ class ImageBuild extends \Docker\API\Runtime\Client\BaseEndpoint implements \Doc * @param array $queryParameters { * @var string $dockerfile Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`. * @var string $t A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters. + * @var string $extrahosts Extra hosts to add to /etc/hosts * @var string $remote A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball. * @var bool $q Suppress verbose build output. * @var bool $nocache Do not use the cache when building the image. @@ -31,11 +32,28 @@ class ImageBuild extends \Docker\API\Runtime\Client\BaseEndpoint implements \Doc * @var string $cpusetcpus CPUs in which to allow execution (e.g., `0-3`, `0,1`). * @var int $cpuperiod The length of a CPU period in microseconds. * @var int $cpuquota Microseconds of CPU time that the container can get in a CPU period. - * @var int $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) + * @var string $buildargs JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. + + For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded. + + [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) + * @var int $shmsize Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB. * @var bool $squash Squash the resulting images layers into a single layer. *(Experimental release only.)* * @var string $labels Arbitrary key/value labels to set on the image, as a JSON map of string pairs. - * @var string $networkmode Sets the networking mode for the run commands during build. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name to which this container should connect to. + * @var string $networkmode Sets the networking mode for the run commands during build. Supported + standard values are: `bridge`, `host`, `none`, and `container:`. + Any other value is taken as a custom network's name or ID to which this + container should connect to. + + * @var string $platform Platform in the format os[/arch[/variant]] + * @var string $target Target build stage + * @var string $outputs BuildKit output configuration + * @var string $version Version of the builder backend to use. + + - `1` is the first generation classic (deprecated) builder in the Docker daemon (default) + - `2` is [BuildKit](https://github.com/moby/buildkit) + * } * @param array $headerParameters { * @var string $Content-type @@ -86,11 +104,12 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['dockerfile', 't', 'remote', 'q', 'nocache', 'cachefrom', 'pull', 'rm', 'forcerm', 'memory', 'memswap', 'cpushares', 'cpusetcpus', 'cpuperiod', 'cpuquota', 'buildargs', 'shmsize', 'squash', 'labels', 'networkmode']); + $optionsResolver->setDefined(['dockerfile', 't', 'extrahosts', 'remote', 'q', 'nocache', 'cachefrom', 'pull', 'rm', 'forcerm', 'memory', 'memswap', 'cpushares', 'cpusetcpus', 'cpuperiod', 'cpuquota', 'buildargs', 'shmsize', 'squash', 'labels', 'networkmode', 'platform', 'target', 'outputs', 'version']); $optionsResolver->setRequired([]); - $optionsResolver->setDefaults(['dockerfile' => 'Dockerfile', 'q' => false, 'nocache' => false, 'rm' => true, 'forcerm' => false]); + $optionsResolver->setDefaults(['dockerfile' => 'Dockerfile', 'q' => false, 'nocache' => false, 'rm' => true, 'forcerm' => false, 'platform' => '', 'target' => '', 'outputs' => '', 'version' => '1']); $optionsResolver->addAllowedTypes('dockerfile', ['string']); $optionsResolver->addAllowedTypes('t', ['string']); + $optionsResolver->addAllowedTypes('extrahosts', ['string']); $optionsResolver->addAllowedTypes('remote', ['string']); $optionsResolver->addAllowedTypes('q', ['bool']); $optionsResolver->addAllowedTypes('nocache', ['bool']); @@ -104,11 +123,15 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver $optionsResolver->addAllowedTypes('cpusetcpus', ['string']); $optionsResolver->addAllowedTypes('cpuperiod', ['int']); $optionsResolver->addAllowedTypes('cpuquota', ['int']); - $optionsResolver->addAllowedTypes('buildargs', ['int']); + $optionsResolver->addAllowedTypes('buildargs', ['string']); $optionsResolver->addAllowedTypes('shmsize', ['int']); $optionsResolver->addAllowedTypes('squash', ['bool']); $optionsResolver->addAllowedTypes('labels', ['string']); $optionsResolver->addAllowedTypes('networkmode', ['string']); + $optionsResolver->addAllowedTypes('platform', ['string']); + $optionsResolver->addAllowedTypes('target', ['string']); + $optionsResolver->addAllowedTypes('outputs', ['string']); + $optionsResolver->addAllowedTypes('version', ['string']); return $optionsResolver; } protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver @@ -116,7 +139,7 @@ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolv $optionsResolver = parent::getHeadersOptionsResolver(); $optionsResolver->setDefined(['Content-type', 'X-Registry-Config']); $optionsResolver->setRequired([]); - $optionsResolver->setDefaults(['Content-type' => 'application/tar']); + $optionsResolver->setDefaults(['Content-type' => 'application/x-tar']); $optionsResolver->addAllowedTypes('Content-type', ['string']); $optionsResolver->addAllowedTypes('X-Registry-Config', ['string']); return $optionsResolver; @@ -124,6 +147,7 @@ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolv /** * {@inheritdoc} * + * @throws \Docker\API\Exception\ImageBuildBadRequestException * @throws \Docker\API\Exception\ImageBuildInternalServerErrorException * * @return null @@ -135,6 +159,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (200 === $status) { return null; } + if (400 === $status) { + throw new \Docker\API\Exception\ImageBuildBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } if (500 === $status) { throw new \Docker\API\Exception\ImageBuildInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } diff --git a/generated/Endpoint/ImageCommit.php b/generated/Endpoint/ImageCommit.php index 0febd0e83..460a4150c 100644 --- a/generated/Endpoint/ImageCommit.php +++ b/generated/Endpoint/ImageCommit.php @@ -7,7 +7,7 @@ class ImageCommit extends \Docker\API\Runtime\Client\BaseEndpoint implements \Do /** * * - * @param \Docker\API\Model\Config $containerConfig The container configuration + * @param \Docker\API\Model\ContainerConfig $containerConfig The container configuration * @param array $queryParameters { * @var string $container The ID or name of the container to commit * @var string $repo Repository name for the created image @@ -18,7 +18,7 @@ class ImageCommit extends \Docker\API\Runtime\Client\BaseEndpoint implements \Do * @var string $changes `Dockerfile` instructions to apply while committing * } */ - public function __construct(\Docker\API\Model\Config $containerConfig, array $queryParameters = []) + public function __construct(\Docker\API\Model\ContainerConfig $containerConfig, array $queryParameters = []) { $this->body = $containerConfig; $this->queryParameters = $queryParameters; diff --git a/generated/Endpoint/ImageCreate.php b/generated/Endpoint/ImageCreate.php index 766202ada..ef35d8b13 100644 --- a/generated/Endpoint/ImageCreate.php +++ b/generated/Endpoint/ImageCreate.php @@ -5,19 +5,47 @@ class ImageCreate extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { /** - * Create an image by either pulling it from a registry or importing it. - * - * @param string $inputImage Image content if the value `-` has been specified in fromSrc query parameter - * @param array $queryParameters { - * @var string $fromImage Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed. - * @var string $fromSrc Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image. - * @var string $repo Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image. - * @var string $tag Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled. - * } - * @param array $headerParameters { - * @var string $X-Registry-Auth A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication) - * } - */ + * Pull or import an image. + * + * @param string $inputImage Image content if the value `-` has been specified in fromSrc query parameter + * @param array $queryParameters { + * @var string $fromImage Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed. + * @var string $fromSrc Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image. + * @var string $repo Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image. + * @var string $tag Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled. + * @var string $message Set commit message for imported image. + * @var array $changes Apply `Dockerfile` instructions to the image that is created, + for example: `changes=ENV DEBUG=true`. + Note that `ENV DEBUG=true` should be URI component encoded. + + Supported `Dockerfile` instructions: + `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR` + + * @var string $platform Platform in the format os[/arch[/variant]]. + + When used in combination with the `fromImage` option, the daemon checks + if the given image is present in the local image cache with the given + OS and Architecture, and otherwise attempts to pull the image. If the + option is not set, the host's native OS and Architecture are used. + If the given image does not exist in the local image cache, the daemon + attempts to pull the image with the host's native OS and Architecture. + If the given image does exists in the local image cache, but its OS or + architecture does not match, a warning is produced. + + When used with the `fromSrc` option to import an image from an archive, + this option sets the platform information for the imported image. If + the option is not set, the host's native OS and Architecture are used + for the imported image. + + * } + * @param array $headerParameters { + * @var string $X-Registry-Auth A base64url-encoded auth configuration. + + Refer to the [authentication section](#section/Authentication) for + details. + + * } + */ public function __construct(string $inputImage, array $queryParameters = [], array $headerParameters = []) { $this->body = $inputImage; @@ -44,13 +72,16 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['fromImage', 'fromSrc', 'repo', 'tag']); + $optionsResolver->setDefined(['fromImage', 'fromSrc', 'repo', 'tag', 'message', 'changes', 'platform']); $optionsResolver->setRequired([]); - $optionsResolver->setDefaults([]); + $optionsResolver->setDefaults(['platform' => '']); $optionsResolver->addAllowedTypes('fromImage', ['string']); $optionsResolver->addAllowedTypes('fromSrc', ['string']); $optionsResolver->addAllowedTypes('repo', ['string']); $optionsResolver->addAllowedTypes('tag', ['string']); + $optionsResolver->addAllowedTypes('message', ['string']); + $optionsResolver->addAllowedTypes('changes', ['array']); + $optionsResolver->addAllowedTypes('platform', ['string']); return $optionsResolver; } protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver diff --git a/generated/Endpoint/ImageDelete.php b/generated/Endpoint/ImageDelete.php index 60b6a5e67..2173f51a5 100644 --- a/generated/Endpoint/ImageDelete.php +++ b/generated/Endpoint/ImageDelete.php @@ -6,9 +6,11 @@ class ImageDelete extends \Docker\API\Runtime\Client\BaseEndpoint implements \Do { protected $name; /** - * Remove an image, along with any untagged parent images that were referenced by that image. + * Remove an image, along with any untagged parent images that were + referenced by that image. - Images can't be removed if they have descendant images, are being used by a running container or are being used by a build. + Images can't be removed if they have descendant images, are being + used by a running container or are being used by a build. * * @param string $name Image name or ID @@ -56,14 +58,14 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * @throws \Docker\API\Exception\ImageDeleteConflictException * @throws \Docker\API\Exception\ImageDeleteInternalServerErrorException * - * @return null|\Docker\API\Model\ImageDeleteResponse[] + * @return null|\Docker\API\Model\ImageDeleteResponseItem[] */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\ImageDeleteResponse[]', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\ImageDeleteResponseItem[]', 'json'); } if (404 === $status) { throw new \Docker\API\Exception\ImageDeleteNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ImageGetAll.php b/generated/Endpoint/ImageGetAll.php index 5e6e4bc3a..d4a0b1564 100644 --- a/generated/Endpoint/ImageGetAll.php +++ b/generated/Endpoint/ImageGetAll.php @@ -5,11 +5,16 @@ class ImageGetAll extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { /** - * Get a tarball containing all images and metadata for several image repositories. + * Get a tarball containing all images and metadata for several image + repositories. - For each value of the `names` parameter: if it is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID. + For each value of the `names` parameter: if it is a specific name and + tag (e.g. `ubuntu:latest`), then only that image (and its parents) are + returned; if it is an image ID, similarly only that image (and its parents) + are returned and there would be no names referenced in the 'repositories' + file for this image ID. - For details on the format, see [the export image endpoint](#operation/ImageGet). + For details on the format, see the [export image endpoint](#operation/ImageGet). * * @param array $queryParameters { diff --git a/generated/Endpoint/ImageInspect.php b/generated/Endpoint/ImageInspect.php index b03947489..50b9396d5 100644 --- a/generated/Endpoint/ImageInspect.php +++ b/generated/Endpoint/ImageInspect.php @@ -37,14 +37,14 @@ public function getExtraHeaders(): array * @throws \Docker\API\Exception\ImageInspectNotFoundException * @throws \Docker\API\Exception\ImageInspectInternalServerErrorException * - * @return null|\Docker\API\Model\Image + * @return null|\Docker\API\Model\ImageInspect */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\Image', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\ImageInspect', 'json'); } if (404 === $status) { throw new \Docker\API\Exception\ImageInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ImageList.php b/generated/Endpoint/ImageList.php index 58f0a341f..4b6011922 100644 --- a/generated/Endpoint/ImageList.php +++ b/generated/Endpoint/ImageList.php @@ -9,16 +9,21 @@ class ImageList extends \Docker\API\Runtime\Client\BaseEndpoint implements \Dock * * @param array $queryParameters { * @var bool $all Show all images. Only images from a final layer (no children) are shown by default. - * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to + process on the images list. Available filters: + + - `before`=(`[:]`, `` or ``) - `dangling=true` - `label=key` or `label="key=value"` of an image label - - `before`=(`[:]`, `` or ``) - - `since`=(`[:]`, `` or ``) - `reference`=(`[:]`) + - `since`=(`[:]`, `` or ``) + - `until=` + * @var bool $shared-size Compute and show shared size as a `SharedSize` field on each image. * @var bool $digests Show digest information as a `RepoDigests` field on each image. + * @var bool $manifests Include `Manifests` in the image summary. * } */ public function __construct(array $queryParameters = []) @@ -45,12 +50,14 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['all', 'filters', 'digests']); + $optionsResolver->setDefined(['all', 'filters', 'shared-size', 'digests', 'manifests']); $optionsResolver->setRequired([]); - $optionsResolver->setDefaults(['all' => false, 'digests' => false]); + $optionsResolver->setDefaults(['all' => false, 'shared-size' => false, 'digests' => false, 'manifests' => false]); $optionsResolver->addAllowedTypes('all', ['bool']); $optionsResolver->addAllowedTypes('filters', ['string']); + $optionsResolver->addAllowedTypes('shared-size', ['bool']); $optionsResolver->addAllowedTypes('digests', ['bool']); + $optionsResolver->addAllowedTypes('manifests', ['bool']); return $optionsResolver; } /** diff --git a/generated/Endpoint/ImageLoad.php b/generated/Endpoint/ImageLoad.php index cdd288c9d..61cf5cf72 100644 --- a/generated/Endpoint/ImageLoad.php +++ b/generated/Endpoint/ImageLoad.php @@ -7,7 +7,7 @@ class ImageLoad extends \Docker\API\Runtime\Client\BaseEndpoint implements \Dock /** * Load a set of images and tags into a repository. - For details on the format, see [the export image endpoint](#operation/ImageGet). + For details on the format, see the [export image endpoint](#operation/ImageGet). * * @param string|resource|\Psr\Http\Message\StreamInterface $imagesTarball Tar archive containing images diff --git a/generated/Endpoint/ImagePrune.php b/generated/Endpoint/ImagePrune.php index 10eab0852..edbde96a3 100644 --- a/generated/Endpoint/ImagePrune.php +++ b/generated/Endpoint/ImagePrune.php @@ -8,12 +8,13 @@ class ImagePrune extends \Docker\API\Runtime\Client\BaseEndpoint implements \Doc * * * @param array $queryParameters { - * @var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + * @var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - Available filters: - `dangling=` When set to `true` (or `1`), prune only unused *and* untagged images. When set to `false` (or `0`), all unused images are pruned. + - `until=` Prune images created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune images with (or without, in case `label!=...` is used) the specified labels. * } */ diff --git a/generated/Endpoint/ImagePush.php b/generated/Endpoint/ImagePush.php index 6a57fbc7d..3a0a21500 100644 --- a/generated/Endpoint/ImagePush.php +++ b/generated/Endpoint/ImagePush.php @@ -8,7 +8,9 @@ class ImagePush extends \Docker\API\Runtime\Client\BaseEndpoint implements \Dock /** * Push an image to a registry. - If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, `registry.example.com/myimage:latest`. + If you wish to push an image on to a private registry, that image must + already have a tag which references the registry. For example, + `registry.example.com/myimage:latest`. The push is cancelled if the HTTP connection is closed. @@ -27,9 +29,23 @@ class ImagePush extends \Docker\API\Runtime\Client\BaseEndpoint implements \Dock all tags of the given image that are present in the local image store are pushed. + * @var string $platform JSON-encoded OCI platform to select the platform-variant to push. + If not provided, all available variants will attempt to be pushed. + + If the daemon provides a multi-platform image store, this selects + the platform-variant to push to the registry. If the image is + a single-platform image, or if the multi-platform image does not + provide a variant matching the given platform, an error is returned. + + Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + * } * @param array $headerParameters { - * @var string $X-Registry-Auth A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication) + * @var string $X-Registry-Auth A base64url-encoded auth configuration. + + Refer to the [authentication section](#section/Authentication) for + details. + * } */ public function __construct(string $name, array $queryParameters = [], array $headerParameters = []) @@ -58,10 +74,11 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['tag']); + $optionsResolver->setDefined(['tag', 'platform']); $optionsResolver->setRequired([]); $optionsResolver->setDefaults([]); $optionsResolver->addAllowedTypes('tag', ['string']); + $optionsResolver->addAllowedTypes('platform', ['string']); return $optionsResolver; } protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver diff --git a/generated/Endpoint/ImageSearch.php b/generated/Endpoint/ImageSearch.php index a35bcfc36..259facfe7 100644 --- a/generated/Endpoint/ImageSearch.php +++ b/generated/Endpoint/ImageSearch.php @@ -12,9 +12,8 @@ class ImageSearch extends \Docker\API\Runtime\Client\BaseEndpoint implements \Do * @var int $limit Maximum number of results to return * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - - `stars=` - - `is-automated=(true|false)` - `is-official=(true|false)` + - `stars=` Matches images that has at least 'number' stars. * } */ diff --git a/generated/Endpoint/NetworkConnect.php b/generated/Endpoint/NetworkConnect.php index df8042847..4714b3fec 100644 --- a/generated/Endpoint/NetworkConnect.php +++ b/generated/Endpoint/NetworkConnect.php @@ -6,7 +6,7 @@ class NetworkConnect extends \Docker\API\Runtime\Client\BaseEndpoint implements { protected $id; /** - * + * The network must be either a local-scoped network or a swarm-scoped network with the `attachable` option set. A network cannot be re-attached to a running container * * @param string $id Network ID or name * @param \Docker\API\Model\NetworksIdConnectPostBody $container @@ -36,6 +36,7 @@ public function getExtraHeaders(): array /** * {@inheritdoc} * + * @throws \Docker\API\Exception\NetworkConnectBadRequestException * @throws \Docker\API\Exception\NetworkConnectForbiddenException * @throws \Docker\API\Exception\NetworkConnectNotFoundException * @throws \Docker\API\Exception\NetworkConnectInternalServerErrorException @@ -49,6 +50,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (200 === $status) { return null; } + if (400 === $status) { + throw new \Docker\API\Exception\NetworkConnectBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } if (403 === $status) { throw new \Docker\API\Exception\NetworkConnectForbiddenException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } diff --git a/generated/Endpoint/NetworkCreate.php b/generated/Endpoint/NetworkCreate.php index 055a984da..9144448c5 100644 --- a/generated/Endpoint/NetworkCreate.php +++ b/generated/Endpoint/NetworkCreate.php @@ -38,14 +38,14 @@ public function getExtraHeaders(): array * @throws \Docker\API\Exception\NetworkCreateNotFoundException * @throws \Docker\API\Exception\NetworkCreateInternalServerErrorException * - * @return null|\Docker\API\Model\NetworksCreatePostResponse201 + * @return null|\Docker\API\Model\NetworkCreateResponse */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (201 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\NetworksCreatePostResponse201', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\NetworkCreateResponse', 'json'); } if (400 === $status) { throw new \Docker\API\Exception\NetworkCreateBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/NetworkDelete.php b/generated/Endpoint/NetworkDelete.php index 4f09f283b..6d2ebe2a7 100644 --- a/generated/Endpoint/NetworkDelete.php +++ b/generated/Endpoint/NetworkDelete.php @@ -34,6 +34,7 @@ public function getExtraHeaders(): array /** * {@inheritdoc} * + * @throws \Docker\API\Exception\NetworkDeleteForbiddenException * @throws \Docker\API\Exception\NetworkDeleteNotFoundException * @throws \Docker\API\Exception\NetworkDeleteInternalServerErrorException * @@ -46,6 +47,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (204 === $status) { return null; } + if (403 === $status) { + throw new \Docker\API\Exception\NetworkDeleteForbiddenException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } if (404 === $status) { throw new \Docker\API\Exception\NetworkDeleteNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } diff --git a/generated/Endpoint/NetworkInspect.php b/generated/Endpoint/NetworkInspect.php index 8f8607764..21657b1cd 100644 --- a/generated/Endpoint/NetworkInspect.php +++ b/generated/Endpoint/NetworkInspect.php @@ -9,10 +9,15 @@ class NetworkInspect extends \Docker\API\Runtime\Client\BaseEndpoint implements * * * @param string $id Network ID or name + * @param array $queryParameters { + * @var bool $verbose Detailed inspect output for troubleshooting + * @var string $scope Filter the network by scope (swarm, global, or local) + * } */ - public function __construct(string $id) + public function __construct(string $id, array $queryParameters = []) { $this->id = $id; + $this->queryParameters = $queryParameters; } use \Docker\API\Runtime\Client\EndpointTrait; public function getMethod(): string @@ -31,10 +36,21 @@ public function getExtraHeaders(): array { return ['Accept' => ['application/json']]; } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['verbose', 'scope']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['verbose' => false]); + $optionsResolver->addAllowedTypes('verbose', ['bool']); + $optionsResolver->addAllowedTypes('scope', ['string']); + return $optionsResolver; + } /** * {@inheritdoc} * * @throws \Docker\API\Exception\NetworkInspectNotFoundException + * @throws \Docker\API\Exception\NetworkInspectInternalServerErrorException * * @return null|\Docker\API\Model\Network */ @@ -48,6 +64,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (404 === $status) { throw new \Docker\API\Exception\NetworkInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (500 === $status) { + throw new \Docker\API\Exception\NetworkInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/NetworkList.php b/generated/Endpoint/NetworkList.php index 5602dc239..717df8594 100644 --- a/generated/Endpoint/NetworkList.php +++ b/generated/Endpoint/NetworkList.php @@ -5,15 +5,29 @@ class NetworkList extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { /** - * + * Returns a list of networks. For details on the format, see the + [network inspect endpoint](#operation/NetworkInspect). + + Note that it uses a different, smaller representation of a network than + inspecting a single network. For example, the list of containers attached + to the network is not propagated in API versions 1.28 and up. + * * @param array $queryParameters { - * @var string $filters JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters: + * @var string $filters JSON encoded value of the filters (a `map[string][]string`) to process + on the networks list. + + Available filters: + - `dangling=` When set to `true` (or `1`), returns all + networks that are not in use by a container. When set to `false` + (or `0`), only networks that are in use by one or more + containers are returned. - `driver=` Matches a network's driver. - `id=` Matches all or part of a network ID. - `label=` or `label==` of a network label. - `name=` Matches all or part of a network name. + - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`). - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. * } diff --git a/generated/Endpoint/NetworkPrune.php b/generated/Endpoint/NetworkPrune.php index 5de480189..9abe65154 100644 --- a/generated/Endpoint/NetworkPrune.php +++ b/generated/Endpoint/NetworkPrune.php @@ -11,6 +11,8 @@ class NetworkPrune extends \Docker\API\Runtime\Client\BaseEndpoint implements \D * @var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: + - `until=` Prune networks created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune networks with (or without, in case `label!=...` is used) the specified labels. * } */ diff --git a/generated/Endpoint/NodeDelete.php b/generated/Endpoint/NodeDelete.php index f5354547e..38018d87f 100644 --- a/generated/Endpoint/NodeDelete.php +++ b/generated/Endpoint/NodeDelete.php @@ -49,6 +49,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * * @throws \Docker\API\Exception\NodeDeleteNotFoundException * @throws \Docker\API\Exception\NodeDeleteInternalServerErrorException + * @throws \Docker\API\Exception\NodeDeleteServiceUnavailableException * * @return null */ @@ -65,6 +66,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\NodeDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\NodeDeleteServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/NodeInspect.php b/generated/Endpoint/NodeInspect.php index ab49418a5..c019d7734 100644 --- a/generated/Endpoint/NodeInspect.php +++ b/generated/Endpoint/NodeInspect.php @@ -36,6 +36,7 @@ public function getExtraHeaders(): array * * @throws \Docker\API\Exception\NodeInspectNotFoundException * @throws \Docker\API\Exception\NodeInspectInternalServerErrorException + * @throws \Docker\API\Exception\NodeInspectServiceUnavailableException * * @return null|\Docker\API\Model\Node */ @@ -52,6 +53,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\NodeInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\NodeInspectServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/NodeList.php b/generated/Endpoint/NodeList.php index 3042ebf0a..15765095b 100644 --- a/generated/Endpoint/NodeList.php +++ b/generated/Endpoint/NodeList.php @@ -15,6 +15,7 @@ class NodeList extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docke - `label=` - `membership=`(`accepted`|`pending`)` - `name=` + - `node.label=` - `role=`(`manager`|`worker`)` * } @@ -53,6 +54,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * {@inheritdoc} * * @throws \Docker\API\Exception\NodeListInternalServerErrorException + * @throws \Docker\API\Exception\NodeListServiceUnavailableException * * @return null|\Docker\API\Model\Node[] */ @@ -66,6 +68,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\NodeListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\NodeListServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/NodeUpdate.php b/generated/Endpoint/NodeUpdate.php index bd573dcd2..9b5f3033f 100644 --- a/generated/Endpoint/NodeUpdate.php +++ b/generated/Endpoint/NodeUpdate.php @@ -6,14 +6,16 @@ class NodeUpdate extends \Docker\API\Runtime\Client\BaseEndpoint implements \Doc { protected $id; /** - * - * - * @param string $id The ID of the node - * @param \Docker\API\Model\NodeSpec $body - * @param array $queryParameters { - * @var int $version The version number of the node object being updated. This is required to avoid conflicting writes. - * } - */ + * + * + * @param string $id The ID of the node + * @param \Docker\API\Model\NodeSpec $body + * @param array $queryParameters { + * @var int $version The version number of the node object being updated. This is required + to avoid conflicting writes. + + * } + */ public function __construct(string $id, \Docker\API\Model\NodeSpec $body, array $queryParameters = []) { $this->id = $id; @@ -49,8 +51,10 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver /** * {@inheritdoc} * + * @throws \Docker\API\Exception\NodeUpdateBadRequestException * @throws \Docker\API\Exception\NodeUpdateNotFoundException * @throws \Docker\API\Exception\NodeUpdateInternalServerErrorException + * @throws \Docker\API\Exception\NodeUpdateServiceUnavailableException * * @return null */ @@ -61,12 +65,18 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (200 === $status) { return null; } + if (400 === $status) { + throw new \Docker\API\Exception\NodeUpdateBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } if (404 === $status) { throw new \Docker\API\Exception\NodeUpdateNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } if (500 === $status) { throw new \Docker\API\Exception\NodeUpdateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\NodeUpdateServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/PluginCreate.php b/generated/Endpoint/PluginCreate.php index ad875df43..276cda841 100644 --- a/generated/Endpoint/PluginCreate.php +++ b/generated/Endpoint/PluginCreate.php @@ -5,13 +5,15 @@ class PluginCreate extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { /** - * - * - * @param string|resource|\Psr\Http\Message\StreamInterface $tarContext Path to tar containing plugin rootfs and manifest - * @param array $queryParameters { - * @var string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - * } - */ + * + * + * @param string|resource|\Psr\Http\Message\StreamInterface $tarContext Path to tar containing plugin rootfs and manifest + * @param array $queryParameters { + * @var string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * } + */ public function __construct($tarContext, array $queryParameters = []) { $this->body = $tarContext; diff --git a/generated/Endpoint/PluginDelete.php b/generated/Endpoint/PluginDelete.php index 2e69246ca..27ebf9375 100644 --- a/generated/Endpoint/PluginDelete.php +++ b/generated/Endpoint/PluginDelete.php @@ -6,13 +6,17 @@ class PluginDelete extends \Docker\API\Runtime\Client\BaseEndpoint implements \D { protected $name; /** - * - * - * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - * @param array $queryParameters { - * @var bool $force Disable the plugin before removing. This may result in issues if the plugin is in use by a container. - * } - */ + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * @param array $queryParameters { + * @var bool $force Disable the plugin before removing. This may result in issues if the + plugin is in use by a container. + + * } + */ public function __construct(string $name, array $queryParameters = []) { $this->name = $name; diff --git a/generated/Endpoint/PluginDisable.php b/generated/Endpoint/PluginDisable.php index c48741bbd..b87afc678 100644 --- a/generated/Endpoint/PluginDisable.php +++ b/generated/Endpoint/PluginDisable.php @@ -6,13 +6,20 @@ class PluginDisable extends \Docker\API\Runtime\Client\BaseEndpoint implements \ { protected $name; /** - * - * - * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - */ - public function __construct(string $name) + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * @param array $queryParameters { + * @var bool $force Force disable a plugin even if still in use. + + * } + */ + public function __construct(string $name, array $queryParameters = []) { $this->name = $name; + $this->queryParameters = $queryParameters; } use \Docker\API\Runtime\Client\EndpointTrait; public function getMethod(): string @@ -31,9 +38,19 @@ public function getExtraHeaders(): array { return ['Accept' => ['application/json']]; } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['force']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('force', ['bool']); + return $optionsResolver; + } /** * {@inheritdoc} * + * @throws \Docker\API\Exception\PluginDisableNotFoundException * @throws \Docker\API\Exception\PluginDisableInternalServerErrorException * * @return null @@ -45,6 +62,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (200 === $status) { return null; } + if (404 === $status) { + throw new \Docker\API\Exception\PluginDisableNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } if (500 === $status) { throw new \Docker\API\Exception\PluginDisableInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } diff --git a/generated/Endpoint/PluginEnable.php b/generated/Endpoint/PluginEnable.php index ebf5153c0..63fc55dd5 100644 --- a/generated/Endpoint/PluginEnable.php +++ b/generated/Endpoint/PluginEnable.php @@ -6,13 +6,15 @@ class PluginEnable extends \Docker\API\Runtime\Client\BaseEndpoint implements \D { protected $name; /** - * - * - * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - * @param array $queryParameters { - * @var int $timeout Set the HTTP client timeout (in seconds) - * } - */ + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * @param array $queryParameters { + * @var int $timeout Set the HTTP client timeout (in seconds) + * } + */ public function __construct(string $name, array $queryParameters = []) { $this->name = $name; @@ -47,6 +49,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver /** * {@inheritdoc} * + * @throws \Docker\API\Exception\PluginEnableNotFoundException * @throws \Docker\API\Exception\PluginEnableInternalServerErrorException * * @return null @@ -58,6 +61,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (200 === $status) { return null; } + if (404 === $status) { + throw new \Docker\API\Exception\PluginEnableNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } if (500 === $status) { throw new \Docker\API\Exception\PluginEnableInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } diff --git a/generated/Endpoint/PluginInspect.php b/generated/Endpoint/PluginInspect.php index a8fce5e8e..5c07d99e9 100644 --- a/generated/Endpoint/PluginInspect.php +++ b/generated/Endpoint/PluginInspect.php @@ -8,8 +8,9 @@ class PluginInspect extends \Docker\API\Runtime\Client\BaseEndpoint implements \ /** * * - * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - */ + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + */ public function __construct(string $name) { $this->name = $name; diff --git a/generated/Endpoint/PluginList.php b/generated/Endpoint/PluginList.php index 53883a08b..5e2f8212b 100644 --- a/generated/Endpoint/PluginList.php +++ b/generated/Endpoint/PluginList.php @@ -4,6 +4,24 @@ class PluginList extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { + /** + * Returns information about installed plugins. + * + * @param array $queryParameters { + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to + process on the plugin list. + + Available filters: + + - `capability=` + - `enable=|` + + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } use \Docker\API\Runtime\Client\EndpointTrait; public function getMethod(): string { @@ -21,6 +39,15 @@ public function getExtraHeaders(): array { return ['Accept' => ['application/json']]; } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['filters']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('filters', ['string']); + return $optionsResolver; + } /** * {@inheritdoc} * diff --git a/generated/Endpoint/PluginPull.php b/generated/Endpoint/PluginPull.php index 0c7c6bebc..f4e48e018 100644 --- a/generated/Endpoint/PluginPull.php +++ b/generated/Endpoint/PluginPull.php @@ -5,10 +5,11 @@ class PluginPull extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { /** - * Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). + * Pulls and installs a plugin. After the plugin is installed, it can be + enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). * - * @param array $body + * @param \Docker\API\Model\PluginPrivilege[] $body * @param array $queryParameters { * @var string $remote Remote reference for plugin to install. @@ -20,7 +21,12 @@ class PluginPull extends \Docker\API\Runtime\Client\BaseEndpoint implements \Doc * } * @param array $headerParameters { - * @var string $X-Registry-Auth A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication) + * @var string $X-Registry-Auth A base64url-encoded auth configuration to use when pulling a plugin + from a registry. + + Refer to the [authentication section](#section/Authentication) for + details. + * } */ public function __construct(array $body, array $queryParameters = [], array $headerParameters = []) diff --git a/generated/Endpoint/PluginPush.php b/generated/Endpoint/PluginPush.php index 4dd1499a8..989ded72f 100644 --- a/generated/Endpoint/PluginPush.php +++ b/generated/Endpoint/PluginPush.php @@ -7,9 +7,10 @@ class PluginPush extends \Docker\API\Runtime\Client\BaseEndpoint implements \Doc protected $name; /** * Push a plugin to the registry. - * - * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - */ + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + */ public function __construct(string $name) { $this->name = $name; diff --git a/generated/Endpoint/PluginSet.php b/generated/Endpoint/PluginSet.php index d13e3ca91..0998ab850 100644 --- a/generated/Endpoint/PluginSet.php +++ b/generated/Endpoint/PluginSet.php @@ -6,11 +6,13 @@ class PluginSet extends \Docker\API\Runtime\Client\BaseEndpoint implements \Dock { protected $name; /** - * - * - * @param string $name The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - * @param array $body - */ + * + * + * @param string $name The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + + * @param array $body + */ public function __construct(string $name, array $body) { $this->name = $name; diff --git a/generated/Endpoint/PluginUpgrade.php b/generated/Endpoint/PluginUpgrade.php new file mode 100644 index 000000000..e40630caa --- /dev/null +++ b/generated/Endpoint/PluginUpgrade.php @@ -0,0 +1,98 @@ +name = $name; + $this->body = $body; + $this->queryParameters = $queryParameters; + $this->headerParameters = $headerParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/plugins/{name}/upgrade'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['remote']); + $optionsResolver->setRequired(['remote']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('remote', ['string']); + return $optionsResolver; + } + protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getHeadersOptionsResolver(); + $optionsResolver->setDefined(['X-Registry-Auth']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('X-Registry-Auth', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\PluginUpgradeNotFoundException + * @throws \Docker\API\Exception\PluginUpgradeInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (204 === $status) { + return null; + } + if (404 === $status) { + throw new \Docker\API\Exception\PluginUpgradeNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\PluginUpgradeInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ContainerPutArchive.php b/generated/Endpoint/PutContainerArchive.php similarity index 68% rename from generated/Endpoint/ContainerPutArchive.php rename to generated/Endpoint/PutContainerArchive.php index ad4e94ff8..4784e680a 100644 --- a/generated/Endpoint/ContainerPutArchive.php +++ b/generated/Endpoint/PutContainerArchive.php @@ -2,7 +2,7 @@ namespace Docker\API\Endpoint; -class ContainerPutArchive extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint +class PutContainerArchive extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { protected $id; /** @@ -12,13 +12,22 @@ class ContainerPutArchive extends \Docker\API\Runtime\Client\BaseEndpoint implem * * @param string $id ID or name of the container - * @param string $inputStream The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz. + * @param string|resource|\Psr\Http\Message\StreamInterface $inputStream The input stream must be a tar archive compressed with one of the + following algorithms: `identity` (no compression), `gzip`, `bzip2`, + or `xz`. + * @param array $queryParameters { * @var string $path Path to a directory in the container to extract the archive’s contents into. - * @var string $noOverwriteDirNonDir If “1”, “true”, or “True” then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa. + * @var string $noOverwriteDirNonDir If `1`, `true`, or `True` then it will be an error if unpacking the + given content would cause an existing directory to be replaced with + a non-directory and vice versa. + + * @var string $copyUIDGID If `1`, `true`, then it will copy UID/GID maps to the dest file or + dir + * } */ - public function __construct(string $id, string $inputStream, array $queryParameters = []) + public function __construct(string $id, $inputStream, array $queryParameters = []) { $this->id = $id; $this->body = $inputStream; @@ -44,20 +53,21 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['path', 'noOverwriteDirNonDir']); + $optionsResolver->setDefined(['path', 'noOverwriteDirNonDir', 'copyUIDGID']); $optionsResolver->setRequired(['path']); $optionsResolver->setDefaults([]); $optionsResolver->addAllowedTypes('path', ['string']); $optionsResolver->addAllowedTypes('noOverwriteDirNonDir', ['string']); + $optionsResolver->addAllowedTypes('copyUIDGID', ['string']); return $optionsResolver; } /** * {@inheritdoc} * - * @throws \Docker\API\Exception\ContainerPutArchiveBadRequestException - * @throws \Docker\API\Exception\ContainerPutArchiveForbiddenException - * @throws \Docker\API\Exception\ContainerPutArchiveNotFoundException - * @throws \Docker\API\Exception\ContainerPutArchiveInternalServerErrorException + * @throws \Docker\API\Exception\PutContainerArchiveBadRequestException + * @throws \Docker\API\Exception\PutContainerArchiveForbiddenException + * @throws \Docker\API\Exception\PutContainerArchiveNotFoundException + * @throws \Docker\API\Exception\PutContainerArchiveInternalServerErrorException * * @return null */ @@ -69,16 +79,16 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re return null; } if (400 === $status) { - throw new \Docker\API\Exception\ContainerPutArchiveBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + throw new \Docker\API\Exception\PutContainerArchiveBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } if (403 === $status) { - throw new \Docker\API\Exception\ContainerPutArchiveForbiddenException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + throw new \Docker\API\Exception\PutContainerArchiveForbiddenException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } if (404 === $status) { - throw new \Docker\API\Exception\ContainerPutArchiveNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + throw new \Docker\API\Exception\PutContainerArchiveNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } if (500 === $status) { - throw new \Docker\API\Exception\ContainerPutArchiveInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + throw new \Docker\API\Exception\PutContainerArchiveInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } } public function getAuthenticationScopes(): array diff --git a/generated/Endpoint/SecretCreate.php b/generated/Endpoint/SecretCreate.php index 14d4b9c0d..86058d114 100644 --- a/generated/Endpoint/SecretCreate.php +++ b/generated/Endpoint/SecretCreate.php @@ -33,21 +33,18 @@ public function getExtraHeaders(): array /** * {@inheritdoc} * - * @throws \Docker\API\Exception\SecretCreateNotAcceptableException * @throws \Docker\API\Exception\SecretCreateConflictException * @throws \Docker\API\Exception\SecretCreateInternalServerErrorException + * @throws \Docker\API\Exception\SecretCreateServiceUnavailableException * - * @return null|\Docker\API\Model\SecretsCreatePostResponse201 + * @return null|\Docker\API\Model\IdResponse */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (201 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\SecretsCreatePostResponse201', 'json'); - } - if (406 === $status) { - throw new \Docker\API\Exception\SecretCreateNotAcceptableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + return $serializer->deserialize($body, 'Docker\API\Model\IdResponse', 'json'); } if (409 === $status) { throw new \Docker\API\Exception\SecretCreateConflictException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); @@ -55,6 +52,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\SecretCreateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\SecretCreateServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/SecretDelete.php b/generated/Endpoint/SecretDelete.php index 8a7da4c06..1217e8912 100644 --- a/generated/Endpoint/SecretDelete.php +++ b/generated/Endpoint/SecretDelete.php @@ -36,6 +36,7 @@ public function getExtraHeaders(): array * * @throws \Docker\API\Exception\SecretDeleteNotFoundException * @throws \Docker\API\Exception\SecretDeleteInternalServerErrorException + * @throws \Docker\API\Exception\SecretDeleteServiceUnavailableException * * @return null */ @@ -52,6 +53,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\SecretDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\SecretDeleteServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/SecretInspect.php b/generated/Endpoint/SecretInspect.php index 298ca03a5..a812480f4 100644 --- a/generated/Endpoint/SecretInspect.php +++ b/generated/Endpoint/SecretInspect.php @@ -35,8 +35,8 @@ public function getExtraHeaders(): array * {@inheritdoc} * * @throws \Docker\API\Exception\SecretInspectNotFoundException - * @throws \Docker\API\Exception\SecretInspectNotAcceptableException * @throws \Docker\API\Exception\SecretInspectInternalServerErrorException + * @throws \Docker\API\Exception\SecretInspectServiceUnavailableException * * @return null|\Docker\API\Model\Secret */ @@ -50,12 +50,12 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (404 === $status) { throw new \Docker\API\Exception\SecretInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } - if (406 === $status) { - throw new \Docker\API\Exception\SecretInspectNotAcceptableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); - } if (500 === $status) { throw new \Docker\API\Exception\SecretInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\SecretInspectServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/SecretList.php b/generated/Endpoint/SecretList.php index d64da5258..d80ff7c53 100644 --- a/generated/Endpoint/SecretList.php +++ b/generated/Endpoint/SecretList.php @@ -8,8 +8,14 @@ class SecretList extends \Docker\API\Runtime\Client\BaseEndpoint implements \Doc * * * @param array $queryParameters { - * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Available filters: + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to + process on the secrets list. + Available filters: + + - `id=` + - `label= or label==value` + - `name=` - `names=` * } @@ -48,6 +54,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * {@inheritdoc} * * @throws \Docker\API\Exception\SecretListInternalServerErrorException + * @throws \Docker\API\Exception\SecretListServiceUnavailableException * * @return null|\Docker\API\Model\Secret[] */ @@ -61,6 +68,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\SecretListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\SecretListServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/SecretUpdate.php b/generated/Endpoint/SecretUpdate.php new file mode 100644 index 000000000..e8a42f10a --- /dev/null +++ b/generated/Endpoint/SecretUpdate.php @@ -0,0 +1,88 @@ +id = $id; + $this->body = $body; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'POST'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/secrets/{id}/update'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['version']); + $optionsResolver->setRequired(['version']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('version', ['int']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SecretUpdateBadRequestException + * @throws \Docker\API\Exception\SecretUpdateNotFoundException + * @throws \Docker\API\Exception\SecretUpdateInternalServerErrorException + * @throws \Docker\API\Exception\SecretUpdateServiceUnavailableException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (400 === $status) { + throw new \Docker\API\Exception\SecretUpdateBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\SecretUpdateNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\SecretUpdateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (503 === $status) { + throw new \Docker\API\Exception\SecretUpdateServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/ServiceCreate.php b/generated/Endpoint/ServiceCreate.php index 454b8c11b..e5460151a 100644 --- a/generated/Endpoint/ServiceCreate.php +++ b/generated/Endpoint/ServiceCreate.php @@ -5,13 +5,18 @@ class ServiceCreate extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { /** - * - * - * @param \Docker\API\Model\ServicesCreatePostBody $body - * @param array $headerParameters { - * @var string $X-Registry-Auth A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication) - * } - */ + * + * + * @param \Docker\API\Model\ServicesCreatePostBody $body + * @param array $headerParameters { + * @var string $X-Registry-Auth A base64url-encoded auth configuration for pulling from private + registries. + + Refer to the [authentication section](#section/Authentication) for + details. + + * } + */ public function __construct(\Docker\API\Model\ServicesCreatePostBody $body, array $headerParameters = []) { $this->body = $body; @@ -46,19 +51,23 @@ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolv /** * {@inheritdoc} * + * @throws \Docker\API\Exception\ServiceCreateBadRequestException * @throws \Docker\API\Exception\ServiceCreateForbiddenException * @throws \Docker\API\Exception\ServiceCreateConflictException * @throws \Docker\API\Exception\ServiceCreateInternalServerErrorException * @throws \Docker\API\Exception\ServiceCreateServiceUnavailableException * - * @return null|\Docker\API\Model\ServicesCreatePostResponse201 + * @return null|\Docker\API\Model\ServiceCreateResponse */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (201 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\ServicesCreatePostResponse201', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\ServiceCreateResponse', 'json'); + } + if (400 === $status) { + throw new \Docker\API\Exception\ServiceCreateBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } if (403 === $status) { throw new \Docker\API\Exception\ServiceCreateForbiddenException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/ServiceDelete.php b/generated/Endpoint/ServiceDelete.php index b998826a6..9a36d0d41 100644 --- a/generated/Endpoint/ServiceDelete.php +++ b/generated/Endpoint/ServiceDelete.php @@ -36,6 +36,7 @@ public function getExtraHeaders(): array * * @throws \Docker\API\Exception\ServiceDeleteNotFoundException * @throws \Docker\API\Exception\ServiceDeleteInternalServerErrorException + * @throws \Docker\API\Exception\ServiceDeleteServiceUnavailableException * * @return null */ @@ -52,6 +53,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\ServiceDeleteInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\ServiceDeleteServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/ServiceInspect.php b/generated/Endpoint/ServiceInspect.php index 4827b7299..baf0e13c2 100644 --- a/generated/Endpoint/ServiceInspect.php +++ b/generated/Endpoint/ServiceInspect.php @@ -9,10 +9,14 @@ class ServiceInspect extends \Docker\API\Runtime\Client\BaseEndpoint implements * * * @param string $id ID or name of service. + * @param array $queryParameters { + * @var bool $insertDefaults Fill empty fields with default values. + * } */ - public function __construct(string $id) + public function __construct(string $id, array $queryParameters = []) { $this->id = $id; + $this->queryParameters = $queryParameters; } use \Docker\API\Runtime\Client\EndpointTrait; public function getMethod(): string @@ -31,11 +35,21 @@ public function getExtraHeaders(): array { return ['Accept' => ['application/json']]; } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['insertDefaults']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['insertDefaults' => false]); + $optionsResolver->addAllowedTypes('insertDefaults', ['bool']); + return $optionsResolver; + } /** * {@inheritdoc} * * @throws \Docker\API\Exception\ServiceInspectNotFoundException * @throws \Docker\API\Exception\ServiceInspectInternalServerErrorException + * @throws \Docker\API\Exception\ServiceInspectServiceUnavailableException * * @return null|\Docker\API\Model\Service */ @@ -52,6 +66,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\ServiceInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\ServiceInspectServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/ServiceList.php b/generated/Endpoint/ServiceList.php index ff1dc898f..26589d409 100644 --- a/generated/Endpoint/ServiceList.php +++ b/generated/Endpoint/ServiceList.php @@ -8,11 +8,17 @@ class ServiceList extends \Docker\API\Runtime\Client\BaseEndpoint implements \Do * * * @param array $queryParameters { - * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters: + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to + process on the services list. + + Available filters: - `id=` - - `name=` - `label=` + - `mode=["replicated"|"global"]` + - `name=` + + * @var bool $status Include service status, with count of running and desired tasks. * } */ @@ -40,16 +46,18 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['filters']); + $optionsResolver->setDefined(['filters', 'status']); $optionsResolver->setRequired([]); $optionsResolver->setDefaults([]); $optionsResolver->addAllowedTypes('filters', ['string']); + $optionsResolver->addAllowedTypes('status', ['bool']); return $optionsResolver; } /** * {@inheritdoc} * * @throws \Docker\API\Exception\ServiceListInternalServerErrorException + * @throws \Docker\API\Exception\ServiceListServiceUnavailableException * * @return null|\Docker\API\Model\Service[] */ @@ -63,6 +71,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\ServiceListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\ServiceListServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/ServiceLogs.php b/generated/Endpoint/ServiceLogs.php index cb4591599..6946456b9 100644 --- a/generated/Endpoint/ServiceLogs.php +++ b/generated/Endpoint/ServiceLogs.php @@ -6,23 +6,24 @@ class ServiceLogs extends \Docker\API\Runtime\Client\BaseEndpoint implements \Do { protected $id; /** - * Get `stdout` and `stderr` logs from a service. + * Get `stdout` and `stderr` logs from a service. See also + [`/containers/{id}/logs`](#operation/ContainerLogs). - **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers. + **Note**: This endpoint works only for services with the `local`, + `json-file` or `journald` logging drivers. * - * @param string $id ID or name of the container + * @param string $id ID or name of the service * @param array $queryParameters { - * @var bool $details Show extra details provided to logs. - * @var bool $follow Return the logs as a stream. - - This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). - + * @var bool $details Show service context and extra details provided to logs. + * @var bool $follow Keep connection after returning logs. * @var bool $stdout Return logs from `stdout` * @var bool $stderr Return logs from `stderr` * @var int $since Only return logs since this time, as a UNIX timestamp * @var bool $timestamps Add timestamps to every log line - * @var string $tail Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. + * @var string $tail Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + * } */ public function __construct(string $id, array $queryParameters = []) @@ -67,6 +68,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * * @throws \Docker\API\Exception\ServiceLogsNotFoundException * @throws \Docker\API\Exception\ServiceLogsInternalServerErrorException + * @throws \Docker\API\Exception\ServiceLogsServiceUnavailableException * * @return null */ @@ -74,9 +76,6 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re { $status = $response->getStatusCode(); $body = (string) $response->getBody(); - if (101 === $status) { - return json_decode($body); - } if (200 === $status) { return json_decode($body); } @@ -86,6 +85,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\ServiceLogsInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\ServiceLogsServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/ServiceUpdate.php b/generated/Endpoint/ServiceUpdate.php index 6e4e04109..4a038843f 100644 --- a/generated/Endpoint/ServiceUpdate.php +++ b/generated/Endpoint/ServiceUpdate.php @@ -6,18 +6,34 @@ class ServiceUpdate extends \Docker\API\Runtime\Client\BaseEndpoint implements \ { protected $id; /** - * - * - * @param string $id ID or name of service. - * @param \Docker\API\Model\ServicesIdUpdatePostBody $body - * @param array $queryParameters { - * @var int $version The version number of the service object being updated. This is required to avoid conflicting writes. - * @var string $registryAuthFrom If the X-Registry-Auth header is not specified, this parameter indicates where to find registry authorization credentials. The valid values are `spec` and `previous-spec`. - * } - * @param array $headerParameters { - * @var string $X-Registry-Auth A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication) - * } - */ + * + * + * @param string $id ID or name of service. + * @param \Docker\API\Model\ServicesIdUpdatePostBody $body + * @param array $queryParameters { + * @var int $version The version number of the service object being updated. This is + required to avoid conflicting writes. + This version number should be the value as currently set on the + service *before* the update. You can find the current version by + calling `GET /services/{id}` + + * @var string $registryAuthFrom If the `X-Registry-Auth` header is not specified, this parameter + indicates where to find registry authorization credentials. + + * @var string $rollback Set to this parameter to `previous` to cause a server-side rollback + to the previous service spec. The supplied spec will be ignored in + this case. + + * } + * @param array $headerParameters { + * @var string $X-Registry-Auth A base64url-encoded auth configuration for pulling from private + registries. + + Refer to the [authentication section](#section/Authentication) for + details. + + * } + */ public function __construct(string $id, \Docker\API\Model\ServicesIdUpdatePostBody $body, array $queryParameters = [], array $headerParameters = []) { $this->id = $id; @@ -45,11 +61,12 @@ public function getExtraHeaders(): array protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver { $optionsResolver = parent::getQueryOptionsResolver(); - $optionsResolver->setDefined(['version', 'registryAuthFrom']); + $optionsResolver->setDefined(['version', 'registryAuthFrom', 'rollback']); $optionsResolver->setRequired(['version']); $optionsResolver->setDefaults(['registryAuthFrom' => 'spec']); $optionsResolver->addAllowedTypes('version', ['int']); $optionsResolver->addAllowedTypes('registryAuthFrom', ['string']); + $optionsResolver->addAllowedTypes('rollback', ['string']); return $optionsResolver; } protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver @@ -64,17 +81,22 @@ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolv /** * {@inheritdoc} * + * @throws \Docker\API\Exception\ServiceUpdateBadRequestException * @throws \Docker\API\Exception\ServiceUpdateNotFoundException * @throws \Docker\API\Exception\ServiceUpdateInternalServerErrorException + * @throws \Docker\API\Exception\ServiceUpdateServiceUnavailableException * - * @return null|\Docker\API\Model\ImageDeleteResponse + * @return null|\Docker\API\Model\ServiceUpdateResponse */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\ImageDeleteResponse', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\ServiceUpdateResponse', 'json'); + } + if (400 === $status) { + throw new \Docker\API\Exception\ServiceUpdateBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } if (404 === $status) { throw new \Docker\API\Exception\ServiceUpdateNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); @@ -82,6 +104,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\ServiceUpdateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\ServiceUpdateServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/Session.php b/generated/Endpoint/Session.php new file mode 100644 index 000000000..5ba35f05e --- /dev/null +++ b/generated/Endpoint/Session.php @@ -0,0 +1,50 @@ + ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SessionBadRequestException + * @throws \Docker\API\Exception\SessionInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (101 === $status) { + return null; + } + if (400 === $status) { + throw new \Docker\API\Exception\SessionBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\SessionInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SwarmInit.php b/generated/Endpoint/SwarmInit.php index 602b27efd..5e5427064 100644 --- a/generated/Endpoint/SwarmInit.php +++ b/generated/Endpoint/SwarmInit.php @@ -34,8 +34,8 @@ public function getExtraHeaders(): array * {@inheritdoc} * * @throws \Docker\API\Exception\SwarmInitBadRequestException - * @throws \Docker\API\Exception\SwarmInitNotAcceptableException * @throws \Docker\API\Exception\SwarmInitInternalServerErrorException + * @throws \Docker\API\Exception\SwarmInitServiceUnavailableException * * @return null */ @@ -49,12 +49,12 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (400 === $status) { throw new \Docker\API\Exception\SwarmInitBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } - if (406 === $status) { - throw new \Docker\API\Exception\SwarmInitNotAcceptableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); - } if (500 === $status) { throw new \Docker\API\Exception\SwarmInitInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\SwarmInitServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/SwarmInspect.php b/generated/Endpoint/SwarmInspect.php index f781a8128..ad8db2022 100644 --- a/generated/Endpoint/SwarmInspect.php +++ b/generated/Endpoint/SwarmInspect.php @@ -24,20 +24,28 @@ public function getExtraHeaders(): array /** * {@inheritdoc} * + * @throws \Docker\API\Exception\SwarmInspectNotFoundException * @throws \Docker\API\Exception\SwarmInspectInternalServerErrorException + * @throws \Docker\API\Exception\SwarmInspectServiceUnavailableException * - * @return null|\Docker\API\Model\SwarmGetResponse200 + * @return null|\Docker\API\Model\Swarm */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\SwarmGetResponse200', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\Swarm', 'json'); + } + if (404 === $status) { + throw new \Docker\API\Exception\SwarmInspectNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } if (500 === $status) { throw new \Docker\API\Exception\SwarmInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\SwarmInspectServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/SwarmLeave.php b/generated/Endpoint/SwarmLeave.php index 780386a6f..0b0cc7ae4 100644 --- a/generated/Endpoint/SwarmLeave.php +++ b/generated/Endpoint/SwarmLeave.php @@ -5,12 +5,14 @@ class SwarmLeave extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { /** - * - * - * @param array $queryParameters { - * @var bool $force Force leave swarm, even if this is the last manager or that it will break the cluster. - * } - */ + * + * + * @param array $queryParameters { + * @var bool $force Force leave swarm, even if this is the last manager or that it will + break the cluster. + + * } + */ public function __construct(array $queryParameters = []) { $this->queryParameters = $queryParameters; diff --git a/generated/Endpoint/SwarmUnlock.php b/generated/Endpoint/SwarmUnlock.php index cb0c1ca2d..f0f681d0f 100644 --- a/generated/Endpoint/SwarmUnlock.php +++ b/generated/Endpoint/SwarmUnlock.php @@ -34,6 +34,7 @@ public function getExtraHeaders(): array * {@inheritdoc} * * @throws \Docker\API\Exception\SwarmUnlockInternalServerErrorException + * @throws \Docker\API\Exception\SwarmUnlockServiceUnavailableException * * @return null */ @@ -47,6 +48,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\SwarmUnlockInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\SwarmUnlockServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/SwarmUnlockkey.php b/generated/Endpoint/SwarmUnlockkey.php index f6af3bb59..b61c75176 100644 --- a/generated/Endpoint/SwarmUnlockkey.php +++ b/generated/Endpoint/SwarmUnlockkey.php @@ -25,6 +25,7 @@ public function getExtraHeaders(): array * {@inheritdoc} * * @throws \Docker\API\Exception\SwarmUnlockkeyInternalServerErrorException + * @throws \Docker\API\Exception\SwarmUnlockkeyServiceUnavailableException * * @return null|\Docker\API\Model\SwarmUnlockkeyGetResponse200 */ @@ -38,6 +39,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\SwarmUnlockkeyInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\SwarmUnlockkeyServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/SwarmUpdate.php b/generated/Endpoint/SwarmUpdate.php index d639268e9..346e2060a 100644 --- a/generated/Endpoint/SwarmUpdate.php +++ b/generated/Endpoint/SwarmUpdate.php @@ -5,16 +5,18 @@ class SwarmUpdate extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { /** - * - * - * @param \Docker\API\Model\SwarmSpec $body - * @param array $queryParameters { - * @var int $version The version number of the swarm object being updated. This is required to avoid conflicting writes. - * @var bool $rotateWorkerToken Rotate the worker join token. - * @var bool $rotateManagerToken Rotate the manager join token. - * @var bool $rotateManagerUnlockKey Rotate the manager unlock key. - * } - */ + * + * + * @param \Docker\API\Model\SwarmSpec $body + * @param array $queryParameters { + * @var int $version The version number of the swarm object being updated. This is + required to avoid conflicting writes. + + * @var bool $rotateWorkerToken Rotate the worker join token. + * @var bool $rotateManagerToken Rotate the manager join token. + * @var bool $rotateManagerUnlockKey Rotate the manager unlock key. + * } + */ public function __construct(\Docker\API\Model\SwarmSpec $body, array $queryParameters = []) { $this->body = $body; diff --git a/generated/Endpoint/SystemAuth.php b/generated/Endpoint/SystemAuth.php index b137a9cb5..7603b5fd3 100644 --- a/generated/Endpoint/SystemAuth.php +++ b/generated/Endpoint/SystemAuth.php @@ -5,10 +5,12 @@ class SystemAuth extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { /** - * Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. - * - * @param \Docker\API\Model\AuthConfig $authConfig Authentication to check - */ + * Validate credentials for a registry and, if available, get an identity + token for accessing the registry without password. + + * + * @param \Docker\API\Model\AuthConfig $authConfig Authentication to check + */ public function __construct(\Docker\API\Model\AuthConfig $authConfig) { $this->body = $authConfig; @@ -33,6 +35,7 @@ public function getExtraHeaders(): array /** * {@inheritdoc} * + * @throws \Docker\API\Exception\SystemAuthUnauthorizedException * @throws \Docker\API\Exception\SystemAuthInternalServerErrorException * * @return null|\Docker\API\Model\AuthPostResponse200 @@ -47,6 +50,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (204 === $status) { return null; } + if (401 === $status) { + throw new \Docker\API\Exception\SystemAuthUnauthorizedException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } if (500 === $status) { throw new \Docker\API\Exception\SystemAuthInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } diff --git a/generated/Endpoint/SystemDataUsage.php b/generated/Endpoint/SystemDataUsage.php index a50ff8324..6522301e0 100644 --- a/generated/Endpoint/SystemDataUsage.php +++ b/generated/Endpoint/SystemDataUsage.php @@ -4,6 +4,17 @@ class SystemDataUsage extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docker\API\Runtime\Client\Endpoint { + /** + * + * + * @param array $queryParameters { + * @var array $type Object types, for which to compute and return data. + * } + */ + public function __construct(array $queryParameters = []) + { + $this->queryParameters = $queryParameters; + } use \Docker\API\Runtime\Client\EndpointTrait; public function getMethod(): string { @@ -21,6 +32,15 @@ public function getExtraHeaders(): array { return ['Accept' => ['application/json']]; } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['type']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('type', ['array']); + return $optionsResolver; + } /** * {@inheritdoc} * diff --git a/generated/Endpoint/SystemEvents.php b/generated/Endpoint/SystemEvents.php index 4cc112436..6e7895ca4 100644 --- a/generated/Endpoint/SystemEvents.php +++ b/generated/Endpoint/SystemEvents.php @@ -9,30 +9,46 @@ class SystemEvents extends \Docker\API\Runtime\Client\BaseEndpoint implements \D Various objects within Docker report events when something happens to them. - Containers report these events: `attach, commit, copy, create, destroy, detach, die, exec_create, exec_detach, exec_start, export, kill, oom, pause, rename, resize, restart, start, stop, top, unpause, update` + Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, `update`, and `prune` - Images report these events: `delete, import, load, pull, push, save, tag, untag` + Images report these events: `create`, `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` - Volumes report these events: `create, mount, unmount, destroy` + Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune` - Networks report these events: `create, connect, disconnect, destroy` + Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune` The Docker daemon reports these events: `reload` + Services report these events: `create`, `update`, and `remove` + + Nodes report these events: `create`, `update`, and `remove` + + Secrets report these events: `create`, `update`, and `remove` + + Configs report these events: `create`, `update`, and `remove` + + The Builder reports `prune` events + * * @param array $queryParameters { * @var string $since Show events created since this timestamp then stream new events. * @var string $until Show events created until this timestamp then stop streaming. * @var string $filters A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: + - `config=` config name or ID - `container=` container name or ID + - `daemon=` daemon name or ID - `event=` event type - `image=` image name or ID - `label=` image or container label - - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, or `daemon` - - `volume=` volume name or ID - `network=` network name or ID - - `daemon=` daemon name or ID + - `node=` node ID + - `plugin`= plugin name or ID + - `scope`= local or swarm + - `secret=` secret name or ID + - `service=` service name or ID + - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config` + - `volume=` volume name * } */ @@ -71,16 +87,20 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver /** * {@inheritdoc} * + * @throws \Docker\API\Exception\SystemEventsBadRequestException * @throws \Docker\API\Exception\SystemEventsInternalServerErrorException * - * @return null|\Docker\API\Model\EventsGetResponse200 + * @return null|\Docker\API\Model\EventMessage */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\EventsGetResponse200', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\EventMessage', 'json'); + } + if (400 === $status) { + throw new \Docker\API\Exception\SystemEventsBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } if (500 === $status) { throw new \Docker\API\Exception\SystemEventsInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/SystemInfo.php b/generated/Endpoint/SystemInfo.php index 347729828..daf4ea04a 100644 --- a/generated/Endpoint/SystemInfo.php +++ b/generated/Endpoint/SystemInfo.php @@ -26,14 +26,14 @@ public function getExtraHeaders(): array * * @throws \Docker\API\Exception\SystemInfoInternalServerErrorException * - * @return null|\Docker\API\Model\InfoGetResponse200 + * @return null|\Docker\API\Model\SystemInfo */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\InfoGetResponse200', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\SystemInfo', 'json'); } if (500 === $status) { throw new \Docker\API\Exception\SystemInfoInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/SystemPingHead.php b/generated/Endpoint/SystemPingHead.php new file mode 100644 index 000000000..4475b5164 --- /dev/null +++ b/generated/Endpoint/SystemPingHead.php @@ -0,0 +1,46 @@ + ['application/json']]; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\SystemPingHeadInternalServerErrorException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return json_decode($body); + } + if (500 === $status) { + throw new \Docker\API\Exception\SystemPingHeadInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/SystemVersion.php b/generated/Endpoint/SystemVersion.php index 0f047e91e..14036d3f0 100644 --- a/generated/Endpoint/SystemVersion.php +++ b/generated/Endpoint/SystemVersion.php @@ -26,14 +26,14 @@ public function getExtraHeaders(): array * * @throws \Docker\API\Exception\SystemVersionInternalServerErrorException * - * @return null|\Docker\API\Model\VersionGetResponse200 + * @return null|\Docker\API\Model\SystemVersion */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\VersionGetResponse200', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\SystemVersion', 'json'); } if (500 === $status) { throw new \Docker\API\Exception\SystemVersionInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/TaskInspect.php b/generated/Endpoint/TaskInspect.php index 3cda3620e..975dc56cd 100644 --- a/generated/Endpoint/TaskInspect.php +++ b/generated/Endpoint/TaskInspect.php @@ -36,6 +36,7 @@ public function getExtraHeaders(): array * * @throws \Docker\API\Exception\TaskInspectNotFoundException * @throws \Docker\API\Exception\TaskInspectInternalServerErrorException + * @throws \Docker\API\Exception\TaskInspectServiceUnavailableException * * @return null|\Docker\API\Model\Task */ @@ -52,6 +53,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\TaskInspectInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\TaskInspectServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/TaskList.php b/generated/Endpoint/TaskList.php index c5dcff98d..775e49740 100644 --- a/generated/Endpoint/TaskList.php +++ b/generated/Endpoint/TaskList.php @@ -8,14 +8,17 @@ class TaskList extends \Docker\API\Runtime\Client\BaseEndpoint implements \Docke * * * @param array $queryParameters { - * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters: + * @var string $filters A JSON encoded value of the filters (a `map[string][]string`) to + process on the tasks list. + Available filters: + + - `desired-state=(running | shutdown | accepted)` - `id=` + - `label=key` or `label="key=value"` - `name=` - - `service=` - `node=` - - `label=key` or `label="key=value"` - - `desired-state=(running | shutdown | accepted)` + - `service=` * } */ @@ -53,6 +56,7 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * {@inheritdoc} * * @throws \Docker\API\Exception\TaskListInternalServerErrorException + * @throws \Docker\API\Exception\TaskListServiceUnavailableException * * @return null|\Docker\API\Model\Task[] */ @@ -66,6 +70,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (500 === $status) { throw new \Docker\API\Exception\TaskListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); } + if (503 === $status) { + throw new \Docker\API\Exception\TaskListServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } } public function getAuthenticationScopes(): array { diff --git a/generated/Endpoint/TaskLogs.php b/generated/Endpoint/TaskLogs.php new file mode 100644 index 000000000..5ab682699 --- /dev/null +++ b/generated/Endpoint/TaskLogs.php @@ -0,0 +1,96 @@ +id = $id; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'GET'; + } + public function getUri(): string + { + return str_replace(['{id}'], [$this->id], '/tasks/{id}/logs'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return [[], null]; + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['details', 'follow', 'stdout', 'stderr', 'since', 'timestamps', 'tail']); + $optionsResolver->setRequired([]); + $optionsResolver->setDefaults(['details' => false, 'follow' => false, 'stdout' => false, 'stderr' => false, 'since' => 0, 'timestamps' => false, 'tail' => 'all']); + $optionsResolver->addAllowedTypes('details', ['bool']); + $optionsResolver->addAllowedTypes('follow', ['bool']); + $optionsResolver->addAllowedTypes('stdout', ['bool']); + $optionsResolver->addAllowedTypes('stderr', ['bool']); + $optionsResolver->addAllowedTypes('since', ['int']); + $optionsResolver->addAllowedTypes('timestamps', ['bool']); + $optionsResolver->addAllowedTypes('tail', ['string']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\TaskLogsNotFoundException + * @throws \Docker\API\Exception\TaskLogsInternalServerErrorException + * @throws \Docker\API\Exception\TaskLogsServiceUnavailableException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return json_decode($body); + } + if (404 === $status) { + throw new \Docker\API\Exception\TaskLogsNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\TaskLogsInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (503 === $status) { + throw new \Docker\API\Exception\TaskLogsServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Endpoint/VolumeCreate.php b/generated/Endpoint/VolumeCreate.php index 3395b46a0..2d205cbfe 100644 --- a/generated/Endpoint/VolumeCreate.php +++ b/generated/Endpoint/VolumeCreate.php @@ -7,9 +7,9 @@ class VolumeCreate extends \Docker\API\Runtime\Client\BaseEndpoint implements \D /** * * - * @param \Docker\API\Model\VolumesCreatePostBody $volumeConfig Volume configuration + * @param \Docker\API\Model\VolumeCreateOptions $volumeConfig Volume configuration */ - public function __construct(\Docker\API\Model\VolumesCreatePostBody $volumeConfig) + public function __construct(\Docker\API\Model\VolumeCreateOptions $volumeConfig) { $this->body = $volumeConfig; } diff --git a/generated/Endpoint/VolumeList.php b/generated/Endpoint/VolumeList.php index 4d9b66d25..2462c0e22 100644 --- a/generated/Endpoint/VolumeList.php +++ b/generated/Endpoint/VolumeList.php @@ -11,13 +11,14 @@ class VolumeList extends \Docker\API\Runtime\Client\BaseEndpoint implements \Doc * @var string $filters JSON encoded value of the filters (a `map[string][]string`) to process on the volumes list. Available filters: - - `name=` Matches all or part of a volume name. - `dangling=` When set to `true` (or `1`), returns all volumes that are not in use by a container. When set to `false` (or `0`), only volumes that are in use by one or more containers are returned. - - `driver=` Matches all or part of a volume - driver name. + - `driver=` Matches volumes based on their driver. + - `label=` or `label=:` Matches volumes based on + the presence of a `label` alone or a `label` and a value. + - `name=` Matches all or part of a volume name. * } */ @@ -56,14 +57,14 @@ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver * * @throws \Docker\API\Exception\VolumeListInternalServerErrorException * - * @return null|\Docker\API\Model\VolumesGetResponse200 + * @return null|\Docker\API\Model\VolumeListResponse */ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) { $status = $response->getStatusCode(); $body = (string) $response->getBody(); if (200 === $status) { - return $serializer->deserialize($body, 'Docker\API\Model\VolumesGetResponse200', 'json'); + return $serializer->deserialize($body, 'Docker\API\Model\VolumeListResponse', 'json'); } if (500 === $status) { throw new \Docker\API\Exception\VolumeListInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); diff --git a/generated/Endpoint/VolumePrune.php b/generated/Endpoint/VolumePrune.php index 1a5596f66..972677517 100644 --- a/generated/Endpoint/VolumePrune.php +++ b/generated/Endpoint/VolumePrune.php @@ -11,6 +11,8 @@ class VolumePrune extends \Docker\API\Runtime\Client\BaseEndpoint implements \Do * @var string $filters Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune volumes with (or without, in case `label!=...` is used) the specified labels. + - `all` (`all=true`) - Consider all (local) volumes for pruning and not just anonymous volumes. * } */ diff --git a/generated/Endpoint/VolumeUpdate.php b/generated/Endpoint/VolumeUpdate.php new file mode 100644 index 000000000..9f94b5c5c --- /dev/null +++ b/generated/Endpoint/VolumeUpdate.php @@ -0,0 +1,88 @@ +name = $name; + $this->body = $body; + $this->queryParameters = $queryParameters; + } + use \Docker\API\Runtime\Client\EndpointTrait; + public function getMethod(): string + { + return 'PUT'; + } + public function getUri(): string + { + return str_replace(['{name}'], [$this->name], '/volumes/{name}'); + } + public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array + { + return $this->getSerializedBody($serializer); + } + public function getExtraHeaders(): array + { + return ['Accept' => ['application/json']]; + } + protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver + { + $optionsResolver = parent::getQueryOptionsResolver(); + $optionsResolver->setDefined(['version']); + $optionsResolver->setRequired(['version']); + $optionsResolver->setDefaults([]); + $optionsResolver->addAllowedTypes('version', ['int']); + return $optionsResolver; + } + /** + * {@inheritdoc} + * + * @throws \Docker\API\Exception\VolumeUpdateBadRequestException + * @throws \Docker\API\Exception\VolumeUpdateNotFoundException + * @throws \Docker\API\Exception\VolumeUpdateInternalServerErrorException + * @throws \Docker\API\Exception\VolumeUpdateServiceUnavailableException + * + * @return null + */ + protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) + { + $status = $response->getStatusCode(); + $body = (string) $response->getBody(); + if (200 === $status) { + return null; + } + if (400 === $status) { + throw new \Docker\API\Exception\VolumeUpdateBadRequestException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (404 === $status) { + throw new \Docker\API\Exception\VolumeUpdateNotFoundException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (500 === $status) { + throw new \Docker\API\Exception\VolumeUpdateInternalServerErrorException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + if (503 === $status) { + throw new \Docker\API\Exception\VolumeUpdateServiceUnavailableException($serializer->deserialize($body, 'Docker\API\Model\ErrorResponse', 'json'), $response); + } + } + public function getAuthenticationScopes(): array + { + return []; + } +} \ No newline at end of file diff --git a/generated/Exception/BuildPruneInternalServerErrorException.php b/generated/Exception/BuildPruneInternalServerErrorException.php new file mode 100644 index 000000000..056be338c --- /dev/null +++ b/generated/Exception/BuildPruneInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ConfigCreateConflictException.php b/generated/Exception/ConfigCreateConflictException.php new file mode 100644 index 000000000..d2754193c --- /dev/null +++ b/generated/Exception/ConfigCreateConflictException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerGetArchiveInternalServerErrorException.php b/generated/Exception/ConfigCreateInternalServerErrorException.php similarity index 88% rename from generated/Exception/ContainerGetArchiveInternalServerErrorException.php rename to generated/Exception/ConfigCreateInternalServerErrorException.php index a982a9b2b..53e7d7a06 100644 --- a/generated/Exception/ContainerGetArchiveInternalServerErrorException.php +++ b/generated/Exception/ConfigCreateInternalServerErrorException.php @@ -2,7 +2,7 @@ namespace Docker\API\Exception; -class ContainerGetArchiveInternalServerErrorException extends InternalServerErrorException +class ConfigCreateInternalServerErrorException extends InternalServerErrorException { /** * @var \Docker\API\Model\ErrorResponse diff --git a/generated/Exception/ConfigCreateServiceUnavailableException.php b/generated/Exception/ConfigCreateServiceUnavailableException.php new file mode 100644 index 000000000..69dad49bf --- /dev/null +++ b/generated/Exception/ConfigCreateServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ConfigDeleteInternalServerErrorException.php b/generated/Exception/ConfigDeleteInternalServerErrorException.php new file mode 100644 index 000000000..1ee287bef --- /dev/null +++ b/generated/Exception/ConfigDeleteInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerCreateNotAcceptableException.php b/generated/Exception/ConfigDeleteNotFoundException.php similarity index 84% rename from generated/Exception/ContainerCreateNotAcceptableException.php rename to generated/Exception/ConfigDeleteNotFoundException.php index 537c01e87..4a8dab144 100644 --- a/generated/Exception/ContainerCreateNotAcceptableException.php +++ b/generated/Exception/ConfigDeleteNotFoundException.php @@ -2,7 +2,7 @@ namespace Docker\API\Exception; -class ContainerCreateNotAcceptableException extends NotAcceptableException +class ConfigDeleteNotFoundException extends NotFoundException { /** * @var \Docker\API\Model\ErrorResponse @@ -14,7 +14,7 @@ class ContainerCreateNotAcceptableException extends NotAcceptableException private $response; public function __construct(\Docker\API\Model\ErrorResponse $errorResponse, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('impossible to attach'); + parent::__construct('config not found'); $this->errorResponse = $errorResponse; $this->response = $response; } diff --git a/generated/Exception/ConfigDeleteServiceUnavailableException.php b/generated/Exception/ConfigDeleteServiceUnavailableException.php new file mode 100644 index 000000000..35386ad15 --- /dev/null +++ b/generated/Exception/ConfigDeleteServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ConfigInspectInternalServerErrorException.php b/generated/Exception/ConfigInspectInternalServerErrorException.php new file mode 100644 index 000000000..434f60e84 --- /dev/null +++ b/generated/Exception/ConfigInspectInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ConfigInspectNotFoundException.php b/generated/Exception/ConfigInspectNotFoundException.php new file mode 100644 index 000000000..0baa83d02 --- /dev/null +++ b/generated/Exception/ConfigInspectNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ConfigInspectServiceUnavailableException.php b/generated/Exception/ConfigInspectServiceUnavailableException.php new file mode 100644 index 000000000..0271d82ce --- /dev/null +++ b/generated/Exception/ConfigInspectServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ConfigListInternalServerErrorException.php b/generated/Exception/ConfigListInternalServerErrorException.php new file mode 100644 index 000000000..2b11a0f12 --- /dev/null +++ b/generated/Exception/ConfigListInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ConfigListServiceUnavailableException.php b/generated/Exception/ConfigListServiceUnavailableException.php new file mode 100644 index 000000000..059e2bcec --- /dev/null +++ b/generated/Exception/ConfigListServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ConfigUpdateBadRequestException.php b/generated/Exception/ConfigUpdateBadRequestException.php new file mode 100644 index 000000000..e022954b7 --- /dev/null +++ b/generated/Exception/ConfigUpdateBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ConfigUpdateInternalServerErrorException.php b/generated/Exception/ConfigUpdateInternalServerErrorException.php new file mode 100644 index 000000000..0fe7e160a --- /dev/null +++ b/generated/Exception/ConfigUpdateInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ConfigUpdateNotFoundException.php b/generated/Exception/ConfigUpdateNotFoundException.php new file mode 100644 index 000000000..ba78e5dd1 --- /dev/null +++ b/generated/Exception/ConfigUpdateNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ConfigUpdateServiceUnavailableException.php b/generated/Exception/ConfigUpdateServiceUnavailableException.php new file mode 100644 index 000000000..dbc007702 --- /dev/null +++ b/generated/Exception/ConfigUpdateServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerPutArchiveBadRequestException.php b/generated/Exception/ContainerArchiveBadRequestException.php similarity index 90% rename from generated/Exception/ContainerPutArchiveBadRequestException.php rename to generated/Exception/ContainerArchiveBadRequestException.php index f1a0d6c71..f130060cf 100644 --- a/generated/Exception/ContainerPutArchiveBadRequestException.php +++ b/generated/Exception/ContainerArchiveBadRequestException.php @@ -2,7 +2,7 @@ namespace Docker\API\Exception; -class ContainerPutArchiveBadRequestException extends BadRequestException +class ContainerArchiveBadRequestException extends BadRequestException { /** * @var \Docker\API\Model\ErrorResponse diff --git a/generated/Exception/ContainerArchiveHeadBadRequestException.php b/generated/Exception/ContainerArchiveInfoBadRequestException.php similarity index 91% rename from generated/Exception/ContainerArchiveHeadBadRequestException.php rename to generated/Exception/ContainerArchiveInfoBadRequestException.php index df61386f8..f9fcad86f 100644 --- a/generated/Exception/ContainerArchiveHeadBadRequestException.php +++ b/generated/Exception/ContainerArchiveInfoBadRequestException.php @@ -2,7 +2,7 @@ namespace Docker\API\Exception; -class ContainerArchiveHeadBadRequestException extends BadRequestException +class ContainerArchiveInfoBadRequestException extends BadRequestException { /** * @var \Docker\API\Model\ErrorResponse diff --git a/generated/Exception/ContainerArchiveHeadInternalServerErrorException.php b/generated/Exception/ContainerArchiveInfoInternalServerErrorException.php similarity index 92% rename from generated/Exception/ContainerArchiveHeadInternalServerErrorException.php rename to generated/Exception/ContainerArchiveInfoInternalServerErrorException.php index cf2be7cd4..0701da3fe 100644 --- a/generated/Exception/ContainerArchiveHeadInternalServerErrorException.php +++ b/generated/Exception/ContainerArchiveInfoInternalServerErrorException.php @@ -2,7 +2,7 @@ namespace Docker\API\Exception; -class ContainerArchiveHeadInternalServerErrorException extends InternalServerErrorException +class ContainerArchiveInfoInternalServerErrorException extends InternalServerErrorException { /** * @var \Docker\API\Model\ErrorResponse diff --git a/generated/Exception/ContainerArchiveHeadNotFoundException.php b/generated/Exception/ContainerArchiveInfoNotFoundException.php similarity index 92% rename from generated/Exception/ContainerArchiveHeadNotFoundException.php rename to generated/Exception/ContainerArchiveInfoNotFoundException.php index 40a9ab3eb..0325bdf95 100644 --- a/generated/Exception/ContainerArchiveHeadNotFoundException.php +++ b/generated/Exception/ContainerArchiveInfoNotFoundException.php @@ -2,7 +2,7 @@ namespace Docker\API\Exception; -class ContainerArchiveHeadNotFoundException extends NotFoundException +class ContainerArchiveInfoNotFoundException extends NotFoundException { /** * @var \Docker\API\Model\ErrorResponse diff --git a/generated/Exception/ContainerArchiveInternalServerErrorException.php b/generated/Exception/ContainerArchiveInternalServerErrorException.php new file mode 100644 index 000000000..697e1c0ba --- /dev/null +++ b/generated/Exception/ContainerArchiveInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerGetArchiveNotFoundException.php b/generated/Exception/ContainerArchiveNotFoundException.php similarity index 91% rename from generated/Exception/ContainerGetArchiveNotFoundException.php rename to generated/Exception/ContainerArchiveNotFoundException.php index 76dafe975..a02ec858a 100644 --- a/generated/Exception/ContainerGetArchiveNotFoundException.php +++ b/generated/Exception/ContainerArchiveNotFoundException.php @@ -2,7 +2,7 @@ namespace Docker\API\Exception; -class ContainerGetArchiveNotFoundException extends NotFoundException +class ContainerArchiveNotFoundException extends NotFoundException { /** * @var \Docker\API\Model\ErrorResponse diff --git a/generated/Exception/ContainerDeleteConflictException.php b/generated/Exception/ContainerDeleteConflictException.php new file mode 100644 index 000000000..1c327bcaa --- /dev/null +++ b/generated/Exception/ContainerDeleteConflictException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerKillConflictException.php b/generated/Exception/ContainerKillConflictException.php new file mode 100644 index 000000000..22f8ecc35 --- /dev/null +++ b/generated/Exception/ContainerKillConflictException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerWaitBadRequestException.php b/generated/Exception/ContainerWaitBadRequestException.php new file mode 100644 index 000000000..6e0ffec3f --- /dev/null +++ b/generated/Exception/ContainerWaitBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerPutArchiveInternalServerErrorException.php b/generated/Exception/DistributionInspectInternalServerErrorException.php similarity index 92% rename from generated/Exception/ContainerPutArchiveInternalServerErrorException.php rename to generated/Exception/DistributionInspectInternalServerErrorException.php index c19bc41f1..9b1834fb9 100644 --- a/generated/Exception/ContainerPutArchiveInternalServerErrorException.php +++ b/generated/Exception/DistributionInspectInternalServerErrorException.php @@ -2,7 +2,7 @@ namespace Docker\API\Exception; -class ContainerPutArchiveInternalServerErrorException extends InternalServerErrorException +class DistributionInspectInternalServerErrorException extends InternalServerErrorException { /** * @var \Docker\API\Model\ErrorResponse diff --git a/generated/Exception/DistributionInspectUnauthorizedException.php b/generated/Exception/DistributionInspectUnauthorizedException.php new file mode 100644 index 000000000..8c2ae4bc6 --- /dev/null +++ b/generated/Exception/DistributionInspectUnauthorizedException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ImageBuildBadRequestException.php b/generated/Exception/ImageBuildBadRequestException.php new file mode 100644 index 000000000..414f71efd --- /dev/null +++ b/generated/Exception/ImageBuildBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkConnectBadRequestException.php b/generated/Exception/NetworkConnectBadRequestException.php new file mode 100644 index 000000000..b01940b68 --- /dev/null +++ b/generated/Exception/NetworkConnectBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkConnectForbiddenException.php b/generated/Exception/NetworkConnectForbiddenException.php index 743f10a11..51e808579 100644 --- a/generated/Exception/NetworkConnectForbiddenException.php +++ b/generated/Exception/NetworkConnectForbiddenException.php @@ -14,7 +14,7 @@ class NetworkConnectForbiddenException extends ForbiddenException private $response; public function __construct(\Docker\API\Model\ErrorResponse $errorResponse, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('Operation not supported for swarm scoped networks'); + parent::__construct('Operation forbidden'); $this->errorResponse = $errorResponse; $this->response = $response; } diff --git a/generated/Exception/NetworkCreateForbiddenException.php b/generated/Exception/NetworkCreateForbiddenException.php index b5b1778f5..48e901031 100644 --- a/generated/Exception/NetworkCreateForbiddenException.php +++ b/generated/Exception/NetworkCreateForbiddenException.php @@ -14,7 +14,9 @@ class NetworkCreateForbiddenException extends ForbiddenException private $response; public function __construct(\Docker\API\Model\ErrorResponse $errorResponse, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('operation not supported for pre-defined networks'); + parent::__construct('Forbidden operation. This happens when trying to create a network named after a pre-defined network, +or when trying to create an overlay network on a daemon which is not part of a Swarm cluster. +'); $this->errorResponse = $errorResponse; $this->response = $response; } diff --git a/generated/Exception/NetworkDeleteForbiddenException.php b/generated/Exception/NetworkDeleteForbiddenException.php new file mode 100644 index 000000000..68e11566d --- /dev/null +++ b/generated/Exception/NetworkDeleteForbiddenException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NetworkInspectInternalServerErrorException.php b/generated/Exception/NetworkInspectInternalServerErrorException.php new file mode 100644 index 000000000..e86b69038 --- /dev/null +++ b/generated/Exception/NetworkInspectInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NodeDeleteServiceUnavailableException.php b/generated/Exception/NodeDeleteServiceUnavailableException.php new file mode 100644 index 000000000..353a61ba6 --- /dev/null +++ b/generated/Exception/NodeDeleteServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NodeInspectServiceUnavailableException.php b/generated/Exception/NodeInspectServiceUnavailableException.php new file mode 100644 index 000000000..fdcdece29 --- /dev/null +++ b/generated/Exception/NodeInspectServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretInspectNotAcceptableException.php b/generated/Exception/NodeListServiceUnavailableException.php similarity index 90% rename from generated/Exception/SecretInspectNotAcceptableException.php rename to generated/Exception/NodeListServiceUnavailableException.php index b29baa1a6..43e352288 100644 --- a/generated/Exception/SecretInspectNotAcceptableException.php +++ b/generated/Exception/NodeListServiceUnavailableException.php @@ -2,7 +2,7 @@ namespace Docker\API\Exception; -class SecretInspectNotAcceptableException extends NotAcceptableException +class NodeListServiceUnavailableException extends ServiceUnavailableException { /** * @var \Docker\API\Model\ErrorResponse diff --git a/generated/Exception/NodeUpdateBadRequestException.php b/generated/Exception/NodeUpdateBadRequestException.php new file mode 100644 index 000000000..c677e05b9 --- /dev/null +++ b/generated/Exception/NodeUpdateBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NodeUpdateServiceUnavailableException.php b/generated/Exception/NodeUpdateServiceUnavailableException.php new file mode 100644 index 000000000..523078fe5 --- /dev/null +++ b/generated/Exception/NodeUpdateServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/NotAcceptableException.php b/generated/Exception/NotAcceptableException.php deleted file mode 100644 index eb2b4717b..000000000 --- a/generated/Exception/NotAcceptableException.php +++ /dev/null @@ -1,11 +0,0 @@ -errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginEnableNotFoundException.php b/generated/Exception/PluginEnableNotFoundException.php new file mode 100644 index 000000000..93aa9fc49 --- /dev/null +++ b/generated/Exception/PluginEnableNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginUpgradeInternalServerErrorException.php b/generated/Exception/PluginUpgradeInternalServerErrorException.php new file mode 100644 index 000000000..d02a5c33c --- /dev/null +++ b/generated/Exception/PluginUpgradeInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/PluginUpgradeNotFoundException.php b/generated/Exception/PluginUpgradeNotFoundException.php new file mode 100644 index 000000000..bc59a631a --- /dev/null +++ b/generated/Exception/PluginUpgradeNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerGetArchiveBadRequestException.php b/generated/Exception/PutContainerArchiveBadRequestException.php similarity index 91% rename from generated/Exception/ContainerGetArchiveBadRequestException.php rename to generated/Exception/PutContainerArchiveBadRequestException.php index 3643afb6f..859175d26 100644 --- a/generated/Exception/ContainerGetArchiveBadRequestException.php +++ b/generated/Exception/PutContainerArchiveBadRequestException.php @@ -2,7 +2,7 @@ namespace Docker\API\Exception; -class ContainerGetArchiveBadRequestException extends BadRequestException +class PutContainerArchiveBadRequestException extends BadRequestException { /** * @var \Docker\API\Model\ErrorResponse diff --git a/generated/Exception/ContainerPutArchiveForbiddenException.php b/generated/Exception/PutContainerArchiveForbiddenException.php similarity index 92% rename from generated/Exception/ContainerPutArchiveForbiddenException.php rename to generated/Exception/PutContainerArchiveForbiddenException.php index 19847fbd8..086e70b72 100644 --- a/generated/Exception/ContainerPutArchiveForbiddenException.php +++ b/generated/Exception/PutContainerArchiveForbiddenException.php @@ -2,7 +2,7 @@ namespace Docker\API\Exception; -class ContainerPutArchiveForbiddenException extends ForbiddenException +class PutContainerArchiveForbiddenException extends ForbiddenException { /** * @var \Docker\API\Model\ErrorResponse diff --git a/generated/Exception/PutContainerArchiveInternalServerErrorException.php b/generated/Exception/PutContainerArchiveInternalServerErrorException.php new file mode 100644 index 000000000..06b4fb449 --- /dev/null +++ b/generated/Exception/PutContainerArchiveInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ContainerPutArchiveNotFoundException.php b/generated/Exception/PutContainerArchiveNotFoundException.php similarity index 92% rename from generated/Exception/ContainerPutArchiveNotFoundException.php rename to generated/Exception/PutContainerArchiveNotFoundException.php index e23300f65..c21f74c6f 100644 --- a/generated/Exception/ContainerPutArchiveNotFoundException.php +++ b/generated/Exception/PutContainerArchiveNotFoundException.php @@ -2,7 +2,7 @@ namespace Docker\API\Exception; -class ContainerPutArchiveNotFoundException extends NotFoundException +class PutContainerArchiveNotFoundException extends NotFoundException { /** * @var \Docker\API\Model\ErrorResponse diff --git a/generated/Exception/SecretCreateNotAcceptableException.php b/generated/Exception/SecretCreateNotAcceptableException.php deleted file mode 100644 index 2a10539cb..000000000 --- a/generated/Exception/SecretCreateNotAcceptableException.php +++ /dev/null @@ -1,29 +0,0 @@ -errorResponse = $errorResponse; - $this->response = $response; - } - public function getErrorResponse(): \Docker\API\Model\ErrorResponse - { - return $this->errorResponse; - } - public function getResponse(): \Psr\Http\Message\ResponseInterface - { - return $this->response; - } -} \ No newline at end of file diff --git a/generated/Exception/SecretCreateServiceUnavailableException.php b/generated/Exception/SecretCreateServiceUnavailableException.php new file mode 100644 index 000000000..057e14919 --- /dev/null +++ b/generated/Exception/SecretCreateServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretDeleteServiceUnavailableException.php b/generated/Exception/SecretDeleteServiceUnavailableException.php new file mode 100644 index 000000000..139f44aa0 --- /dev/null +++ b/generated/Exception/SecretDeleteServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretInspectServiceUnavailableException.php b/generated/Exception/SecretInspectServiceUnavailableException.php new file mode 100644 index 000000000..f8a9e34e8 --- /dev/null +++ b/generated/Exception/SecretInspectServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretListServiceUnavailableException.php b/generated/Exception/SecretListServiceUnavailableException.php new file mode 100644 index 000000000..25acc5148 --- /dev/null +++ b/generated/Exception/SecretListServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretUpdateBadRequestException.php b/generated/Exception/SecretUpdateBadRequestException.php new file mode 100644 index 000000000..c2f975cee --- /dev/null +++ b/generated/Exception/SecretUpdateBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretUpdateInternalServerErrorException.php b/generated/Exception/SecretUpdateInternalServerErrorException.php new file mode 100644 index 000000000..04e855a0b --- /dev/null +++ b/generated/Exception/SecretUpdateInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretUpdateNotFoundException.php b/generated/Exception/SecretUpdateNotFoundException.php new file mode 100644 index 000000000..b2311669a --- /dev/null +++ b/generated/Exception/SecretUpdateNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SecretUpdateServiceUnavailableException.php b/generated/Exception/SecretUpdateServiceUnavailableException.php new file mode 100644 index 000000000..4756f2d1e --- /dev/null +++ b/generated/Exception/SecretUpdateServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceCreateBadRequestException.php b/generated/Exception/ServiceCreateBadRequestException.php new file mode 100644 index 000000000..302c36d58 --- /dev/null +++ b/generated/Exception/ServiceCreateBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceCreateServiceUnavailableException.php b/generated/Exception/ServiceCreateServiceUnavailableException.php index 21f572b13..6a83715b0 100644 --- a/generated/Exception/ServiceCreateServiceUnavailableException.php +++ b/generated/Exception/ServiceCreateServiceUnavailableException.php @@ -14,7 +14,7 @@ class ServiceCreateServiceUnavailableException extends ServiceUnavailableExcepti private $response; public function __construct(\Docker\API\Model\ErrorResponse $errorResponse, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('server error or node is not part of a swarm'); + parent::__construct('node is not part of a swarm'); $this->errorResponse = $errorResponse; $this->response = $response; } diff --git a/generated/Exception/ServiceDeleteServiceUnavailableException.php b/generated/Exception/ServiceDeleteServiceUnavailableException.php new file mode 100644 index 000000000..3853be866 --- /dev/null +++ b/generated/Exception/ServiceDeleteServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceInspectServiceUnavailableException.php b/generated/Exception/ServiceInspectServiceUnavailableException.php new file mode 100644 index 000000000..72f73b096 --- /dev/null +++ b/generated/Exception/ServiceInspectServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceListServiceUnavailableException.php b/generated/Exception/ServiceListServiceUnavailableException.php new file mode 100644 index 000000000..39ddc2c1d --- /dev/null +++ b/generated/Exception/ServiceListServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceLogsNotFoundException.php b/generated/Exception/ServiceLogsNotFoundException.php index 9326a07c6..b12e89937 100644 --- a/generated/Exception/ServiceLogsNotFoundException.php +++ b/generated/Exception/ServiceLogsNotFoundException.php @@ -14,7 +14,7 @@ class ServiceLogsNotFoundException extends NotFoundException private $response; public function __construct(\Docker\API\Model\ErrorResponse $errorResponse, \Psr\Http\Message\ResponseInterface $response) { - parent::__construct('no such container'); + parent::__construct('no such service'); $this->errorResponse = $errorResponse; $this->response = $response; } diff --git a/generated/Exception/ServiceLogsServiceUnavailableException.php b/generated/Exception/ServiceLogsServiceUnavailableException.php new file mode 100644 index 000000000..f0b091d6a --- /dev/null +++ b/generated/Exception/ServiceLogsServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceUpdateBadRequestException.php b/generated/Exception/ServiceUpdateBadRequestException.php new file mode 100644 index 000000000..01e56c4f2 --- /dev/null +++ b/generated/Exception/ServiceUpdateBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/ServiceUpdateServiceUnavailableException.php b/generated/Exception/ServiceUpdateServiceUnavailableException.php new file mode 100644 index 000000000..76f4dbd76 --- /dev/null +++ b/generated/Exception/ServiceUpdateServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SessionBadRequestException.php b/generated/Exception/SessionBadRequestException.php new file mode 100644 index 000000000..71a2b2f14 --- /dev/null +++ b/generated/Exception/SessionBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SessionInternalServerErrorException.php b/generated/Exception/SessionInternalServerErrorException.php new file mode 100644 index 000000000..efc8e789e --- /dev/null +++ b/generated/Exception/SessionInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmInitNotAcceptableException.php b/generated/Exception/SwarmInitServiceUnavailableException.php similarity index 90% rename from generated/Exception/SwarmInitNotAcceptableException.php rename to generated/Exception/SwarmInitServiceUnavailableException.php index b38e1c6fc..732c97b51 100644 --- a/generated/Exception/SwarmInitNotAcceptableException.php +++ b/generated/Exception/SwarmInitServiceUnavailableException.php @@ -2,7 +2,7 @@ namespace Docker\API\Exception; -class SwarmInitNotAcceptableException extends NotAcceptableException +class SwarmInitServiceUnavailableException extends ServiceUnavailableException { /** * @var \Docker\API\Model\ErrorResponse diff --git a/generated/Exception/SwarmInspectNotFoundException.php b/generated/Exception/SwarmInspectNotFoundException.php new file mode 100644 index 000000000..3155bb559 --- /dev/null +++ b/generated/Exception/SwarmInspectNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmInspectServiceUnavailableException.php b/generated/Exception/SwarmInspectServiceUnavailableException.php new file mode 100644 index 000000000..9ac9828ea --- /dev/null +++ b/generated/Exception/SwarmInspectServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmUnlockServiceUnavailableException.php b/generated/Exception/SwarmUnlockServiceUnavailableException.php new file mode 100644 index 000000000..253a0e40a --- /dev/null +++ b/generated/Exception/SwarmUnlockServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SwarmUnlockkeyServiceUnavailableException.php b/generated/Exception/SwarmUnlockkeyServiceUnavailableException.php new file mode 100644 index 000000000..6a08a1042 --- /dev/null +++ b/generated/Exception/SwarmUnlockkeyServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SystemAuthUnauthorizedException.php b/generated/Exception/SystemAuthUnauthorizedException.php new file mode 100644 index 000000000..e7ef22e19 --- /dev/null +++ b/generated/Exception/SystemAuthUnauthorizedException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SystemEventsBadRequestException.php b/generated/Exception/SystemEventsBadRequestException.php new file mode 100644 index 000000000..996ff836e --- /dev/null +++ b/generated/Exception/SystemEventsBadRequestException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/SystemPingHeadInternalServerErrorException.php b/generated/Exception/SystemPingHeadInternalServerErrorException.php new file mode 100644 index 000000000..29236e152 --- /dev/null +++ b/generated/Exception/SystemPingHeadInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/TaskInspectServiceUnavailableException.php b/generated/Exception/TaskInspectServiceUnavailableException.php new file mode 100644 index 000000000..d21cf9629 --- /dev/null +++ b/generated/Exception/TaskInspectServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/TaskListServiceUnavailableException.php b/generated/Exception/TaskListServiceUnavailableException.php new file mode 100644 index 000000000..894d2aa71 --- /dev/null +++ b/generated/Exception/TaskListServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/TaskLogsInternalServerErrorException.php b/generated/Exception/TaskLogsInternalServerErrorException.php new file mode 100644 index 000000000..90b2830c9 --- /dev/null +++ b/generated/Exception/TaskLogsInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/TaskLogsNotFoundException.php b/generated/Exception/TaskLogsNotFoundException.php new file mode 100644 index 000000000..6f8d1bc9f --- /dev/null +++ b/generated/Exception/TaskLogsNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/TaskLogsServiceUnavailableException.php b/generated/Exception/TaskLogsServiceUnavailableException.php new file mode 100644 index 000000000..5fde2e30c --- /dev/null +++ b/generated/Exception/TaskLogsServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/UnauthorizedException.php b/generated/Exception/UnauthorizedException.php new file mode 100644 index 000000000..2209b5def --- /dev/null +++ b/generated/Exception/UnauthorizedException.php @@ -0,0 +1,11 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/VolumeUpdateInternalServerErrorException.php b/generated/Exception/VolumeUpdateInternalServerErrorException.php new file mode 100644 index 000000000..f8d23fbc7 --- /dev/null +++ b/generated/Exception/VolumeUpdateInternalServerErrorException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/VolumeUpdateNotFoundException.php b/generated/Exception/VolumeUpdateNotFoundException.php new file mode 100644 index 000000000..49b6341d9 --- /dev/null +++ b/generated/Exception/VolumeUpdateNotFoundException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Exception/VolumeUpdateServiceUnavailableException.php b/generated/Exception/VolumeUpdateServiceUnavailableException.php new file mode 100644 index 000000000..ce105e47a --- /dev/null +++ b/generated/Exception/VolumeUpdateServiceUnavailableException.php @@ -0,0 +1,29 @@ +errorResponse = $errorResponse; + $this->response = $response; + } + public function getErrorResponse(): \Docker\API\Model\ErrorResponse + { + return $this->errorResponse; + } + public function getResponse(): \Psr\Http\Message\ResponseInterface + { + return $this->response; + } +} \ No newline at end of file diff --git a/generated/Model/Address.php b/generated/Model/Address.php new file mode 100644 index 000000000..d35a1f9ff --- /dev/null +++ b/generated/Model/Address.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * IP address. + * + * @var string|null + */ + protected $addr; + /** + * Mask length of the IP address. + * + * @var int|null + */ + protected $prefixLen; + /** + * IP address. + * + * @return string|null + */ + public function getAddr(): ?string + { + return $this->addr; + } + /** + * IP address. + * + * @param string|null $addr + * + * @return self + */ + public function setAddr(?string $addr): self + { + $this->initialized['addr'] = true; + $this->addr = $addr; + return $this; + } + /** + * Mask length of the IP address. + * + * @return int|null + */ + public function getPrefixLen(): ?int + { + return $this->prefixLen; + } + /** + * Mask length of the IP address. + * + * @param int|null $prefixLen + * + * @return self + */ + public function setPrefixLen(?int $prefixLen): self + { + $this->initialized['prefixLen'] = true; + $this->prefixLen = $prefixLen; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/BuildCache.php b/generated/Model/BuildCache.php new file mode 100644 index 000000000..50792993e --- /dev/null +++ b/generated/Model/BuildCache.php @@ -0,0 +1,344 @@ +initialized); + } + /** + * Unique ID of the build cache record. + * + * @var string|null + */ + protected $iD; + /** + * ID of the parent build cache record. + + > **Deprecated**: This field is deprecated, and omitted if empty. + + * + * @var string|null + */ + protected $parent; + /** + * List of parent build cache record IDs. + * + * @var list|null + */ + protected $parents; + /** + * Cache record type. + * + * @var string|null + */ + protected $type; + /** + * Description of the build-step that produced the build cache. + * + * @var string|null + */ + protected $description; + /** + * Indicates if the build cache is in use. + * + * @var bool|null + */ + protected $inUse; + /** + * Indicates if the build cache is shared. + * + * @var bool|null + */ + protected $shared; + /** + * Amount of disk space used by the build cache (in bytes). + * + * @var int|null + */ + protected $size; + /** + * Date and time at which the build cache was created in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @var string|null + */ + protected $createdAt; + /** + * Date and time at which the build cache was last used in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @var string|null + */ + protected $lastUsedAt; + /** + * + * + * @var int|null + */ + protected $usageCount; + /** + * Unique ID of the build cache record. + * + * @return string|null + */ + public function getID(): ?string + { + return $this->iD; + } + /** + * Unique ID of the build cache record. + * + * @param string|null $iD + * + * @return self + */ + public function setID(?string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + return $this; + } + /** + * ID of the parent build cache record. + + > **Deprecated**: This field is deprecated, and omitted if empty. + + * + * @return string|null + */ + public function getParent(): ?string + { + return $this->parent; + } + /** + * ID of the parent build cache record. + + > **Deprecated**: This field is deprecated, and omitted if empty. + + * + * @param string|null $parent + * + * @return self + */ + public function setParent(?string $parent): self + { + $this->initialized['parent'] = true; + $this->parent = $parent; + return $this; + } + /** + * List of parent build cache record IDs. + * + * @return list|null + */ + public function getParents(): ?array + { + return $this->parents; + } + /** + * List of parent build cache record IDs. + * + * @param list|null $parents + * + * @return self + */ + public function setParents(?array $parents): self + { + $this->initialized['parents'] = true; + $this->parents = $parents; + return $this; + } + /** + * Cache record type. + * + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + /** + * Cache record type. + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self + { + $this->initialized['type'] = true; + $this->type = $type; + return $this; + } + /** + * Description of the build-step that produced the build cache. + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->description; + } + /** + * Description of the build-step that produced the build cache. + * + * @param string|null $description + * + * @return self + */ + public function setDescription(?string $description): self + { + $this->initialized['description'] = true; + $this->description = $description; + return $this; + } + /** + * Indicates if the build cache is in use. + * + * @return bool|null + */ + public function getInUse(): ?bool + { + return $this->inUse; + } + /** + * Indicates if the build cache is in use. + * + * @param bool|null $inUse + * + * @return self + */ + public function setInUse(?bool $inUse): self + { + $this->initialized['inUse'] = true; + $this->inUse = $inUse; + return $this; + } + /** + * Indicates if the build cache is shared. + * + * @return bool|null + */ + public function getShared(): ?bool + { + return $this->shared; + } + /** + * Indicates if the build cache is shared. + * + * @param bool|null $shared + * + * @return self + */ + public function setShared(?bool $shared): self + { + $this->initialized['shared'] = true; + $this->shared = $shared; + return $this; + } + /** + * Amount of disk space used by the build cache (in bytes). + * + * @return int|null + */ + public function getSize(): ?int + { + return $this->size; + } + /** + * Amount of disk space used by the build cache (in bytes). + * + * @param int|null $size + * + * @return self + */ + public function setSize(?int $size): self + { + $this->initialized['size'] = true; + $this->size = $size; + return $this; + } + /** + * Date and time at which the build cache was created in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @return string|null + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + /** + * Date and time at which the build cache was created in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @param string|null $createdAt + * + * @return self + */ + public function setCreatedAt(?string $createdAt): self + { + $this->initialized['createdAt'] = true; + $this->createdAt = $createdAt; + return $this; + } + /** + * Date and time at which the build cache was last used in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @return string|null + */ + public function getLastUsedAt(): ?string + { + return $this->lastUsedAt; + } + /** + * Date and time at which the build cache was last used in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @param string|null $lastUsedAt + * + * @return self + */ + public function setLastUsedAt(?string $lastUsedAt): self + { + $this->initialized['lastUsedAt'] = true; + $this->lastUsedAt = $lastUsedAt; + return $this; + } + /** + * + * + * @return int|null + */ + public function getUsageCount(): ?int + { + return $this->usageCount; + } + /** + * + * + * @param int|null $usageCount + * + * @return self + */ + public function setUsageCount(?int $usageCount): self + { + $this->initialized['usageCount'] = true; + $this->usageCount = $usageCount; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/BuildInfo.php b/generated/Model/BuildInfo.php index 373c04d0c..7201cbf24 100644 --- a/generated/Model/BuildInfo.php +++ b/generated/Model/BuildInfo.php @@ -54,6 +54,12 @@ public function isInitialized($property): bool * @var ProgressDetail|null */ protected $progressDetail; + /** + * Image ID or Digest + * + * @var ImageID|null + */ + protected $aux; /** * * @@ -208,4 +214,26 @@ public function setProgressDetail(?ProgressDetail $progressDetail): self $this->progressDetail = $progressDetail; return $this; } + /** + * Image ID or Digest + * + * @return ImageID|null + */ + public function getAux(): ?ImageID + { + return $this->aux; + } + /** + * Image ID or Digest + * + * @param ImageID|null $aux + * + * @return self + */ + public function setAux(?ImageID $aux): self + { + $this->initialized['aux'] = true; + $this->aux = $aux; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/BuildPrunePostResponse200.php b/generated/Model/BuildPrunePostResponse200.php new file mode 100644 index 000000000..1f1600edc --- /dev/null +++ b/generated/Model/BuildPrunePostResponse200.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var list|null + */ + protected $cachesDeleted; + /** + * Disk space reclaimed in bytes + * + * @var int|null + */ + protected $spaceReclaimed; + /** + * + * + * @return list|null + */ + public function getCachesDeleted(): ?array + { + return $this->cachesDeleted; + } + /** + * + * + * @param list|null $cachesDeleted + * + * @return self + */ + public function setCachesDeleted(?array $cachesDeleted): self + { + $this->initialized['cachesDeleted'] = true; + $this->cachesDeleted = $cachesDeleted; + return $this; + } + /** + * Disk space reclaimed in bytes + * + * @return int|null + */ + public function getSpaceReclaimed(): ?int + { + return $this->spaceReclaimed; + } + /** + * Disk space reclaimed in bytes + * + * @param int|null $spaceReclaimed + * + * @return self + */ + public function setSpaceReclaimed(?int $spaceReclaimed): self + { + $this->initialized['spaceReclaimed'] = true; + $this->spaceReclaimed = $spaceReclaimed; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ClusterInfo.php b/generated/Model/ClusterInfo.php index 499be9e61..42be6fa68 100644 --- a/generated/Model/ClusterInfo.php +++ b/generated/Model/ClusterInfo.php @@ -19,22 +19,36 @@ public function isInitialized($property): bool */ protected $iD; /** - * - * - * @var ClusterInfoVersion|null - */ + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @var ObjectVersion|null + */ protected $version; /** - * - * - * @var string|null - */ + * Date and time at which the swarm was initialised in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @var string|null + */ protected $createdAt; /** - * - * - * @var string|null - */ + * Date and time at which the swarm was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @var string|null + */ protected $updatedAt; /** * User modifiable swarm configuration. @@ -42,6 +56,45 @@ public function isInitialized($property): bool * @var SwarmSpec|null */ protected $spec; + /** + * Information about the issuer of leaf TLS certificates and the trusted root + CA certificate. + + * + * @var TLSInfo|null + */ + protected $tLSInfo; + /** + * Whether there is currently a root CA rotation in progress for the swarm + * + * @var bool|null + */ + protected $rootRotationInProgress; + /** + * DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + If no port is set or is set to 0, the default port (4789) is used. + + * + * @var int|null + */ + protected $dataPathPort = 4789; + /** + * Default Address Pool specifies default subnet pools for global scope + networks. + + * + * @var list|null + */ + protected $defaultAddrPool; + /** + * SubnetSize specifies the subnet size of the networks created from the + default subnet pool. + + * + * @var int|null + */ + protected $subnetSize = 24; /** * The ID of the swarm. * @@ -65,43 +118,67 @@ public function setID(?string $iD): self return $this; } /** - * - * - * @return ClusterInfoVersion|null - */ - public function getVersion(): ?ClusterInfoVersion + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @return ObjectVersion|null + */ + public function getVersion(): ?ObjectVersion { return $this->version; } /** - * - * - * @param ClusterInfoVersion|null $version - * - * @return self - */ - public function setVersion(?ClusterInfoVersion $version): self + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @param ObjectVersion|null $version + * + * @return self + */ + public function setVersion(?ObjectVersion $version): self { $this->initialized['version'] = true; $this->version = $version; return $this; } /** - * - * - * @return string|null - */ + * Date and time at which the swarm was initialised in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @return string|null + */ public function getCreatedAt(): ?string { return $this->createdAt; } /** - * - * - * @param string|null $createdAt - * - * @return self - */ + * Date and time at which the swarm was initialised in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @param string|null $createdAt + * + * @return self + */ public function setCreatedAt(?string $createdAt): self { $this->initialized['createdAt'] = true; @@ -109,21 +186,25 @@ public function setCreatedAt(?string $createdAt): self return $this; } /** - * - * - * @return string|null - */ + * Date and time at which the swarm was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @return string|null + */ public function getUpdatedAt(): ?string { return $this->updatedAt; } /** - * - * - * @param string|null $updatedAt - * - * @return self - */ + * Date and time at which the swarm was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @param string|null $updatedAt + * + * @return self + */ public function setUpdatedAt(?string $updatedAt): self { $this->initialized['updatedAt'] = true; @@ -152,4 +233,132 @@ public function setSpec(?SwarmSpec $spec): self $this->spec = $spec; return $this; } + /** + * Information about the issuer of leaf TLS certificates and the trusted root + CA certificate. + + * + * @return TLSInfo|null + */ + public function getTLSInfo(): ?TLSInfo + { + return $this->tLSInfo; + } + /** + * Information about the issuer of leaf TLS certificates and the trusted root + CA certificate. + + * + * @param TLSInfo|null $tLSInfo + * + * @return self + */ + public function setTLSInfo(?TLSInfo $tLSInfo): self + { + $this->initialized['tLSInfo'] = true; + $this->tLSInfo = $tLSInfo; + return $this; + } + /** + * Whether there is currently a root CA rotation in progress for the swarm + * + * @return bool|null + */ + public function getRootRotationInProgress(): ?bool + { + return $this->rootRotationInProgress; + } + /** + * Whether there is currently a root CA rotation in progress for the swarm + * + * @param bool|null $rootRotationInProgress + * + * @return self + */ + public function setRootRotationInProgress(?bool $rootRotationInProgress): self + { + $this->initialized['rootRotationInProgress'] = true; + $this->rootRotationInProgress = $rootRotationInProgress; + return $this; + } + /** + * DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + If no port is set or is set to 0, the default port (4789) is used. + + * + * @return int|null + */ + public function getDataPathPort(): ?int + { + return $this->dataPathPort; + } + /** + * DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + If no port is set or is set to 0, the default port (4789) is used. + + * + * @param int|null $dataPathPort + * + * @return self + */ + public function setDataPathPort(?int $dataPathPort): self + { + $this->initialized['dataPathPort'] = true; + $this->dataPathPort = $dataPathPort; + return $this; + } + /** + * Default Address Pool specifies default subnet pools for global scope + networks. + + * + * @return list|null + */ + public function getDefaultAddrPool(): ?array + { + return $this->defaultAddrPool; + } + /** + * Default Address Pool specifies default subnet pools for global scope + networks. + + * + * @param list|null $defaultAddrPool + * + * @return self + */ + public function setDefaultAddrPool(?array $defaultAddrPool): self + { + $this->initialized['defaultAddrPool'] = true; + $this->defaultAddrPool = $defaultAddrPool; + return $this; + } + /** + * SubnetSize specifies the subnet size of the networks created from the + default subnet pool. + + * + * @return int|null + */ + public function getSubnetSize(): ?int + { + return $this->subnetSize; + } + /** + * SubnetSize specifies the subnet size of the networks created from the + default subnet pool. + + * + * @param int|null $subnetSize + * + * @return self + */ + public function setSubnetSize(?int $subnetSize): self + { + $this->initialized['subnetSize'] = true; + $this->subnetSize = $subnetSize; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/ClusterInfoVersion.php b/generated/Model/ClusterInfoVersion.php deleted file mode 100644 index 0805f7310..000000000 --- a/generated/Model/ClusterInfoVersion.php +++ /dev/null @@ -1,43 +0,0 @@ -initialized); - } - /** - * - * - * @var int|null - */ - protected $index; - /** - * - * - * @return int|null - */ - public function getIndex(): ?int - { - return $this->index; - } - /** - * - * - * @param int|null $index - * - * @return self - */ - public function setIndex(?int $index): self - { - $this->initialized['index'] = true; - $this->index = $index; - return $this; - } -} \ No newline at end of file diff --git a/generated/Model/ClusterVolume.php b/generated/Model/ClusterVolume.php new file mode 100644 index 000000000..77cf91c9c --- /dev/null +++ b/generated/Model/ClusterVolume.php @@ -0,0 +1,256 @@ +initialized); + } + /** + * The Swarm ID of this volume. Because cluster volumes are Swarm + objects, they have an ID, unlike non-cluster volumes. This ID can + be used to refer to the Volume instead of the name. + + * + * @var string|null + */ + protected $iD; + /** + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @var ObjectVersion|null + */ + protected $version; + /** + * + * + * @var string|null + */ + protected $createdAt; + /** + * + * + * @var string|null + */ + protected $updatedAt; + /** + * Cluster-specific options used to create the volume. + * + * @var ClusterVolumeSpec|null + */ + protected $spec; + /** + * Information about the global status of the volume. + * + * @var ClusterVolumeInfo|null + */ + protected $info; + /** + * The status of the volume as it pertains to its publishing and use on + specific nodes + + * + * @var list|null + */ + protected $publishStatus; + /** + * The Swarm ID of this volume. Because cluster volumes are Swarm + objects, they have an ID, unlike non-cluster volumes. This ID can + be used to refer to the Volume instead of the name. + + * + * @return string|null + */ + public function getID(): ?string + { + return $this->iD; + } + /** + * The Swarm ID of this volume. Because cluster volumes are Swarm + objects, they have an ID, unlike non-cluster volumes. This ID can + be used to refer to the Volume instead of the name. + + * + * @param string|null $iD + * + * @return self + */ + public function setID(?string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + return $this; + } + /** + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @return ObjectVersion|null + */ + public function getVersion(): ?ObjectVersion + { + return $this->version; + } + /** + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @param ObjectVersion|null $version + * + * @return self + */ + public function setVersion(?ObjectVersion $version): self + { + $this->initialized['version'] = true; + $this->version = $version; + return $this; + } + /** + * + * + * @return string|null + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + /** + * + * + * @param string|null $createdAt + * + * @return self + */ + public function setCreatedAt(?string $createdAt): self + { + $this->initialized['createdAt'] = true; + $this->createdAt = $createdAt; + return $this; + } + /** + * + * + * @return string|null + */ + public function getUpdatedAt(): ?string + { + return $this->updatedAt; + } + /** + * + * + * @param string|null $updatedAt + * + * @return self + */ + public function setUpdatedAt(?string $updatedAt): self + { + $this->initialized['updatedAt'] = true; + $this->updatedAt = $updatedAt; + return $this; + } + /** + * Cluster-specific options used to create the volume. + * + * @return ClusterVolumeSpec|null + */ + public function getSpec(): ?ClusterVolumeSpec + { + return $this->spec; + } + /** + * Cluster-specific options used to create the volume. + * + * @param ClusterVolumeSpec|null $spec + * + * @return self + */ + public function setSpec(?ClusterVolumeSpec $spec): self + { + $this->initialized['spec'] = true; + $this->spec = $spec; + return $this; + } + /** + * Information about the global status of the volume. + * + * @return ClusterVolumeInfo|null + */ + public function getInfo(): ?ClusterVolumeInfo + { + return $this->info; + } + /** + * Information about the global status of the volume. + * + * @param ClusterVolumeInfo|null $info + * + * @return self + */ + public function setInfo(?ClusterVolumeInfo $info): self + { + $this->initialized['info'] = true; + $this->info = $info; + return $this; + } + /** + * The status of the volume as it pertains to its publishing and use on + specific nodes + + * + * @return list|null + */ + public function getPublishStatus(): ?array + { + return $this->publishStatus; + } + /** + * The status of the volume as it pertains to its publishing and use on + specific nodes + + * + * @param list|null $publishStatus + * + * @return self + */ + public function setPublishStatus(?array $publishStatus): self + { + $this->initialized['publishStatus'] = true; + $this->publishStatus = $publishStatus; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ClusterVolumeInfo.php b/generated/Model/ClusterVolumeInfo.php new file mode 100644 index 000000000..daf58d94a --- /dev/null +++ b/generated/Model/ClusterVolumeInfo.php @@ -0,0 +1,154 @@ +initialized); + } + /** + * The capacity of the volume in bytes. A value of 0 indicates that + the capacity is unknown. + + * + * @var int|null + */ + protected $capacityBytes; + /** + * A map of strings to strings returned from the storage plugin when + the volume is created. + + * + * @var array|null + */ + protected $volumeContext; + /** + * The ID of the volume as returned by the CSI storage plugin. This + is distinct from the volume's ID as provided by Docker. This ID + is never used by the user when communicating with Docker to refer + to this volume. If the ID is blank, then the Volume has not been + successfully created in the plugin yet. + + * + * @var string|null + */ + protected $volumeID; + /** + * The topology this volume is actually accessible from. + * + * @var list>|null + */ + protected $accessibleTopology; + /** + * The capacity of the volume in bytes. A value of 0 indicates that + the capacity is unknown. + + * + * @return int|null + */ + public function getCapacityBytes(): ?int + { + return $this->capacityBytes; + } + /** + * The capacity of the volume in bytes. A value of 0 indicates that + the capacity is unknown. + + * + * @param int|null $capacityBytes + * + * @return self + */ + public function setCapacityBytes(?int $capacityBytes): self + { + $this->initialized['capacityBytes'] = true; + $this->capacityBytes = $capacityBytes; + return $this; + } + /** + * A map of strings to strings returned from the storage plugin when + the volume is created. + + * + * @return array|null + */ + public function getVolumeContext(): ?iterable + { + return $this->volumeContext; + } + /** + * A map of strings to strings returned from the storage plugin when + the volume is created. + + * + * @param array|null $volumeContext + * + * @return self + */ + public function setVolumeContext(?iterable $volumeContext): self + { + $this->initialized['volumeContext'] = true; + $this->volumeContext = $volumeContext; + return $this; + } + /** + * The ID of the volume as returned by the CSI storage plugin. This + is distinct from the volume's ID as provided by Docker. This ID + is never used by the user when communicating with Docker to refer + to this volume. If the ID is blank, then the Volume has not been + successfully created in the plugin yet. + + * + * @return string|null + */ + public function getVolumeID(): ?string + { + return $this->volumeID; + } + /** + * The ID of the volume as returned by the CSI storage plugin. This + is distinct from the volume's ID as provided by Docker. This ID + is never used by the user when communicating with Docker to refer + to this volume. If the ID is blank, then the Volume has not been + successfully created in the plugin yet. + + * + * @param string|null $volumeID + * + * @return self + */ + public function setVolumeID(?string $volumeID): self + { + $this->initialized['volumeID'] = true; + $this->volumeID = $volumeID; + return $this; + } + /** + * The topology this volume is actually accessible from. + * + * @return list>|null + */ + public function getAccessibleTopology(): ?array + { + return $this->accessibleTopology; + } + /** + * The topology this volume is actually accessible from. + * + * @param list>|null $accessibleTopology + * + * @return self + */ + public function setAccessibleTopology(?array $accessibleTopology): self + { + $this->initialized['accessibleTopology'] = true; + $this->accessibleTopology = $accessibleTopology; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ClusterVolumePublishStatusItem.php b/generated/Model/ClusterVolumePublishStatusItem.php new file mode 100644 index 000000000..e9ee69b22 --- /dev/null +++ b/generated/Model/ClusterVolumePublishStatusItem.php @@ -0,0 +1,120 @@ +initialized); + } + /** + * The ID of the Swarm node the volume is published on. + * + * @var string|null + */ + protected $nodeID; + /** + * The published state of the volume. + * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. + * `published` The volume is published successfully to the node. + * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. + * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. + + * + * @var string|null + */ + protected $state; + /** + * A map of strings to strings returned by the CSI controller + plugin when a volume is published. + + * + * @var array|null + */ + protected $publishContext; + /** + * The ID of the Swarm node the volume is published on. + * + * @return string|null + */ + public function getNodeID(): ?string + { + return $this->nodeID; + } + /** + * The ID of the Swarm node the volume is published on. + * + * @param string|null $nodeID + * + * @return self + */ + public function setNodeID(?string $nodeID): self + { + $this->initialized['nodeID'] = true; + $this->nodeID = $nodeID; + return $this; + } + /** + * The published state of the volume. + * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. + * `published` The volume is published successfully to the node. + * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. + * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. + + * + * @return string|null + */ + public function getState(): ?string + { + return $this->state; + } + /** + * The published state of the volume. + * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. + * `published` The volume is published successfully to the node. + * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. + * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. + + * + * @param string|null $state + * + * @return self + */ + public function setState(?string $state): self + { + $this->initialized['state'] = true; + $this->state = $state; + return $this; + } + /** + * A map of strings to strings returned by the CSI controller + plugin when a volume is published. + + * + * @return array|null + */ + public function getPublishContext(): ?iterable + { + return $this->publishContext; + } + /** + * A map of strings to strings returned by the CSI controller + plugin when a volume is published. + + * + * @param array|null $publishContext + * + * @return self + */ + public function setPublishContext(?iterable $publishContext): self + { + $this->initialized['publishContext'] = true; + $this->publishContext = $publishContext; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ClusterVolumeSpec.php b/generated/Model/ClusterVolumeSpec.php new file mode 100644 index 000000000..af3d4a96e --- /dev/null +++ b/generated/Model/ClusterVolumeSpec.php @@ -0,0 +1,89 @@ +initialized); + } + /** + * Group defines the volume group of this volume. Volumes belonging to + the same group can be referred to by group name when creating + Services. Referring to a volume by group instructs Swarm to treat + volumes in that group interchangeably for the purpose of scheduling. + Volumes with an empty string for a group technically all belong to + the same, emptystring group. + + * + * @var string|null + */ + protected $group; + /** + * Defines how the volume is used by tasks. + * + * @var ClusterVolumeSpecAccessMode|null + */ + protected $accessMode; + /** + * Group defines the volume group of this volume. Volumes belonging to + the same group can be referred to by group name when creating + Services. Referring to a volume by group instructs Swarm to treat + volumes in that group interchangeably for the purpose of scheduling. + Volumes with an empty string for a group technically all belong to + the same, emptystring group. + + * + * @return string|null + */ + public function getGroup(): ?string + { + return $this->group; + } + /** + * Group defines the volume group of this volume. Volumes belonging to + the same group can be referred to by group name when creating + Services. Referring to a volume by group instructs Swarm to treat + volumes in that group interchangeably for the purpose of scheduling. + Volumes with an empty string for a group technically all belong to + the same, emptystring group. + + * + * @param string|null $group + * + * @return self + */ + public function setGroup(?string $group): self + { + $this->initialized['group'] = true; + $this->group = $group; + return $this; + } + /** + * Defines how the volume is used by tasks. + * + * @return ClusterVolumeSpecAccessMode|null + */ + public function getAccessMode(): ?ClusterVolumeSpecAccessMode + { + return $this->accessMode; + } + /** + * Defines how the volume is used by tasks. + * + * @param ClusterVolumeSpecAccessMode|null $accessMode + * + * @return self + */ + public function setAccessMode(?ClusterVolumeSpecAccessMode $accessMode): self + { + $this->initialized['accessMode'] = true; + $this->accessMode = $accessMode; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ClusterVolumeSpecAccessMode.php b/generated/Model/ClusterVolumeSpecAccessMode.php new file mode 100644 index 000000000..39436e7aa --- /dev/null +++ b/generated/Model/ClusterVolumeSpecAccessMode.php @@ -0,0 +1,334 @@ +initialized); + } + /** + * The set of nodes this volume can be used on at one time. + - `single` The volume may only be scheduled to one node at a time. + - `multi` the volume may be scheduled to any supported number of nodes at a time. + + * + * @var string|null + */ + protected $scope = 'single'; + /** + * The number and way that different tasks can use this volume + at one time. + - `none` The volume may only be used by one task at a time. + - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly + - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. + - `all` The volume may have any number of readers and writers. + + * + * @var string|null + */ + protected $sharing = 'none'; + /** + * Options for using this volume as a Mount-type volume. + + Either MountVolume or BlockVolume, but not both, must be + present. + properties: + FsType: + type: "string" + description: | + Specifies the filesystem type for the mount volume. + Optional. + MountFlags: + type: "array" + description: | + Flags to pass when mounting the volume. Optional. + items: + type: "string" + BlockVolume: + type: "object" + description: | + Options for using this volume as a Block-type volume. + Intentionally empty. + + * + * @var mixed|null + */ + protected $mountVolume; + /** + * Swarm Secrets that are passed to the CSI storage plugin when + operating on this volume. + + * + * @var list|null + */ + protected $secrets; + /** + * Requirements for the accessible topology of the volume. These + fields are optional. For an in-depth description of what these + fields mean, see the CSI specification. + + * + * @var ClusterVolumeSpecAccessModeAccessibilityRequirements|null + */ + protected $accessibilityRequirements; + /** + * The desired capacity that the volume should be created with. If + empty, the plugin will decide the capacity. + + * + * @var ClusterVolumeSpecAccessModeCapacityRange|null + */ + protected $capacityRange; + /** + * The availability of the volume for use in tasks. + - `active` The volume is fully available for scheduling on the cluster + - `pause` No new workloads should use the volume, but existing workloads are not stopped. + - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started. + + * + * @var string|null + */ + protected $availability = 'active'; + /** + * The set of nodes this volume can be used on at one time. + - `single` The volume may only be scheduled to one node at a time. + - `multi` the volume may be scheduled to any supported number of nodes at a time. + + * + * @return string|null + */ + public function getScope(): ?string + { + return $this->scope; + } + /** + * The set of nodes this volume can be used on at one time. + - `single` The volume may only be scheduled to one node at a time. + - `multi` the volume may be scheduled to any supported number of nodes at a time. + + * + * @param string|null $scope + * + * @return self + */ + public function setScope(?string $scope): self + { + $this->initialized['scope'] = true; + $this->scope = $scope; + return $this; + } + /** + * The number and way that different tasks can use this volume + at one time. + - `none` The volume may only be used by one task at a time. + - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly + - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. + - `all` The volume may have any number of readers and writers. + + * + * @return string|null + */ + public function getSharing(): ?string + { + return $this->sharing; + } + /** + * The number and way that different tasks can use this volume + at one time. + - `none` The volume may only be used by one task at a time. + - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly + - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. + - `all` The volume may have any number of readers and writers. + + * + * @param string|null $sharing + * + * @return self + */ + public function setSharing(?string $sharing): self + { + $this->initialized['sharing'] = true; + $this->sharing = $sharing; + return $this; + } + /** + * Options for using this volume as a Mount-type volume. + + Either MountVolume or BlockVolume, but not both, must be + present. + properties: + FsType: + type: "string" + description: | + Specifies the filesystem type for the mount volume. + Optional. + MountFlags: + type: "array" + description: | + Flags to pass when mounting the volume. Optional. + items: + type: "string" + BlockVolume: + type: "object" + description: | + Options for using this volume as a Block-type volume. + Intentionally empty. + + * + * @return mixed + */ + public function getMountVolume() + { + return $this->mountVolume; + } + /** + * Options for using this volume as a Mount-type volume. + + Either MountVolume or BlockVolume, but not both, must be + present. + properties: + FsType: + type: "string" + description: | + Specifies the filesystem type for the mount volume. + Optional. + MountFlags: + type: "array" + description: | + Flags to pass when mounting the volume. Optional. + items: + type: "string" + BlockVolume: + type: "object" + description: | + Options for using this volume as a Block-type volume. + Intentionally empty. + + * + * @param mixed $mountVolume + * + * @return self + */ + public function setMountVolume($mountVolume): self + { + $this->initialized['mountVolume'] = true; + $this->mountVolume = $mountVolume; + return $this; + } + /** + * Swarm Secrets that are passed to the CSI storage plugin when + operating on this volume. + + * + * @return list|null + */ + public function getSecrets(): ?array + { + return $this->secrets; + } + /** + * Swarm Secrets that are passed to the CSI storage plugin when + operating on this volume. + + * + * @param list|null $secrets + * + * @return self + */ + public function setSecrets(?array $secrets): self + { + $this->initialized['secrets'] = true; + $this->secrets = $secrets; + return $this; + } + /** + * Requirements for the accessible topology of the volume. These + fields are optional. For an in-depth description of what these + fields mean, see the CSI specification. + + * + * @return ClusterVolumeSpecAccessModeAccessibilityRequirements|null + */ + public function getAccessibilityRequirements(): ?ClusterVolumeSpecAccessModeAccessibilityRequirements + { + return $this->accessibilityRequirements; + } + /** + * Requirements for the accessible topology of the volume. These + fields are optional. For an in-depth description of what these + fields mean, see the CSI specification. + + * + * @param ClusterVolumeSpecAccessModeAccessibilityRequirements|null $accessibilityRequirements + * + * @return self + */ + public function setAccessibilityRequirements(?ClusterVolumeSpecAccessModeAccessibilityRequirements $accessibilityRequirements): self + { + $this->initialized['accessibilityRequirements'] = true; + $this->accessibilityRequirements = $accessibilityRequirements; + return $this; + } + /** + * The desired capacity that the volume should be created with. If + empty, the plugin will decide the capacity. + + * + * @return ClusterVolumeSpecAccessModeCapacityRange|null + */ + public function getCapacityRange(): ?ClusterVolumeSpecAccessModeCapacityRange + { + return $this->capacityRange; + } + /** + * The desired capacity that the volume should be created with. If + empty, the plugin will decide the capacity. + + * + * @param ClusterVolumeSpecAccessModeCapacityRange|null $capacityRange + * + * @return self + */ + public function setCapacityRange(?ClusterVolumeSpecAccessModeCapacityRange $capacityRange): self + { + $this->initialized['capacityRange'] = true; + $this->capacityRange = $capacityRange; + return $this; + } + /** + * The availability of the volume for use in tasks. + - `active` The volume is fully available for scheduling on the cluster + - `pause` No new workloads should use the volume, but existing workloads are not stopped. + - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started. + + * + * @return string|null + */ + public function getAvailability(): ?string + { + return $this->availability; + } + /** + * The availability of the volume for use in tasks. + - `active` The volume is fully available for scheduling on the cluster + - `pause` No new workloads should use the volume, but existing workloads are not stopped. + - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started. + + * + * @param string|null $availability + * + * @return self + */ + public function setAvailability(?string $availability): self + { + $this->initialized['availability'] = true; + $this->availability = $availability; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ClusterVolumeSpecAccessModeAccessibilityRequirements.php b/generated/Model/ClusterVolumeSpecAccessModeAccessibilityRequirements.php new file mode 100644 index 000000000..ad8f333a8 --- /dev/null +++ b/generated/Model/ClusterVolumeSpecAccessModeAccessibilityRequirements.php @@ -0,0 +1,83 @@ +initialized); + } + /** + * A list of required topologies, at least one of which the + volume must be accessible from. + + * + * @var list>|null + */ + protected $requisite; + /** + * A list of topologies that the volume should attempt to be + provisioned in. + + * + * @var list>|null + */ + protected $preferred; + /** + * A list of required topologies, at least one of which the + volume must be accessible from. + + * + * @return list>|null + */ + public function getRequisite(): ?array + { + return $this->requisite; + } + /** + * A list of required topologies, at least one of which the + volume must be accessible from. + + * + * @param list>|null $requisite + * + * @return self + */ + public function setRequisite(?array $requisite): self + { + $this->initialized['requisite'] = true; + $this->requisite = $requisite; + return $this; + } + /** + * A list of topologies that the volume should attempt to be + provisioned in. + + * + * @return list>|null + */ + public function getPreferred(): ?array + { + return $this->preferred; + } + /** + * A list of topologies that the volume should attempt to be + provisioned in. + + * + * @param list>|null $preferred + * + * @return self + */ + public function setPreferred(?array $preferred): self + { + $this->initialized['preferred'] = true; + $this->preferred = $preferred; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ClusterVolumeSpecAccessModeCapacityRange.php b/generated/Model/ClusterVolumeSpecAccessModeCapacityRange.php new file mode 100644 index 000000000..167289093 --- /dev/null +++ b/generated/Model/ClusterVolumeSpecAccessModeCapacityRange.php @@ -0,0 +1,83 @@ +initialized); + } + /** + * The volume must be at least this big. The value of 0 + indicates an unspecified minimum + + * + * @var int|null + */ + protected $requiredBytes; + /** + * The volume must not be bigger than this. The value of 0 + indicates an unspecified maximum. + + * + * @var int|null + */ + protected $limitBytes; + /** + * The volume must be at least this big. The value of 0 + indicates an unspecified minimum + + * + * @return int|null + */ + public function getRequiredBytes(): ?int + { + return $this->requiredBytes; + } + /** + * The volume must be at least this big. The value of 0 + indicates an unspecified minimum + + * + * @param int|null $requiredBytes + * + * @return self + */ + public function setRequiredBytes(?int $requiredBytes): self + { + $this->initialized['requiredBytes'] = true; + $this->requiredBytes = $requiredBytes; + return $this; + } + /** + * The volume must not be bigger than this. The value of 0 + indicates an unspecified maximum. + + * + * @return int|null + */ + public function getLimitBytes(): ?int + { + return $this->limitBytes; + } + /** + * The volume must not be bigger than this. The value of 0 + indicates an unspecified maximum. + + * + * @param int|null $limitBytes + * + * @return self + */ + public function setLimitBytes(?int $limitBytes): self + { + $this->initialized['limitBytes'] = true; + $this->limitBytes = $limitBytes; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ClusterVolumeSpecAccessModeSecretsItem.php b/generated/Model/ClusterVolumeSpecAccessModeSecretsItem.php new file mode 100644 index 000000000..cf7e23a66 --- /dev/null +++ b/generated/Model/ClusterVolumeSpecAccessModeSecretsItem.php @@ -0,0 +1,89 @@ +initialized); + } + /** + * Key is the name of the key of the key-value pair passed to + the plugin. + + * + * @var string|null + */ + protected $key; + /** + * Secret is the swarm Secret object from which to read data. + This can be a Secret name or ID. The Secret data is + retrieved by swarm and used as the value of the key-value + pair passed to the plugin. + + * + * @var string|null + */ + protected $secret; + /** + * Key is the name of the key of the key-value pair passed to + the plugin. + + * + * @return string|null + */ + public function getKey(): ?string + { + return $this->key; + } + /** + * Key is the name of the key of the key-value pair passed to + the plugin. + + * + * @param string|null $key + * + * @return self + */ + public function setKey(?string $key): self + { + $this->initialized['key'] = true; + $this->key = $key; + return $this; + } + /** + * Secret is the swarm Secret object from which to read data. + This can be a Secret name or ID. The Secret data is + retrieved by swarm and used as the value of the key-value + pair passed to the plugin. + + * + * @return string|null + */ + public function getSecret(): ?string + { + return $this->secret; + } + /** + * Secret is the swarm Secret object from which to read data. + This can be a Secret name or ID. The Secret data is + retrieved by swarm and used as the value of the key-value + pair passed to the plugin. + + * + * @param string|null $secret + * + * @return self + */ + public function setSecret(?string $secret): self + { + $this->initialized['secret'] = true; + $this->secret = $secret; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServicesCreatePostResponse201.php b/generated/Model/Commit.php similarity index 56% rename from generated/Model/ServicesCreatePostResponse201.php rename to generated/Model/Commit.php index aa1224037..3fb167782 100644 --- a/generated/Model/ServicesCreatePostResponse201.php +++ b/generated/Model/Commit.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class ServicesCreatePostResponse201 +class Commit { /** * @var array @@ -13,19 +13,19 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * The ID of the created service. + * Actual commit ID of external tool. * * @var string|null */ protected $iD; /** - * Optional warning message + * Commit ID of external tool expected by dockerd as set at build time. * * @var string|null */ - protected $warning; + protected $expected; /** - * The ID of the created service. + * Actual commit ID of external tool. * * @return string|null */ @@ -34,7 +34,7 @@ public function getID(): ?string return $this->iD; } /** - * The ID of the created service. + * Actual commit ID of external tool. * * @param string|null $iD * @@ -47,25 +47,25 @@ public function setID(?string $iD): self return $this; } /** - * Optional warning message + * Commit ID of external tool expected by dockerd as set at build time. * * @return string|null */ - public function getWarning(): ?string + public function getExpected(): ?string { - return $this->warning; + return $this->expected; } /** - * Optional warning message + * Commit ID of external tool expected by dockerd as set at build time. * - * @param string|null $warning + * @param string|null $expected * * @return self */ - public function setWarning(?string $warning): self + public function setExpected(?string $expected): self { - $this->initialized['warning'] = true; - $this->warning = $warning; + $this->initialized['expected'] = true; + $this->expected = $expected; return $this; } } \ No newline at end of file diff --git a/generated/Model/Config.php b/generated/Model/Config.php index 996201214..a7808ac96 100644 --- a/generated/Model/Config.php +++ b/generated/Model/Config.php @@ -13,721 +13,173 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * The hostname to use for the container, as a valid RFC 1123 hostname. + * * * @var string|null */ - protected $hostname; + protected $iD; /** - * The domain name to use for the container. - * - * @var string|null - */ - protected $domainname; - /** - * The user that commands are run as inside the container. - * - * @var string|null - */ - protected $user; - /** - * Whether to attach to `stdin`. - * - * @var bool|null - */ - protected $attachStdin = false; - /** - * Whether to attach to `stdout`. - * - * @var bool|null - */ - protected $attachStdout = true; - /** - * Whether to attach to `stderr`. - * - * @var bool|null - */ - protected $attachStderr = true; - /** - * An object mapping ports to an empty object in the form: - - `{"/": {}}` - - * - * @var array|null - */ - protected $exposedPorts; - /** - * Attach standard streams to a TTY, including `stdin` if it is not closed. - * - * @var bool|null - */ - protected $tty = false; - /** - * Open `stdin` - * - * @var bool|null - */ - protected $openStdin = false; - /** - * Close `stdin` after one attached client disconnects - * - * @var bool|null - */ - protected $stdinOnce = false; - /** - * A list of environment variables to set inside the container in the form `["VAR=value", ...]` - * - * @var list|null - */ - protected $env; - /** - * Command to run specified as a string or an array of strings. - * - * @var list|string|null - */ - protected $cmd; - /** - * A test to perform to check that the container is healthy. - * - * @var ConfigHealthcheck|null - */ - protected $healthcheck; - /** - * Command is already escaped (Windows only) - * - * @var bool|null - */ - protected $argsEscaped; - /** - * The name of the image to use when creating the container - * - * @var string|null - */ - protected $image; - /** - * An object mapping mount point paths inside the container to empty objects. - * - * @var ConfigVolumes|null - */ - protected $volumes; - /** - * The working directory for commands to run in. - * - * @var string|null - */ - protected $workingDir; - /** - * The entry point for the container as a string or an array of strings. + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. - If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. * - * @var list|string|null + * @var ObjectVersion|null */ - protected $entrypoint; + protected $version; /** - * Disable networking for the container. - * - * @var bool|null - */ - protected $networkDisabled; - /** - * MAC address of the container. + * * * @var string|null */ - protected $macAddress; - /** - * `ONBUILD` metadata that were defined in the image's `Dockerfile`. - * - * @var list|null - */ - protected $onBuild; - /** - * User-defined key/value metadata. - * - * @var array|null - */ - protected $labels; + protected $createdAt; /** - * Signal to stop a container as a string or unsigned integer. + * * * @var string|null */ - protected $stopSignal = 'SIGTERM'; - /** - * Timeout to stop a container in seconds. - * - * @var int|null - */ - protected $stopTimeout = 10; - /** - * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. - * - * @var list|null - */ - protected $shell; - /** - * The hostname to use for the container, as a valid RFC 1123 hostname. - * - * @return string|null - */ - public function getHostname(): ?string - { - return $this->hostname; - } - /** - * The hostname to use for the container, as a valid RFC 1123 hostname. - * - * @param string|null $hostname - * - * @return self - */ - public function setHostname(?string $hostname): self - { - $this->initialized['hostname'] = true; - $this->hostname = $hostname; - return $this; - } - /** - * The domain name to use for the container. - * - * @return string|null - */ - public function getDomainname(): ?string - { - return $this->domainname; - } - /** - * The domain name to use for the container. - * - * @param string|null $domainname - * - * @return self - */ - public function setDomainname(?string $domainname): self - { - $this->initialized['domainname'] = true; - $this->domainname = $domainname; - return $this; - } - /** - * The user that commands are run as inside the container. - * - * @return string|null - */ - public function getUser(): ?string - { - return $this->user; - } - /** - * The user that commands are run as inside the container. - * - * @param string|null $user - * - * @return self - */ - public function setUser(?string $user): self - { - $this->initialized['user'] = true; - $this->user = $user; - return $this; - } - /** - * Whether to attach to `stdin`. - * - * @return bool|null - */ - public function getAttachStdin(): ?bool - { - return $this->attachStdin; - } - /** - * Whether to attach to `stdin`. - * - * @param bool|null $attachStdin - * - * @return self - */ - public function setAttachStdin(?bool $attachStdin): self - { - $this->initialized['attachStdin'] = true; - $this->attachStdin = $attachStdin; - return $this; - } - /** - * Whether to attach to `stdout`. - * - * @return bool|null - */ - public function getAttachStdout(): ?bool - { - return $this->attachStdout; - } - /** - * Whether to attach to `stdout`. - * - * @param bool|null $attachStdout - * - * @return self - */ - public function setAttachStdout(?bool $attachStdout): self - { - $this->initialized['attachStdout'] = true; - $this->attachStdout = $attachStdout; - return $this; - } - /** - * Whether to attach to `stderr`. - * - * @return bool|null - */ - public function getAttachStderr(): ?bool - { - return $this->attachStderr; - } - /** - * Whether to attach to `stderr`. - * - * @param bool|null $attachStderr - * - * @return self - */ - public function setAttachStderr(?bool $attachStderr): self - { - $this->initialized['attachStderr'] = true; - $this->attachStderr = $attachStderr; - return $this; - } - /** - * An object mapping ports to an empty object in the form: - - `{"/": {}}` - - * - * @return array|null - */ - public function getExposedPorts(): ?iterable - { - return $this->exposedPorts; - } - /** - * An object mapping ports to an empty object in the form: - - `{"/": {}}` - - * - * @param array|null $exposedPorts - * - * @return self - */ - public function setExposedPorts(?iterable $exposedPorts): self - { - $this->initialized['exposedPorts'] = true; - $this->exposedPorts = $exposedPorts; - return $this; - } - /** - * Attach standard streams to a TTY, including `stdin` if it is not closed. - * - * @return bool|null - */ - public function getTty(): ?bool - { - return $this->tty; - } - /** - * Attach standard streams to a TTY, including `stdin` if it is not closed. - * - * @param bool|null $tty - * - * @return self - */ - public function setTty(?bool $tty): self - { - $this->initialized['tty'] = true; - $this->tty = $tty; - return $this; - } - /** - * Open `stdin` - * - * @return bool|null - */ - public function getOpenStdin(): ?bool - { - return $this->openStdin; - } - /** - * Open `stdin` - * - * @param bool|null $openStdin - * - * @return self - */ - public function setOpenStdin(?bool $openStdin): self - { - $this->initialized['openStdin'] = true; - $this->openStdin = $openStdin; - return $this; - } - /** - * Close `stdin` after one attached client disconnects - * - * @return bool|null - */ - public function getStdinOnce(): ?bool - { - return $this->stdinOnce; - } - /** - * Close `stdin` after one attached client disconnects - * - * @param bool|null $stdinOnce - * - * @return self - */ - public function setStdinOnce(?bool $stdinOnce): self - { - $this->initialized['stdinOnce'] = true; - $this->stdinOnce = $stdinOnce; - return $this; - } - /** - * A list of environment variables to set inside the container in the form `["VAR=value", ...]` - * - * @return list|null - */ - public function getEnv(): ?array - { - return $this->env; - } - /** - * A list of environment variables to set inside the container in the form `["VAR=value", ...]` - * - * @param list|null $env - * - * @return self - */ - public function setEnv(?array $env): self - { - $this->initialized['env'] = true; - $this->env = $env; - return $this; - } - /** - * Command to run specified as a string or an array of strings. - * - * @return list|string|null - */ - public function getCmd() - { - return $this->cmd; - } - /** - * Command to run specified as a string or an array of strings. - * - * @param list|string|null $cmd - * - * @return self - */ - public function setCmd($cmd): self - { - $this->initialized['cmd'] = true; - $this->cmd = $cmd; - return $this; - } + protected $updatedAt; /** - * A test to perform to check that the container is healthy. + * * - * @return ConfigHealthcheck|null + * @var ConfigSpec|null */ - public function getHealthcheck(): ?ConfigHealthcheck - { - return $this->healthcheck; - } + protected $spec; /** - * A test to perform to check that the container is healthy. - * - * @param ConfigHealthcheck|null $healthcheck - * - * @return self - */ - public function setHealthcheck(?ConfigHealthcheck $healthcheck): self - { - $this->initialized['healthcheck'] = true; - $this->healthcheck = $healthcheck; - return $this; - } - /** - * Command is already escaped (Windows only) - * - * @return bool|null - */ - public function getArgsEscaped(): ?bool - { - return $this->argsEscaped; - } - /** - * Command is already escaped (Windows only) - * - * @param bool|null $argsEscaped - * - * @return self - */ - public function setArgsEscaped(?bool $argsEscaped): self - { - $this->initialized['argsEscaped'] = true; - $this->argsEscaped = $argsEscaped; - return $this; - } - /** - * The name of the image to use when creating the container - * - * @return string|null - */ - public function getImage(): ?string - { - return $this->image; - } - /** - * The name of the image to use when creating the container - * - * @param string|null $image - * - * @return self - */ - public function setImage(?string $image): self - { - $this->initialized['image'] = true; - $this->image = $image; - return $this; - } - /** - * An object mapping mount point paths inside the container to empty objects. - * - * @return ConfigVolumes|null - */ - public function getVolumes(): ?ConfigVolumes - { - return $this->volumes; - } - /** - * An object mapping mount point paths inside the container to empty objects. - * - * @param ConfigVolumes|null $volumes - * - * @return self - */ - public function setVolumes(?ConfigVolumes $volumes): self - { - $this->initialized['volumes'] = true; - $this->volumes = $volumes; - return $this; - } - /** - * The working directory for commands to run in. + * * * @return string|null */ - public function getWorkingDir(): ?string + public function getID(): ?string { - return $this->workingDir; + return $this->iD; } /** - * The working directory for commands to run in. + * * - * @param string|null $workingDir + * @param string|null $iD * * @return self */ - public function setWorkingDir(?string $workingDir): self + public function setID(?string $iD): self { - $this->initialized['workingDir'] = true; - $this->workingDir = $workingDir; + $this->initialized['iD'] = true; + $this->iD = $iD; return $this; } /** - * The entry point for the container as a string or an array of strings. + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. - If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. * - * @return list|string|null + * @return ObjectVersion|null */ - public function getEntrypoint() + public function getVersion(): ?ObjectVersion { - return $this->entrypoint; + return $this->version; } /** - * The entry point for the container as a string or an array of strings. + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. - If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. * - * @param list|string|null $entrypoint + * @param ObjectVersion|null $version * * @return self */ - public function setEntrypoint($entrypoint): self + public function setVersion(?ObjectVersion $version): self { - $this->initialized['entrypoint'] = true; - $this->entrypoint = $entrypoint; + $this->initialized['version'] = true; + $this->version = $version; return $this; } /** - * Disable networking for the container. - * - * @return bool|null - */ - public function getNetworkDisabled(): ?bool - { - return $this->networkDisabled; - } - /** - * Disable networking for the container. - * - * @param bool|null $networkDisabled - * - * @return self - */ - public function setNetworkDisabled(?bool $networkDisabled): self - { - $this->initialized['networkDisabled'] = true; - $this->networkDisabled = $networkDisabled; - return $this; - } - /** - * MAC address of the container. + * * * @return string|null */ - public function getMacAddress(): ?string + public function getCreatedAt(): ?string { - return $this->macAddress; + return $this->createdAt; } /** - * MAC address of the container. + * * - * @param string|null $macAddress + * @param string|null $createdAt * * @return self */ - public function setMacAddress(?string $macAddress): self + public function setCreatedAt(?string $createdAt): self { - $this->initialized['macAddress'] = true; - $this->macAddress = $macAddress; + $this->initialized['createdAt'] = true; + $this->createdAt = $createdAt; return $this; } /** - * `ONBUILD` metadata that were defined in the image's `Dockerfile`. - * - * @return list|null - */ - public function getOnBuild(): ?array - { - return $this->onBuild; - } - /** - * `ONBUILD` metadata that were defined in the image's `Dockerfile`. - * - * @param list|null $onBuild - * - * @return self - */ - public function setOnBuild(?array $onBuild): self - { - $this->initialized['onBuild'] = true; - $this->onBuild = $onBuild; - return $this; - } - /** - * User-defined key/value metadata. - * - * @return array|null - */ - public function getLabels(): ?iterable - { - return $this->labels; - } - /** - * User-defined key/value metadata. - * - * @param array|null $labels - * - * @return self - */ - public function setLabels(?iterable $labels): self - { - $this->initialized['labels'] = true; - $this->labels = $labels; - return $this; - } - /** - * Signal to stop a container as a string or unsigned integer. + * * * @return string|null */ - public function getStopSignal(): ?string - { - return $this->stopSignal; - } - /** - * Signal to stop a container as a string or unsigned integer. - * - * @param string|null $stopSignal - * - * @return self - */ - public function setStopSignal(?string $stopSignal): self - { - $this->initialized['stopSignal'] = true; - $this->stopSignal = $stopSignal; - return $this; - } - /** - * Timeout to stop a container in seconds. - * - * @return int|null - */ - public function getStopTimeout(): ?int + public function getUpdatedAt(): ?string { - return $this->stopTimeout; + return $this->updatedAt; } /** - * Timeout to stop a container in seconds. + * * - * @param int|null $stopTimeout + * @param string|null $updatedAt * * @return self */ - public function setStopTimeout(?int $stopTimeout): self + public function setUpdatedAt(?string $updatedAt): self { - $this->initialized['stopTimeout'] = true; - $this->stopTimeout = $stopTimeout; + $this->initialized['updatedAt'] = true; + $this->updatedAt = $updatedAt; return $this; } /** - * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * * - * @return list|null + * @return ConfigSpec|null */ - public function getShell(): ?array + public function getSpec(): ?ConfigSpec { - return $this->shell; + return $this->spec; } /** - * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * * - * @param list|null $shell + * @param ConfigSpec|null $spec * * @return self */ - public function setShell(?array $shell): self + public function setSpec(?ConfigSpec $spec): self { - $this->initialized['shell'] = true; - $this->shell = $shell; + $this->initialized['spec'] = true; + $this->spec = $spec; return $this; } } \ No newline at end of file diff --git a/generated/Model/ConfigHealthcheck.php b/generated/Model/ConfigHealthcheck.php deleted file mode 100644 index 5bd183efb..000000000 --- a/generated/Model/ConfigHealthcheck.php +++ /dev/null @@ -1,145 +0,0 @@ -initialized); - } - /** - * The test to perform. Possible values are: - - - `{}` inherit healthcheck from image or parent image - - `{"NONE"}` disable healthcheck - - `{"CMD", args...}` exec arguments directly - - `{"CMD-SHELL", command}` run command with system's default shell - - * - * @var list|null - */ - protected $test; - /** - * The time to wait between checks in nanoseconds. 0 means inherit. - * - * @var int|null - */ - protected $interval; - /** - * The time to wait before considering the check to have hung. 0 means inherit. - * - * @var int|null - */ - protected $timeout; - /** - * The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit. - * - * @var int|null - */ - protected $retries; - /** - * The test to perform. Possible values are: - - - `{}` inherit healthcheck from image or parent image - - `{"NONE"}` disable healthcheck - - `{"CMD", args...}` exec arguments directly - - `{"CMD-SHELL", command}` run command with system's default shell - - * - * @return list|null - */ - public function getTest(): ?array - { - return $this->test; - } - /** - * The test to perform. Possible values are: - - - `{}` inherit healthcheck from image or parent image - - `{"NONE"}` disable healthcheck - - `{"CMD", args...}` exec arguments directly - - `{"CMD-SHELL", command}` run command with system's default shell - - * - * @param list|null $test - * - * @return self - */ - public function setTest(?array $test): self - { - $this->initialized['test'] = true; - $this->test = $test; - return $this; - } - /** - * The time to wait between checks in nanoseconds. 0 means inherit. - * - * @return int|null - */ - public function getInterval(): ?int - { - return $this->interval; - } - /** - * The time to wait between checks in nanoseconds. 0 means inherit. - * - * @param int|null $interval - * - * @return self - */ - public function setInterval(?int $interval): self - { - $this->initialized['interval'] = true; - $this->interval = $interval; - return $this; - } - /** - * The time to wait before considering the check to have hung. 0 means inherit. - * - * @return int|null - */ - public function getTimeout(): ?int - { - return $this->timeout; - } - /** - * The time to wait before considering the check to have hung. 0 means inherit. - * - * @param int|null $timeout - * - * @return self - */ - public function setTimeout(?int $timeout): self - { - $this->initialized['timeout'] = true; - $this->timeout = $timeout; - return $this; - } - /** - * The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit. - * - * @return int|null - */ - public function getRetries(): ?int - { - return $this->retries; - } - /** - * The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit. - * - * @param int|null $retries - * - * @return self - */ - public function setRetries(?int $retries): self - { - $this->initialized['retries'] = true; - $this->retries = $retries; - return $this; - } -} \ No newline at end of file diff --git a/generated/Model/ConfigReference.php b/generated/Model/ConfigReference.php new file mode 100644 index 000000000..030f2f510 --- /dev/null +++ b/generated/Model/ConfigReference.php @@ -0,0 +1,52 @@ +initialized); + } + /** + * The name of the config-only network that provides the network's + configuration. The specified network must be an existing config-only + network. Only network names are allowed, not network IDs. + + * + * @var string|null + */ + protected $network; + /** + * The name of the config-only network that provides the network's + configuration. The specified network must be an existing config-only + network. Only network names are allowed, not network IDs. + + * + * @return string|null + */ + public function getNetwork(): ?string + { + return $this->network; + } + /** + * The name of the config-only network that provides the network's + configuration. The specified network must be an existing config-only + network. Only network names are allowed, not network IDs. + + * + * @param string|null $network + * + * @return self + */ + public function setNetwork(?string $network): self + { + $this->initialized['network'] = true; + $this->network = $network; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ConfigSpec.php b/generated/Model/ConfigSpec.php new file mode 100644 index 000000000..d25a76ecd --- /dev/null +++ b/generated/Model/ConfigSpec.php @@ -0,0 +1,133 @@ +initialized); + } + /** + * User-defined name of the config. + * + * @var string|null + */ + protected $name; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + config data. + + * + * @var string|null + */ + protected $data; + /** + * Driver represents a driver (network, logging, secrets). + * + * @var Driver|null + */ + protected $templating; + /** + * User-defined name of the config. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * User-defined name of the config. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + config data. + + * + * @return string|null + */ + public function getData(): ?string + { + return $this->data; + } + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + config data. + + * + * @param string|null $data + * + * @return self + */ + public function setData(?string $data): self + { + $this->initialized['data'] = true; + $this->data = $data; + return $this; + } + /** + * Driver represents a driver (network, logging, secrets). + * + * @return Driver|null + */ + public function getTemplating(): ?Driver + { + return $this->templating; + } + /** + * Driver represents a driver (network, logging, secrets). + * + * @param Driver|null $templating + * + * @return self + */ + public function setTemplating(?Driver $templating): self + { + $this->initialized['templating'] = true; + $this->templating = $templating; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ConfigVolumes.php b/generated/Model/ConfigVolumes.php deleted file mode 100644 index b7b64e511..000000000 --- a/generated/Model/ConfigVolumes.php +++ /dev/null @@ -1,43 +0,0 @@ -initialized); - } - /** - * - * - * @var mixed|null - */ - protected $additionalProperties; - /** - * - * - * @return mixed - */ - public function getAdditionalProperties() - { - return $this->additionalProperties; - } - /** - * - * - * @param mixed $additionalProperties - * - * @return self - */ - public function setAdditionalProperties($additionalProperties): self - { - $this->initialized['additionalProperties'] = true; - $this->additionalProperties = $additionalProperties; - return $this; - } -} \ No newline at end of file diff --git a/generated/Model/ConfigsCreatePostBody.php b/generated/Model/ConfigsCreatePostBody.php new file mode 100644 index 000000000..a3d513a22 --- /dev/null +++ b/generated/Model/ConfigsCreatePostBody.php @@ -0,0 +1,133 @@ +initialized); + } + /** + * User-defined name of the config. + * + * @var string|null + */ + protected $name; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + config data. + + * + * @var string|null + */ + protected $data; + /** + * Driver represents a driver (network, logging, secrets). + * + * @var Driver|null + */ + protected $templating; + /** + * User-defined name of the config. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * User-defined name of the config. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + config data. + + * + * @return string|null + */ + public function getData(): ?string + { + return $this->data; + } + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + config data. + + * + * @param string|null $data + * + * @return self + */ + public function setData(?string $data): self + { + $this->initialized['data'] = true; + $this->data = $data; + return $this; + } + /** + * Driver represents a driver (network, logging, secrets). + * + * @return Driver|null + */ + public function getTemplating(): ?Driver + { + return $this->templating; + } + /** + * Driver represents a driver (network, logging, secrets). + * + * @param Driver|null $templating + * + * @return self + */ + public function setTemplating(?Driver $templating): self + { + $this->initialized['templating'] = true; + $this->templating = $templating; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainerConfig.php b/generated/Model/ContainerConfig.php new file mode 100644 index 000000000..2471c2ed6 --- /dev/null +++ b/generated/Model/ContainerConfig.php @@ -0,0 +1,769 @@ +initialized); + } + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + * @var string|null + */ + protected $hostname; + /** + * The domain name to use for the container. + * + * @var string|null + */ + protected $domainname; + /** + * The user that commands are run as inside the container. + * + * @var string|null + */ + protected $user; + /** + * Whether to attach to `stdin`. + * + * @var bool|null + */ + protected $attachStdin = false; + /** + * Whether to attach to `stdout`. + * + * @var bool|null + */ + protected $attachStdout = true; + /** + * Whether to attach to `stderr`. + * + * @var bool|null + */ + protected $attachStderr = true; + /** + * An object mapping ports to an empty object in the form: + + `{"/": {}}` + + * + * @var array|null + */ + protected $exposedPorts; + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + * @var bool|null + */ + protected $tty = false; + /** + * Open `stdin` + * + * @var bool|null + */ + protected $openStdin = false; + /** + * Close `stdin` after one attached client disconnects + * + * @var bool|null + */ + protected $stdinOnce = false; + /** + * A list of environment variables to set inside the container in the + form `["VAR=value", ...]`. A variable without `=` is removed from the + environment, rather than to have an empty value. + + * + * @var list|null + */ + protected $env; + /** + * Command to run specified as a string or an array of strings. + * + * @var list|null + */ + protected $cmd; + /** + * A test to perform to check that the container is healthy. + * + * @var HealthConfig|null + */ + protected $healthcheck; + /** + * Command is already escaped (Windows only) + * + * @var bool|null + */ + protected $argsEscaped = false; + /** + * The name (or reference) of the image to use when creating the container, + or which was used when the container was created. + + * + * @var string|null + */ + protected $image; + /** + * An object mapping mount point paths inside the container to empty + objects. + + * + * @var array|null + */ + protected $volumes; + /** + * The working directory for commands to run in. + * + * @var string|null + */ + protected $workingDir; + /** + * The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the + entry point is reset to system default (i.e., the entry point used by + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + + * + * @var list|null + */ + protected $entrypoint; + /** + * Disable networking for the container. + * + * @var bool|null + */ + protected $networkDisabled; + /** + * MAC address of the container. + + Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. + + * + * @var string|null + */ + protected $macAddress; + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @var list|null + */ + protected $onBuild; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * Signal to stop a container as a string or unsigned integer. + * + * @var string|null + */ + protected $stopSignal; + /** + * Timeout to stop a container in seconds. + * + * @var int|null + */ + protected $stopTimeout = 10; + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @var list|null + */ + protected $shell; + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + * @return string|null + */ + public function getHostname(): ?string + { + return $this->hostname; + } + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + * + * @param string|null $hostname + * + * @return self + */ + public function setHostname(?string $hostname): self + { + $this->initialized['hostname'] = true; + $this->hostname = $hostname; + return $this; + } + /** + * The domain name to use for the container. + * + * @return string|null + */ + public function getDomainname(): ?string + { + return $this->domainname; + } + /** + * The domain name to use for the container. + * + * @param string|null $domainname + * + * @return self + */ + public function setDomainname(?string $domainname): self + { + $this->initialized['domainname'] = true; + $this->domainname = $domainname; + return $this; + } + /** + * The user that commands are run as inside the container. + * + * @return string|null + */ + public function getUser(): ?string + { + return $this->user; + } + /** + * The user that commands are run as inside the container. + * + * @param string|null $user + * + * @return self + */ + public function setUser(?string $user): self + { + $this->initialized['user'] = true; + $this->user = $user; + return $this; + } + /** + * Whether to attach to `stdin`. + * + * @return bool|null + */ + public function getAttachStdin(): ?bool + { + return $this->attachStdin; + } + /** + * Whether to attach to `stdin`. + * + * @param bool|null $attachStdin + * + * @return self + */ + public function setAttachStdin(?bool $attachStdin): self + { + $this->initialized['attachStdin'] = true; + $this->attachStdin = $attachStdin; + return $this; + } + /** + * Whether to attach to `stdout`. + * + * @return bool|null + */ + public function getAttachStdout(): ?bool + { + return $this->attachStdout; + } + /** + * Whether to attach to `stdout`. + * + * @param bool|null $attachStdout + * + * @return self + */ + public function setAttachStdout(?bool $attachStdout): self + { + $this->initialized['attachStdout'] = true; + $this->attachStdout = $attachStdout; + return $this; + } + /** + * Whether to attach to `stderr`. + * + * @return bool|null + */ + public function getAttachStderr(): ?bool + { + return $this->attachStderr; + } + /** + * Whether to attach to `stderr`. + * + * @param bool|null $attachStderr + * + * @return self + */ + public function setAttachStderr(?bool $attachStderr): self + { + $this->initialized['attachStderr'] = true; + $this->attachStderr = $attachStderr; + return $this; + } + /** + * An object mapping ports to an empty object in the form: + + `{"/": {}}` + + * + * @return array|null + */ + public function getExposedPorts(): ?iterable + { + return $this->exposedPorts; + } + /** + * An object mapping ports to an empty object in the form: + + `{"/": {}}` + + * + * @param array|null $exposedPorts + * + * @return self + */ + public function setExposedPorts(?iterable $exposedPorts): self + { + $this->initialized['exposedPorts'] = true; + $this->exposedPorts = $exposedPorts; + return $this; + } + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + * @return bool|null + */ + public function getTty(): ?bool + { + return $this->tty; + } + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + * + * @param bool|null $tty + * + * @return self + */ + public function setTty(?bool $tty): self + { + $this->initialized['tty'] = true; + $this->tty = $tty; + return $this; + } + /** + * Open `stdin` + * + * @return bool|null + */ + public function getOpenStdin(): ?bool + { + return $this->openStdin; + } + /** + * Open `stdin` + * + * @param bool|null $openStdin + * + * @return self + */ + public function setOpenStdin(?bool $openStdin): self + { + $this->initialized['openStdin'] = true; + $this->openStdin = $openStdin; + return $this; + } + /** + * Close `stdin` after one attached client disconnects + * + * @return bool|null + */ + public function getStdinOnce(): ?bool + { + return $this->stdinOnce; + } + /** + * Close `stdin` after one attached client disconnects + * + * @param bool|null $stdinOnce + * + * @return self + */ + public function setStdinOnce(?bool $stdinOnce): self + { + $this->initialized['stdinOnce'] = true; + $this->stdinOnce = $stdinOnce; + return $this; + } + /** + * A list of environment variables to set inside the container in the + form `["VAR=value", ...]`. A variable without `=` is removed from the + environment, rather than to have an empty value. + + * + * @return list|null + */ + public function getEnv(): ?array + { + return $this->env; + } + /** + * A list of environment variables to set inside the container in the + form `["VAR=value", ...]`. A variable without `=` is removed from the + environment, rather than to have an empty value. + + * + * @param list|null $env + * + * @return self + */ + public function setEnv(?array $env): self + { + $this->initialized['env'] = true; + $this->env = $env; + return $this; + } + /** + * Command to run specified as a string or an array of strings. + * + * @return list|null + */ + public function getCmd(): ?array + { + return $this->cmd; + } + /** + * Command to run specified as a string or an array of strings. + * + * @param list|null $cmd + * + * @return self + */ + public function setCmd(?array $cmd): self + { + $this->initialized['cmd'] = true; + $this->cmd = $cmd; + return $this; + } + /** + * A test to perform to check that the container is healthy. + * + * @return HealthConfig|null + */ + public function getHealthcheck(): ?HealthConfig + { + return $this->healthcheck; + } + /** + * A test to perform to check that the container is healthy. + * + * @param HealthConfig|null $healthcheck + * + * @return self + */ + public function setHealthcheck(?HealthConfig $healthcheck): self + { + $this->initialized['healthcheck'] = true; + $this->healthcheck = $healthcheck; + return $this; + } + /** + * Command is already escaped (Windows only) + * + * @return bool|null + */ + public function getArgsEscaped(): ?bool + { + return $this->argsEscaped; + } + /** + * Command is already escaped (Windows only) + * + * @param bool|null $argsEscaped + * + * @return self + */ + public function setArgsEscaped(?bool $argsEscaped): self + { + $this->initialized['argsEscaped'] = true; + $this->argsEscaped = $argsEscaped; + return $this; + } + /** + * The name (or reference) of the image to use when creating the container, + or which was used when the container was created. + + * + * @return string|null + */ + public function getImage(): ?string + { + return $this->image; + } + /** + * The name (or reference) of the image to use when creating the container, + or which was used when the container was created. + + * + * @param string|null $image + * + * @return self + */ + public function setImage(?string $image): self + { + $this->initialized['image'] = true; + $this->image = $image; + return $this; + } + /** + * An object mapping mount point paths inside the container to empty + objects. + + * + * @return array|null + */ + public function getVolumes(): ?iterable + { + return $this->volumes; + } + /** + * An object mapping mount point paths inside the container to empty + objects. + + * + * @param array|null $volumes + * + * @return self + */ + public function setVolumes(?iterable $volumes): self + { + $this->initialized['volumes'] = true; + $this->volumes = $volumes; + return $this; + } + /** + * The working directory for commands to run in. + * + * @return string|null + */ + public function getWorkingDir(): ?string + { + return $this->workingDir; + } + /** + * The working directory for commands to run in. + * + * @param string|null $workingDir + * + * @return self + */ + public function setWorkingDir(?string $workingDir): self + { + $this->initialized['workingDir'] = true; + $this->workingDir = $workingDir; + return $this; + } + /** + * The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the + entry point is reset to system default (i.e., the entry point used by + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + + * + * @return list|null + */ + public function getEntrypoint(): ?array + { + return $this->entrypoint; + } + /** + * The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the + entry point is reset to system default (i.e., the entry point used by + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + + * + * @param list|null $entrypoint + * + * @return self + */ + public function setEntrypoint(?array $entrypoint): self + { + $this->initialized['entrypoint'] = true; + $this->entrypoint = $entrypoint; + return $this; + } + /** + * Disable networking for the container. + * + * @return bool|null + */ + public function getNetworkDisabled(): ?bool + { + return $this->networkDisabled; + } + /** + * Disable networking for the container. + * + * @param bool|null $networkDisabled + * + * @return self + */ + public function setNetworkDisabled(?bool $networkDisabled): self + { + $this->initialized['networkDisabled'] = true; + $this->networkDisabled = $networkDisabled; + return $this; + } + /** + * MAC address of the container. + + Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. + + * + * @return string|null + */ + public function getMacAddress(): ?string + { + return $this->macAddress; + } + /** + * MAC address of the container. + + Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. + + * + * @param string|null $macAddress + * + * @return self + */ + public function setMacAddress(?string $macAddress): self + { + $this->initialized['macAddress'] = true; + $this->macAddress = $macAddress; + return $this; + } + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @return list|null + */ + public function getOnBuild(): ?array + { + return $this->onBuild; + } + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @param list|null $onBuild + * + * @return self + */ + public function setOnBuild(?array $onBuild): self + { + $this->initialized['onBuild'] = true; + $this->onBuild = $onBuild; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * Signal to stop a container as a string or unsigned integer. + * + * @return string|null + */ + public function getStopSignal(): ?string + { + return $this->stopSignal; + } + /** + * Signal to stop a container as a string or unsigned integer. + * + * @param string|null $stopSignal + * + * @return self + */ + public function setStopSignal(?string $stopSignal): self + { + $this->initialized['stopSignal'] = true; + $this->stopSignal = $stopSignal; + return $this; + } + /** + * Timeout to stop a container in seconds. + * + * @return int|null + */ + public function getStopTimeout(): ?int + { + return $this->stopTimeout; + } + /** + * Timeout to stop a container in seconds. + * + * @param int|null $stopTimeout + * + * @return self + */ + public function setStopTimeout(?int $stopTimeout): self + { + $this->initialized['stopTimeout'] = true; + $this->stopTimeout = $stopTimeout; + return $this; + } + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @return list|null + */ + public function getShell(): ?array + { + return $this->shell; + } + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @param list|null $shell + * + * @return self + */ + public function setShell(?array $shell): self + { + $this->initialized['shell'] = true; + $this->shell = $shell; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainersCreatePostResponse201.php b/generated/Model/ContainerCreateResponse.php similarity index 97% rename from generated/Model/ContainersCreatePostResponse201.php rename to generated/Model/ContainerCreateResponse.php index 9f8794eb3..94d1b22aa 100644 --- a/generated/Model/ContainersCreatePostResponse201.php +++ b/generated/Model/ContainerCreateResponse.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class ContainersCreatePostResponse201 +class ContainerCreateResponse { /** * @var array diff --git a/generated/Model/ContainersIdJsonGetResponse200State.php b/generated/Model/ContainerState.php similarity index 62% rename from generated/Model/ContainersIdJsonGetResponse200State.php rename to generated/Model/ContainerState.php index f681f2bb7..4ea6c3255 100644 --- a/generated/Model/ContainersIdJsonGetResponse200State.php +++ b/generated/Model/ContainerState.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class ContainersIdJsonGetResponse200State +class ContainerState { /** * @var array @@ -13,16 +13,28 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * The status of the container. For example, `running` or `exited`. - * - * @var string|null - */ + * String representation of the container state. Can be one of "created", + "running", "paused", "restarting", "removing", "exited", or "dead". + + * + * @var string|null + */ protected $status; /** - * Whether this container is running. - * - * @var bool|null - */ + * Whether this container is running. + + Note that a running container can be _paused_. The `Running` and `Paused` + booleans are not mutually exclusive: + + When pausing a container (on Linux), the freezer cgroup is used to suspend + all processes in the container. Freezing the process requires the process to + be running. As a result, paused containers are both `Running` _and_ `Paused`. + + Use the `Status` field instead to determine if a container's state is "running". + + * + * @var bool|null + */ protected $running; /** * Whether this container is paused. @@ -37,10 +49,12 @@ public function isInitialized($property): bool */ protected $restarting; /** - * Whether this container has been killed because it ran out of memory. - * - * @var bool|null - */ + * Whether a process within this container has been killed because it ran + out of memory since the container was last started. + + * + * @var bool|null + */ protected $oOMKilled; /** * @@ -79,21 +93,31 @@ public function isInitialized($property): bool */ protected $finishedAt; /** - * The status of the container. For example, `running` or `exited`. + * Health stores information about the container's healthcheck results. * - * @return string|null + * @var Health|null */ + protected $health; + /** + * String representation of the container state. Can be one of "created", + "running", "paused", "restarting", "removing", "exited", or "dead". + + * + * @return string|null + */ public function getStatus(): ?string { return $this->status; } /** - * The status of the container. For example, `running` or `exited`. - * - * @param string|null $status - * - * @return self - */ + * String representation of the container state. Can be one of "created", + "running", "paused", "restarting", "removing", "exited", or "dead". + + * + * @param string|null $status + * + * @return self + */ public function setStatus(?string $status): self { $this->initialized['status'] = true; @@ -101,21 +125,41 @@ public function setStatus(?string $status): self return $this; } /** - * Whether this container is running. - * - * @return bool|null - */ + * Whether this container is running. + + Note that a running container can be _paused_. The `Running` and `Paused` + booleans are not mutually exclusive: + + When pausing a container (on Linux), the freezer cgroup is used to suspend + all processes in the container. Freezing the process requires the process to + be running. As a result, paused containers are both `Running` _and_ `Paused`. + + Use the `Status` field instead to determine if a container's state is "running". + + * + * @return bool|null + */ public function getRunning(): ?bool { return $this->running; } /** - * Whether this container is running. - * - * @param bool|null $running - * - * @return self - */ + * Whether this container is running. + + Note that a running container can be _paused_. The `Running` and `Paused` + booleans are not mutually exclusive: + + When pausing a container (on Linux), the freezer cgroup is used to suspend + all processes in the container. Freezing the process requires the process to + be running. As a result, paused containers are both `Running` _and_ `Paused`. + + Use the `Status` field instead to determine if a container's state is "running". + + * + * @param bool|null $running + * + * @return self + */ public function setRunning(?bool $running): self { $this->initialized['running'] = true; @@ -167,21 +211,25 @@ public function setRestarting(?bool $restarting): self return $this; } /** - * Whether this container has been killed because it ran out of memory. - * - * @return bool|null - */ + * Whether a process within this container has been killed because it ran + out of memory since the container was last started. + + * + * @return bool|null + */ public function getOOMKilled(): ?bool { return $this->oOMKilled; } /** - * Whether this container has been killed because it ran out of memory. - * - * @param bool|null $oOMKilled - * - * @return self - */ + * Whether a process within this container has been killed because it ran + out of memory since the container was last started. + + * + * @param bool|null $oOMKilled + * + * @return self + */ public function setOOMKilled(?bool $oOMKilled): self { $this->initialized['oOMKilled'] = true; @@ -320,4 +368,26 @@ public function setFinishedAt(?string $finishedAt): self $this->finishedAt = $finishedAt; return $this; } + /** + * Health stores information about the container's healthcheck results. + * + * @return Health|null + */ + public function getHealth(): ?Health + { + return $this->health; + } + /** + * Health stores information about the container's healthcheck results. + * + * @param Health|null $health + * + * @return self + */ + public function setHealth(?Health $health): self + { + $this->initialized['health'] = true; + $this->health = $health; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/TaskStatusContainerStatus.php b/generated/Model/ContainerStatus.php similarity index 98% rename from generated/Model/TaskStatusContainerStatus.php rename to generated/Model/ContainerStatus.php index 918c63278..2af76a75e 100644 --- a/generated/Model/TaskStatusContainerStatus.php +++ b/generated/Model/ContainerStatus.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class TaskStatusContainerStatus +class ContainerStatus { /** * @var array diff --git a/generated/Model/ContainerSummaryItem.php b/generated/Model/ContainerSummary.php similarity index 92% rename from generated/Model/ContainerSummaryItem.php rename to generated/Model/ContainerSummary.php index 54d886f25..4b76d8df5 100644 --- a/generated/Model/ContainerSummaryItem.php +++ b/generated/Model/ContainerSummary.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class ContainerSummaryItem +class ContainerSummary { /** * @var array @@ -87,13 +87,13 @@ public function isInitialized($property): bool /** * * - * @var ContainerSummaryItemHostConfig|null + * @var ContainerSummaryHostConfig|null */ protected $hostConfig; /** * A summary of the container's network settings * - * @var ContainerSummaryItemNetworkSettings|null + * @var ContainerSummaryNetworkSettings|null */ protected $networkSettings; /** @@ -369,20 +369,20 @@ public function setStatus(?string $status): self /** * * - * @return ContainerSummaryItemHostConfig|null + * @return ContainerSummaryHostConfig|null */ - public function getHostConfig(): ?ContainerSummaryItemHostConfig + public function getHostConfig(): ?ContainerSummaryHostConfig { return $this->hostConfig; } /** * * - * @param ContainerSummaryItemHostConfig|null $hostConfig + * @param ContainerSummaryHostConfig|null $hostConfig * * @return self */ - public function setHostConfig(?ContainerSummaryItemHostConfig $hostConfig): self + public function setHostConfig(?ContainerSummaryHostConfig $hostConfig): self { $this->initialized['hostConfig'] = true; $this->hostConfig = $hostConfig; @@ -391,20 +391,20 @@ public function setHostConfig(?ContainerSummaryItemHostConfig $hostConfig): self /** * A summary of the container's network settings * - * @return ContainerSummaryItemNetworkSettings|null + * @return ContainerSummaryNetworkSettings|null */ - public function getNetworkSettings(): ?ContainerSummaryItemNetworkSettings + public function getNetworkSettings(): ?ContainerSummaryNetworkSettings { return $this->networkSettings; } /** * A summary of the container's network settings * - * @param ContainerSummaryItemNetworkSettings|null $networkSettings + * @param ContainerSummaryNetworkSettings|null $networkSettings * * @return self */ - public function setNetworkSettings(?ContainerSummaryItemNetworkSettings $networkSettings): self + public function setNetworkSettings(?ContainerSummaryNetworkSettings $networkSettings): self { $this->initialized['networkSettings'] = true; $this->networkSettings = $networkSettings; diff --git a/generated/Model/ContainerSummaryHostConfig.php b/generated/Model/ContainerSummaryHostConfig.php new file mode 100644 index 000000000..cbc7b0c38 --- /dev/null +++ b/generated/Model/ContainerSummaryHostConfig.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $networkMode; + /** + * Arbitrary key-value metadata attached to container + * + * @var array|null + */ + protected $annotations; + /** + * + * + * @return string|null + */ + public function getNetworkMode(): ?string + { + return $this->networkMode; + } + /** + * + * + * @param string|null $networkMode + * + * @return self + */ + public function setNetworkMode(?string $networkMode): self + { + $this->initialized['networkMode'] = true; + $this->networkMode = $networkMode; + return $this; + } + /** + * Arbitrary key-value metadata attached to container + * + * @return array|null + */ + public function getAnnotations(): ?iterable + { + return $this->annotations; + } + /** + * Arbitrary key-value metadata attached to container + * + * @param array|null $annotations + * + * @return self + */ + public function setAnnotations(?iterable $annotations): self + { + $this->initialized['annotations'] = true; + $this->annotations = $annotations; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainerSummaryItemNetworkSettings.php b/generated/Model/ContainerSummaryNetworkSettings.php similarity index 95% rename from generated/Model/ContainerSummaryItemNetworkSettings.php rename to generated/Model/ContainerSummaryNetworkSettings.php index b6938c55a..b08c11d9c 100644 --- a/generated/Model/ContainerSummaryItemNetworkSettings.php +++ b/generated/Model/ContainerSummaryNetworkSettings.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class ContainerSummaryItemNetworkSettings +class ContainerSummaryNetworkSettings { /** * @var array diff --git a/generated/Model/ContainerWaitExitError.php b/generated/Model/ContainerWaitExitError.php new file mode 100644 index 000000000..212a552c9 --- /dev/null +++ b/generated/Model/ContainerWaitExitError.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * Details of an error + * + * @var string|null + */ + protected $message; + /** + * Details of an error + * + * @return string|null + */ + public function getMessage(): ?string + { + return $this->message; + } + /** + * Details of an error + * + * @param string|null $message + * + * @return self + */ + public function setMessage(?string $message): self + { + $this->initialized['message'] = true; + $this->message = $message; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainersIdWaitPostResponse200.php b/generated/Model/ContainerWaitResponse.php similarity index 54% rename from generated/Model/ContainersIdWaitPostResponse200.php rename to generated/Model/ContainerWaitResponse.php index 80f296ce7..3b6c684e9 100644 --- a/generated/Model/ContainersIdWaitPostResponse200.php +++ b/generated/Model/ContainerWaitResponse.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class ContainersIdWaitPostResponse200 +class ContainerWaitResponse { /** * @var array @@ -18,6 +18,12 @@ public function isInitialized($property): bool * @var int|null */ protected $statusCode; + /** + * container waiting error, if any + * + * @var ContainerWaitExitError|null + */ + protected $error; /** * Exit code of the container * @@ -40,4 +46,26 @@ public function setStatusCode(?int $statusCode): self $this->statusCode = $statusCode; return $this; } + /** + * container waiting error, if any + * + * @return ContainerWaitExitError|null + */ + public function getError(): ?ContainerWaitExitError + { + return $this->error; + } + /** + * container waiting error, if any + * + * @param ContainerWaitExitError|null $error + * + * @return self + */ + public function setError(?ContainerWaitExitError $error): self + { + $this->initialized['error'] = true; + $this->error = $error; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/ContainerdInfo.php b/generated/Model/ContainerdInfo.php new file mode 100644 index 000000000..49bf5ecba --- /dev/null +++ b/generated/Model/ContainerdInfo.php @@ -0,0 +1,101 @@ +initialized); + } + /** + * The address of the containerd socket. + * + * @var string|null + */ + protected $address; + /** + * The namespaces that the daemon uses for running containers and + plugins in containerd. These namespaces can be configured in the + daemon configuration, and are considered to be used exclusively + by the daemon, Tampering with the containerd instance may cause + unexpected behavior. + + As these namespaces are considered to be exclusively accessed + by the daemon, it is not recommended to change these values, + or to change them to a value that is used by other systems, + such as cri-containerd. + + * + * @var ContainerdInfoNamespaces|null + */ + protected $namespaces; + /** + * The address of the containerd socket. + * + * @return string|null + */ + public function getAddress(): ?string + { + return $this->address; + } + /** + * The address of the containerd socket. + * + * @param string|null $address + * + * @return self + */ + public function setAddress(?string $address): self + { + $this->initialized['address'] = true; + $this->address = $address; + return $this; + } + /** + * The namespaces that the daemon uses for running containers and + plugins in containerd. These namespaces can be configured in the + daemon configuration, and are considered to be used exclusively + by the daemon, Tampering with the containerd instance may cause + unexpected behavior. + + As these namespaces are considered to be exclusively accessed + by the daemon, it is not recommended to change these values, + or to change them to a value that is used by other systems, + such as cri-containerd. + + * + * @return ContainerdInfoNamespaces|null + */ + public function getNamespaces(): ?ContainerdInfoNamespaces + { + return $this->namespaces; + } + /** + * The namespaces that the daemon uses for running containers and + plugins in containerd. These namespaces can be configured in the + daemon configuration, and are considered to be used exclusively + by the daemon, Tampering with the containerd instance may cause + unexpected behavior. + + As these namespaces are considered to be exclusively accessed + by the daemon, it is not recommended to change these values, + or to change them to a value that is used by other systems, + such as cri-containerd. + + * + * @param ContainerdInfoNamespaces|null $namespaces + * + * @return self + */ + public function setNamespaces(?ContainerdInfoNamespaces $namespaces): self + { + $this->initialized['namespaces'] = true; + $this->namespaces = $namespaces; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainerdInfoNamespaces.php b/generated/Model/ContainerdInfoNamespaces.php new file mode 100644 index 000000000..877c8aca2 --- /dev/null +++ b/generated/Model/ContainerdInfoNamespaces.php @@ -0,0 +1,113 @@ +initialized); + } + /** + * The default containerd namespace used for containers managed + by the daemon. + + The default namespace for containers is "moby", but will be + suffixed with the `.` of the remapped `root` if + user-namespaces are enabled and the containerd image-store + is used. + + * + * @var string|null + */ + protected $containers = 'moby'; + /** + * The default containerd namespace used for plugins managed by + the daemon. + + The default namespace for plugins is "plugins.moby", but will be + suffixed with the `.` of the remapped `root` if + user-namespaces are enabled and the containerd image-store + is used. + + * + * @var string|null + */ + protected $plugins = 'plugins.moby'; + /** + * The default containerd namespace used for containers managed + by the daemon. + + The default namespace for containers is "moby", but will be + suffixed with the `.` of the remapped `root` if + user-namespaces are enabled and the containerd image-store + is used. + + * + * @return string|null + */ + public function getContainers(): ?string + { + return $this->containers; + } + /** + * The default containerd namespace used for containers managed + by the daemon. + + The default namespace for containers is "moby", but will be + suffixed with the `.` of the remapped `root` if + user-namespaces are enabled and the containerd image-store + is used. + + * + * @param string|null $containers + * + * @return self + */ + public function setContainers(?string $containers): self + { + $this->initialized['containers'] = true; + $this->containers = $containers; + return $this; + } + /** + * The default containerd namespace used for plugins managed by + the daemon. + + The default namespace for plugins is "plugins.moby", but will be + suffixed with the `.` of the remapped `root` if + user-namespaces are enabled and the containerd image-store + is used. + + * + * @return string|null + */ + public function getPlugins(): ?string + { + return $this->plugins; + } + /** + * The default containerd namespace used for plugins managed by + the daemon. + + The default namespace for plugins is "plugins.moby", but will be + suffixed with the `.` of the remapped `root` if + user-namespaces are enabled and the containerd image-store + is used. + + * + * @param string|null $plugins + * + * @return self + */ + public function setPlugins(?string $plugins): self + { + $this->initialized['plugins'] = true; + $this->plugins = $plugins; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainersCreatePostBody.php b/generated/Model/ContainersCreatePostBody.php index e924f5c3a..b0e9e38e2 100644 --- a/generated/Model/ContainersCreatePostBody.php +++ b/generated/Model/ContainersCreatePostBody.php @@ -51,7 +51,7 @@ public function isInitialized($property): bool /** * An object mapping ports to an empty object in the form: - `{"/": {}}` + `{"/": {}}` * * @var array|null @@ -76,21 +76,24 @@ public function isInitialized($property): bool */ protected $stdinOnce = false; /** - * A list of environment variables to set inside the container in the form `["VAR=value", ...]` - * - * @var list|null - */ + * A list of environment variables to set inside the container in the + form `["VAR=value", ...]`. A variable without `=` is removed from the + environment, rather than to have an empty value. + + * + * @var list|null + */ protected $env; /** * Command to run specified as a string or an array of strings. * - * @var list|string|null + * @var list|null */ protected $cmd; /** * A test to perform to check that the container is healthy. * - * @var ConfigHealthcheck|null + * @var HealthConfig|null */ protected $healthcheck; /** @@ -98,18 +101,22 @@ public function isInitialized($property): bool * * @var bool|null */ - protected $argsEscaped; + protected $argsEscaped = false; /** - * The name of the image to use when creating the container - * - * @var string|null - */ + * The name (or reference) of the image to use when creating the container, + or which was used when the container was created. + + * + * @var string|null + */ protected $image; /** - * An object mapping mount point paths inside the container to empty objects. - * - * @var ConfigVolumes|null - */ + * An object mapping mount point paths inside the container to empty + objects. + + * + * @var array|null + */ protected $volumes; /** * The working directory for commands to run in. @@ -120,10 +127,12 @@ public function isInitialized($property): bool /** * The entry point for the container as a string or an array of strings. - If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + If the array consists of exactly one empty string (`[""]`) then the + entry point is reset to system default (i.e., the entry point used by + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). * - * @var list|string|null + * @var list|null */ protected $entrypoint; /** @@ -133,10 +142,13 @@ public function isInitialized($property): bool */ protected $networkDisabled; /** - * MAC address of the container. - * - * @var string|null - */ + * MAC address of the container. + + Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. + + * + * @var string|null + */ protected $macAddress; /** * `ONBUILD` metadata that were defined in the image's `Dockerfile`. @@ -155,7 +167,7 @@ public function isInitialized($property): bool * * @var string|null */ - protected $stopSignal = 'SIGTERM'; + protected $stopSignal; /** * Timeout to stop a container in seconds. * @@ -175,10 +187,14 @@ public function isInitialized($property): bool */ protected $hostConfig; /** - * This container's networking configuration. - * - * @var ContainersCreatePostBodyNetworkingConfig|null - */ + * NetworkingConfig represents the container's networking configuration for + each of its interfaces. + It is used for the networking configs specified in the `docker create` + and `docker network connect` commands. + + * + * @var NetworkingConfig|null + */ protected $networkingConfig; /** * The hostname to use for the container, as a valid RFC 1123 hostname. @@ -315,7 +331,7 @@ public function setAttachStderr(?bool $attachStderr): self /** * An object mapping ports to an empty object in the form: - `{"/": {}}` + `{"/": {}}` * * @return array|null @@ -327,7 +343,7 @@ public function getExposedPorts(): ?iterable /** * An object mapping ports to an empty object in the form: - `{"/": {}}` + `{"/": {}}` * * @param array|null $exposedPorts @@ -407,21 +423,27 @@ public function setStdinOnce(?bool $stdinOnce): self return $this; } /** - * A list of environment variables to set inside the container in the form `["VAR=value", ...]` - * - * @return list|null - */ + * A list of environment variables to set inside the container in the + form `["VAR=value", ...]`. A variable without `=` is removed from the + environment, rather than to have an empty value. + + * + * @return list|null + */ public function getEnv(): ?array { return $this->env; } /** - * A list of environment variables to set inside the container in the form `["VAR=value", ...]` - * - * @param list|null $env - * - * @return self - */ + * A list of environment variables to set inside the container in the + form `["VAR=value", ...]`. A variable without `=` is removed from the + environment, rather than to have an empty value. + + * + * @param list|null $env + * + * @return self + */ public function setEnv(?array $env): self { $this->initialized['env'] = true; @@ -431,20 +453,20 @@ public function setEnv(?array $env): self /** * Command to run specified as a string or an array of strings. * - * @return list|string|null + * @return list|null */ - public function getCmd() + public function getCmd(): ?array { return $this->cmd; } /** * Command to run specified as a string or an array of strings. * - * @param list|string|null $cmd + * @param list|null $cmd * * @return self */ - public function setCmd($cmd): self + public function setCmd(?array $cmd): self { $this->initialized['cmd'] = true; $this->cmd = $cmd; @@ -453,20 +475,20 @@ public function setCmd($cmd): self /** * A test to perform to check that the container is healthy. * - * @return ConfigHealthcheck|null + * @return HealthConfig|null */ - public function getHealthcheck(): ?ConfigHealthcheck + public function getHealthcheck(): ?HealthConfig { return $this->healthcheck; } /** * A test to perform to check that the container is healthy. * - * @param ConfigHealthcheck|null $healthcheck + * @param HealthConfig|null $healthcheck * * @return self */ - public function setHealthcheck(?ConfigHealthcheck $healthcheck): self + public function setHealthcheck(?HealthConfig $healthcheck): self { $this->initialized['healthcheck'] = true; $this->healthcheck = $healthcheck; @@ -495,21 +517,25 @@ public function setArgsEscaped(?bool $argsEscaped): self return $this; } /** - * The name of the image to use when creating the container - * - * @return string|null - */ + * The name (or reference) of the image to use when creating the container, + or which was used when the container was created. + + * + * @return string|null + */ public function getImage(): ?string { return $this->image; } /** - * The name of the image to use when creating the container - * - * @param string|null $image - * - * @return self - */ + * The name (or reference) of the image to use when creating the container, + or which was used when the container was created. + + * + * @param string|null $image + * + * @return self + */ public function setImage(?string $image): self { $this->initialized['image'] = true; @@ -517,22 +543,26 @@ public function setImage(?string $image): self return $this; } /** - * An object mapping mount point paths inside the container to empty objects. - * - * @return ConfigVolumes|null - */ - public function getVolumes(): ?ConfigVolumes + * An object mapping mount point paths inside the container to empty + objects. + + * + * @return array|null + */ + public function getVolumes(): ?iterable { return $this->volumes; } /** - * An object mapping mount point paths inside the container to empty objects. - * - * @param ConfigVolumes|null $volumes - * - * @return self - */ - public function setVolumes(?ConfigVolumes $volumes): self + * An object mapping mount point paths inside the container to empty + objects. + + * + * @param array|null $volumes + * + * @return self + */ + public function setVolumes(?iterable $volumes): self { $this->initialized['volumes'] = true; $this->volumes = $volumes; @@ -563,26 +593,30 @@ public function setWorkingDir(?string $workingDir): self /** * The entry point for the container as a string or an array of strings. - If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + If the array consists of exactly one empty string (`[""]`) then the + entry point is reset to system default (i.e., the entry point used by + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). * - * @return list|string|null + * @return list|null */ - public function getEntrypoint() + public function getEntrypoint(): ?array { return $this->entrypoint; } /** * The entry point for the container as a string or an array of strings. - If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + If the array consists of exactly one empty string (`[""]`) then the + entry point is reset to system default (i.e., the entry point used by + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). * - * @param list|string|null $entrypoint + * @param list|null $entrypoint * * @return self */ - public function setEntrypoint($entrypoint): self + public function setEntrypoint(?array $entrypoint): self { $this->initialized['entrypoint'] = true; $this->entrypoint = $entrypoint; @@ -611,21 +645,27 @@ public function setNetworkDisabled(?bool $networkDisabled): self return $this; } /** - * MAC address of the container. - * - * @return string|null - */ + * MAC address of the container. + + Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. + + * + * @return string|null + */ public function getMacAddress(): ?string { return $this->macAddress; } /** - * MAC address of the container. - * - * @param string|null $macAddress - * - * @return self - */ + * MAC address of the container. + + Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. + + * + * @param string|null $macAddress + * + * @return self + */ public function setMacAddress(?string $macAddress): self { $this->initialized['macAddress'] = true; @@ -765,22 +805,30 @@ public function setHostConfig(?HostConfig $hostConfig): self return $this; } /** - * This container's networking configuration. - * - * @return ContainersCreatePostBodyNetworkingConfig|null - */ - public function getNetworkingConfig(): ?ContainersCreatePostBodyNetworkingConfig + * NetworkingConfig represents the container's networking configuration for + each of its interfaces. + It is used for the networking configs specified in the `docker create` + and `docker network connect` commands. + + * + * @return NetworkingConfig|null + */ + public function getNetworkingConfig(): ?NetworkingConfig { return $this->networkingConfig; } /** - * This container's networking configuration. - * - * @param ContainersCreatePostBodyNetworkingConfig|null $networkingConfig - * - * @return self - */ - public function setNetworkingConfig(?ContainersCreatePostBodyNetworkingConfig $networkingConfig): self + * NetworkingConfig represents the container's networking configuration for + each of its interfaces. + It is used for the networking configs specified in the `docker create` + and `docker network connect` commands. + + * + * @param NetworkingConfig|null $networkingConfig + * + * @return self + */ + public function setNetworkingConfig(?NetworkingConfig $networkingConfig): self { $this->initialized['networkingConfig'] = true; $this->networkingConfig = $networkingConfig; diff --git a/generated/Model/ContainersCreatePostBodyNetworkingConfig.php b/generated/Model/ContainersCreatePostBodyNetworkingConfig.php deleted file mode 100644 index 49187c656..000000000 --- a/generated/Model/ContainersCreatePostBodyNetworkingConfig.php +++ /dev/null @@ -1,43 +0,0 @@ -initialized); - } - /** - * A mapping of network name to endpoint configuration for that network. - * - * @var array|null - */ - protected $endpointsConfig; - /** - * A mapping of network name to endpoint configuration for that network. - * - * @return array|null - */ - public function getEndpointsConfig(): ?iterable - { - return $this->endpointsConfig; - } - /** - * A mapping of network name to endpoint configuration for that network. - * - * @param array|null $endpointsConfig - * - * @return self - */ - public function setEndpointsConfig(?iterable $endpointsConfig): self - { - $this->initialized['endpointsConfig'] = true; - $this->endpointsConfig = $endpointsConfig; - return $this; - } -} \ No newline at end of file diff --git a/generated/Model/ContainersIdExecPostBody.php b/generated/Model/ContainersIdExecPostBody.php index 29bee969f..6ab86fd81 100644 --- a/generated/Model/ContainersIdExecPostBody.php +++ b/generated/Model/ContainersIdExecPostBody.php @@ -31,10 +31,19 @@ public function isInitialized($property): bool */ protected $attachStderr; /** - * Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + * Initial console size, as an `[height, width]` array. * - * @var string|null + * @var list|null */ + protected $consoleSize; + /** + * Override the key sequence for detaching a container. Format is + a single character `[a-Z]` or `ctrl-` where `` + is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + + * + * @var string|null + */ protected $detachKeys; /** * Allocate a pseudo-TTY. @@ -61,11 +70,20 @@ public function isInitialized($property): bool */ protected $privileged = false; /** - * The user, and optionally, group to run the exec process inside the container. Format is one of: `user`, `user:group`, `uid`, or `uid:gid`. + * The user, and optionally, group to run the exec process inside + the container. Format is one of: `user`, `user:group`, `uid`, + or `uid:gid`. + + * + * @var string|null + */ + protected $user; + /** + * The working directory for the exec process inside the container. * * @var string|null */ - protected $user; + protected $workingDir; /** * Attach to `stdin` of the exec command. * @@ -133,21 +151,49 @@ public function setAttachStderr(?bool $attachStderr): self return $this; } /** - * Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + * Initial console size, as an `[height, width]` array. * - * @return string|null + * @return list|null */ - public function getDetachKeys(): ?string + public function getConsoleSize(): ?array { - return $this->detachKeys; + return $this->consoleSize; } /** - * Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + * Initial console size, as an `[height, width]` array. * - * @param string|null $detachKeys + * @param list|null $consoleSize * * @return self */ + public function setConsoleSize(?array $consoleSize): self + { + $this->initialized['consoleSize'] = true; + $this->consoleSize = $consoleSize; + return $this; + } + /** + * Override the key sequence for detaching a container. Format is + a single character `[a-Z]` or `ctrl-` where `` + is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + + * + * @return string|null + */ + public function getDetachKeys(): ?string + { + return $this->detachKeys; + } + /** + * Override the key sequence for detaching a container. Format is + a single character `[a-Z]` or `ctrl-` where `` + is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + + * + * @param string|null $detachKeys + * + * @return self + */ public function setDetachKeys(?string $detachKeys): self { $this->initialized['detachKeys'] = true; @@ -243,25 +289,53 @@ public function setPrivileged(?bool $privileged): self return $this; } /** - * The user, and optionally, group to run the exec process inside the container. Format is one of: `user`, `user:group`, `uid`, or `uid:gid`. + * The user, and optionally, group to run the exec process inside + the container. Format is one of: `user`, `user:group`, `uid`, + or `uid:gid`. + + * + * @return string|null + */ + public function getUser(): ?string + { + return $this->user; + } + /** + * The user, and optionally, group to run the exec process inside + the container. Format is one of: `user`, `user:group`, `uid`, + or `uid:gid`. + + * + * @param string|null $user + * + * @return self + */ + public function setUser(?string $user): self + { + $this->initialized['user'] = true; + $this->user = $user; + return $this; + } + /** + * The working directory for the exec process inside the container. * * @return string|null */ - public function getUser(): ?string + public function getWorkingDir(): ?string { - return $this->user; + return $this->workingDir; } /** - * The user, and optionally, group to run the exec process inside the container. Format is one of: `user`, `user:group`, `uid`, or `uid:gid`. + * The working directory for the exec process inside the container. * - * @param string|null $user + * @param string|null $workingDir * * @return self */ - public function setUser(?string $user): self + public function setWorkingDir(?string $workingDir): self { - $this->initialized['user'] = true; - $this->user = $user; + $this->initialized['workingDir'] = true; + $this->workingDir = $workingDir; return $this; } } \ No newline at end of file diff --git a/generated/Model/ContainersIdJsonGetResponse200.php b/generated/Model/ContainersIdJsonGetResponse200.php index 39ebd42ef..e4524d2bb 100644 --- a/generated/Model/ContainersIdJsonGetResponse200.php +++ b/generated/Model/ContainersIdJsonGetResponse200.php @@ -37,13 +37,15 @@ public function isInitialized($property): bool */ protected $args; /** - * The state of the container. - * - * @var ContainersIdJsonGetResponse200State|null - */ + * ContainerState stores container's running state. It's part of ContainerJSONBase + and will be returned by the "inspect" command. + + * + * @var ContainerState|null + */ protected $state; /** - * The container's image + * The container's image ID * * @var string|null */ @@ -72,12 +74,6 @@ public function isInitialized($property): bool * @var string|null */ protected $logPath; - /** - * TODO - * - * @var mixed|null - */ - protected $node; /** * * @@ -96,6 +92,12 @@ public function isInitialized($property): bool * @var string|null */ protected $driver; + /** + * + * + * @var string|null + */ + protected $platform; /** * * @@ -115,9 +117,9 @@ public function isInitialized($property): bool */ protected $appArmorProfile; /** - * + * IDs of exec instances that are running in the container. * - * @var string|null + * @var list|null */ protected $execIDs; /** @@ -127,16 +129,20 @@ public function isInitialized($property): bool */ protected $hostConfig; /** - * Information about this container's graph driver. - * - * @var GraphDriver|null - */ + * Information about the storage driver used to store the container's and + image's filesystem. + + * + * @var DriverData|null + */ protected $graphDriver; /** - * The size of files that have been created or changed by this container. - * - * @var int|null - */ + * The size of files that have been created or changed by this + container. + + * + * @var int|null + */ protected $sizeRw; /** * The total size of all the files in this container. @@ -151,15 +157,15 @@ public function isInitialized($property): bool */ protected $mounts; /** - * Configuration for a container that is portable between hosts + * Configuration for a container that is portable between hosts. * - * @var Config|null + * @var ContainerConfig|null */ protected $config; /** - * TODO: check is correct + * NetworkSettings exposes the network settings in the API * - * @var NetworkConfig|null + * @var NetworkSettings|null */ protected $networkSettings; /** @@ -251,29 +257,33 @@ public function setArgs(?array $args): self return $this; } /** - * The state of the container. - * - * @return ContainersIdJsonGetResponse200State|null - */ - public function getState(): ?ContainersIdJsonGetResponse200State + * ContainerState stores container's running state. It's part of ContainerJSONBase + and will be returned by the "inspect" command. + + * + * @return ContainerState|null + */ + public function getState(): ?ContainerState { return $this->state; } /** - * The state of the container. - * - * @param ContainersIdJsonGetResponse200State|null $state - * - * @return self - */ - public function setState(?ContainersIdJsonGetResponse200State $state): self + * ContainerState stores container's running state. It's part of ContainerJSONBase + and will be returned by the "inspect" command. + + * + * @param ContainerState|null $state + * + * @return self + */ + public function setState(?ContainerState $state): self { $this->initialized['state'] = true; $this->state = $state; return $this; } /** - * The container's image + * The container's image ID * * @return string|null */ @@ -282,7 +292,7 @@ public function getImage(): ?string return $this->image; } /** - * The container's image + * The container's image ID * * @param string|null $image * @@ -382,28 +392,6 @@ public function setLogPath(?string $logPath): self $this->logPath = $logPath; return $this; } - /** - * TODO - * - * @return mixed - */ - public function getNode() - { - return $this->node; - } - /** - * TODO - * - * @param mixed $node - * - * @return self - */ - public function setNode($node): self - { - $this->initialized['node'] = true; - $this->node = $node; - return $this; - } /** * * @@ -470,6 +458,28 @@ public function setDriver(?string $driver): self $this->driver = $driver; return $this; } + /** + * + * + * @return string|null + */ + public function getPlatform(): ?string + { + return $this->platform; + } + /** + * + * + * @param string|null $platform + * + * @return self + */ + public function setPlatform(?string $platform): self + { + $this->initialized['platform'] = true; + $this->platform = $platform; + return $this; + } /** * * @@ -537,22 +547,22 @@ public function setAppArmorProfile(?string $appArmorProfile): self return $this; } /** - * + * IDs of exec instances that are running in the container. * - * @return string|null + * @return list|null */ - public function getExecIDs(): ?string + public function getExecIDs(): ?array { return $this->execIDs; } /** - * + * IDs of exec instances that are running in the container. * - * @param string|null $execIDs + * @param list|null $execIDs * * @return self */ - public function setExecIDs(?string $execIDs): self + public function setExecIDs(?array $execIDs): self { $this->initialized['execIDs'] = true; $this->execIDs = $execIDs; @@ -581,43 +591,51 @@ public function setHostConfig(?HostConfig $hostConfig): self return $this; } /** - * Information about this container's graph driver. - * - * @return GraphDriver|null - */ - public function getGraphDriver(): ?GraphDriver + * Information about the storage driver used to store the container's and + image's filesystem. + + * + * @return DriverData|null + */ + public function getGraphDriver(): ?DriverData { return $this->graphDriver; } /** - * Information about this container's graph driver. - * - * @param GraphDriver|null $graphDriver - * - * @return self - */ - public function setGraphDriver(?GraphDriver $graphDriver): self + * Information about the storage driver used to store the container's and + image's filesystem. + + * + * @param DriverData|null $graphDriver + * + * @return self + */ + public function setGraphDriver(?DriverData $graphDriver): self { $this->initialized['graphDriver'] = true; $this->graphDriver = $graphDriver; return $this; } /** - * The size of files that have been created or changed by this container. - * - * @return int|null - */ + * The size of files that have been created or changed by this + container. + + * + * @return int|null + */ public function getSizeRw(): ?int { return $this->sizeRw; } /** - * The size of files that have been created or changed by this container. - * - * @param int|null $sizeRw - * - * @return self - */ + * The size of files that have been created or changed by this + container. + + * + * @param int|null $sizeRw + * + * @return self + */ public function setSizeRw(?int $sizeRw): self { $this->initialized['sizeRw'] = true; @@ -669,44 +687,44 @@ public function setMounts(?array $mounts): self return $this; } /** - * Configuration for a container that is portable between hosts + * Configuration for a container that is portable between hosts. * - * @return Config|null + * @return ContainerConfig|null */ - public function getConfig(): ?Config + public function getConfig(): ?ContainerConfig { return $this->config; } /** - * Configuration for a container that is portable between hosts + * Configuration for a container that is portable between hosts. * - * @param Config|null $config + * @param ContainerConfig|null $config * * @return self */ - public function setConfig(?Config $config): self + public function setConfig(?ContainerConfig $config): self { $this->initialized['config'] = true; $this->config = $config; return $this; } /** - * TODO: check is correct + * NetworkSettings exposes the network settings in the API * - * @return NetworkConfig|null + * @return NetworkSettings|null */ - public function getNetworkSettings(): ?NetworkConfig + public function getNetworkSettings(): ?NetworkSettings { return $this->networkSettings; } /** - * TODO: check is correct + * NetworkSettings exposes the network settings in the API * - * @param NetworkConfig|null $networkSettings + * @param NetworkSettings|null $networkSettings * * @return self */ - public function setNetworkSettings(?NetworkConfig $networkSettings): self + public function setNetworkSettings(?NetworkSettings $networkSettings): self { $this->initialized['networkSettings'] = true; $this->networkSettings = $networkSettings; diff --git a/generated/Model/ContainersIdTopGetResponse200.php b/generated/Model/ContainersIdTopGetResponse200.php index 4ec0caafd..4aed5604e 100644 --- a/generated/Model/ContainersIdTopGetResponse200.php +++ b/generated/Model/ContainersIdTopGetResponse200.php @@ -19,10 +19,12 @@ public function isInitialized($property): bool */ protected $titles; /** - * Each process running in the container, where each is process is an array of values corresponding to the titles - * - * @var list>|null - */ + * Each process running in the container, where each is process + is an array of values corresponding to the titles. + + * + * @var list>|null + */ protected $processes; /** * The ps column titles @@ -47,21 +49,25 @@ public function setTitles(?array $titles): self return $this; } /** - * Each process running in the container, where each is process is an array of values corresponding to the titles - * - * @return list>|null - */ + * Each process running in the container, where each is process + is an array of values corresponding to the titles. + + * + * @return list>|null + */ public function getProcesses(): ?array { return $this->processes; } /** - * Each process running in the container, where each is process is an array of values corresponding to the titles - * - * @param list>|null $processes - * - * @return self - */ + * Each process running in the container, where each is process + is an array of values corresponding to the titles. + + * + * @param list>|null $processes + * + * @return self + */ public function setProcesses(?array $processes): self { $this->initialized['processes'] = true; diff --git a/generated/Model/ContainersIdUpdatePostBody.php b/generated/Model/ContainersIdUpdatePostBody.php index af8b55bc0..bfff80782 100644 --- a/generated/Model/ContainersIdUpdatePostBody.php +++ b/generated/Model/ContainersIdUpdatePostBody.php @@ -13,10 +13,12 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * An integer value representing this container's relative CPU weight versus other containers. - * - * @var int|null - */ + * An integer value representing this container's relative CPU weight + versus other containers. + + * + * @var int|null + */ protected $cpuShares; /** * Memory limit in bytes. @@ -25,10 +27,14 @@ public function isInitialized($property): bool */ protected $memory = 0; /** - * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. - * - * @var string|null - */ + * Path to `cgroups` under which the container's `cgroup` is created. If + the path is not absolute, the path is considered to be relative to the + `cgroups` path of the init process. Cgroups are created if they do not + already exist. + + * + * @var string|null + */ protected $cgroupParent; /** * Block IO weight (relative weight). @@ -37,34 +43,59 @@ public function isInitialized($property): bool */ protected $blkioWeight; /** - * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. - * - * @var list|null - */ + * Block IO weight (relative device weight) in the form: + + ``` + [{"Path": "device_path", "Weight": weight}] + ``` + + * + * @var list|null + */ protected $blkioWeightDevice; /** - * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @var list|null - */ + * Limit read rate (bytes per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @var list|null + */ protected $blkioDeviceReadBps; /** - * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @var list|null - */ + * Limit write rate (bytes per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @var list|null + */ protected $blkioDeviceWriteBps; /** - * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @var list|null - */ + * Limit read rate (IO per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @var list|null + */ protected $blkioDeviceReadIOps; /** - * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @var list|null - */ + * Limit write rate (IO per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @var list|null + */ protected $blkioDeviceWriteIOps; /** * The length of a CPU period in microseconds. @@ -79,28 +110,34 @@ public function isInitialized($property): bool */ protected $cpuQuota; /** - * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @var int|null - */ + * The length of a CPU real-time period in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @var int|null + */ protected $cpuRealtimePeriod; /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @var int|null - */ + * The length of a CPU real-time runtime in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @var int|null + */ protected $cpuRealtimeRuntime; /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * * @var string|null */ protected $cpusetCpus; /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. - * - * @var string|null - */ + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + effective on NUMA systems. + + * + * @var string|null + */ protected $cpusetMems; /** * A list of devices to add to the container. @@ -109,17 +146,28 @@ public function isInitialized($property): bool */ protected $devices; /** - * Disk limit (in bytes). + * a list of cgroup rules to apply to the container * - * @var int|null + * @var list|null */ - protected $diskQuota; + protected $deviceCgroupRules; /** - * Kernel memory limit in bytes. + * A list of requests for devices to be sent to device drivers. * - * @var int|null + * @var list|null */ - protected $kernelMemory; + protected $deviceRequests; + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + OCI runtime in use, this option may be ignored. It is no longer supported + by the default (runc) runtime. + + This field is omitted when empty. + + * + * @var int|null + */ + protected $kernelMemoryTCP; /** * Memory soft limit in bytes. * @@ -127,16 +175,20 @@ public function isInitialized($property): bool */ protected $memoryReservation; /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. - * - * @var int|null - */ + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + swap. + + * + * @var int|null + */ protected $memorySwap; /** - * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. - * - * @var int|null - */ + * Tune a container's memory swappiness behavior. Accepts an integer + between 0 and 100. + + * + * @var int|null + */ protected $memorySwappiness; /** * CPU quota in units of 10-9 CPUs. @@ -151,21 +203,39 @@ public function isInitialized($property): bool */ protected $oomKillDisable; /** - * Tune a container's pids limit. Set -1 for unlimited. - * - * @var int|null - */ + * Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + + * + * @var bool|null + */ + protected $init; + /** + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + to not change. + + * + * @var int|null + */ protected $pidsLimit; /** - * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" - * - * @var list|null - */ + * A list of resource limits to set in the container. For example: + + ``` + {"Name": "nofile", "Soft": 1024, "Hard": 2048} + ``` + + * + * @var list|null + */ protected $ulimits; /** * The number of usable CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @var int|null @@ -174,7 +244,9 @@ public function isInitialized($property): bool /** * The usable percentage of the available CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @var int|null @@ -187,36 +259,44 @@ public function isInitialized($property): bool */ protected $iOMaximumIOps; /** - * Maximum IO in bytes per second for the container system drive (Windows only) - * - * @var int|null - */ + * Maximum IO in bytes per second for the container system drive + (Windows only). + + * + * @var int|null + */ protected $iOMaximumBandwidth; /** - * The behavior to apply when the container exits. The default is not to restart. + * The behavior to apply when the container exits. The default is not to + restart. - An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + An ever increasing delay (double the previous delay, starting at 100ms) is + added before each restart to prevent flooding the server. * * @var RestartPolicy|null */ protected $restartPolicy; /** - * An integer value representing this container's relative CPU weight versus other containers. - * - * @return int|null - */ + * An integer value representing this container's relative CPU weight + versus other containers. + + * + * @return int|null + */ public function getCpuShares(): ?int { return $this->cpuShares; } /** - * An integer value representing this container's relative CPU weight versus other containers. - * - * @param int|null $cpuShares - * - * @return self - */ + * An integer value representing this container's relative CPU weight + versus other containers. + + * + * @param int|null $cpuShares + * + * @return self + */ public function setCpuShares(?int $cpuShares): self { $this->initialized['cpuShares'] = true; @@ -246,21 +326,29 @@ public function setMemory(?int $memory): self return $this; } /** - * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. - * - * @return string|null - */ + * Path to `cgroups` under which the container's `cgroup` is created. If + the path is not absolute, the path is considered to be relative to the + `cgroups` path of the init process. Cgroups are created if they do not + already exist. + + * + * @return string|null + */ public function getCgroupParent(): ?string { return $this->cgroupParent; } /** - * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. - * - * @param string|null $cgroupParent - * - * @return self - */ + * Path to `cgroups` under which the container's `cgroup` is created. If + the path is not absolute, the path is considered to be relative to the + `cgroups` path of the init process. Cgroups are created if they do not + already exist. + + * + * @param string|null $cgroupParent + * + * @return self + */ public function setCgroupParent(?string $cgroupParent): self { $this->initialized['cgroupParent'] = true; @@ -290,21 +378,31 @@ public function setBlkioWeight(?int $blkioWeight): self return $this; } /** - * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. - * - * @return list|null - */ + * Block IO weight (relative device weight) in the form: + + ``` + [{"Path": "device_path", "Weight": weight}] + ``` + + * + * @return list|null + */ public function getBlkioWeightDevice(): ?array { return $this->blkioWeightDevice; } /** - * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. - * - * @param list|null $blkioWeightDevice - * - * @return self - */ + * Block IO weight (relative device weight) in the form: + + ``` + [{"Path": "device_path", "Weight": weight}] + ``` + + * + * @param list|null $blkioWeightDevice + * + * @return self + */ public function setBlkioWeightDevice(?array $blkioWeightDevice): self { $this->initialized['blkioWeightDevice'] = true; @@ -312,21 +410,31 @@ public function setBlkioWeightDevice(?array $blkioWeightDevice): self return $this; } /** - * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @return list|null - */ + * Limit read rate (bytes per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @return list|null + */ public function getBlkioDeviceReadBps(): ?array { return $this->blkioDeviceReadBps; } /** - * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @param list|null $blkioDeviceReadBps - * - * @return self - */ + * Limit read rate (bytes per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @param list|null $blkioDeviceReadBps + * + * @return self + */ public function setBlkioDeviceReadBps(?array $blkioDeviceReadBps): self { $this->initialized['blkioDeviceReadBps'] = true; @@ -334,21 +442,31 @@ public function setBlkioDeviceReadBps(?array $blkioDeviceReadBps): self return $this; } /** - * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @return list|null - */ + * Limit write rate (bytes per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @return list|null + */ public function getBlkioDeviceWriteBps(): ?array { return $this->blkioDeviceWriteBps; } /** - * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @param list|null $blkioDeviceWriteBps - * - * @return self - */ + * Limit write rate (bytes per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @param list|null $blkioDeviceWriteBps + * + * @return self + */ public function setBlkioDeviceWriteBps(?array $blkioDeviceWriteBps): self { $this->initialized['blkioDeviceWriteBps'] = true; @@ -356,21 +474,31 @@ public function setBlkioDeviceWriteBps(?array $blkioDeviceWriteBps): self return $this; } /** - * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @return list|null - */ + * Limit read rate (IO per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @return list|null + */ public function getBlkioDeviceReadIOps(): ?array { return $this->blkioDeviceReadIOps; } /** - * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @param list|null $blkioDeviceReadIOps - * - * @return self - */ + * Limit read rate (IO per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @param list|null $blkioDeviceReadIOps + * + * @return self + */ public function setBlkioDeviceReadIOps(?array $blkioDeviceReadIOps): self { $this->initialized['blkioDeviceReadIOps'] = true; @@ -378,21 +506,31 @@ public function setBlkioDeviceReadIOps(?array $blkioDeviceReadIOps): self return $this; } /** - * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @return list|null - */ + * Limit write rate (IO per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @return list|null + */ public function getBlkioDeviceWriteIOps(): ?array { return $this->blkioDeviceWriteIOps; } /** - * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @param list|null $blkioDeviceWriteIOps - * - * @return self - */ + * Limit write rate (IO per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @param list|null $blkioDeviceWriteIOps + * + * @return self + */ public function setBlkioDeviceWriteIOps(?array $blkioDeviceWriteIOps): self { $this->initialized['blkioDeviceWriteIOps'] = true; @@ -444,21 +582,25 @@ public function setCpuQuota(?int $cpuQuota): self return $this; } /** - * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @return int|null - */ + * The length of a CPU real-time period in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @return int|null + */ public function getCpuRealtimePeriod(): ?int { return $this->cpuRealtimePeriod; } /** - * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @param int|null $cpuRealtimePeriod - * - * @return self - */ + * The length of a CPU real-time period in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @param int|null $cpuRealtimePeriod + * + * @return self + */ public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self { $this->initialized['cpuRealtimePeriod'] = true; @@ -466,21 +608,25 @@ public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self return $this; } /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @return int|null - */ + * The length of a CPU real-time runtime in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @return int|null + */ public function getCpuRealtimeRuntime(): ?int { return $this->cpuRealtimeRuntime; } /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @param int|null $cpuRealtimeRuntime - * - * @return self - */ + * The length of a CPU real-time runtime in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @param int|null $cpuRealtimeRuntime + * + * @return self + */ public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self { $this->initialized['cpuRealtimeRuntime'] = true; @@ -488,7 +634,7 @@ public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self return $this; } /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * * @return string|null */ @@ -497,7 +643,7 @@ public function getCpusetCpus(): ?string return $this->cpusetCpus; } /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * * @param string|null $cpusetCpus * @@ -510,21 +656,25 @@ public function setCpusetCpus(?string $cpusetCpus): self return $this; } /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. - * - * @return string|null - */ + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + effective on NUMA systems. + + * + * @return string|null + */ public function getCpusetMems(): ?string { return $this->cpusetMems; } /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. - * - * @param string|null $cpusetMems - * - * @return self - */ + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + effective on NUMA systems. + + * + * @param string|null $cpusetMems + * + * @return self + */ public function setCpusetMems(?string $cpusetMems): self { $this->initialized['cpusetMems'] = true; @@ -554,47 +704,79 @@ public function setDevices(?array $devices): self return $this; } /** - * Disk limit (in bytes). + * a list of cgroup rules to apply to the container * - * @return int|null + * @return list|null */ - public function getDiskQuota(): ?int + public function getDeviceCgroupRules(): ?array { - return $this->diskQuota; + return $this->deviceCgroupRules; } /** - * Disk limit (in bytes). + * a list of cgroup rules to apply to the container * - * @param int|null $diskQuota + * @param list|null $deviceCgroupRules * * @return self */ - public function setDiskQuota(?int $diskQuota): self + public function setDeviceCgroupRules(?array $deviceCgroupRules): self { - $this->initialized['diskQuota'] = true; - $this->diskQuota = $diskQuota; + $this->initialized['deviceCgroupRules'] = true; + $this->deviceCgroupRules = $deviceCgroupRules; return $this; } /** - * Kernel memory limit in bytes. + * A list of requests for devices to be sent to device drivers. * - * @return int|null + * @return list|null */ - public function getKernelMemory(): ?int + public function getDeviceRequests(): ?array { - return $this->kernelMemory; + return $this->deviceRequests; } /** - * Kernel memory limit in bytes. + * A list of requests for devices to be sent to device drivers. * - * @param int|null $kernelMemory + * @param list|null $deviceRequests * * @return self */ - public function setKernelMemory(?int $kernelMemory): self + public function setDeviceRequests(?array $deviceRequests): self + { + $this->initialized['deviceRequests'] = true; + $this->deviceRequests = $deviceRequests; + return $this; + } + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + OCI runtime in use, this option may be ignored. It is no longer supported + by the default (runc) runtime. + + This field is omitted when empty. + + * + * @return int|null + */ + public function getKernelMemoryTCP(): ?int + { + return $this->kernelMemoryTCP; + } + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + OCI runtime in use, this option may be ignored. It is no longer supported + by the default (runc) runtime. + + This field is omitted when empty. + + * + * @param int|null $kernelMemoryTCP + * + * @return self + */ + public function setKernelMemoryTCP(?int $kernelMemoryTCP): self { - $this->initialized['kernelMemory'] = true; - $this->kernelMemory = $kernelMemory; + $this->initialized['kernelMemoryTCP'] = true; + $this->kernelMemoryTCP = $kernelMemoryTCP; return $this; } /** @@ -620,21 +802,25 @@ public function setMemoryReservation(?int $memoryReservation): self return $this; } /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. - * - * @return int|null - */ + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + swap. + + * + * @return int|null + */ public function getMemorySwap(): ?int { return $this->memorySwap; } /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. - * - * @param int|null $memorySwap - * - * @return self - */ + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + swap. + + * + * @param int|null $memorySwap + * + * @return self + */ public function setMemorySwap(?int $memorySwap): self { $this->initialized['memorySwap'] = true; @@ -642,21 +828,25 @@ public function setMemorySwap(?int $memorySwap): self return $this; } /** - * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. - * - * @return int|null - */ + * Tune a container's memory swappiness behavior. Accepts an integer + between 0 and 100. + + * + * @return int|null + */ public function getMemorySwappiness(): ?int { return $this->memorySwappiness; } /** - * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. - * - * @param int|null $memorySwappiness - * - * @return self - */ + * Tune a container's memory swappiness behavior. Accepts an integer + between 0 and 100. + + * + * @param int|null $memorySwappiness + * + * @return self + */ public function setMemorySwappiness(?int $memorySwappiness): self { $this->initialized['memorySwappiness'] = true; @@ -708,21 +898,53 @@ public function setOomKillDisable(?bool $oomKillDisable): self return $this; } /** - * Tune a container's pids limit. Set -1 for unlimited. - * - * @return int|null - */ + * Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + + * + * @return bool|null + */ + public function getInit(): ?bool + { + return $this->init; + } + /** + * Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + + * + * @param bool|null $init + * + * @return self + */ + public function setInit(?bool $init): self + { + $this->initialized['init'] = true; + $this->init = $init; + return $this; + } + /** + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + to not change. + + * + * @return int|null + */ public function getPidsLimit(): ?int { return $this->pidsLimit; } /** - * Tune a container's pids limit. Set -1 for unlimited. - * - * @param int|null $pidsLimit - * - * @return self - */ + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + to not change. + + * + * @param int|null $pidsLimit + * + * @return self + */ public function setPidsLimit(?int $pidsLimit): self { $this->initialized['pidsLimit'] = true; @@ -730,21 +952,31 @@ public function setPidsLimit(?int $pidsLimit): self return $this; } /** - * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" - * - * @return list|null - */ + * A list of resource limits to set in the container. For example: + + ``` + {"Name": "nofile", "Soft": 1024, "Hard": 2048} + ``` + + * + * @return list|null + */ public function getUlimits(): ?array { return $this->ulimits; } /** - * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" - * - * @param list|null $ulimits - * - * @return self - */ + * A list of resource limits to set in the container. For example: + + ``` + {"Name": "nofile", "Soft": 1024, "Hard": 2048} + ``` + + * + * @param list|null $ulimits + * + * @return self + */ public function setUlimits(?array $ulimits): self { $this->initialized['ulimits'] = true; @@ -754,7 +986,9 @@ public function setUlimits(?array $ulimits): self /** * The number of usable CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @return int|null @@ -766,7 +1000,9 @@ public function getCpuCount(): ?int /** * The number of usable CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @param int|null $cpuCount @@ -782,7 +1018,9 @@ public function setCpuCount(?int $cpuCount): self /** * The usable percentage of the available CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @return int|null @@ -794,7 +1032,9 @@ public function getCpuPercent(): ?int /** * The usable percentage of the available CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @param int|null $cpuPercent @@ -830,21 +1070,25 @@ public function setIOMaximumIOps(?int $iOMaximumIOps): self return $this; } /** - * Maximum IO in bytes per second for the container system drive (Windows only) - * - * @return int|null - */ + * Maximum IO in bytes per second for the container system drive + (Windows only). + + * + * @return int|null + */ public function getIOMaximumBandwidth(): ?int { return $this->iOMaximumBandwidth; } /** - * Maximum IO in bytes per second for the container system drive (Windows only) - * - * @param int|null $iOMaximumBandwidth - * - * @return self - */ + * Maximum IO in bytes per second for the container system drive + (Windows only). + + * + * @param int|null $iOMaximumBandwidth + * + * @return self + */ public function setIOMaximumBandwidth(?int $iOMaximumBandwidth): self { $this->initialized['iOMaximumBandwidth'] = true; @@ -852,9 +1096,11 @@ public function setIOMaximumBandwidth(?int $iOMaximumBandwidth): self return $this; } /** - * The behavior to apply when the container exits. The default is not to restart. + * The behavior to apply when the container exits. The default is not to + restart. - An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + An ever increasing delay (double the previous delay, starting at 100ms) is + added before each restart to prevent flooding the server. * * @return RestartPolicy|null @@ -864,9 +1110,11 @@ public function getRestartPolicy(): ?RestartPolicy return $this->restartPolicy; } /** - * The behavior to apply when the container exits. The default is not to restart. + * The behavior to apply when the container exits. The default is not to + restart. - An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + An ever increasing delay (double the previous delay, starting at 100ms) is + added before each restart to prevent flooding the server. * * @param RestartPolicy|null $restartPolicy diff --git a/generated/Model/CreateImageInfo.php b/generated/Model/CreateImageInfo.php index d7847e449..428e8ad22 100644 --- a/generated/Model/CreateImageInfo.php +++ b/generated/Model/CreateImageInfo.php @@ -12,12 +12,24 @@ public function isInitialized($property): bool { return array_key_exists($property, $this->initialized); } + /** + * + * + * @var string|null + */ + protected $id; /** * * * @var string|null */ protected $error; + /** + * + * + * @var ErrorDetail|null + */ + protected $errorDetail; /** * * @@ -36,6 +48,28 @@ public function isInitialized($property): bool * @var ProgressDetail|null */ protected $progressDetail; + /** + * + * + * @return string|null + */ + public function getId(): ?string + { + return $this->id; + } + /** + * + * + * @param string|null $id + * + * @return self + */ + public function setId(?string $id): self + { + $this->initialized['id'] = true; + $this->id = $id; + return $this; + } /** * * @@ -58,6 +92,28 @@ public function setError(?string $error): self $this->error = $error; return $this; } + /** + * + * + * @return ErrorDetail|null + */ + public function getErrorDetail(): ?ErrorDetail + { + return $this->errorDetail; + } + /** + * + * + * @param ErrorDetail|null $errorDetail + * + * @return self + */ + public function setErrorDetail(?ErrorDetail $errorDetail): self + { + $this->initialized['errorDetail'] = true; + $this->errorDetail = $errorDetail; + return $this; + } /** * * diff --git a/generated/Model/DeviceRequest.php b/generated/Model/DeviceRequest.php new file mode 100644 index 000000000..4f53e5f73 --- /dev/null +++ b/generated/Model/DeviceRequest.php @@ -0,0 +1,161 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $driver; + /** + * + * + * @var int|null + */ + protected $count; + /** + * + * + * @var list|null + */ + protected $deviceIDs; + /** + * A list of capabilities; an OR list of AND lists of capabilities. + * + * @var list>|null + */ + protected $capabilities; + /** + * Driver-specific options, specified as a key/value pairs. These options + are passed directly to the driver. + + * + * @var array|null + */ + protected $options; + /** + * + * + * @return string|null + */ + public function getDriver(): ?string + { + return $this->driver; + } + /** + * + * + * @param string|null $driver + * + * @return self + */ + public function setDriver(?string $driver): self + { + $this->initialized['driver'] = true; + $this->driver = $driver; + return $this; + } + /** + * + * + * @return int|null + */ + public function getCount(): ?int + { + return $this->count; + } + /** + * + * + * @param int|null $count + * + * @return self + */ + public function setCount(?int $count): self + { + $this->initialized['count'] = true; + $this->count = $count; + return $this; + } + /** + * + * + * @return list|null + */ + public function getDeviceIDs(): ?array + { + return $this->deviceIDs; + } + /** + * + * + * @param list|null $deviceIDs + * + * @return self + */ + public function setDeviceIDs(?array $deviceIDs): self + { + $this->initialized['deviceIDs'] = true; + $this->deviceIDs = $deviceIDs; + return $this; + } + /** + * A list of capabilities; an OR list of AND lists of capabilities. + * + * @return list>|null + */ + public function getCapabilities(): ?array + { + return $this->capabilities; + } + /** + * A list of capabilities; an OR list of AND lists of capabilities. + * + * @param list>|null $capabilities + * + * @return self + */ + public function setCapabilities(?array $capabilities): self + { + $this->initialized['capabilities'] = true; + $this->capabilities = $capabilities; + return $this; + } + /** + * Driver-specific options, specified as a key/value pairs. These options + are passed directly to the driver. + + * + * @return array|null + */ + public function getOptions(): ?iterable + { + return $this->options; + } + /** + * Driver-specific options, specified as a key/value pairs. These options + are passed directly to the driver. + + * + * @param array|null $options + * + * @return self + */ + public function setOptions(?iterable $options): self + { + $this->initialized['options'] = true; + $this->options = $options; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/DistributionInspect.php b/generated/Model/DistributionInspect.php new file mode 100644 index 000000000..f85126915 --- /dev/null +++ b/generated/Model/DistributionInspect.php @@ -0,0 +1,77 @@ +initialized); + } + /** + * A descriptor struct containing digest, media type, and size, as defined in + the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). + + * + * @var OCIDescriptor|null + */ + protected $descriptor; + /** + * An array containing all platforms supported by the image. + * + * @var list|null + */ + protected $platforms; + /** + * A descriptor struct containing digest, media type, and size, as defined in + the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). + + * + * @return OCIDescriptor|null + */ + public function getDescriptor(): ?OCIDescriptor + { + return $this->descriptor; + } + /** + * A descriptor struct containing digest, media type, and size, as defined in + the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). + + * + * @param OCIDescriptor|null $descriptor + * + * @return self + */ + public function setDescriptor(?OCIDescriptor $descriptor): self + { + $this->initialized['descriptor'] = true; + $this->descriptor = $descriptor; + return $this; + } + /** + * An array containing all platforms supported by the image. + * + * @return list|null + */ + public function getPlatforms(): ?array + { + return $this->platforms; + } + /** + * An array containing all platforms supported by the image. + * + * @param list|null $platforms + * + * @return self + */ + public function setPlatforms(?array $platforms): self + { + $this->initialized['platforms'] = true; + $this->platforms = $platforms; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/GraphDriver.php b/generated/Model/Driver.php similarity index 62% rename from generated/Model/GraphDriver.php rename to generated/Model/Driver.php index 76785b8d4..bb809346f 100644 --- a/generated/Model/GraphDriver.php +++ b/generated/Model/Driver.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class GraphDriver +class Driver { /** * @var array @@ -13,19 +13,19 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * + * Name of the driver. * * @var string|null */ protected $name; /** - * + * Key/value map of driver-specific options. * * @var array|null */ - protected $data; + protected $options; /** - * + * Name of the driver. * * @return string|null */ @@ -34,7 +34,7 @@ public function getName(): ?string return $this->name; } /** - * + * Name of the driver. * * @param string|null $name * @@ -47,25 +47,25 @@ public function setName(?string $name): self return $this; } /** - * + * Key/value map of driver-specific options. * * @return array|null */ - public function getData(): ?iterable + public function getOptions(): ?iterable { - return $this->data; + return $this->options; } /** - * + * Key/value map of driver-specific options. * - * @param array|null $data + * @param array|null $options * * @return self */ - public function setData(?iterable $data): self + public function setOptions(?iterable $options): self { - $this->initialized['data'] = true; - $this->data = $data; + $this->initialized['options'] = true; + $this->options = $options; return $this; } } \ No newline at end of file diff --git a/generated/Model/DriverData.php b/generated/Model/DriverData.php new file mode 100644 index 000000000..a8184ec26 --- /dev/null +++ b/generated/Model/DriverData.php @@ -0,0 +1,83 @@ +initialized); + } + /** + * Name of the storage driver. + * + * @var string|null + */ + protected $name; + /** + * Low-level storage metadata, provided as key/value pairs. + + This information is driver-specific, and depends on the storage-driver + in use, and should be used for informational purposes only. + + * + * @var array|null + */ + protected $data; + /** + * Name of the storage driver. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * Name of the storage driver. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * Low-level storage metadata, provided as key/value pairs. + + This information is driver-specific, and depends on the storage-driver + in use, and should be used for informational purposes only. + + * + * @return array|null + */ + public function getData(): ?iterable + { + return $this->data; + } + /** + * Low-level storage metadata, provided as key/value pairs. + + This information is driver-specific, and depends on the storage-driver + in use, and should be used for informational purposes only. + + * + * @param array|null $data + * + * @return self + */ + public function setData(?iterable $data): self + { + $this->initialized['data'] = true; + $this->data = $data; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/EndpointSettingsIPAMConfig.php b/generated/Model/EndpointIPAMConfig.php similarity index 98% rename from generated/Model/EndpointSettingsIPAMConfig.php rename to generated/Model/EndpointIPAMConfig.php index e3eb31d5e..e86adf83f 100644 --- a/generated/Model/EndpointSettingsIPAMConfig.php +++ b/generated/Model/EndpointIPAMConfig.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class EndpointSettingsIPAMConfig +class EndpointIPAMConfig { /** * @var array diff --git a/generated/Model/EndpointPortConfig.php b/generated/Model/EndpointPortConfig.php index bfcb452d5..69134e922 100644 --- a/generated/Model/EndpointPortConfig.php +++ b/generated/Model/EndpointPortConfig.php @@ -36,6 +36,21 @@ public function isInitialized($property): bool * @var int|null */ protected $publishedPort; + /** + * The mode in which port is published. + +


+ + - "ingress" makes the target port accessible on every node, + regardless of whether there is a task for the service running on + that node or not. + - "host" bypasses the routing mesh and publish the port directly on + the swarm node where that service is running. + + * + * @var string|null + */ + protected $publishMode = 'ingress'; /** * * @@ -124,4 +139,44 @@ public function setPublishedPort(?int $publishedPort): self $this->publishedPort = $publishedPort; return $this; } + /** + * The mode in which port is published. + +


+ + - "ingress" makes the target port accessible on every node, + regardless of whether there is a task for the service running on + that node or not. + - "host" bypasses the routing mesh and publish the port directly on + the swarm node where that service is running. + + * + * @return string|null + */ + public function getPublishMode(): ?string + { + return $this->publishMode; + } + /** + * The mode in which port is published. + +


+ + - "ingress" makes the target port accessible on every node, + regardless of whether there is a task for the service running on + that node or not. + - "host" bypasses the routing mesh and publish the port directly on + the swarm node where that service is running. + + * + * @param string|null $publishMode + * + * @return self + */ + public function setPublishMode(?string $publishMode): self + { + $this->initialized['publishMode'] = true; + $this->publishMode = $publishMode; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/EndpointSettings.php b/generated/Model/EndpointSettings.php index b35880612..97e83788a 100644 --- a/generated/Model/EndpointSettings.php +++ b/generated/Model/EndpointSettings.php @@ -13,9 +13,9 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * IPAM configurations for the endpoint + * EndpointIPAMConfig represents an endpoint's IPAM configuration. * - * @var EndpointSettingsIPAMConfig|null + * @var EndpointIPAMConfig|null */ protected $iPAMConfig; /** @@ -24,6 +24,12 @@ public function isInitialized($property): bool * @var list|null */ protected $links; + /** + * MAC address for the endpoint on this network. The network driver might ignore this parameter. + * + * @var string|null + */ + protected $macAddress; /** * * @@ -31,76 +37,93 @@ public function isInitialized($property): bool */ protected $aliases; /** - * + * DriverOpts is a mapping of driver options and values. These options + are passed directly to the driver and are driver specific. + + * + * @var array|null + */ + protected $driverOpts; + /** + * Unique ID of the network. * * @var string|null */ protected $networkID; /** - * + * Unique ID for the service endpoint in a Sandbox. * * @var string|null */ protected $endpointID; /** - * + * Gateway address for this network. * * @var string|null */ protected $gateway; /** - * + * IPv4 address. * * @var string|null */ protected $iPAddress; /** - * + * Mask length of the IPv4 address. * * @var int|null */ protected $iPPrefixLen; /** - * + * IPv6 gateway address. * * @var string|null */ protected $iPv6Gateway; /** - * + * Global IPv6 address. * * @var string|null */ protected $globalIPv6Address; /** - * + * Mask length of the global IPv6 address. * * @var int|null */ protected $globalIPv6PrefixLen; /** - * - * - * @var string|null - */ - protected $macAddress; - /** - * IPAM configurations for the endpoint - * - * @return EndpointSettingsIPAMConfig|null - */ - public function getIPAMConfig(): ?EndpointSettingsIPAMConfig + * List of all DNS names an endpoint has on a specific network. This + list is based on the container name, network aliases, container short + ID, and hostname. + + These DNS names are non-fully qualified but can contain several dots. + You can get fully qualified DNS names by appending `.`. + For instance, if container name is `my.ctr` and the network is named + `testnet`, `DNSNames` will contain `my.ctr` and the FQDN will be + `my.ctr.testnet`. + + * + * @var list|null + */ + protected $dNSNames; + /** + * EndpointIPAMConfig represents an endpoint's IPAM configuration. + * + * @return EndpointIPAMConfig|null + */ + public function getIPAMConfig(): ?EndpointIPAMConfig { return $this->iPAMConfig; } /** - * IPAM configurations for the endpoint + * EndpointIPAMConfig represents an endpoint's IPAM configuration. * - * @param EndpointSettingsIPAMConfig|null $iPAMConfig + * @param EndpointIPAMConfig|null $iPAMConfig * * @return self */ - public function setIPAMConfig(?EndpointSettingsIPAMConfig $iPAMConfig): self + public function setIPAMConfig(?EndpointIPAMConfig $iPAMConfig): self { $this->initialized['iPAMConfig'] = true; $this->iPAMConfig = $iPAMConfig; @@ -128,6 +151,28 @@ public function setLinks(?array $links): self $this->links = $links; return $this; } + /** + * MAC address for the endpoint on this network. The network driver might ignore this parameter. + * + * @return string|null + */ + public function getMacAddress(): ?string + { + return $this->macAddress; + } + /** + * MAC address for the endpoint on this network. The network driver might ignore this parameter. + * + * @param string|null $macAddress + * + * @return self + */ + public function setMacAddress(?string $macAddress): self + { + $this->initialized['macAddress'] = true; + $this->macAddress = $macAddress; + return $this; + } /** * * @@ -151,7 +196,33 @@ public function setAliases(?array $aliases): self return $this; } /** - * + * DriverOpts is a mapping of driver options and values. These options + are passed directly to the driver and are driver specific. + + * + * @return array|null + */ + public function getDriverOpts(): ?iterable + { + return $this->driverOpts; + } + /** + * DriverOpts is a mapping of driver options and values. These options + are passed directly to the driver and are driver specific. + + * + * @param array|null $driverOpts + * + * @return self + */ + public function setDriverOpts(?iterable $driverOpts): self + { + $this->initialized['driverOpts'] = true; + $this->driverOpts = $driverOpts; + return $this; + } + /** + * Unique ID of the network. * * @return string|null */ @@ -160,7 +231,7 @@ public function getNetworkID(): ?string return $this->networkID; } /** - * + * Unique ID of the network. * * @param string|null $networkID * @@ -173,7 +244,7 @@ public function setNetworkID(?string $networkID): self return $this; } /** - * + * Unique ID for the service endpoint in a Sandbox. * * @return string|null */ @@ -182,7 +253,7 @@ public function getEndpointID(): ?string return $this->endpointID; } /** - * + * Unique ID for the service endpoint in a Sandbox. * * @param string|null $endpointID * @@ -195,7 +266,7 @@ public function setEndpointID(?string $endpointID): self return $this; } /** - * + * Gateway address for this network. * * @return string|null */ @@ -204,7 +275,7 @@ public function getGateway(): ?string return $this->gateway; } /** - * + * Gateway address for this network. * * @param string|null $gateway * @@ -217,7 +288,7 @@ public function setGateway(?string $gateway): self return $this; } /** - * + * IPv4 address. * * @return string|null */ @@ -226,7 +297,7 @@ public function getIPAddress(): ?string return $this->iPAddress; } /** - * + * IPv4 address. * * @param string|null $iPAddress * @@ -239,7 +310,7 @@ public function setIPAddress(?string $iPAddress): self return $this; } /** - * + * Mask length of the IPv4 address. * * @return int|null */ @@ -248,7 +319,7 @@ public function getIPPrefixLen(): ?int return $this->iPPrefixLen; } /** - * + * Mask length of the IPv4 address. * * @param int|null $iPPrefixLen * @@ -261,7 +332,7 @@ public function setIPPrefixLen(?int $iPPrefixLen): self return $this; } /** - * + * IPv6 gateway address. * * @return string|null */ @@ -270,7 +341,7 @@ public function getIPv6Gateway(): ?string return $this->iPv6Gateway; } /** - * + * IPv6 gateway address. * * @param string|null $iPv6Gateway * @@ -283,7 +354,7 @@ public function setIPv6Gateway(?string $iPv6Gateway): self return $this; } /** - * + * Global IPv6 address. * * @return string|null */ @@ -292,7 +363,7 @@ public function getGlobalIPv6Address(): ?string return $this->globalIPv6Address; } /** - * + * Global IPv6 address. * * @param string|null $globalIPv6Address * @@ -305,7 +376,7 @@ public function setGlobalIPv6Address(?string $globalIPv6Address): self return $this; } /** - * + * Mask length of the global IPv6 address. * * @return int|null */ @@ -314,7 +385,7 @@ public function getGlobalIPv6PrefixLen(): ?int return $this->globalIPv6PrefixLen; } /** - * + * Mask length of the global IPv6 address. * * @param int|null $globalIPv6PrefixLen * @@ -327,25 +398,43 @@ public function setGlobalIPv6PrefixLen(?int $globalIPv6PrefixLen): self return $this; } /** - * - * - * @return string|null - */ - public function getMacAddress(): ?string + * List of all DNS names an endpoint has on a specific network. This + list is based on the container name, network aliases, container short + ID, and hostname. + + These DNS names are non-fully qualified but can contain several dots. + You can get fully qualified DNS names by appending `.`. + For instance, if container name is `my.ctr` and the network is named + `testnet`, `DNSNames` will contain `my.ctr` and the FQDN will be + `my.ctr.testnet`. + + * + * @return list|null + */ + public function getDNSNames(): ?array { - return $this->macAddress; + return $this->dNSNames; } /** - * - * - * @param string|null $macAddress - * - * @return self - */ - public function setMacAddress(?string $macAddress): self + * List of all DNS names an endpoint has on a specific network. This + list is based on the container name, network aliases, container short + ID, and hostname. + + These DNS names are non-fully qualified but can contain several dots. + You can get fully qualified DNS names by appending `.`. + For instance, if container name is `my.ctr` and the network is named + `testnet`, `DNSNames` will contain `my.ctr` and the FQDN will be + `my.ctr.testnet`. + + * + * @param list|null $dNSNames + * + * @return self + */ + public function setDNSNames(?array $dNSNames): self { - $this->initialized['macAddress'] = true; - $this->macAddress = $macAddress; + $this->initialized['dNSNames'] = true; + $this->dNSNames = $dNSNames; return $this; } } \ No newline at end of file diff --git a/generated/Model/EndpointSpec.php b/generated/Model/EndpointSpec.php index 9a44fc443..a9fd0062f 100644 --- a/generated/Model/EndpointSpec.php +++ b/generated/Model/EndpointSpec.php @@ -19,10 +19,12 @@ public function isInitialized($property): bool */ protected $mode = 'vip'; /** - * List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used. - * - * @var list|null - */ + * List of exposed ports that this service is accessible on from the + outside. Ports can only be provided if `vip` resolution mode is used. + + * + * @var list|null + */ protected $ports; /** * The mode of resolution to use for internal load balancing between tasks. @@ -47,21 +49,25 @@ public function setMode(?string $mode): self return $this; } /** - * List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used. - * - * @return list|null - */ + * List of exposed ports that this service is accessible on from the + outside. Ports can only be provided if `vip` resolution mode is used. + + * + * @return list|null + */ public function getPorts(): ?array { return $this->ports; } /** - * List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used. - * - * @param list|null $ports - * - * @return self - */ + * List of exposed ports that this service is accessible on from the + outside. Ports can only be provided if `vip` resolution mode is used. + + * + * @param list|null $ports + * + * @return self + */ public function setPorts(?array $ports): self { $this->initialized['ports'] = true; diff --git a/generated/Model/NodeDescriptionEngine.php b/generated/Model/EngineDescription.php similarity index 88% rename from generated/Model/NodeDescriptionEngine.php rename to generated/Model/EngineDescription.php index b0a690bcd..0655b7541 100644 --- a/generated/Model/NodeDescriptionEngine.php +++ b/generated/Model/EngineDescription.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class NodeDescriptionEngine +class EngineDescription { /** * @var array @@ -27,7 +27,7 @@ public function isInitialized($property): bool /** * * - * @var list|null + * @var list|null */ protected $plugins; /** @@ -77,7 +77,7 @@ public function setLabels(?iterable $labels): self /** * * - * @return list|null + * @return list|null */ public function getPlugins(): ?array { @@ -86,7 +86,7 @@ public function getPlugins(): ?array /** * * - * @param list|null $plugins + * @param list|null $plugins * * @return self */ diff --git a/generated/Model/NodeDescriptionEnginePluginsItem.php b/generated/Model/EngineDescriptionPluginsItem.php similarity index 96% rename from generated/Model/NodeDescriptionEnginePluginsItem.php rename to generated/Model/EngineDescriptionPluginsItem.php index f3b7d3e82..d32380a28 100644 --- a/generated/Model/NodeDescriptionEnginePluginsItem.php +++ b/generated/Model/EngineDescriptionPluginsItem.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class NodeDescriptionEnginePluginsItem +class EngineDescriptionPluginsItem { /** * @var array diff --git a/generated/Model/EventsGetResponse200Actor.php b/generated/Model/EventActor.php similarity index 96% rename from generated/Model/EventsGetResponse200Actor.php rename to generated/Model/EventActor.php index f4260221f..106247030 100644 --- a/generated/Model/EventsGetResponse200Actor.php +++ b/generated/Model/EventActor.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class EventsGetResponse200Actor +class EventActor { /** * @var array @@ -19,7 +19,7 @@ public function isInitialized($property): bool */ protected $iD; /** - * Various key/value attributes of the object, depending on its type + * Various key/value attributes of the object, depending on its type. * * @var array|null */ @@ -47,7 +47,7 @@ public function setID(?string $iD): self return $this; } /** - * Various key/value attributes of the object, depending on its type + * Various key/value attributes of the object, depending on its type. * * @return array|null */ @@ -56,7 +56,7 @@ public function getAttributes(): ?iterable return $this->attributes; } /** - * Various key/value attributes of the object, depending on its type + * Various key/value attributes of the object, depending on its type. * * @param array|null $attributes * diff --git a/generated/Model/EventsGetResponse200.php b/generated/Model/EventMessage.php similarity index 66% rename from generated/Model/EventsGetResponse200.php rename to generated/Model/EventMessage.php index 6af18eb79..320cf8667 100644 --- a/generated/Model/EventsGetResponse200.php +++ b/generated/Model/EventMessage.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class EventsGetResponse200 +class EventMessage { /** * @var array @@ -25,11 +25,21 @@ public function isInitialized($property): bool */ protected $action; /** - * - * - * @var EventsGetResponse200Actor|null - */ + * Actor describes something that generates events, like a container, network, + or a volume. + + * + * @var EventActor|null + */ protected $actor; + /** + * Scope of the event. Engine events are `local` scope. Cluster (Swarm) + events are `swarm` scope. + + * + * @var string|null + */ + protected $scope; /** * Timestamp of event * @@ -87,27 +97,57 @@ public function setAction(?string $action): self return $this; } /** - * - * - * @return EventsGetResponse200Actor|null - */ - public function getActor(): ?EventsGetResponse200Actor + * Actor describes something that generates events, like a container, network, + or a volume. + + * + * @return EventActor|null + */ + public function getActor(): ?EventActor { return $this->actor; } /** - * - * - * @param EventsGetResponse200Actor|null $actor - * - * @return self - */ - public function setActor(?EventsGetResponse200Actor $actor): self + * Actor describes something that generates events, like a container, network, + or a volume. + + * + * @param EventActor|null $actor + * + * @return self + */ + public function setActor(?EventActor $actor): self { $this->initialized['actor'] = true; $this->actor = $actor; return $this; } + /** + * Scope of the event. Engine events are `local` scope. Cluster (Swarm) + events are `swarm` scope. + + * + * @return string|null + */ + public function getScope(): ?string + { + return $this->scope; + } + /** + * Scope of the event. Engine events are `local` scope. Cluster (Swarm) + events are `swarm` scope. + + * + * @param string|null $scope + * + * @return self + */ + public function setScope(?string $scope): self + { + $this->initialized['scope'] = true; + $this->scope = $scope; + return $this; + } /** * Timestamp of event * diff --git a/generated/Model/ExecIdJsonGetResponse200.php b/generated/Model/ExecIdJsonGetResponse200.php index 85d33a8b6..72f273e05 100644 --- a/generated/Model/ExecIdJsonGetResponse200.php +++ b/generated/Model/ExecIdJsonGetResponse200.php @@ -12,6 +12,18 @@ public function isInitialized($property): bool { return array_key_exists($property, $this->initialized); } + /** + * + * + * @var bool|null + */ + protected $canRemove; + /** + * + * + * @var string|null + */ + protected $detachKeys; /** * * @@ -66,6 +78,50 @@ public function isInitialized($property): bool * @var int|null */ protected $pid; + /** + * + * + * @return bool|null + */ + public function getCanRemove(): ?bool + { + return $this->canRemove; + } + /** + * + * + * @param bool|null $canRemove + * + * @return self + */ + public function setCanRemove(?bool $canRemove): self + { + $this->initialized['canRemove'] = true; + $this->canRemove = $canRemove; + return $this; + } + /** + * + * + * @return string|null + */ + public function getDetachKeys(): ?string + { + return $this->detachKeys; + } + /** + * + * + * @param string|null $detachKeys + * + * @return self + */ + public function setDetachKeys(?string $detachKeys): self + { + $this->initialized['detachKeys'] = true; + $this->detachKeys = $detachKeys; + return $this; + } /** * * diff --git a/generated/Model/ExecIdStartPostBody.php b/generated/Model/ExecIdStartPostBody.php index ac6cf8baa..1253b660f 100644 --- a/generated/Model/ExecIdStartPostBody.php +++ b/generated/Model/ExecIdStartPostBody.php @@ -24,6 +24,12 @@ public function isInitialized($property): bool * @var bool|null */ protected $tty; + /** + * Initial console size, as an `[height, width]` array. + * + * @var list|null + */ + protected $consoleSize; /** * Detach from the command. * @@ -68,4 +74,26 @@ public function setTty(?bool $tty): self $this->tty = $tty; return $this; } + /** + * Initial console size, as an `[height, width]` array. + * + * @return list|null + */ + public function getConsoleSize(): ?array + { + return $this->consoleSize; + } + /** + * Initial console size, as an `[height, width]` array. + * + * @param list|null $consoleSize + * + * @return self + */ + public function setConsoleSize(?array $consoleSize): self + { + $this->initialized['consoleSize'] = true; + $this->consoleSize = $consoleSize; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/ContainersIdChangesGetResponse200Item.php b/generated/Model/FilesystemChange.php similarity index 57% rename from generated/Model/ContainersIdChangesGetResponse200Item.php rename to generated/Model/FilesystemChange.php index 0c18fc487..28ff64355 100644 --- a/generated/Model/ContainersIdChangesGetResponse200Item.php +++ b/generated/Model/FilesystemChange.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class ContainersIdChangesGetResponse200Item +class FilesystemChange { /** * @var array @@ -13,19 +13,26 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * Path to file that has changed + * Path to file or directory that has changed. * * @var string|null */ protected $path; /** - * Kind of change - * - * @var int|null - */ + * Kind of change + + Can be one of: + + - `0`: Modified ("C") + - `1`: Added ("A") + - `2`: Deleted ("D") + + * + * @var int|null + */ protected $kind; /** - * Path to file that has changed + * Path to file or directory that has changed. * * @return string|null */ @@ -34,7 +41,7 @@ public function getPath(): ?string return $this->path; } /** - * Path to file that has changed + * Path to file or directory that has changed. * * @param string|null $path * @@ -47,21 +54,35 @@ public function setPath(?string $path): self return $this; } /** - * Kind of change - * - * @return int|null - */ + * Kind of change + + Can be one of: + + - `0`: Modified ("C") + - `1`: Added ("A") + - `2`: Deleted ("D") + + * + * @return int|null + */ public function getKind(): ?int { return $this->kind; } /** - * Kind of change - * - * @param int|null $kind - * - * @return self - */ + * Kind of change + + Can be one of: + + - `0`: Modified ("C") + - `1`: Added ("A") + - `2`: Deleted ("D") + + * + * @param int|null $kind + * + * @return self + */ public function setKind(?int $kind): self { $this->initialized['kind'] = true; diff --git a/generated/Model/GenericResourcesItem.php b/generated/Model/GenericResourcesItem.php new file mode 100644 index 000000000..3daf7a056 --- /dev/null +++ b/generated/Model/GenericResourcesItem.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var GenericResourcesItemNamedResourceSpec|null + */ + protected $namedResourceSpec; + /** + * + * + * @var GenericResourcesItemDiscreteResourceSpec|null + */ + protected $discreteResourceSpec; + /** + * + * + * @return GenericResourcesItemNamedResourceSpec|null + */ + public function getNamedResourceSpec(): ?GenericResourcesItemNamedResourceSpec + { + return $this->namedResourceSpec; + } + /** + * + * + * @param GenericResourcesItemNamedResourceSpec|null $namedResourceSpec + * + * @return self + */ + public function setNamedResourceSpec(?GenericResourcesItemNamedResourceSpec $namedResourceSpec): self + { + $this->initialized['namedResourceSpec'] = true; + $this->namedResourceSpec = $namedResourceSpec; + return $this; + } + /** + * + * + * @return GenericResourcesItemDiscreteResourceSpec|null + */ + public function getDiscreteResourceSpec(): ?GenericResourcesItemDiscreteResourceSpec + { + return $this->discreteResourceSpec; + } + /** + * + * + * @param GenericResourcesItemDiscreteResourceSpec|null $discreteResourceSpec + * + * @return self + */ + public function setDiscreteResourceSpec(?GenericResourcesItemDiscreteResourceSpec $discreteResourceSpec): self + { + $this->initialized['discreteResourceSpec'] = true; + $this->discreteResourceSpec = $discreteResourceSpec; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/GenericResourcesItemDiscreteResourceSpec.php b/generated/Model/GenericResourcesItemDiscreteResourceSpec.php new file mode 100644 index 000000000..c00d7dfc1 --- /dev/null +++ b/generated/Model/GenericResourcesItemDiscreteResourceSpec.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $kind; + /** + * + * + * @var int|null + */ + protected $value; + /** + * + * + * @return string|null + */ + public function getKind(): ?string + { + return $this->kind; + } + /** + * + * + * @param string|null $kind + * + * @return self + */ + public function setKind(?string $kind): self + { + $this->initialized['kind'] = true; + $this->kind = $kind; + return $this; + } + /** + * + * + * @return int|null + */ + public function getValue(): ?int + { + return $this->value; + } + /** + * + * + * @param int|null $value + * + * @return self + */ + public function setValue(?int $value): self + { + $this->initialized['value'] = true; + $this->value = $value; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/GenericResourcesItemNamedResourceSpec.php b/generated/Model/GenericResourcesItemNamedResourceSpec.php new file mode 100644 index 000000000..e7c13a401 --- /dev/null +++ b/generated/Model/GenericResourcesItemNamedResourceSpec.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $kind; + /** + * + * + * @var string|null + */ + protected $value; + /** + * + * + * @return string|null + */ + public function getKind(): ?string + { + return $this->kind; + } + /** + * + * + * @param string|null $kind + * + * @return self + */ + public function setKind(?string $kind): self + { + $this->initialized['kind'] = true; + $this->kind = $kind; + return $this; + } + /** + * + * + * @return string|null + */ + public function getValue(): ?string + { + return $this->value; + } + /** + * + * + * @param string|null $value + * + * @return self + */ + public function setValue(?string $value): self + { + $this->initialized['value'] = true; + $this->value = $value; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Health.php b/generated/Model/Health.php new file mode 100644 index 000000000..2bb1b5b39 --- /dev/null +++ b/generated/Model/Health.php @@ -0,0 +1,117 @@ +initialized); + } + /** + * Status is one of `none`, `starting`, `healthy` or `unhealthy` + + - "none" Indicates there is no healthcheck + - "starting" Starting indicates that the container is not yet ready + - "healthy" Healthy indicates that the container is running correctly + - "unhealthy" Unhealthy indicates that the container has a problem + + * + * @var string|null + */ + protected $status; + /** + * FailingStreak is the number of consecutive failures + * + * @var int|null + */ + protected $failingStreak; + /** + * Log contains the last few results (oldest first) + * + * @var list|null + */ + protected $log; + /** + * Status is one of `none`, `starting`, `healthy` or `unhealthy` + + - "none" Indicates there is no healthcheck + - "starting" Starting indicates that the container is not yet ready + - "healthy" Healthy indicates that the container is running correctly + - "unhealthy" Unhealthy indicates that the container has a problem + + * + * @return string|null + */ + public function getStatus(): ?string + { + return $this->status; + } + /** + * Status is one of `none`, `starting`, `healthy` or `unhealthy` + + - "none" Indicates there is no healthcheck + - "starting" Starting indicates that the container is not yet ready + - "healthy" Healthy indicates that the container is running correctly + - "unhealthy" Unhealthy indicates that the container has a problem + + * + * @param string|null $status + * + * @return self + */ + public function setStatus(?string $status): self + { + $this->initialized['status'] = true; + $this->status = $status; + return $this; + } + /** + * FailingStreak is the number of consecutive failures + * + * @return int|null + */ + public function getFailingStreak(): ?int + { + return $this->failingStreak; + } + /** + * FailingStreak is the number of consecutive failures + * + * @param int|null $failingStreak + * + * @return self + */ + public function setFailingStreak(?int $failingStreak): self + { + $this->initialized['failingStreak'] = true; + $this->failingStreak = $failingStreak; + return $this; + } + /** + * Log contains the last few results (oldest first) + * + * @return list|null + */ + public function getLog(): ?array + { + return $this->log; + } + /** + * Log contains the last few results (oldest first) + * + * @param list|null $log + * + * @return self + */ + public function setLog(?array $log): self + { + $this->initialized['log'] = true; + $this->log = $log; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/HealthConfig.php b/generated/Model/HealthConfig.php new file mode 100644 index 000000000..588bed230 --- /dev/null +++ b/generated/Model/HealthConfig.php @@ -0,0 +1,234 @@ +initialized); + } + /** + * The test to perform. Possible values are: + + - `[]` inherit healthcheck from image or parent image + - `["NONE"]` disable healthcheck + - `["CMD", args...]` exec arguments directly + - `["CMD-SHELL", command]` run command with system's default shell + + * + * @var list|null + */ + protected $test; + /** + * The time to wait between checks in nanoseconds. It should be 0 or at + least 1000000 (1 ms). 0 means inherit. + + * + * @var int|null + */ + protected $interval; + /** + * The time to wait before considering the check to have hung. It should + be 0 or at least 1000000 (1 ms). 0 means inherit. + + * + * @var int|null + */ + protected $timeout; + /** + * The number of consecutive failures needed to consider a container as + unhealthy. 0 means inherit. + + * + * @var int|null + */ + protected $retries; + /** + * Start period for the container to initialize before starting + health-retries countdown in nanoseconds. It should be 0 or at least + 1000000 (1 ms). 0 means inherit. + + * + * @var int|null + */ + protected $startPeriod; + /** + * The time to wait between checks in nanoseconds during the start period. + It should be 0 or at least 1000000 (1 ms). 0 means inherit. + + * + * @var int|null + */ + protected $startInterval; + /** + * The test to perform. Possible values are: + + - `[]` inherit healthcheck from image or parent image + - `["NONE"]` disable healthcheck + - `["CMD", args...]` exec arguments directly + - `["CMD-SHELL", command]` run command with system's default shell + + * + * @return list|null + */ + public function getTest(): ?array + { + return $this->test; + } + /** + * The test to perform. Possible values are: + + - `[]` inherit healthcheck from image or parent image + - `["NONE"]` disable healthcheck + - `["CMD", args...]` exec arguments directly + - `["CMD-SHELL", command]` run command with system's default shell + + * + * @param list|null $test + * + * @return self + */ + public function setTest(?array $test): self + { + $this->initialized['test'] = true; + $this->test = $test; + return $this; + } + /** + * The time to wait between checks in nanoseconds. It should be 0 or at + least 1000000 (1 ms). 0 means inherit. + + * + * @return int|null + */ + public function getInterval(): ?int + { + return $this->interval; + } + /** + * The time to wait between checks in nanoseconds. It should be 0 or at + least 1000000 (1 ms). 0 means inherit. + + * + * @param int|null $interval + * + * @return self + */ + public function setInterval(?int $interval): self + { + $this->initialized['interval'] = true; + $this->interval = $interval; + return $this; + } + /** + * The time to wait before considering the check to have hung. It should + be 0 or at least 1000000 (1 ms). 0 means inherit. + + * + * @return int|null + */ + public function getTimeout(): ?int + { + return $this->timeout; + } + /** + * The time to wait before considering the check to have hung. It should + be 0 or at least 1000000 (1 ms). 0 means inherit. + + * + * @param int|null $timeout + * + * @return self + */ + public function setTimeout(?int $timeout): self + { + $this->initialized['timeout'] = true; + $this->timeout = $timeout; + return $this; + } + /** + * The number of consecutive failures needed to consider a container as + unhealthy. 0 means inherit. + + * + * @return int|null + */ + public function getRetries(): ?int + { + return $this->retries; + } + /** + * The number of consecutive failures needed to consider a container as + unhealthy. 0 means inherit. + + * + * @param int|null $retries + * + * @return self + */ + public function setRetries(?int $retries): self + { + $this->initialized['retries'] = true; + $this->retries = $retries; + return $this; + } + /** + * Start period for the container to initialize before starting + health-retries countdown in nanoseconds. It should be 0 or at least + 1000000 (1 ms). 0 means inherit. + + * + * @return int|null + */ + public function getStartPeriod(): ?int + { + return $this->startPeriod; + } + /** + * Start period for the container to initialize before starting + health-retries countdown in nanoseconds. It should be 0 or at least + 1000000 (1 ms). 0 means inherit. + + * + * @param int|null $startPeriod + * + * @return self + */ + public function setStartPeriod(?int $startPeriod): self + { + $this->initialized['startPeriod'] = true; + $this->startPeriod = $startPeriod; + return $this; + } + /** + * The time to wait between checks in nanoseconds during the start period. + It should be 0 or at least 1000000 (1 ms). 0 means inherit. + + * + * @return int|null + */ + public function getStartInterval(): ?int + { + return $this->startInterval; + } + /** + * The time to wait between checks in nanoseconds during the start period. + It should be 0 or at least 1000000 (1 ms). 0 means inherit. + + * + * @param int|null $startInterval + * + * @return self + */ + public function setStartInterval(?int $startInterval): self + { + $this->initialized['startInterval'] = true; + $this->startInterval = $startInterval; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/HealthcheckResult.php b/generated/Model/HealthcheckResult.php new file mode 100644 index 000000000..13bea4d4c --- /dev/null +++ b/generated/Model/HealthcheckResult.php @@ -0,0 +1,157 @@ +initialized); + } + /** + * Date and time at which this check started in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @var \DateTime|null + */ + protected $start; + /** + * Date and time at which this check ended in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @var string|null + */ + protected $end; + /** + * ExitCode meanings: + + - `0` healthy + - `1` unhealthy + - `2` reserved (considered unhealthy) + - other values: error running probe + + * + * @var int|null + */ + protected $exitCode; + /** + * Output from last check + * + * @var string|null + */ + protected $output; + /** + * Date and time at which this check started in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @return \DateTime|null + */ + public function getStart(): ?\DateTime + { + return $this->start; + } + /** + * Date and time at which this check started in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @param \DateTime|null $start + * + * @return self + */ + public function setStart(?\DateTime $start): self + { + $this->initialized['start'] = true; + $this->start = $start; + return $this; + } + /** + * Date and time at which this check ended in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @return string|null + */ + public function getEnd(): ?string + { + return $this->end; + } + /** + * Date and time at which this check ended in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @param string|null $end + * + * @return self + */ + public function setEnd(?string $end): self + { + $this->initialized['end'] = true; + $this->end = $end; + return $this; + } + /** + * ExitCode meanings: + + - `0` healthy + - `1` unhealthy + - `2` reserved (considered unhealthy) + - other values: error running probe + + * + * @return int|null + */ + public function getExitCode(): ?int + { + return $this->exitCode; + } + /** + * ExitCode meanings: + + - `0` healthy + - `1` unhealthy + - `2` reserved (considered unhealthy) + - other values: error running probe + + * + * @param int|null $exitCode + * + * @return self + */ + public function setExitCode(?int $exitCode): self + { + $this->initialized['exitCode'] = true; + $this->exitCode = $exitCode; + return $this; + } + /** + * Output from last check + * + * @return string|null + */ + public function getOutput(): ?string + { + return $this->output; + } + /** + * Output from last check + * + * @param string|null $output + * + * @return self + */ + public function setOutput(?string $output): self + { + $this->initialized['output'] = true; + $this->output = $output; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/HostConfig.php b/generated/Model/HostConfig.php index a157de352..f9513fa0a 100644 --- a/generated/Model/HostConfig.php +++ b/generated/Model/HostConfig.php @@ -13,10 +13,12 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * An integer value representing this container's relative CPU weight versus other containers. - * - * @var int|null - */ + * An integer value representing this container's relative CPU weight + versus other containers. + + * + * @var int|null + */ protected $cpuShares; /** * Memory limit in bytes. @@ -25,10 +27,14 @@ public function isInitialized($property): bool */ protected $memory = 0; /** - * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. - * - * @var string|null - */ + * Path to `cgroups` under which the container's `cgroup` is created. If + the path is not absolute, the path is considered to be relative to the + `cgroups` path of the init process. Cgroups are created if they do not + already exist. + + * + * @var string|null + */ protected $cgroupParent; /** * Block IO weight (relative weight). @@ -37,34 +43,59 @@ public function isInitialized($property): bool */ protected $blkioWeight; /** - * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. - * - * @var list|null - */ + * Block IO weight (relative device weight) in the form: + + ``` + [{"Path": "device_path", "Weight": weight}] + ``` + + * + * @var list|null + */ protected $blkioWeightDevice; /** - * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @var list|null - */ + * Limit read rate (bytes per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @var list|null + */ protected $blkioDeviceReadBps; /** - * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @var list|null - */ + * Limit write rate (bytes per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @var list|null + */ protected $blkioDeviceWriteBps; /** - * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @var list|null - */ + * Limit read rate (IO per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @var list|null + */ protected $blkioDeviceReadIOps; /** - * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @var list|null - */ + * Limit write rate (IO per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @var list|null + */ protected $blkioDeviceWriteIOps; /** * The length of a CPU period in microseconds. @@ -79,28 +110,34 @@ public function isInitialized($property): bool */ protected $cpuQuota; /** - * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @var int|null - */ + * The length of a CPU real-time period in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @var int|null + */ protected $cpuRealtimePeriod; /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @var int|null - */ + * The length of a CPU real-time runtime in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @var int|null + */ protected $cpuRealtimeRuntime; /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * * @var string|null */ protected $cpusetCpus; /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. - * - * @var string|null - */ + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + effective on NUMA systems. + + * + * @var string|null + */ protected $cpusetMems; /** * A list of devices to add to the container. @@ -109,17 +146,28 @@ public function isInitialized($property): bool */ protected $devices; /** - * Disk limit (in bytes). + * a list of cgroup rules to apply to the container * - * @var int|null + * @var list|null */ - protected $diskQuota; + protected $deviceCgroupRules; /** - * Kernel memory limit in bytes. + * A list of requests for devices to be sent to device drivers. * - * @var int|null + * @var list|null */ - protected $kernelMemory; + protected $deviceRequests; + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + OCI runtime in use, this option may be ignored. It is no longer supported + by the default (runc) runtime. + + This field is omitted when empty. + + * + * @var int|null + */ + protected $kernelMemoryTCP; /** * Memory soft limit in bytes. * @@ -127,16 +175,20 @@ public function isInitialized($property): bool */ protected $memoryReservation; /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. - * - * @var int|null - */ + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + swap. + + * + * @var int|null + */ protected $memorySwap; /** - * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. - * - * @var int|null - */ + * Tune a container's memory swappiness behavior. Accepts an integer + between 0 and 100. + + * + * @var int|null + */ protected $memorySwappiness; /** * CPU quota in units of 10-9 CPUs. @@ -151,21 +203,39 @@ public function isInitialized($property): bool */ protected $oomKillDisable; /** - * Tune a container's pids limit. Set -1 for unlimited. - * - * @var int|null - */ + * Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + + * + * @var bool|null + */ + protected $init; + /** + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + to not change. + + * + * @var int|null + */ protected $pidsLimit; /** - * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" - * - * @var list|null - */ + * A list of resource limits to set in the container. For example: + + ``` + {"Name": "nofile", "Soft": 1024, "Hard": 2048} + ``` + + * + * @var list|null + */ protected $ulimits; /** * The number of usable CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @var int|null @@ -174,7 +244,9 @@ public function isInitialized($property): bool /** * The usable percentage of the available CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @var int|null @@ -187,18 +259,52 @@ public function isInitialized($property): bool */ protected $iOMaximumIOps; /** - * Maximum IO in bytes per second for the container system drive (Windows only) - * - * @var int|null - */ + * Maximum IO in bytes per second for the container system drive + (Windows only). + + * + * @var int|null + */ protected $iOMaximumBandwidth; /** - * A list of volume bindings for this container. Each volume binding is a string in one of these forms: + * A list of volume bindings for this container. Each volume binding + is a string in one of these forms: + + - `host-src:container-dest[:options]` to bind-mount a host path + into the container. Both `host-src`, and `container-dest` must + be an _absolute_ path. + - `volume-name:container-dest[:options]` to bind-mount a volume + managed by a volume driver into the container. `container-dest` + must be an _absolute_ path. - - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - - `host-src:container-dest:ro` to make the bind-mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. - - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path. + `options` is an optional, comma-delimited list of: + + - `nocopy` disables automatic copying of data from the container + path to the volume. The `nocopy` flag only applies to named volumes. + - `[ro|rw]` mounts a volume read-only or read-write, respectively. + If omitted or set to `rw`, volumes are mounted read-write. + - `[z|Z]` applies SELinux labels to allow or deny multiple containers + to read and write to the same volume. + - `z`: a _shared_ content label is applied to the content. This + label indicates that multiple containers can share the volume + content, for both reading and writing. + - `Z`: a _private unshared_ label is applied to the content. + This label indicates that only the current container can use + a private volume. Labeling systems such as SELinux require + proper labels to be placed on volume content that is mounted + into a container. Without a label, the security system can + prevent a container's processes from using the content. By + default, the labels set by the host operating system are not + modified. + - `[[r]shared|[r]slave|[r]private]` specifies mount + [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). + This only applies to bind-mounted volumes, not internal volumes + or named volumes. Mount propagation requires the source mount + point (the location where the source directory is mounted in the + host operating system) to have the correct propagation properties. + For shared volumes, the source mount point must be set to `shared`. + For slave volumes, the mount must be set to either `shared` or + `slave`. * * @var list|null @@ -217,31 +323,45 @@ public function isInitialized($property): bool */ protected $logConfig; /** - * Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name to which this container should connect to. - * - * @var string|null - */ + * Network mode to use for this container. Supported standard values + are: `bridge`, `host`, `none`, and `container:`. Any + other value is taken as a custom network's name to which this + container should connect to. + + * + * @var string|null + */ protected $networkMode; /** - * A map of exposed container ports and the host port they should map to. - * - * @var array|null - */ + * PortMap describes the mapping of container ports to host ports, using the + container's port-number and protocol as key in the format `/`, + for example, `80/udp`. + + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. + + * + * @var array>|null + */ protected $portBindings; /** - * The behavior to apply when the container exits. The default is not to restart. + * The behavior to apply when the container exits. The default is not to + restart. - An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + An ever increasing delay (double the previous delay, starting at 100ms) is + added before each restart to prevent flooding the server. * * @var RestartPolicy|null */ protected $restartPolicy; /** - * Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set. - * - * @var bool|null - */ + * Automatically remove the container when the container's process + exits. This has no effect if `RestartPolicy` is set. + + * + * @var bool|null + */ protected $autoRemove; /** * Driver that this container uses to mount volumes. @@ -250,10 +370,12 @@ public function isInitialized($property): bool */ protected $volumeDriver; /** - * A list of volumes to inherit from another container, specified in the form `[:]`. - * - * @var list|null - */ + * A list of volumes to inherit from another container, specified in + the form `[:]`. + + * + * @var list|null + */ protected $volumesFrom; /** * Specification for mounts to be added to the container. @@ -262,17 +384,48 @@ public function isInitialized($property): bool */ protected $mounts; /** - * A list of kernel capabilities to add to the container. + * Initial console size, as an `[height, width]` array. * - * @var list|null + * @var list|null */ + protected $consoleSize; + /** + * Arbitrary non-identifying metadata attached to container and + provided to the runtime when the container is started. + + * + * @var array|null + */ + protected $annotations; + /** + * A list of kernel capabilities to add to the container. Conflicts + with option 'Capabilities'. + + * + * @var list|null + */ protected $capAdd; /** - * A list of kernel capabilities to drop from the container. - * - * @var list|null - */ + * A list of kernel capabilities to drop from the container. Conflicts + with option 'Capabilities'. + + * + * @var list|null + */ protected $capDrop; + /** + * cgroup namespace mode for the container. Possible values are: + + - `"private"`: the container runs in its own private cgroup namespace + - `"host"`: use the host system's cgroup namespace + + If not specified, the daemon default is used, which can either be `"private"` + or `"host"`, depending on daemon version, kernel support and configuration. + + * + * @var string|null + */ + protected $cgroupnsMode; /** * A list of DNS servers for the container to use. * @@ -292,10 +445,12 @@ public function isInitialized($property): bool */ protected $dnsSearch; /** - * A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`. - * - * @var list|null - */ + * A list of hostnames/IP mappings to add to the container's `/etc/hosts` + file. Specified in the form `["hostname:IP"]`. + + * + * @var list|null + */ protected $extraHosts; /** * A list of additional groups that the container process will run as. @@ -304,10 +459,20 @@ public function isInitialized($property): bool */ protected $groupAdd; /** - * IPC namespace to use for the container. - * - * @var string|null - */ + * IPC sharing mode for the container. Possible values are: + + - `"none"`: own private IPC namespace, with /dev/shm not mounted + - `"private"`: own private IPC namespace + - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers + - `"container:"`: join another (shareable) container's IPC namespace + - `"host"`: use the host system's IPC namespace + + If not specified, daemon default is used, which can either be `"private"` + or `"shareable"`, depending on daemon version and configuration. + + * + * @var string|null + */ protected $ipcMode; /** * Cgroup to use for the container. @@ -322,13 +487,16 @@ public function isInitialized($property): bool */ protected $links; /** - * An integer value containing the score given to the container in order to tune OOM killer preferences. - * - * @var int|null - */ + * An integer value containing the score given to the container in + order to tune OOM killer preferences. + + * + * @var int|null + */ protected $oomScoreAdj; /** - * Set the PID (Process) Namespace mode for the container. It can be either: + * Set the PID (Process) Namespace mode for the container. It can be + either: - `"container:"`: joins another container's PID namespace - `"host"`: use the host's PID namespace inside the container @@ -344,10 +512,20 @@ public function isInitialized($property): bool */ protected $privileged; /** - * Allocates a random host port for all of a container's exposed ports. - * - * @var bool|null - */ + * Allocates an ephemeral host port for all of a container's + exposed ports. + + Ports are de-allocated when the container stops and allocated when + the container starts. The allocated port might be changed when + restarting the container. + + The port is selected from the ephemeral port range that depends on + the kernel. For example, on Linux the range is defined by + `/proc/sys/net/ipv4/ip_local_port_range`. + + * + * @var bool|null + */ protected $publishAllPorts; /** * Mount the container's root filesystem as read only. @@ -356,10 +534,12 @@ public function isInitialized($property): bool */ protected $readonlyRootfs; /** - * A list of string values to customize labels for MLS systems, such as SELinux. - * - * @var list|null - */ + * A list of string values to customize labels for MLS systems, such + as SELinux. + + * + * @var list|null + */ protected $securityOpt; /** * Storage driver options for this container, in the form `{"size": "120G"}`. @@ -368,10 +548,16 @@ public function isInitialized($property): bool */ protected $storageOpt; /** - * A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ "/run": "rw,noexec,nosuid,size=65536k" }`. - * - * @var array|null - */ + * A map of container directories which should be replaced by tmpfs + mounts, and their corresponding mount options. For example: + + ``` + { "/run": "rw,noexec,nosuid,size=65536k" } + ``` + + * + * @var array|null + */ protected $tmpfs; /** * UTS namespace to use for the container. @@ -380,10 +566,12 @@ public function isInitialized($property): bool */ protected $uTSMode; /** - * Sets the usernamespace mode for the container when usernamespace remapping option is enabled. - * - * @var string|null - */ + * Sets the usernamespace mode for the container when usernamespace + remapping option is enabled. + + * + * @var string|null + */ protected $usernsMode; /** * Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. @@ -392,10 +580,16 @@ public function isInitialized($property): bool */ protected $shmSize; /** - * A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}` - * - * @var array|null - */ + * A list of kernel parameters (sysctls) to set in the container. + For example: + + ``` + {"net.ipv4.ip_forward": "1"} + ``` + + * + * @var array|null + */ protected $sysctls; /** * Runtime to use with this container. @@ -403,12 +597,6 @@ public function isInitialized($property): bool * @var string|null */ protected $runtime; - /** - * Initial console size, as an `[height, width]` array. (Windows only) - * - * @var list|null - */ - protected $consoleSize; /** * Isolation technology of the container. (Windows only) * @@ -416,21 +604,41 @@ public function isInitialized($property): bool */ protected $isolation; /** - * An integer value representing this container's relative CPU weight versus other containers. - * - * @return int|null - */ + * The list of paths to be masked inside the container (this overrides + the default set of paths). + + * + * @var list|null + */ + protected $maskedPaths; + /** + * The list of paths to be set as read-only inside the container + (this overrides the default set of paths). + + * + * @var list|null + */ + protected $readonlyPaths; + /** + * An integer value representing this container's relative CPU weight + versus other containers. + + * + * @return int|null + */ public function getCpuShares(): ?int { return $this->cpuShares; } /** - * An integer value representing this container's relative CPU weight versus other containers. - * - * @param int|null $cpuShares - * - * @return self - */ + * An integer value representing this container's relative CPU weight + versus other containers. + + * + * @param int|null $cpuShares + * + * @return self + */ public function setCpuShares(?int $cpuShares): self { $this->initialized['cpuShares'] = true; @@ -460,21 +668,29 @@ public function setMemory(?int $memory): self return $this; } /** - * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. - * - * @return string|null - */ + * Path to `cgroups` under which the container's `cgroup` is created. If + the path is not absolute, the path is considered to be relative to the + `cgroups` path of the init process. Cgroups are created if they do not + already exist. + + * + * @return string|null + */ public function getCgroupParent(): ?string { return $this->cgroupParent; } /** - * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. - * - * @param string|null $cgroupParent - * - * @return self - */ + * Path to `cgroups` under which the container's `cgroup` is created. If + the path is not absolute, the path is considered to be relative to the + `cgroups` path of the init process. Cgroups are created if they do not + already exist. + + * + * @param string|null $cgroupParent + * + * @return self + */ public function setCgroupParent(?string $cgroupParent): self { $this->initialized['cgroupParent'] = true; @@ -504,21 +720,31 @@ public function setBlkioWeight(?int $blkioWeight): self return $this; } /** - * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. - * - * @return list|null - */ + * Block IO weight (relative device weight) in the form: + + ``` + [{"Path": "device_path", "Weight": weight}] + ``` + + * + * @return list|null + */ public function getBlkioWeightDevice(): ?array { return $this->blkioWeightDevice; } /** - * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. - * - * @param list|null $blkioWeightDevice - * - * @return self - */ + * Block IO weight (relative device weight) in the form: + + ``` + [{"Path": "device_path", "Weight": weight}] + ``` + + * + * @param list|null $blkioWeightDevice + * + * @return self + */ public function setBlkioWeightDevice(?array $blkioWeightDevice): self { $this->initialized['blkioWeightDevice'] = true; @@ -526,21 +752,31 @@ public function setBlkioWeightDevice(?array $blkioWeightDevice): self return $this; } /** - * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @return list|null - */ + * Limit read rate (bytes per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @return list|null + */ public function getBlkioDeviceReadBps(): ?array { return $this->blkioDeviceReadBps; } /** - * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @param list|null $blkioDeviceReadBps - * - * @return self - */ + * Limit read rate (bytes per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @param list|null $blkioDeviceReadBps + * + * @return self + */ public function setBlkioDeviceReadBps(?array $blkioDeviceReadBps): self { $this->initialized['blkioDeviceReadBps'] = true; @@ -548,21 +784,31 @@ public function setBlkioDeviceReadBps(?array $blkioDeviceReadBps): self return $this; } /** - * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @return list|null - */ + * Limit write rate (bytes per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @return list|null + */ public function getBlkioDeviceWriteBps(): ?array { return $this->blkioDeviceWriteBps; } /** - * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @param list|null $blkioDeviceWriteBps - * - * @return self - */ + * Limit write rate (bytes per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @param list|null $blkioDeviceWriteBps + * + * @return self + */ public function setBlkioDeviceWriteBps(?array $blkioDeviceWriteBps): self { $this->initialized['blkioDeviceWriteBps'] = true; @@ -570,21 +816,31 @@ public function setBlkioDeviceWriteBps(?array $blkioDeviceWriteBps): self return $this; } /** - * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @return list|null - */ + * Limit read rate (IO per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @return list|null + */ public function getBlkioDeviceReadIOps(): ?array { return $this->blkioDeviceReadIOps; } /** - * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @param list|null $blkioDeviceReadIOps - * - * @return self - */ + * Limit read rate (IO per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @param list|null $blkioDeviceReadIOps + * + * @return self + */ public function setBlkioDeviceReadIOps(?array $blkioDeviceReadIOps): self { $this->initialized['blkioDeviceReadIOps'] = true; @@ -592,21 +848,31 @@ public function setBlkioDeviceReadIOps(?array $blkioDeviceReadIOps): self return $this; } /** - * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @return list|null - */ + * Limit write rate (IO per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @return list|null + */ public function getBlkioDeviceWriteIOps(): ?array { return $this->blkioDeviceWriteIOps; } /** - * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @param list|null $blkioDeviceWriteIOps - * - * @return self - */ + * Limit write rate (IO per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @param list|null $blkioDeviceWriteIOps + * + * @return self + */ public function setBlkioDeviceWriteIOps(?array $blkioDeviceWriteIOps): self { $this->initialized['blkioDeviceWriteIOps'] = true; @@ -658,21 +924,25 @@ public function setCpuQuota(?int $cpuQuota): self return $this; } /** - * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @return int|null - */ + * The length of a CPU real-time period in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @return int|null + */ public function getCpuRealtimePeriod(): ?int { return $this->cpuRealtimePeriod; } /** - * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @param int|null $cpuRealtimePeriod - * - * @return self - */ + * The length of a CPU real-time period in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @param int|null $cpuRealtimePeriod + * + * @return self + */ public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self { $this->initialized['cpuRealtimePeriod'] = true; @@ -680,21 +950,25 @@ public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self return $this; } /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @return int|null - */ + * The length of a CPU real-time runtime in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @return int|null + */ public function getCpuRealtimeRuntime(): ?int { return $this->cpuRealtimeRuntime; } /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @param int|null $cpuRealtimeRuntime - * - * @return self - */ + * The length of a CPU real-time runtime in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @param int|null $cpuRealtimeRuntime + * + * @return self + */ public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self { $this->initialized['cpuRealtimeRuntime'] = true; @@ -702,7 +976,7 @@ public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self return $this; } /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * * @return string|null */ @@ -711,7 +985,7 @@ public function getCpusetCpus(): ?string return $this->cpusetCpus; } /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * * @param string|null $cpusetCpus * @@ -724,21 +998,25 @@ public function setCpusetCpus(?string $cpusetCpus): self return $this; } /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. - * - * @return string|null - */ + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + effective on NUMA systems. + + * + * @return string|null + */ public function getCpusetMems(): ?string { return $this->cpusetMems; } /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. - * - * @param string|null $cpusetMems - * - * @return self - */ + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + effective on NUMA systems. + + * + * @param string|null $cpusetMems + * + * @return self + */ public function setCpusetMems(?string $cpusetMems): self { $this->initialized['cpusetMems'] = true; @@ -768,47 +1046,79 @@ public function setDevices(?array $devices): self return $this; } /** - * Disk limit (in bytes). + * a list of cgroup rules to apply to the container * - * @return int|null + * @return list|null */ - public function getDiskQuota(): ?int + public function getDeviceCgroupRules(): ?array { - return $this->diskQuota; + return $this->deviceCgroupRules; } /** - * Disk limit (in bytes). + * a list of cgroup rules to apply to the container * - * @param int|null $diskQuota + * @param list|null $deviceCgroupRules * * @return self */ - public function setDiskQuota(?int $diskQuota): self + public function setDeviceCgroupRules(?array $deviceCgroupRules): self { - $this->initialized['diskQuota'] = true; - $this->diskQuota = $diskQuota; + $this->initialized['deviceCgroupRules'] = true; + $this->deviceCgroupRules = $deviceCgroupRules; return $this; } /** - * Kernel memory limit in bytes. + * A list of requests for devices to be sent to device drivers. * - * @return int|null + * @return list|null */ - public function getKernelMemory(): ?int + public function getDeviceRequests(): ?array { - return $this->kernelMemory; + return $this->deviceRequests; } /** - * Kernel memory limit in bytes. + * A list of requests for devices to be sent to device drivers. * - * @param int|null $kernelMemory + * @param list|null $deviceRequests * * @return self */ - public function setKernelMemory(?int $kernelMemory): self + public function setDeviceRequests(?array $deviceRequests): self + { + $this->initialized['deviceRequests'] = true; + $this->deviceRequests = $deviceRequests; + return $this; + } + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + OCI runtime in use, this option may be ignored. It is no longer supported + by the default (runc) runtime. + + This field is omitted when empty. + + * + * @return int|null + */ + public function getKernelMemoryTCP(): ?int + { + return $this->kernelMemoryTCP; + } + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + OCI runtime in use, this option may be ignored. It is no longer supported + by the default (runc) runtime. + + This field is omitted when empty. + + * + * @param int|null $kernelMemoryTCP + * + * @return self + */ + public function setKernelMemoryTCP(?int $kernelMemoryTCP): self { - $this->initialized['kernelMemory'] = true; - $this->kernelMemory = $kernelMemory; + $this->initialized['kernelMemoryTCP'] = true; + $this->kernelMemoryTCP = $kernelMemoryTCP; return $this; } /** @@ -834,21 +1144,25 @@ public function setMemoryReservation(?int $memoryReservation): self return $this; } /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. - * - * @return int|null - */ + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + swap. + + * + * @return int|null + */ public function getMemorySwap(): ?int { return $this->memorySwap; } /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. - * - * @param int|null $memorySwap - * - * @return self - */ + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + swap. + + * + * @param int|null $memorySwap + * + * @return self + */ public function setMemorySwap(?int $memorySwap): self { $this->initialized['memorySwap'] = true; @@ -856,21 +1170,25 @@ public function setMemorySwap(?int $memorySwap): self return $this; } /** - * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. - * - * @return int|null - */ + * Tune a container's memory swappiness behavior. Accepts an integer + between 0 and 100. + + * + * @return int|null + */ public function getMemorySwappiness(): ?int { return $this->memorySwappiness; } /** - * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. - * - * @param int|null $memorySwappiness - * - * @return self - */ + * Tune a container's memory swappiness behavior. Accepts an integer + between 0 and 100. + + * + * @param int|null $memorySwappiness + * + * @return self + */ public function setMemorySwappiness(?int $memorySwappiness): self { $this->initialized['memorySwappiness'] = true; @@ -922,21 +1240,53 @@ public function setOomKillDisable(?bool $oomKillDisable): self return $this; } /** - * Tune a container's pids limit. Set -1 for unlimited. - * - * @return int|null - */ + * Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + + * + * @return bool|null + */ + public function getInit(): ?bool + { + return $this->init; + } + /** + * Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + + * + * @param bool|null $init + * + * @return self + */ + public function setInit(?bool $init): self + { + $this->initialized['init'] = true; + $this->init = $init; + return $this; + } + /** + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + to not change. + + * + * @return int|null + */ public function getPidsLimit(): ?int { return $this->pidsLimit; } /** - * Tune a container's pids limit. Set -1 for unlimited. - * - * @param int|null $pidsLimit - * - * @return self - */ + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + to not change. + + * + * @param int|null $pidsLimit + * + * @return self + */ public function setPidsLimit(?int $pidsLimit): self { $this->initialized['pidsLimit'] = true; @@ -944,21 +1294,31 @@ public function setPidsLimit(?int $pidsLimit): self return $this; } /** - * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" - * - * @return list|null - */ + * A list of resource limits to set in the container. For example: + + ``` + {"Name": "nofile", "Soft": 1024, "Hard": 2048} + ``` + + * + * @return list|null + */ public function getUlimits(): ?array { return $this->ulimits; } /** - * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" - * - * @param list|null $ulimits - * - * @return self - */ + * A list of resource limits to set in the container. For example: + + ``` + {"Name": "nofile", "Soft": 1024, "Hard": 2048} + ``` + + * + * @param list|null $ulimits + * + * @return self + */ public function setUlimits(?array $ulimits): self { $this->initialized['ulimits'] = true; @@ -968,7 +1328,9 @@ public function setUlimits(?array $ulimits): self /** * The number of usable CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @return int|null @@ -980,7 +1342,9 @@ public function getCpuCount(): ?int /** * The number of usable CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @param int|null $cpuCount @@ -996,7 +1360,9 @@ public function setCpuCount(?int $cpuCount): self /** * The usable percentage of the available CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @return int|null @@ -1008,7 +1374,9 @@ public function getCpuPercent(): ?int /** * The usable percentage of the available CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @param int|null $cpuPercent @@ -1044,21 +1412,25 @@ public function setIOMaximumIOps(?int $iOMaximumIOps): self return $this; } /** - * Maximum IO in bytes per second for the container system drive (Windows only) - * - * @return int|null - */ + * Maximum IO in bytes per second for the container system drive + (Windows only). + + * + * @return int|null + */ public function getIOMaximumBandwidth(): ?int { return $this->iOMaximumBandwidth; } /** - * Maximum IO in bytes per second for the container system drive (Windows only) - * - * @param int|null $iOMaximumBandwidth - * - * @return self - */ + * Maximum IO in bytes per second for the container system drive + (Windows only). + + * + * @param int|null $iOMaximumBandwidth + * + * @return self + */ public function setIOMaximumBandwidth(?int $iOMaximumBandwidth): self { $this->initialized['iOMaximumBandwidth'] = true; @@ -1066,12 +1438,44 @@ public function setIOMaximumBandwidth(?int $iOMaximumBandwidth): self return $this; } /** - * A list of volume bindings for this container. Each volume binding is a string in one of these forms: + * A list of volume bindings for this container. Each volume binding + is a string in one of these forms: + + - `host-src:container-dest[:options]` to bind-mount a host path + into the container. Both `host-src`, and `container-dest` must + be an _absolute_ path. + - `volume-name:container-dest[:options]` to bind-mount a volume + managed by a volume driver into the container. `container-dest` + must be an _absolute_ path. - - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - - `host-src:container-dest:ro` to make the bind-mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. - - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path. + `options` is an optional, comma-delimited list of: + + - `nocopy` disables automatic copying of data from the container + path to the volume. The `nocopy` flag only applies to named volumes. + - `[ro|rw]` mounts a volume read-only or read-write, respectively. + If omitted or set to `rw`, volumes are mounted read-write. + - `[z|Z]` applies SELinux labels to allow or deny multiple containers + to read and write to the same volume. + - `z`: a _shared_ content label is applied to the content. This + label indicates that multiple containers can share the volume + content, for both reading and writing. + - `Z`: a _private unshared_ label is applied to the content. + This label indicates that only the current container can use + a private volume. Labeling systems such as SELinux require + proper labels to be placed on volume content that is mounted + into a container. Without a label, the security system can + prevent a container's processes from using the content. By + default, the labels set by the host operating system are not + modified. + - `[[r]shared|[r]slave|[r]private]` specifies mount + [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). + This only applies to bind-mounted volumes, not internal volumes + or named volumes. Mount propagation requires the source mount + point (the location where the source directory is mounted in the + host operating system) to have the correct propagation properties. + For shared volumes, the source mount point must be set to `shared`. + For slave volumes, the mount must be set to either `shared` or + `slave`. * * @return list|null @@ -1081,12 +1485,44 @@ public function getBinds(): ?array return $this->binds; } /** - * A list of volume bindings for this container. Each volume binding is a string in one of these forms: + * A list of volume bindings for this container. Each volume binding + is a string in one of these forms: + + - `host-src:container-dest[:options]` to bind-mount a host path + into the container. Both `host-src`, and `container-dest` must + be an _absolute_ path. + - `volume-name:container-dest[:options]` to bind-mount a volume + managed by a volume driver into the container. `container-dest` + must be an _absolute_ path. - - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - - `host-src:container-dest:ro` to make the bind-mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. - - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path. + `options` is an optional, comma-delimited list of: + + - `nocopy` disables automatic copying of data from the container + path to the volume. The `nocopy` flag only applies to named volumes. + - `[ro|rw]` mounts a volume read-only or read-write, respectively. + If omitted or set to `rw`, volumes are mounted read-write. + - `[z|Z]` applies SELinux labels to allow or deny multiple containers + to read and write to the same volume. + - `z`: a _shared_ content label is applied to the content. This + label indicates that multiple containers can share the volume + content, for both reading and writing. + - `Z`: a _private unshared_ label is applied to the content. + This label indicates that only the current container can use + a private volume. Labeling systems such as SELinux require + proper labels to be placed on volume content that is mounted + into a container. Without a label, the security system can + prevent a container's processes from using the content. By + default, the labels set by the host operating system are not + modified. + - `[[r]shared|[r]slave|[r]private]` specifies mount + [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). + This only applies to bind-mounted volumes, not internal volumes + or named volumes. Mount propagation requires the source mount + point (the location where the source directory is mounted in the + host operating system) to have the correct propagation properties. + For shared volumes, the source mount point must be set to `shared`. + For slave volumes, the mount must be set to either `shared` or + `slave`. * * @param list|null $binds @@ -1144,21 +1580,29 @@ public function setLogConfig(?HostConfigLogConfig $logConfig): self return $this; } /** - * Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name to which this container should connect to. - * - * @return string|null - */ + * Network mode to use for this container. Supported standard values + are: `bridge`, `host`, `none`, and `container:`. Any + other value is taken as a custom network's name to which this + container should connect to. + + * + * @return string|null + */ public function getNetworkMode(): ?string { return $this->networkMode; } /** - * Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name to which this container should connect to. - * - * @param string|null $networkMode - * - * @return self - */ + * Network mode to use for this container. Supported standard values + are: `bridge`, `host`, `none`, and `container:`. Any + other value is taken as a custom network's name to which this + container should connect to. + + * + * @param string|null $networkMode + * + * @return self + */ public function setNetworkMode(?string $networkMode): self { $this->initialized['networkMode'] = true; @@ -1166,21 +1610,33 @@ public function setNetworkMode(?string $networkMode): self return $this; } /** - * A map of exposed container ports and the host port they should map to. - * - * @return array|null - */ + * PortMap describes the mapping of container ports to host ports, using the + container's port-number and protocol as key in the format `/`, + for example, `80/udp`. + + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. + + * + * @return array>|null + */ public function getPortBindings(): ?iterable { return $this->portBindings; } /** - * A map of exposed container ports and the host port they should map to. - * - * @param array|null $portBindings - * - * @return self - */ + * PortMap describes the mapping of container ports to host ports, using the + container's port-number and protocol as key in the format `/`, + for example, `80/udp`. + + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. + + * + * @param array>|null $portBindings + * + * @return self + */ public function setPortBindings(?iterable $portBindings): self { $this->initialized['portBindings'] = true; @@ -1188,9 +1644,11 @@ public function setPortBindings(?iterable $portBindings): self return $this; } /** - * The behavior to apply when the container exits. The default is not to restart. + * The behavior to apply when the container exits. The default is not to + restart. - An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + An ever increasing delay (double the previous delay, starting at 100ms) is + added before each restart to prevent flooding the server. * * @return RestartPolicy|null @@ -1200,9 +1658,11 @@ public function getRestartPolicy(): ?RestartPolicy return $this->restartPolicy; } /** - * The behavior to apply when the container exits. The default is not to restart. + * The behavior to apply when the container exits. The default is not to + restart. - An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. + An ever increasing delay (double the previous delay, starting at 100ms) is + added before each restart to prevent flooding the server. * * @param RestartPolicy|null $restartPolicy @@ -1216,21 +1676,25 @@ public function setRestartPolicy(?RestartPolicy $restartPolicy): self return $this; } /** - * Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set. - * - * @return bool|null - */ + * Automatically remove the container when the container's process + exits. This has no effect if `RestartPolicy` is set. + + * + * @return bool|null + */ public function getAutoRemove(): ?bool { return $this->autoRemove; } /** - * Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set. - * - * @param bool|null $autoRemove - * - * @return self - */ + * Automatically remove the container when the container's process + exits. This has no effect if `RestartPolicy` is set. + + * + * @param bool|null $autoRemove + * + * @return self + */ public function setAutoRemove(?bool $autoRemove): self { $this->initialized['autoRemove'] = true; @@ -1260,21 +1724,25 @@ public function setVolumeDriver(?string $volumeDriver): self return $this; } /** - * A list of volumes to inherit from another container, specified in the form `[:]`. - * - * @return list|null - */ + * A list of volumes to inherit from another container, specified in + the form `[:]`. + + * + * @return list|null + */ public function getVolumesFrom(): ?array { return $this->volumesFrom; } /** - * A list of volumes to inherit from another container, specified in the form `[:]`. - * - * @param list|null $volumesFrom - * - * @return self - */ + * A list of volumes to inherit from another container, specified in + the form `[:]`. + + * + * @param list|null $volumesFrom + * + * @return self + */ public function setVolumesFrom(?array $volumesFrom): self { $this->initialized['volumesFrom'] = true; @@ -1288,37 +1756,89 @@ public function setVolumesFrom(?array $volumesFrom): self */ public function getMounts(): ?array { - return $this->mounts; + return $this->mounts; + } + /** + * Specification for mounts to be added to the container. + * + * @param list|null $mounts + * + * @return self + */ + public function setMounts(?array $mounts): self + { + $this->initialized['mounts'] = true; + $this->mounts = $mounts; + return $this; + } + /** + * Initial console size, as an `[height, width]` array. + * + * @return list|null + */ + public function getConsoleSize(): ?array + { + return $this->consoleSize; + } + /** + * Initial console size, as an `[height, width]` array. + * + * @param list|null $consoleSize + * + * @return self + */ + public function setConsoleSize(?array $consoleSize): self + { + $this->initialized['consoleSize'] = true; + $this->consoleSize = $consoleSize; + return $this; + } + /** + * Arbitrary non-identifying metadata attached to container and + provided to the runtime when the container is started. + + * + * @return array|null + */ + public function getAnnotations(): ?iterable + { + return $this->annotations; } /** - * Specification for mounts to be added to the container. - * - * @param list|null $mounts - * - * @return self - */ - public function setMounts(?array $mounts): self + * Arbitrary non-identifying metadata attached to container and + provided to the runtime when the container is started. + + * + * @param array|null $annotations + * + * @return self + */ + public function setAnnotations(?iterable $annotations): self { - $this->initialized['mounts'] = true; - $this->mounts = $mounts; + $this->initialized['annotations'] = true; + $this->annotations = $annotations; return $this; } /** - * A list of kernel capabilities to add to the container. - * - * @return list|null - */ + * A list of kernel capabilities to add to the container. Conflicts + with option 'Capabilities'. + + * + * @return list|null + */ public function getCapAdd(): ?array { return $this->capAdd; } /** - * A list of kernel capabilities to add to the container. - * - * @param list|null $capAdd - * - * @return self - */ + * A list of kernel capabilities to add to the container. Conflicts + with option 'Capabilities'. + + * + * @param list|null $capAdd + * + * @return self + */ public function setCapAdd(?array $capAdd): self { $this->initialized['capAdd'] = true; @@ -1326,27 +1846,67 @@ public function setCapAdd(?array $capAdd): self return $this; } /** - * A list of kernel capabilities to drop from the container. - * - * @return list|null - */ + * A list of kernel capabilities to drop from the container. Conflicts + with option 'Capabilities'. + + * + * @return list|null + */ public function getCapDrop(): ?array { return $this->capDrop; } /** - * A list of kernel capabilities to drop from the container. - * - * @param list|null $capDrop - * - * @return self - */ + * A list of kernel capabilities to drop from the container. Conflicts + with option 'Capabilities'. + + * + * @param list|null $capDrop + * + * @return self + */ public function setCapDrop(?array $capDrop): self { $this->initialized['capDrop'] = true; $this->capDrop = $capDrop; return $this; } + /** + * cgroup namespace mode for the container. Possible values are: + + - `"private"`: the container runs in its own private cgroup namespace + - `"host"`: use the host system's cgroup namespace + + If not specified, the daemon default is used, which can either be `"private"` + or `"host"`, depending on daemon version, kernel support and configuration. + + * + * @return string|null + */ + public function getCgroupnsMode(): ?string + { + return $this->cgroupnsMode; + } + /** + * cgroup namespace mode for the container. Possible values are: + + - `"private"`: the container runs in its own private cgroup namespace + - `"host"`: use the host system's cgroup namespace + + If not specified, the daemon default is used, which can either be `"private"` + or `"host"`, depending on daemon version, kernel support and configuration. + + * + * @param string|null $cgroupnsMode + * + * @return self + */ + public function setCgroupnsMode(?string $cgroupnsMode): self + { + $this->initialized['cgroupnsMode'] = true; + $this->cgroupnsMode = $cgroupnsMode; + return $this; + } /** * A list of DNS servers for the container to use. * @@ -1414,21 +1974,25 @@ public function setDnsSearch(?array $dnsSearch): self return $this; } /** - * A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`. - * - * @return list|null - */ + * A list of hostnames/IP mappings to add to the container's `/etc/hosts` + file. Specified in the form `["hostname:IP"]`. + + * + * @return list|null + */ public function getExtraHosts(): ?array { return $this->extraHosts; } /** - * A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`. - * - * @param list|null $extraHosts - * - * @return self - */ + * A list of hostnames/IP mappings to add to the container's `/etc/hosts` + file. Specified in the form `["hostname:IP"]`. + + * + * @param list|null $extraHosts + * + * @return self + */ public function setExtraHosts(?array $extraHosts): self { $this->initialized['extraHosts'] = true; @@ -1458,21 +2022,41 @@ public function setGroupAdd(?array $groupAdd): self return $this; } /** - * IPC namespace to use for the container. - * - * @return string|null - */ + * IPC sharing mode for the container. Possible values are: + + - `"none"`: own private IPC namespace, with /dev/shm not mounted + - `"private"`: own private IPC namespace + - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers + - `"container:"`: join another (shareable) container's IPC namespace + - `"host"`: use the host system's IPC namespace + + If not specified, daemon default is used, which can either be `"private"` + or `"shareable"`, depending on daemon version and configuration. + + * + * @return string|null + */ public function getIpcMode(): ?string { return $this->ipcMode; } /** - * IPC namespace to use for the container. - * - * @param string|null $ipcMode - * - * @return self - */ + * IPC sharing mode for the container. Possible values are: + + - `"none"`: own private IPC namespace, with /dev/shm not mounted + - `"private"`: own private IPC namespace + - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers + - `"container:"`: join another (shareable) container's IPC namespace + - `"host"`: use the host system's IPC namespace + + If not specified, daemon default is used, which can either be `"private"` + or `"shareable"`, depending on daemon version and configuration. + + * + * @param string|null $ipcMode + * + * @return self + */ public function setIpcMode(?string $ipcMode): self { $this->initialized['ipcMode'] = true; @@ -1524,21 +2108,25 @@ public function setLinks(?array $links): self return $this; } /** - * An integer value containing the score given to the container in order to tune OOM killer preferences. - * - * @return int|null - */ + * An integer value containing the score given to the container in + order to tune OOM killer preferences. + + * + * @return int|null + */ public function getOomScoreAdj(): ?int { return $this->oomScoreAdj; } /** - * An integer value containing the score given to the container in order to tune OOM killer preferences. - * - * @param int|null $oomScoreAdj - * - * @return self - */ + * An integer value containing the score given to the container in + order to tune OOM killer preferences. + + * + * @param int|null $oomScoreAdj + * + * @return self + */ public function setOomScoreAdj(?int $oomScoreAdj): self { $this->initialized['oomScoreAdj'] = true; @@ -1546,7 +2134,8 @@ public function setOomScoreAdj(?int $oomScoreAdj): self return $this; } /** - * Set the PID (Process) Namespace mode for the container. It can be either: + * Set the PID (Process) Namespace mode for the container. It can be + either: - `"container:"`: joins another container's PID namespace - `"host"`: use the host's PID namespace inside the container @@ -1559,7 +2148,8 @@ public function getPidMode(): ?string return $this->pidMode; } /** - * Set the PID (Process) Namespace mode for the container. It can be either: + * Set the PID (Process) Namespace mode for the container. It can be + either: - `"container:"`: joins another container's PID namespace - `"host"`: use the host's PID namespace inside the container @@ -1598,21 +2188,41 @@ public function setPrivileged(?bool $privileged): self return $this; } /** - * Allocates a random host port for all of a container's exposed ports. - * - * @return bool|null - */ + * Allocates an ephemeral host port for all of a container's + exposed ports. + + Ports are de-allocated when the container stops and allocated when + the container starts. The allocated port might be changed when + restarting the container. + + The port is selected from the ephemeral port range that depends on + the kernel. For example, on Linux the range is defined by + `/proc/sys/net/ipv4/ip_local_port_range`. + + * + * @return bool|null + */ public function getPublishAllPorts(): ?bool { return $this->publishAllPorts; } /** - * Allocates a random host port for all of a container's exposed ports. - * - * @param bool|null $publishAllPorts - * - * @return self - */ + * Allocates an ephemeral host port for all of a container's + exposed ports. + + Ports are de-allocated when the container stops and allocated when + the container starts. The allocated port might be changed when + restarting the container. + + The port is selected from the ephemeral port range that depends on + the kernel. For example, on Linux the range is defined by + `/proc/sys/net/ipv4/ip_local_port_range`. + + * + * @param bool|null $publishAllPorts + * + * @return self + */ public function setPublishAllPorts(?bool $publishAllPorts): self { $this->initialized['publishAllPorts'] = true; @@ -1642,21 +2252,25 @@ public function setReadonlyRootfs(?bool $readonlyRootfs): self return $this; } /** - * A list of string values to customize labels for MLS systems, such as SELinux. - * - * @return list|null - */ + * A list of string values to customize labels for MLS systems, such + as SELinux. + + * + * @return list|null + */ public function getSecurityOpt(): ?array { return $this->securityOpt; } /** - * A list of string values to customize labels for MLS systems, such as SELinux. - * - * @param list|null $securityOpt - * - * @return self - */ + * A list of string values to customize labels for MLS systems, such + as SELinux. + + * + * @param list|null $securityOpt + * + * @return self + */ public function setSecurityOpt(?array $securityOpt): self { $this->initialized['securityOpt'] = true; @@ -1686,21 +2300,33 @@ public function setStorageOpt(?iterable $storageOpt): self return $this; } /** - * A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ "/run": "rw,noexec,nosuid,size=65536k" }`. - * - * @return array|null - */ + * A map of container directories which should be replaced by tmpfs + mounts, and their corresponding mount options. For example: + + ``` + { "/run": "rw,noexec,nosuid,size=65536k" } + ``` + + * + * @return array|null + */ public function getTmpfs(): ?iterable { return $this->tmpfs; } /** - * A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ "/run": "rw,noexec,nosuid,size=65536k" }`. - * - * @param array|null $tmpfs - * - * @return self - */ + * A map of container directories which should be replaced by tmpfs + mounts, and their corresponding mount options. For example: + + ``` + { "/run": "rw,noexec,nosuid,size=65536k" } + ``` + + * + * @param array|null $tmpfs + * + * @return self + */ public function setTmpfs(?iterable $tmpfs): self { $this->initialized['tmpfs'] = true; @@ -1730,21 +2356,25 @@ public function setUTSMode(?string $uTSMode): self return $this; } /** - * Sets the usernamespace mode for the container when usernamespace remapping option is enabled. - * - * @return string|null - */ + * Sets the usernamespace mode for the container when usernamespace + remapping option is enabled. + + * + * @return string|null + */ public function getUsernsMode(): ?string { return $this->usernsMode; } /** - * Sets the usernamespace mode for the container when usernamespace remapping option is enabled. - * - * @param string|null $usernsMode - * - * @return self - */ + * Sets the usernamespace mode for the container when usernamespace + remapping option is enabled. + + * + * @param string|null $usernsMode + * + * @return self + */ public function setUsernsMode(?string $usernsMode): self { $this->initialized['usernsMode'] = true; @@ -1774,21 +2404,33 @@ public function setShmSize(?int $shmSize): self return $this; } /** - * A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}` - * - * @return array|null - */ + * A list of kernel parameters (sysctls) to set in the container. + For example: + + ``` + {"net.ipv4.ip_forward": "1"} + ``` + + * + * @return array|null + */ public function getSysctls(): ?iterable { return $this->sysctls; } /** - * A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}` - * - * @param array|null $sysctls - * - * @return self - */ + * A list of kernel parameters (sysctls) to set in the container. + For example: + + ``` + {"net.ipv4.ip_forward": "1"} + ``` + + * + * @param array|null $sysctls + * + * @return self + */ public function setSysctls(?iterable $sysctls): self { $this->initialized['sysctls'] = true; @@ -1817,28 +2459,6 @@ public function setRuntime(?string $runtime): self $this->runtime = $runtime; return $this; } - /** - * Initial console size, as an `[height, width]` array. (Windows only) - * - * @return list|null - */ - public function getConsoleSize(): ?array - { - return $this->consoleSize; - } - /** - * Initial console size, as an `[height, width]` array. (Windows only) - * - * @param list|null $consoleSize - * - * @return self - */ - public function setConsoleSize(?array $consoleSize): self - { - $this->initialized['consoleSize'] = true; - $this->consoleSize = $consoleSize; - return $this; - } /** * Isolation technology of the container. (Windows only) * @@ -1861,4 +2481,56 @@ public function setIsolation(?string $isolation): self $this->isolation = $isolation; return $this; } + /** + * The list of paths to be masked inside the container (this overrides + the default set of paths). + + * + * @return list|null + */ + public function getMaskedPaths(): ?array + { + return $this->maskedPaths; + } + /** + * The list of paths to be masked inside the container (this overrides + the default set of paths). + + * + * @param list|null $maskedPaths + * + * @return self + */ + public function setMaskedPaths(?array $maskedPaths): self + { + $this->initialized['maskedPaths'] = true; + $this->maskedPaths = $maskedPaths; + return $this; + } + /** + * The list of paths to be set as read-only inside the container + (this overrides the default set of paths). + + * + * @return list|null + */ + public function getReadonlyPaths(): ?array + { + return $this->readonlyPaths; + } + /** + * The list of paths to be set as read-only inside the container + (this overrides the default set of paths). + + * + * @param list|null $readonlyPaths + * + * @return self + */ + public function setReadonlyPaths(?array $readonlyPaths): self + { + $this->initialized['readonlyPaths'] = true; + $this->readonlyPaths = $readonlyPaths; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/IPAM.php b/generated/Model/IPAM.php index aa8677380..f1600b831 100644 --- a/generated/Model/IPAM.php +++ b/generated/Model/IPAM.php @@ -19,15 +19,20 @@ public function isInitialized($property): bool */ protected $driver = 'default'; /** - * List of IPAM configuration options, specified as a map: `{"Subnet": , "IPRange": , "Gateway": , "AuxAddress": }` - * - * @var list>|null - */ + * List of IPAM configuration options, specified as a map: + + ``` + {"Subnet": , "IPRange": , "Gateway": , "AuxAddress": } + ``` + + * + * @var list|null + */ protected $config; /** * Driver-specific options, specified as a map. * - * @var list>|null + * @var array|null */ protected $options; /** @@ -53,21 +58,31 @@ public function setDriver(?string $driver): self return $this; } /** - * List of IPAM configuration options, specified as a map: `{"Subnet": , "IPRange": , "Gateway": , "AuxAddress": }` - * - * @return list>|null - */ + * List of IPAM configuration options, specified as a map: + + ``` + {"Subnet": , "IPRange": , "Gateway": , "AuxAddress": } + ``` + + * + * @return list|null + */ public function getConfig(): ?array { return $this->config; } /** - * List of IPAM configuration options, specified as a map: `{"Subnet": , "IPRange": , "Gateway": , "AuxAddress": }` - * - * @param list>|null $config - * - * @return self - */ + * List of IPAM configuration options, specified as a map: + + ``` + {"Subnet": , "IPRange": , "Gateway": , "AuxAddress": } + ``` + + * + * @param list|null $config + * + * @return self + */ public function setConfig(?array $config): self { $this->initialized['config'] = true; @@ -77,20 +92,20 @@ public function setConfig(?array $config): self /** * Driver-specific options, specified as a map. * - * @return list>|null + * @return array|null */ - public function getOptions(): ?array + public function getOptions(): ?iterable { return $this->options; } /** * Driver-specific options, specified as a map. * - * @param list>|null $options + * @param array|null $options * * @return self */ - public function setOptions(?array $options): self + public function setOptions(?iterable $options): self { $this->initialized['options'] = true; $this->options = $options; diff --git a/generated/Model/IPAMConfig.php b/generated/Model/IPAMConfig.php new file mode 100644 index 000000000..000473c1c --- /dev/null +++ b/generated/Model/IPAMConfig.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $subnet; + /** + * + * + * @var string|null + */ + protected $iPRange; + /** + * + * + * @var string|null + */ + protected $gateway; + /** + * + * + * @var array|null + */ + protected $auxiliaryAddresses; + /** + * + * + * @return string|null + */ + public function getSubnet(): ?string + { + return $this->subnet; + } + /** + * + * + * @param string|null $subnet + * + * @return self + */ + public function setSubnet(?string $subnet): self + { + $this->initialized['subnet'] = true; + $this->subnet = $subnet; + return $this; + } + /** + * + * + * @return string|null + */ + public function getIPRange(): ?string + { + return $this->iPRange; + } + /** + * + * + * @param string|null $iPRange + * + * @return self + */ + public function setIPRange(?string $iPRange): self + { + $this->initialized['iPRange'] = true; + $this->iPRange = $iPRange; + return $this; + } + /** + * + * + * @return string|null + */ + public function getGateway(): ?string + { + return $this->gateway; + } + /** + * + * + * @param string|null $gateway + * + * @return self + */ + public function setGateway(?string $gateway): self + { + $this->initialized['gateway'] = true; + $this->gateway = $gateway; + return $this; + } + /** + * + * + * @return array|null + */ + public function getAuxiliaryAddresses(): ?iterable + { + return $this->auxiliaryAddresses; + } + /** + * + * + * @param array|null $auxiliaryAddresses + * + * @return self + */ + public function setAuxiliaryAddresses(?iterable $auxiliaryAddresses): self + { + $this->initialized['auxiliaryAddresses'] = true; + $this->auxiliaryAddresses = $auxiliaryAddresses; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Image.php b/generated/Model/Image.php deleted file mode 100644 index 0ad2c1f9c..000000000 --- a/generated/Model/Image.php +++ /dev/null @@ -1,491 +0,0 @@ -initialized); - } - /** - * - * - * @var string|null - */ - protected $id; - /** - * - * - * @var list|null - */ - protected $repoTags; - /** - * - * - * @var list|null - */ - protected $repoDigests; - /** - * - * - * @var string|null - */ - protected $parent; - /** - * - * - * @var string|null - */ - protected $comment; - /** - * - * - * @var string|null - */ - protected $created; - /** - * - * - * @var string|null - */ - protected $container; - /** - * Configuration for a container that is portable between hosts - * - * @var Config|null - */ - protected $containerConfig; - /** - * - * - * @var string|null - */ - protected $dockerVersion; - /** - * - * - * @var string|null - */ - protected $author; - /** - * Configuration for a container that is portable between hosts - * - * @var Config|null - */ - protected $config; - /** - * - * - * @var string|null - */ - protected $architecture; - /** - * - * - * @var string|null - */ - protected $os; - /** - * - * - * @var int|null - */ - protected $size; - /** - * - * - * @var int|null - */ - protected $virtualSize; - /** - * Information about this container's graph driver. - * - * @var GraphDriver|null - */ - protected $graphDriver; - /** - * - * - * @var ImageRootFS|null - */ - protected $rootFS; - /** - * - * - * @return string|null - */ - public function getId(): ?string - { - return $this->id; - } - /** - * - * - * @param string|null $id - * - * @return self - */ - public function setId(?string $id): self - { - $this->initialized['id'] = true; - $this->id = $id; - return $this; - } - /** - * - * - * @return list|null - */ - public function getRepoTags(): ?array - { - return $this->repoTags; - } - /** - * - * - * @param list|null $repoTags - * - * @return self - */ - public function setRepoTags(?array $repoTags): self - { - $this->initialized['repoTags'] = true; - $this->repoTags = $repoTags; - return $this; - } - /** - * - * - * @return list|null - */ - public function getRepoDigests(): ?array - { - return $this->repoDigests; - } - /** - * - * - * @param list|null $repoDigests - * - * @return self - */ - public function setRepoDigests(?array $repoDigests): self - { - $this->initialized['repoDigests'] = true; - $this->repoDigests = $repoDigests; - return $this; - } - /** - * - * - * @return string|null - */ - public function getParent(): ?string - { - return $this->parent; - } - /** - * - * - * @param string|null $parent - * - * @return self - */ - public function setParent(?string $parent): self - { - $this->initialized['parent'] = true; - $this->parent = $parent; - return $this; - } - /** - * - * - * @return string|null - */ - public function getComment(): ?string - { - return $this->comment; - } - /** - * - * - * @param string|null $comment - * - * @return self - */ - public function setComment(?string $comment): self - { - $this->initialized['comment'] = true; - $this->comment = $comment; - return $this; - } - /** - * - * - * @return string|null - */ - public function getCreated(): ?string - { - return $this->created; - } - /** - * - * - * @param string|null $created - * - * @return self - */ - public function setCreated(?string $created): self - { - $this->initialized['created'] = true; - $this->created = $created; - return $this; - } - /** - * - * - * @return string|null - */ - public function getContainer(): ?string - { - return $this->container; - } - /** - * - * - * @param string|null $container - * - * @return self - */ - public function setContainer(?string $container): self - { - $this->initialized['container'] = true; - $this->container = $container; - return $this; - } - /** - * Configuration for a container that is portable between hosts - * - * @return Config|null - */ - public function getContainerConfig(): ?Config - { - return $this->containerConfig; - } - /** - * Configuration for a container that is portable between hosts - * - * @param Config|null $containerConfig - * - * @return self - */ - public function setContainerConfig(?Config $containerConfig): self - { - $this->initialized['containerConfig'] = true; - $this->containerConfig = $containerConfig; - return $this; - } - /** - * - * - * @return string|null - */ - public function getDockerVersion(): ?string - { - return $this->dockerVersion; - } - /** - * - * - * @param string|null $dockerVersion - * - * @return self - */ - public function setDockerVersion(?string $dockerVersion): self - { - $this->initialized['dockerVersion'] = true; - $this->dockerVersion = $dockerVersion; - return $this; - } - /** - * - * - * @return string|null - */ - public function getAuthor(): ?string - { - return $this->author; - } - /** - * - * - * @param string|null $author - * - * @return self - */ - public function setAuthor(?string $author): self - { - $this->initialized['author'] = true; - $this->author = $author; - return $this; - } - /** - * Configuration for a container that is portable between hosts - * - * @return Config|null - */ - public function getConfig(): ?Config - { - return $this->config; - } - /** - * Configuration for a container that is portable between hosts - * - * @param Config|null $config - * - * @return self - */ - public function setConfig(?Config $config): self - { - $this->initialized['config'] = true; - $this->config = $config; - return $this; - } - /** - * - * - * @return string|null - */ - public function getArchitecture(): ?string - { - return $this->architecture; - } - /** - * - * - * @param string|null $architecture - * - * @return self - */ - public function setArchitecture(?string $architecture): self - { - $this->initialized['architecture'] = true; - $this->architecture = $architecture; - return $this; - } - /** - * - * - * @return string|null - */ - public function getOs(): ?string - { - return $this->os; - } - /** - * - * - * @param string|null $os - * - * @return self - */ - public function setOs(?string $os): self - { - $this->initialized['os'] = true; - $this->os = $os; - return $this; - } - /** - * - * - * @return int|null - */ - public function getSize(): ?int - { - return $this->size; - } - /** - * - * - * @param int|null $size - * - * @return self - */ - public function setSize(?int $size): self - { - $this->initialized['size'] = true; - $this->size = $size; - return $this; - } - /** - * - * - * @return int|null - */ - public function getVirtualSize(): ?int - { - return $this->virtualSize; - } - /** - * - * - * @param int|null $virtualSize - * - * @return self - */ - public function setVirtualSize(?int $virtualSize): self - { - $this->initialized['virtualSize'] = true; - $this->virtualSize = $virtualSize; - return $this; - } - /** - * Information about this container's graph driver. - * - * @return GraphDriver|null - */ - public function getGraphDriver(): ?GraphDriver - { - return $this->graphDriver; - } - /** - * Information about this container's graph driver. - * - * @param GraphDriver|null $graphDriver - * - * @return self - */ - public function setGraphDriver(?GraphDriver $graphDriver): self - { - $this->initialized['graphDriver'] = true; - $this->graphDriver = $graphDriver; - return $this; - } - /** - * - * - * @return ImageRootFS|null - */ - public function getRootFS(): ?ImageRootFS - { - return $this->rootFS; - } - /** - * - * - * @param ImageRootFS|null $rootFS - * - * @return self - */ - public function setRootFS(?ImageRootFS $rootFS): self - { - $this->initialized['rootFS'] = true; - $this->rootFS = $rootFS; - return $this; - } -} \ No newline at end of file diff --git a/generated/Model/ImageConfig.php b/generated/Model/ImageConfig.php new file mode 100644 index 000000000..53a275022 --- /dev/null +++ b/generated/Model/ImageConfig.php @@ -0,0 +1,973 @@ +initialized); + } + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always empty. It must not be used, and will be removed in API v1.48. + + * + * @var string|null + */ + protected $hostname; + /** + * The domain name to use for the container. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always empty. It must not be used, and will be removed in API v1.48. + + * + * @var string|null + */ + protected $domainname; + /** + * The user that commands are run as inside the container. + * + * @var string|null + */ + protected $user; + /** + * Whether to attach to `stdin`. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @var bool|null + */ + protected $attachStdin = false; + /** + * Whether to attach to `stdout`. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @var bool|null + */ + protected $attachStdout = false; + /** + * Whether to attach to `stderr`. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @var bool|null + */ + protected $attachStderr = false; + /** + * An object mapping ports to an empty object in the form: + + `{"/": {}}` + + * + * @var array|null + */ + protected $exposedPorts; + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @var bool|null + */ + protected $tty = false; + /** + * Open `stdin` + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @var bool|null + */ + protected $openStdin = false; + /** + * Close `stdin` after one attached client disconnects. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @var bool|null + */ + protected $stdinOnce = false; + /** + * A list of environment variables to set inside the container in the + form `["VAR=value", ...]`. A variable without `=` is removed from the + environment, rather than to have an empty value. + + * + * @var list|null + */ + protected $env; + /** + * Command to run specified as a string or an array of strings. + * + * @var list|null + */ + protected $cmd; + /** + * A test to perform to check that the container is healthy. + * + * @var HealthConfig|null + */ + protected $healthcheck; + /** + * Command is already escaped (Windows only) + * + * @var bool|null + */ + protected $argsEscaped = false; + /** + * The name (or reference) of the image to use when creating the container, + or which was used when the container was created. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always empty. It must not be used, and will be removed in API v1.48. + + * + * @var string|null + */ + protected $image = ''; + /** + * An object mapping mount point paths inside the container to empty + objects. + + * + * @var array|null + */ + protected $volumes; + /** + * The working directory for commands to run in. + * + * @var string|null + */ + protected $workingDir; + /** + * The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the + entry point is reset to system default (i.e., the entry point used by + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + + * + * @var list|null + */ + protected $entrypoint; + /** + * Disable networking for the container. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always omitted. It must not be used, and will be removed in API v1.48. + + * + * @var bool|null + */ + protected $networkDisabled = false; + /** + * MAC address of the container. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always omitted. It must not be used, and will be removed in API v1.48. + + * + * @var string|null + */ + protected $macAddress = ''; + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @var list|null + */ + protected $onBuild; + /** + * User-defined key/value metadata. + * + * @var array|null + */ + protected $labels; + /** + * Signal to stop a container as a string or unsigned integer. + * + * @var string|null + */ + protected $stopSignal; + /** + * Timeout to stop a container in seconds. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always omitted. It must not be used, and will be removed in API v1.48. + + * + * @var int|null + */ + protected $stopTimeout = 10; + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @var list|null + */ + protected $shell; + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always empty. It must not be used, and will be removed in API v1.48. + + * + * @return string|null + */ + public function getHostname(): ?string + { + return $this->hostname; + } + /** + * The hostname to use for the container, as a valid RFC 1123 hostname. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always empty. It must not be used, and will be removed in API v1.48. + + * + * @param string|null $hostname + * + * @return self + */ + public function setHostname(?string $hostname): self + { + $this->initialized['hostname'] = true; + $this->hostname = $hostname; + return $this; + } + /** + * The domain name to use for the container. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always empty. It must not be used, and will be removed in API v1.48. + + * + * @return string|null + */ + public function getDomainname(): ?string + { + return $this->domainname; + } + /** + * The domain name to use for the container. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always empty. It must not be used, and will be removed in API v1.48. + + * + * @param string|null $domainname + * + * @return self + */ + public function setDomainname(?string $domainname): self + { + $this->initialized['domainname'] = true; + $this->domainname = $domainname; + return $this; + } + /** + * The user that commands are run as inside the container. + * + * @return string|null + */ + public function getUser(): ?string + { + return $this->user; + } + /** + * The user that commands are run as inside the container. + * + * @param string|null $user + * + * @return self + */ + public function setUser(?string $user): self + { + $this->initialized['user'] = true; + $this->user = $user; + return $this; + } + /** + * Whether to attach to `stdin`. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @return bool|null + */ + public function getAttachStdin(): ?bool + { + return $this->attachStdin; + } + /** + * Whether to attach to `stdin`. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @param bool|null $attachStdin + * + * @return self + */ + public function setAttachStdin(?bool $attachStdin): self + { + $this->initialized['attachStdin'] = true; + $this->attachStdin = $attachStdin; + return $this; + } + /** + * Whether to attach to `stdout`. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @return bool|null + */ + public function getAttachStdout(): ?bool + { + return $this->attachStdout; + } + /** + * Whether to attach to `stdout`. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @param bool|null $attachStdout + * + * @return self + */ + public function setAttachStdout(?bool $attachStdout): self + { + $this->initialized['attachStdout'] = true; + $this->attachStdout = $attachStdout; + return $this; + } + /** + * Whether to attach to `stderr`. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @return bool|null + */ + public function getAttachStderr(): ?bool + { + return $this->attachStderr; + } + /** + * Whether to attach to `stderr`. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @param bool|null $attachStderr + * + * @return self + */ + public function setAttachStderr(?bool $attachStderr): self + { + $this->initialized['attachStderr'] = true; + $this->attachStderr = $attachStderr; + return $this; + } + /** + * An object mapping ports to an empty object in the form: + + `{"/": {}}` + + * + * @return array|null + */ + public function getExposedPorts(): ?iterable + { + return $this->exposedPorts; + } + /** + * An object mapping ports to an empty object in the form: + + `{"/": {}}` + + * + * @param array|null $exposedPorts + * + * @return self + */ + public function setExposedPorts(?iterable $exposedPorts): self + { + $this->initialized['exposedPorts'] = true; + $this->exposedPorts = $exposedPorts; + return $this; + } + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @return bool|null + */ + public function getTty(): ?bool + { + return $this->tty; + } + /** + * Attach standard streams to a TTY, including `stdin` if it is not closed. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @param bool|null $tty + * + * @return self + */ + public function setTty(?bool $tty): self + { + $this->initialized['tty'] = true; + $this->tty = $tty; + return $this; + } + /** + * Open `stdin` + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @return bool|null + */ + public function getOpenStdin(): ?bool + { + return $this->openStdin; + } + /** + * Open `stdin` + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @param bool|null $openStdin + * + * @return self + */ + public function setOpenStdin(?bool $openStdin): self + { + $this->initialized['openStdin'] = true; + $this->openStdin = $openStdin; + return $this; + } + /** + * Close `stdin` after one attached client disconnects. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @return bool|null + */ + public function getStdinOnce(): ?bool + { + return $this->stdinOnce; + } + /** + * Close `stdin` after one attached client disconnects. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + + * + * @param bool|null $stdinOnce + * + * @return self + */ + public function setStdinOnce(?bool $stdinOnce): self + { + $this->initialized['stdinOnce'] = true; + $this->stdinOnce = $stdinOnce; + return $this; + } + /** + * A list of environment variables to set inside the container in the + form `["VAR=value", ...]`. A variable without `=` is removed from the + environment, rather than to have an empty value. + + * + * @return list|null + */ + public function getEnv(): ?array + { + return $this->env; + } + /** + * A list of environment variables to set inside the container in the + form `["VAR=value", ...]`. A variable without `=` is removed from the + environment, rather than to have an empty value. + + * + * @param list|null $env + * + * @return self + */ + public function setEnv(?array $env): self + { + $this->initialized['env'] = true; + $this->env = $env; + return $this; + } + /** + * Command to run specified as a string or an array of strings. + * + * @return list|null + */ + public function getCmd(): ?array + { + return $this->cmd; + } + /** + * Command to run specified as a string or an array of strings. + * + * @param list|null $cmd + * + * @return self + */ + public function setCmd(?array $cmd): self + { + $this->initialized['cmd'] = true; + $this->cmd = $cmd; + return $this; + } + /** + * A test to perform to check that the container is healthy. + * + * @return HealthConfig|null + */ + public function getHealthcheck(): ?HealthConfig + { + return $this->healthcheck; + } + /** + * A test to perform to check that the container is healthy. + * + * @param HealthConfig|null $healthcheck + * + * @return self + */ + public function setHealthcheck(?HealthConfig $healthcheck): self + { + $this->initialized['healthcheck'] = true; + $this->healthcheck = $healthcheck; + return $this; + } + /** + * Command is already escaped (Windows only) + * + * @return bool|null + */ + public function getArgsEscaped(): ?bool + { + return $this->argsEscaped; + } + /** + * Command is already escaped (Windows only) + * + * @param bool|null $argsEscaped + * + * @return self + */ + public function setArgsEscaped(?bool $argsEscaped): self + { + $this->initialized['argsEscaped'] = true; + $this->argsEscaped = $argsEscaped; + return $this; + } + /** + * The name (or reference) of the image to use when creating the container, + or which was used when the container was created. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always empty. It must not be used, and will be removed in API v1.48. + + * + * @return string|null + */ + public function getImage(): ?string + { + return $this->image; + } + /** + * The name (or reference) of the image to use when creating the container, + or which was used when the container was created. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always empty. It must not be used, and will be removed in API v1.48. + + * + * @param string|null $image + * + * @return self + */ + public function setImage(?string $image): self + { + $this->initialized['image'] = true; + $this->image = $image; + return $this; + } + /** + * An object mapping mount point paths inside the container to empty + objects. + + * + * @return array|null + */ + public function getVolumes(): ?iterable + { + return $this->volumes; + } + /** + * An object mapping mount point paths inside the container to empty + objects. + + * + * @param array|null $volumes + * + * @return self + */ + public function setVolumes(?iterable $volumes): self + { + $this->initialized['volumes'] = true; + $this->volumes = $volumes; + return $this; + } + /** + * The working directory for commands to run in. + * + * @return string|null + */ + public function getWorkingDir(): ?string + { + return $this->workingDir; + } + /** + * The working directory for commands to run in. + * + * @param string|null $workingDir + * + * @return self + */ + public function setWorkingDir(?string $workingDir): self + { + $this->initialized['workingDir'] = true; + $this->workingDir = $workingDir; + return $this; + } + /** + * The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the + entry point is reset to system default (i.e., the entry point used by + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + + * + * @return list|null + */ + public function getEntrypoint(): ?array + { + return $this->entrypoint; + } + /** + * The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the + entry point is reset to system default (i.e., the entry point used by + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + + * + * @param list|null $entrypoint + * + * @return self + */ + public function setEntrypoint(?array $entrypoint): self + { + $this->initialized['entrypoint'] = true; + $this->entrypoint = $entrypoint; + return $this; + } + /** + * Disable networking for the container. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always omitted. It must not be used, and will be removed in API v1.48. + + * + * @return bool|null + */ + public function getNetworkDisabled(): ?bool + { + return $this->networkDisabled; + } + /** + * Disable networking for the container. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always omitted. It must not be used, and will be removed in API v1.48. + + * + * @param bool|null $networkDisabled + * + * @return self + */ + public function setNetworkDisabled(?bool $networkDisabled): self + { + $this->initialized['networkDisabled'] = true; + $this->networkDisabled = $networkDisabled; + return $this; + } + /** + * MAC address of the container. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always omitted. It must not be used, and will be removed in API v1.48. + + * + * @return string|null + */ + public function getMacAddress(): ?string + { + return $this->macAddress; + } + /** + * MAC address of the container. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always omitted. It must not be used, and will be removed in API v1.48. + + * + * @param string|null $macAddress + * + * @return self + */ + public function setMacAddress(?string $macAddress): self + { + $this->initialized['macAddress'] = true; + $this->macAddress = $macAddress; + return $this; + } + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @return list|null + */ + public function getOnBuild(): ?array + { + return $this->onBuild; + } + /** + * `ONBUILD` metadata that were defined in the image's `Dockerfile`. + * + * @param list|null $onBuild + * + * @return self + */ + public function setOnBuild(?array $onBuild): self + { + $this->initialized['onBuild'] = true; + $this->onBuild = $onBuild; + return $this; + } + /** + * User-defined key/value metadata. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value metadata. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * Signal to stop a container as a string or unsigned integer. + * + * @return string|null + */ + public function getStopSignal(): ?string + { + return $this->stopSignal; + } + /** + * Signal to stop a container as a string or unsigned integer. + * + * @param string|null $stopSignal + * + * @return self + */ + public function setStopSignal(?string $stopSignal): self + { + $this->initialized['stopSignal'] = true; + $this->stopSignal = $stopSignal; + return $this; + } + /** + * Timeout to stop a container in seconds. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always omitted. It must not be used, and will be removed in API v1.48. + + * + * @return int|null + */ + public function getStopTimeout(): ?int + { + return $this->stopTimeout; + } + /** + * Timeout to stop a container in seconds. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always omitted. It must not be used, and will be removed in API v1.48. + + * + * @param int|null $stopTimeout + * + * @return self + */ + public function setStopTimeout(?int $stopTimeout): self + { + $this->initialized['stopTimeout'] = true; + $this->stopTimeout = $stopTimeout; + return $this; + } + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @return list|null + */ + public function getShell(): ?array + { + return $this->shell; + } + /** + * Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + * + * @param list|null $shell + * + * @return self + */ + public function setShell(?array $shell): self + { + $this->initialized['shell'] = true; + $this->shell = $shell; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ImageDeleteResponse.php b/generated/Model/ImageDeleteResponseItem.php similarity index 97% rename from generated/Model/ImageDeleteResponse.php rename to generated/Model/ImageDeleteResponseItem.php index b861f3699..3799c3c7b 100644 --- a/generated/Model/ImageDeleteResponse.php +++ b/generated/Model/ImageDeleteResponseItem.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class ImageDeleteResponse +class ImageDeleteResponseItem { /** * @var array diff --git a/generated/Model/SecretsCreatePostResponse201.php b/generated/Model/ImageID.php similarity index 81% rename from generated/Model/SecretsCreatePostResponse201.php rename to generated/Model/ImageID.php index a23bf4b26..d78d4ca63 100644 --- a/generated/Model/SecretsCreatePostResponse201.php +++ b/generated/Model/ImageID.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class SecretsCreatePostResponse201 +class ImageID { /** * @var array @@ -13,13 +13,13 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * The ID of the created secret. + * * * @var string|null */ protected $iD; /** - * The ID of the created secret. + * * * @return string|null */ @@ -28,7 +28,7 @@ public function getID(): ?string return $this->iD; } /** - * The ID of the created secret. + * * * @param string|null $iD * diff --git a/generated/Model/ImageInspect.php b/generated/Model/ImageInspect.php new file mode 100644 index 000000000..ffedff580 --- /dev/null +++ b/generated/Model/ImageInspect.php @@ -0,0 +1,660 @@ +initialized); + } + /** + * ID is the content-addressable ID of an image. + + This identifier is a content-addressable digest calculated from the + image's configuration (which includes the digests of layers used by + the image). + + Note that this digest differs from the `RepoDigests` below, which + holds digests of image manifests that reference the image. + + * + * @var string|null + */ + protected $id; + /** + * List of image names/tags in the local image cache that reference this + image. + + Multiple image tags can refer to the same image, and this list may be + empty if no tags reference the image, in which case the image is + "untagged", in which case it can still be referenced by its ID. + + * + * @var list|null + */ + protected $repoTags; + /** + * List of content-addressable digests of locally available image manifests + that the image is referenced from. Multiple manifests can refer to the + same image. + + These digests are usually only available if the image was either pulled + from a registry, or if the image was pushed to a registry, which is when + the manifest is generated and its digest calculated. + + * + * @var list|null + */ + protected $repoDigests; + /** + * ID of the parent image. + + Depending on how the image was created, this field may be empty and + is only set for images that were built/created locally. This field + is empty if the image was pulled from an image registry. + + * + * @var string|null + */ + protected $parent; + /** + * Optional message that was set when committing or importing the image. + * + * @var string|null + */ + protected $comment; + /** + * Date and time at which the image was created, formatted in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + This information is only available if present in the image, + and omitted otherwise. + + * + * @var string|null + */ + protected $created; + /** + * The version of Docker that was used to build the image. + + Depending on how the image was created, this field may be empty. + + * + * @var string|null + */ + protected $dockerVersion; + /** + * Name of the author that was specified when committing the image, or as + specified through MAINTAINER (deprecated) in the Dockerfile. + + * + * @var string|null + */ + protected $author; + /** + * Configuration of the image. These fields are used as defaults + when starting a container from the image. + + * + * @var ImageConfig|null + */ + protected $config; + /** + * Hardware CPU architecture that the image runs on. + * + * @var string|null + */ + protected $architecture; + /** + * CPU architecture variant (presently ARM-only). + * + * @var string|null + */ + protected $variant; + /** + * Operating System the image is built to run on. + * + * @var string|null + */ + protected $os; + /** + * Operating System version the image is built to run on (especially + for Windows). + + * + * @var string|null + */ + protected $osVersion; + /** + * Total size of the image including all layers it is composed of. + * + * @var int|null + */ + protected $size; + /** + * Total size of the image including all layers it is composed of. + + Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. + + * + * @var int|null + */ + protected $virtualSize; + /** + * Information about the storage driver used to store the container's and + image's filesystem. + + * + * @var DriverData|null + */ + protected $graphDriver; + /** + * Information about the image's RootFS, including the layer IDs. + * + * @var ImageInspectRootFS|null + */ + protected $rootFS; + /** + * Additional metadata of the image in the local cache. This information + is local to the daemon, and not part of the image itself. + + * + * @var ImageInspectMetadata|null + */ + protected $metadata; + /** + * ID is the content-addressable ID of an image. + + This identifier is a content-addressable digest calculated from the + image's configuration (which includes the digests of layers used by + the image). + + Note that this digest differs from the `RepoDigests` below, which + holds digests of image manifests that reference the image. + + * + * @return string|null + */ + public function getId(): ?string + { + return $this->id; + } + /** + * ID is the content-addressable ID of an image. + + This identifier is a content-addressable digest calculated from the + image's configuration (which includes the digests of layers used by + the image). + + Note that this digest differs from the `RepoDigests` below, which + holds digests of image manifests that reference the image. + + * + * @param string|null $id + * + * @return self + */ + public function setId(?string $id): self + { + $this->initialized['id'] = true; + $this->id = $id; + return $this; + } + /** + * List of image names/tags in the local image cache that reference this + image. + + Multiple image tags can refer to the same image, and this list may be + empty if no tags reference the image, in which case the image is + "untagged", in which case it can still be referenced by its ID. + + * + * @return list|null + */ + public function getRepoTags(): ?array + { + return $this->repoTags; + } + /** + * List of image names/tags in the local image cache that reference this + image. + + Multiple image tags can refer to the same image, and this list may be + empty if no tags reference the image, in which case the image is + "untagged", in which case it can still be referenced by its ID. + + * + * @param list|null $repoTags + * + * @return self + */ + public function setRepoTags(?array $repoTags): self + { + $this->initialized['repoTags'] = true; + $this->repoTags = $repoTags; + return $this; + } + /** + * List of content-addressable digests of locally available image manifests + that the image is referenced from. Multiple manifests can refer to the + same image. + + These digests are usually only available if the image was either pulled + from a registry, or if the image was pushed to a registry, which is when + the manifest is generated and its digest calculated. + + * + * @return list|null + */ + public function getRepoDigests(): ?array + { + return $this->repoDigests; + } + /** + * List of content-addressable digests of locally available image manifests + that the image is referenced from. Multiple manifests can refer to the + same image. + + These digests are usually only available if the image was either pulled + from a registry, or if the image was pushed to a registry, which is when + the manifest is generated and its digest calculated. + + * + * @param list|null $repoDigests + * + * @return self + */ + public function setRepoDigests(?array $repoDigests): self + { + $this->initialized['repoDigests'] = true; + $this->repoDigests = $repoDigests; + return $this; + } + /** + * ID of the parent image. + + Depending on how the image was created, this field may be empty and + is only set for images that were built/created locally. This field + is empty if the image was pulled from an image registry. + + * + * @return string|null + */ + public function getParent(): ?string + { + return $this->parent; + } + /** + * ID of the parent image. + + Depending on how the image was created, this field may be empty and + is only set for images that were built/created locally. This field + is empty if the image was pulled from an image registry. + + * + * @param string|null $parent + * + * @return self + */ + public function setParent(?string $parent): self + { + $this->initialized['parent'] = true; + $this->parent = $parent; + return $this; + } + /** + * Optional message that was set when committing or importing the image. + * + * @return string|null + */ + public function getComment(): ?string + { + return $this->comment; + } + /** + * Optional message that was set when committing or importing the image. + * + * @param string|null $comment + * + * @return self + */ + public function setComment(?string $comment): self + { + $this->initialized['comment'] = true; + $this->comment = $comment; + return $this; + } + /** + * Date and time at which the image was created, formatted in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + This information is only available if present in the image, + and omitted otherwise. + + * + * @return string|null + */ + public function getCreated(): ?string + { + return $this->created; + } + /** + * Date and time at which the image was created, formatted in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + This information is only available if present in the image, + and omitted otherwise. + + * + * @param string|null $created + * + * @return self + */ + public function setCreated(?string $created): self + { + $this->initialized['created'] = true; + $this->created = $created; + return $this; + } + /** + * The version of Docker that was used to build the image. + + Depending on how the image was created, this field may be empty. + + * + * @return string|null + */ + public function getDockerVersion(): ?string + { + return $this->dockerVersion; + } + /** + * The version of Docker that was used to build the image. + + Depending on how the image was created, this field may be empty. + + * + * @param string|null $dockerVersion + * + * @return self + */ + public function setDockerVersion(?string $dockerVersion): self + { + $this->initialized['dockerVersion'] = true; + $this->dockerVersion = $dockerVersion; + return $this; + } + /** + * Name of the author that was specified when committing the image, or as + specified through MAINTAINER (deprecated) in the Dockerfile. + + * + * @return string|null + */ + public function getAuthor(): ?string + { + return $this->author; + } + /** + * Name of the author that was specified when committing the image, or as + specified through MAINTAINER (deprecated) in the Dockerfile. + + * + * @param string|null $author + * + * @return self + */ + public function setAuthor(?string $author): self + { + $this->initialized['author'] = true; + $this->author = $author; + return $this; + } + /** + * Configuration of the image. These fields are used as defaults + when starting a container from the image. + + * + * @return ImageConfig|null + */ + public function getConfig(): ?ImageConfig + { + return $this->config; + } + /** + * Configuration of the image. These fields are used as defaults + when starting a container from the image. + + * + * @param ImageConfig|null $config + * + * @return self + */ + public function setConfig(?ImageConfig $config): self + { + $this->initialized['config'] = true; + $this->config = $config; + return $this; + } + /** + * Hardware CPU architecture that the image runs on. + * + * @return string|null + */ + public function getArchitecture(): ?string + { + return $this->architecture; + } + /** + * Hardware CPU architecture that the image runs on. + * + * @param string|null $architecture + * + * @return self + */ + public function setArchitecture(?string $architecture): self + { + $this->initialized['architecture'] = true; + $this->architecture = $architecture; + return $this; + } + /** + * CPU architecture variant (presently ARM-only). + * + * @return string|null + */ + public function getVariant(): ?string + { + return $this->variant; + } + /** + * CPU architecture variant (presently ARM-only). + * + * @param string|null $variant + * + * @return self + */ + public function setVariant(?string $variant): self + { + $this->initialized['variant'] = true; + $this->variant = $variant; + return $this; + } + /** + * Operating System the image is built to run on. + * + * @return string|null + */ + public function getOs(): ?string + { + return $this->os; + } + /** + * Operating System the image is built to run on. + * + * @param string|null $os + * + * @return self + */ + public function setOs(?string $os): self + { + $this->initialized['os'] = true; + $this->os = $os; + return $this; + } + /** + * Operating System version the image is built to run on (especially + for Windows). + + * + * @return string|null + */ + public function getOsVersion(): ?string + { + return $this->osVersion; + } + /** + * Operating System version the image is built to run on (especially + for Windows). + + * + * @param string|null $osVersion + * + * @return self + */ + public function setOsVersion(?string $osVersion): self + { + $this->initialized['osVersion'] = true; + $this->osVersion = $osVersion; + return $this; + } + /** + * Total size of the image including all layers it is composed of. + * + * @return int|null + */ + public function getSize(): ?int + { + return $this->size; + } + /** + * Total size of the image including all layers it is composed of. + * + * @param int|null $size + * + * @return self + */ + public function setSize(?int $size): self + { + $this->initialized['size'] = true; + $this->size = $size; + return $this; + } + /** + * Total size of the image including all layers it is composed of. + + Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. + + * + * @return int|null + */ + public function getVirtualSize(): ?int + { + return $this->virtualSize; + } + /** + * Total size of the image including all layers it is composed of. + + Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. + + * + * @param int|null $virtualSize + * + * @return self + */ + public function setVirtualSize(?int $virtualSize): self + { + $this->initialized['virtualSize'] = true; + $this->virtualSize = $virtualSize; + return $this; + } + /** + * Information about the storage driver used to store the container's and + image's filesystem. + + * + * @return DriverData|null + */ + public function getGraphDriver(): ?DriverData + { + return $this->graphDriver; + } + /** + * Information about the storage driver used to store the container's and + image's filesystem. + + * + * @param DriverData|null $graphDriver + * + * @return self + */ + public function setGraphDriver(?DriverData $graphDriver): self + { + $this->initialized['graphDriver'] = true; + $this->graphDriver = $graphDriver; + return $this; + } + /** + * Information about the image's RootFS, including the layer IDs. + * + * @return ImageInspectRootFS|null + */ + public function getRootFS(): ?ImageInspectRootFS + { + return $this->rootFS; + } + /** + * Information about the image's RootFS, including the layer IDs. + * + * @param ImageInspectRootFS|null $rootFS + * + * @return self + */ + public function setRootFS(?ImageInspectRootFS $rootFS): self + { + $this->initialized['rootFS'] = true; + $this->rootFS = $rootFS; + return $this; + } + /** + * Additional metadata of the image in the local cache. This information + is local to the daemon, and not part of the image itself. + + * + * @return ImageInspectMetadata|null + */ + public function getMetadata(): ?ImageInspectMetadata + { + return $this->metadata; + } + /** + * Additional metadata of the image in the local cache. This information + is local to the daemon, and not part of the image itself. + + * + * @param ImageInspectMetadata|null $metadata + * + * @return self + */ + public function setMetadata(?ImageInspectMetadata $metadata): self + { + $this->initialized['metadata'] = true; + $this->metadata = $metadata; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ImageInspectMetadata.php b/generated/Model/ImageInspectMetadata.php new file mode 100644 index 000000000..c8e8d7960 --- /dev/null +++ b/generated/Model/ImageInspectMetadata.php @@ -0,0 +1,58 @@ +initialized); + } + /** + * Date and time at which the image was last tagged in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + This information is only available if the image was tagged locally, + and omitted otherwise. + + * + * @var string|null + */ + protected $lastTagTime; + /** + * Date and time at which the image was last tagged in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + This information is only available if the image was tagged locally, + and omitted otherwise. + + * + * @return string|null + */ + public function getLastTagTime(): ?string + { + return $this->lastTagTime; + } + /** + * Date and time at which the image was last tagged in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + This information is only available if the image was tagged locally, + and omitted otherwise. + + * + * @param string|null $lastTagTime + * + * @return self + */ + public function setLastTagTime(?string $lastTagTime): self + { + $this->initialized['lastTagTime'] = true; + $this->lastTagTime = $lastTagTime; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ImageRootFS.php b/generated/Model/ImageInspectRootFS.php similarity index 97% rename from generated/Model/ImageRootFS.php rename to generated/Model/ImageInspectRootFS.php index 9dc3e6682..b2088b54d 100644 --- a/generated/Model/ImageRootFS.php +++ b/generated/Model/ImageInspectRootFS.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class ImageRootFS +class ImageInspectRootFS { /** * @var array diff --git a/generated/Model/ImageManifestSummary.php b/generated/Model/ImageManifestSummary.php new file mode 100644 index 000000000..65720ae5a --- /dev/null +++ b/generated/Model/ImageManifestSummary.php @@ -0,0 +1,253 @@ +initialized); + } + /** + * ID is the content-addressable ID of an image and is the same as the + digest of the image manifest. + + * + * @var string|null + */ + protected $iD; + /** + * A descriptor struct containing digest, media type, and size, as defined in + the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). + + * + * @var OCIDescriptor|null + */ + protected $descriptor; + /** + * Indicates whether all the child content (image config, layers) is fully available locally. + * + * @var bool|null + */ + protected $available; + /** + * + * + * @var ImageManifestSummarySize|null + */ + protected $size; + /** + * The kind of the manifest. + + kind | description + -------------|----------------------------------------------------------- + image | Image manifest that can be used to start a container. + attestation | Attestation manifest produced by the Buildkit builder for a specific image manifest. + + * + * @var string|null + */ + protected $kind; + /** + * The image data for the image manifest. + This field is only populated when Kind is "image". + + * + * @var ImageManifestSummaryImageData|null + */ + protected $imageData; + /** + * The image data for the attestation manifest. + This field is only populated when Kind is "attestation". + + * + * @var ImageManifestSummaryAttestationData|null + */ + protected $attestationData; + /** + * ID is the content-addressable ID of an image and is the same as the + digest of the image manifest. + + * + * @return string|null + */ + public function getID(): ?string + { + return $this->iD; + } + /** + * ID is the content-addressable ID of an image and is the same as the + digest of the image manifest. + + * + * @param string|null $iD + * + * @return self + */ + public function setID(?string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + return $this; + } + /** + * A descriptor struct containing digest, media type, and size, as defined in + the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). + + * + * @return OCIDescriptor|null + */ + public function getDescriptor(): ?OCIDescriptor + { + return $this->descriptor; + } + /** + * A descriptor struct containing digest, media type, and size, as defined in + the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). + + * + * @param OCIDescriptor|null $descriptor + * + * @return self + */ + public function setDescriptor(?OCIDescriptor $descriptor): self + { + $this->initialized['descriptor'] = true; + $this->descriptor = $descriptor; + return $this; + } + /** + * Indicates whether all the child content (image config, layers) is fully available locally. + * + * @return bool|null + */ + public function getAvailable(): ?bool + { + return $this->available; + } + /** + * Indicates whether all the child content (image config, layers) is fully available locally. + * + * @param bool|null $available + * + * @return self + */ + public function setAvailable(?bool $available): self + { + $this->initialized['available'] = true; + $this->available = $available; + return $this; + } + /** + * + * + * @return ImageManifestSummarySize|null + */ + public function getSize(): ?ImageManifestSummarySize + { + return $this->size; + } + /** + * + * + * @param ImageManifestSummarySize|null $size + * + * @return self + */ + public function setSize(?ImageManifestSummarySize $size): self + { + $this->initialized['size'] = true; + $this->size = $size; + return $this; + } + /** + * The kind of the manifest. + + kind | description + -------------|----------------------------------------------------------- + image | Image manifest that can be used to start a container. + attestation | Attestation manifest produced by the Buildkit builder for a specific image manifest. + + * + * @return string|null + */ + public function getKind(): ?string + { + return $this->kind; + } + /** + * The kind of the manifest. + + kind | description + -------------|----------------------------------------------------------- + image | Image manifest that can be used to start a container. + attestation | Attestation manifest produced by the Buildkit builder for a specific image manifest. + + * + * @param string|null $kind + * + * @return self + */ + public function setKind(?string $kind): self + { + $this->initialized['kind'] = true; + $this->kind = $kind; + return $this; + } + /** + * The image data for the image manifest. + This field is only populated when Kind is "image". + + * + * @return ImageManifestSummaryImageData|null + */ + public function getImageData(): ?ImageManifestSummaryImageData + { + return $this->imageData; + } + /** + * The image data for the image manifest. + This field is only populated when Kind is "image". + + * + * @param ImageManifestSummaryImageData|null $imageData + * + * @return self + */ + public function setImageData(?ImageManifestSummaryImageData $imageData): self + { + $this->initialized['imageData'] = true; + $this->imageData = $imageData; + return $this; + } + /** + * The image data for the attestation manifest. + This field is only populated when Kind is "attestation". + + * + * @return ImageManifestSummaryAttestationData|null + */ + public function getAttestationData(): ?ImageManifestSummaryAttestationData + { + return $this->attestationData; + } + /** + * The image data for the attestation manifest. + This field is only populated when Kind is "attestation". + + * + * @param ImageManifestSummaryAttestationData|null $attestationData + * + * @return self + */ + public function setAttestationData(?ImageManifestSummaryAttestationData $attestationData): self + { + $this->initialized['attestationData'] = true; + $this->attestationData = $attestationData; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ImageManifestSummaryAttestationData.php b/generated/Model/ImageManifestSummaryAttestationData.php new file mode 100644 index 000000000..e63863808 --- /dev/null +++ b/generated/Model/ImageManifestSummaryAttestationData.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * The digest of the image manifest that this attestation is for. + * + * @var string|null + */ + protected $for; + /** + * The digest of the image manifest that this attestation is for. + * + * @return string|null + */ + public function getFor(): ?string + { + return $this->for; + } + /** + * The digest of the image manifest that this attestation is for. + * + * @param string|null $for + * + * @return self + */ + public function setFor(?string $for): self + { + $this->initialized['for'] = true; + $this->for = $for; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ImageManifestSummaryImageData.php b/generated/Model/ImageManifestSummaryImageData.php new file mode 100644 index 000000000..5c29ff0ba --- /dev/null +++ b/generated/Model/ImageManifestSummaryImageData.php @@ -0,0 +1,105 @@ +initialized); + } + /** + * Describes the platform which the image in the manifest runs on, as defined + in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md). + + * + * @var OCIPlatform|null + */ + protected $platform; + /** + * The IDs of the containers that are using this image. + * + * @var list|null + */ + protected $containers; + /** + * + * + * @var ImageManifestSummaryImageDataSize|null + */ + protected $size; + /** + * Describes the platform which the image in the manifest runs on, as defined + in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md). + + * + * @return OCIPlatform|null + */ + public function getPlatform(): ?OCIPlatform + { + return $this->platform; + } + /** + * Describes the platform which the image in the manifest runs on, as defined + in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md). + + * + * @param OCIPlatform|null $platform + * + * @return self + */ + public function setPlatform(?OCIPlatform $platform): self + { + $this->initialized['platform'] = true; + $this->platform = $platform; + return $this; + } + /** + * The IDs of the containers that are using this image. + * + * @return list|null + */ + public function getContainers(): ?array + { + return $this->containers; + } + /** + * The IDs of the containers that are using this image. + * + * @param list|null $containers + * + * @return self + */ + public function setContainers(?array $containers): self + { + $this->initialized['containers'] = true; + $this->containers = $containers; + return $this; + } + /** + * + * + * @return ImageManifestSummaryImageDataSize|null + */ + public function getSize(): ?ImageManifestSummaryImageDataSize + { + return $this->size; + } + /** + * + * + * @param ImageManifestSummaryImageDataSize|null $size + * + * @return self + */ + public function setSize(?ImageManifestSummaryImageDataSize $size): self + { + $this->initialized['size'] = true; + $this->size = $size; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ImageManifestSummaryImageDataSize.php b/generated/Model/ImageManifestSummaryImageDataSize.php new file mode 100644 index 000000000..14ce09ee3 --- /dev/null +++ b/generated/Model/ImageManifestSummaryImageDataSize.php @@ -0,0 +1,64 @@ +initialized); + } + /** + * Unpacked is the size (in bytes) of the locally unpacked + (uncompressed) image content that's directly usable by the containers + running this image. + It's independent of the distributable content - e.g. + the image might still have an unpacked data that's still used by + some container even when the distributable/compressed content is + already gone. + + * + * @var int|null + */ + protected $unpacked; + /** + * Unpacked is the size (in bytes) of the locally unpacked + (uncompressed) image content that's directly usable by the containers + running this image. + It's independent of the distributable content - e.g. + the image might still have an unpacked data that's still used by + some container even when the distributable/compressed content is + already gone. + + * + * @return int|null + */ + public function getUnpacked(): ?int + { + return $this->unpacked; + } + /** + * Unpacked is the size (in bytes) of the locally unpacked + (uncompressed) image content that's directly usable by the containers + running this image. + It's independent of the distributable content - e.g. + the image might still have an unpacked data that's still used by + some container even when the distributable/compressed content is + already gone. + + * + * @param int|null $unpacked + * + * @return self + */ + public function setUnpacked(?int $unpacked): self + { + $this->initialized['unpacked'] = true; + $this->unpacked = $unpacked; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ImageManifestSummarySize.php b/generated/Model/ImageManifestSummarySize.php new file mode 100644 index 000000000..91d65489c --- /dev/null +++ b/generated/Model/ImageManifestSummarySize.php @@ -0,0 +1,107 @@ +initialized); + } + /** + * Total is the total size (in bytes) of all the locally present + data (both distributable and non-distributable) that's related to + this manifest and its children. + This equal to the sum of [Content] size AND all the sizes in the + [Size] struct present in the Kind-specific data struct. + For example, for an image kind (Kind == "image") + this would include the size of the image content and unpacked + image snapshots ([Size.Content] + [ImageData.Size.Unpacked]). + + * + * @var int|null + */ + protected $total; + /** + * Content is the size (in bytes) of all the locally present + content in the content store (e.g. image config, layers) + referenced by this manifest and its children. + This only includes blobs in the content store. + + * + * @var int|null + */ + protected $content; + /** + * Total is the total size (in bytes) of all the locally present + data (both distributable and non-distributable) that's related to + this manifest and its children. + This equal to the sum of [Content] size AND all the sizes in the + [Size] struct present in the Kind-specific data struct. + For example, for an image kind (Kind == "image") + this would include the size of the image content and unpacked + image snapshots ([Size.Content] + [ImageData.Size.Unpacked]). + + * + * @return int|null + */ + public function getTotal(): ?int + { + return $this->total; + } + /** + * Total is the total size (in bytes) of all the locally present + data (both distributable and non-distributable) that's related to + this manifest and its children. + This equal to the sum of [Content] size AND all the sizes in the + [Size] struct present in the Kind-specific data struct. + For example, for an image kind (Kind == "image") + this would include the size of the image content and unpacked + image snapshots ([Size.Content] + [ImageData.Size.Unpacked]). + + * + * @param int|null $total + * + * @return self + */ + public function setTotal(?int $total): self + { + $this->initialized['total'] = true; + $this->total = $total; + return $this; + } + /** + * Content is the size (in bytes) of all the locally present + content in the content store (e.g. image config, layers) + referenced by this manifest and its children. + This only includes blobs in the content store. + + * + * @return int|null + */ + public function getContent(): ?int + { + return $this->content; + } + /** + * Content is the size (in bytes) of all the locally present + content in the content store (e.g. image config, layers) + referenced by this manifest and its children. + This only includes blobs in the content store. + + * + * @param int|null $content + * + * @return self + */ + public function setContent(?int $content): self + { + $this->initialized['content'] = true; + $this->content = $content; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ImageSummary.php b/generated/Model/ImageSummary.php index 8a9f5c72b..f67e5001c 100644 --- a/generated/Model/ImageSummary.php +++ b/generated/Model/ImageSummary.php @@ -13,81 +13,149 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * - * - * @var string|null - */ + * ID is the content-addressable ID of an image. + + This identifier is a content-addressable digest calculated from the + image's configuration (which includes the digests of layers used by + the image). + + Note that this digest differs from the `RepoDigests` below, which + holds digests of image manifests that reference the image. + + * + * @var string|null + */ protected $id; /** - * - * - * @var string|null - */ + * ID of the parent image. + + Depending on how the image was created, this field may be empty and + is only set for images that were built/created locally. This field + is empty if the image was pulled from an image registry. + + * + * @var string|null + */ protected $parentId; /** - * - * - * @var list|null - */ + * List of image names/tags in the local image cache that reference this + image. + + Multiple image tags can refer to the same image, and this list may be + empty if no tags reference the image, in which case the image is + "untagged", in which case it can still be referenced by its ID. + + * + * @var list|null + */ protected $repoTags; /** - * - * - * @var list|null - */ + * List of content-addressable digests of locally available image manifests + that the image is referenced from. Multiple manifests can refer to the + same image. + + These digests are usually only available if the image was either pulled + from a registry, or if the image was pushed to a registry, which is when + the manifest is generated and its digest calculated. + + * + * @var list|null + */ protected $repoDigests; /** - * - * - * @var int|null - */ + * Date and time at which the image was created as a Unix timestamp + (number of seconds since EPOCH). + + * + * @var int|null + */ protected $created; /** - * + * Total size of the image including all layers it is composed of. * * @var int|null */ protected $size; /** - * - * - * @var int|null - */ + * Total size of image layers that are shared between this image and other + images. + + This size is not calculated by default. `-1` indicates that the value + has not been set / calculated. + + * + * @var int|null + */ protected $sharedSize; /** - * - * - * @var int|null - */ + * Total size of the image including all layers it is composed of. + + Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. + * + * @var int|null + */ protected $virtualSize; /** - * + * User-defined key/value metadata. * * @var array|null */ protected $labels; /** - * - * - * @var int|null - */ + * Number of containers using this image. Includes both stopped and running + containers. + + This size is not calculated by default, and depends on which API endpoint + is used. `-1` indicates that the value has not been set / calculated. + + * + * @var int|null + */ protected $containers; /** - * - * - * @return string|null - */ + * Manifests is a list of manifests available in this image. + It provides a more detailed view of the platform-specific image manifests + or other image-attached data like build attestations. + + WARNING: This is experimental and may change at any time without any backward + compatibility. + + * + * @var list|null + */ + protected $manifests; + /** + * ID is the content-addressable ID of an image. + + This identifier is a content-addressable digest calculated from the + image's configuration (which includes the digests of layers used by + the image). + + Note that this digest differs from the `RepoDigests` below, which + holds digests of image manifests that reference the image. + + * + * @return string|null + */ public function getId(): ?string { return $this->id; } /** - * - * - * @param string|null $id - * - * @return self - */ + * ID is the content-addressable ID of an image. + + This identifier is a content-addressable digest calculated from the + image's configuration (which includes the digests of layers used by + the image). + + Note that this digest differs from the `RepoDigests` below, which + holds digests of image manifests that reference the image. + + * + * @param string|null $id + * + * @return self + */ public function setId(?string $id): self { $this->initialized['id'] = true; @@ -95,21 +163,31 @@ public function setId(?string $id): self return $this; } /** - * - * - * @return string|null - */ + * ID of the parent image. + + Depending on how the image was created, this field may be empty and + is only set for images that were built/created locally. This field + is empty if the image was pulled from an image registry. + + * + * @return string|null + */ public function getParentId(): ?string { return $this->parentId; } /** - * - * - * @param string|null $parentId - * - * @return self - */ + * ID of the parent image. + + Depending on how the image was created, this field may be empty and + is only set for images that were built/created locally. This field + is empty if the image was pulled from an image registry. + + * + * @param string|null $parentId + * + * @return self + */ public function setParentId(?string $parentId): self { $this->initialized['parentId'] = true; @@ -117,21 +195,33 @@ public function setParentId(?string $parentId): self return $this; } /** - * - * - * @return list|null - */ + * List of image names/tags in the local image cache that reference this + image. + + Multiple image tags can refer to the same image, and this list may be + empty if no tags reference the image, in which case the image is + "untagged", in which case it can still be referenced by its ID. + + * + * @return list|null + */ public function getRepoTags(): ?array { return $this->repoTags; } /** - * - * - * @param list|null $repoTags - * - * @return self - */ + * List of image names/tags in the local image cache that reference this + image. + + Multiple image tags can refer to the same image, and this list may be + empty if no tags reference the image, in which case the image is + "untagged", in which case it can still be referenced by its ID. + + * + * @param list|null $repoTags + * + * @return self + */ public function setRepoTags(?array $repoTags): self { $this->initialized['repoTags'] = true; @@ -139,21 +229,35 @@ public function setRepoTags(?array $repoTags): self return $this; } /** - * - * - * @return list|null - */ + * List of content-addressable digests of locally available image manifests + that the image is referenced from. Multiple manifests can refer to the + same image. + + These digests are usually only available if the image was either pulled + from a registry, or if the image was pushed to a registry, which is when + the manifest is generated and its digest calculated. + + * + * @return list|null + */ public function getRepoDigests(): ?array { return $this->repoDigests; } /** - * - * - * @param list|null $repoDigests - * - * @return self - */ + * List of content-addressable digests of locally available image manifests + that the image is referenced from. Multiple manifests can refer to the + same image. + + These digests are usually only available if the image was either pulled + from a registry, or if the image was pushed to a registry, which is when + the manifest is generated and its digest calculated. + + * + * @param list|null $repoDigests + * + * @return self + */ public function setRepoDigests(?array $repoDigests): self { $this->initialized['repoDigests'] = true; @@ -161,21 +265,25 @@ public function setRepoDigests(?array $repoDigests): self return $this; } /** - * - * - * @return int|null - */ + * Date and time at which the image was created as a Unix timestamp + (number of seconds since EPOCH). + + * + * @return int|null + */ public function getCreated(): ?int { return $this->created; } /** - * - * - * @param int|null $created - * - * @return self - */ + * Date and time at which the image was created as a Unix timestamp + (number of seconds since EPOCH). + + * + * @param int|null $created + * + * @return self + */ public function setCreated(?int $created): self { $this->initialized['created'] = true; @@ -183,7 +291,7 @@ public function setCreated(?int $created): self return $this; } /** - * + * Total size of the image including all layers it is composed of. * * @return int|null */ @@ -192,7 +300,7 @@ public function getSize(): ?int return $this->size; } /** - * + * Total size of the image including all layers it is composed of. * * @param int|null $size * @@ -205,21 +313,31 @@ public function setSize(?int $size): self return $this; } /** - * - * - * @return int|null - */ + * Total size of image layers that are shared between this image and other + images. + + This size is not calculated by default. `-1` indicates that the value + has not been set / calculated. + + * + * @return int|null + */ public function getSharedSize(): ?int { return $this->sharedSize; } /** - * - * - * @param int|null $sharedSize - * - * @return self - */ + * Total size of image layers that are shared between this image and other + images. + + This size is not calculated by default. `-1` indicates that the value + has not been set / calculated. + + * + * @param int|null $sharedSize + * + * @return self + */ public function setSharedSize(?int $sharedSize): self { $this->initialized['sharedSize'] = true; @@ -227,21 +345,25 @@ public function setSharedSize(?int $sharedSize): self return $this; } /** - * - * - * @return int|null - */ + * Total size of the image including all layers it is composed of. + + Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. + * + * @return int|null + */ public function getVirtualSize(): ?int { return $this->virtualSize; } /** - * - * - * @param int|null $virtualSize - * - * @return self - */ + * Total size of the image including all layers it is composed of. + + Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. + * + * @param int|null $virtualSize + * + * @return self + */ public function setVirtualSize(?int $virtualSize): self { $this->initialized['virtualSize'] = true; @@ -249,7 +371,7 @@ public function setVirtualSize(?int $virtualSize): self return $this; } /** - * + * User-defined key/value metadata. * * @return array|null */ @@ -258,7 +380,7 @@ public function getLabels(): ?iterable return $this->labels; } /** - * + * User-defined key/value metadata. * * @param array|null $labels * @@ -271,25 +393,69 @@ public function setLabels(?iterable $labels): self return $this; } /** - * - * - * @return int|null - */ + * Number of containers using this image. Includes both stopped and running + containers. + + This size is not calculated by default, and depends on which API endpoint + is used. `-1` indicates that the value has not been set / calculated. + + * + * @return int|null + */ public function getContainers(): ?int { return $this->containers; } /** - * - * - * @param int|null $containers - * - * @return self - */ + * Number of containers using this image. Includes both stopped and running + containers. + + This size is not calculated by default, and depends on which API endpoint + is used. `-1` indicates that the value has not been set / calculated. + + * + * @param int|null $containers + * + * @return self + */ public function setContainers(?int $containers): self { $this->initialized['containers'] = true; $this->containers = $containers; return $this; } + /** + * Manifests is a list of manifests available in this image. + It provides a more detailed view of the platform-specific image manifests + or other image-attached data like build attestations. + + WARNING: This is experimental and may change at any time without any backward + compatibility. + + * + * @return list|null + */ + public function getManifests(): ?array + { + return $this->manifests; + } + /** + * Manifests is a list of manifests available in this image. + It provides a more detailed view of the platform-specific image manifests + or other image-attached data like build attestations. + + WARNING: This is experimental and may change at any time without any backward + compatibility. + + * + * @param list|null $manifests + * + * @return self + */ + public function setManifests(?array $manifests): self + { + $this->initialized['manifests'] = true; + $this->manifests = $manifests; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/ImagesPrunePostResponse200.php b/generated/Model/ImagesPrunePostResponse200.php index 28f68765d..e990cd83c 100644 --- a/generated/Model/ImagesPrunePostResponse200.php +++ b/generated/Model/ImagesPrunePostResponse200.php @@ -15,7 +15,7 @@ public function isInitialized($property): bool /** * Images that were deleted * - * @var list|null + * @var list|null */ protected $imagesDeleted; /** @@ -27,7 +27,7 @@ public function isInitialized($property): bool /** * Images that were deleted * - * @return list|null + * @return list|null */ public function getImagesDeleted(): ?array { @@ -36,7 +36,7 @@ public function getImagesDeleted(): ?array /** * Images that were deleted * - * @param list|null $imagesDeleted + * @param list|null $imagesDeleted * * @return self */ diff --git a/generated/Model/ImagesSearchGetResponse200Item.php b/generated/Model/ImagesSearchGetResponse200Item.php index 4fded414c..ea23779cd 100644 --- a/generated/Model/ImagesSearchGetResponse200Item.php +++ b/generated/Model/ImagesSearchGetResponse200Item.php @@ -25,10 +25,15 @@ public function isInitialized($property): bool */ protected $isOfficial; /** - * - * - * @var bool|null - */ + * Whether this repository has automated builds enabled. + +


+ + > **Deprecated**: This field is deprecated and will always be "false". + + * + * @var bool|null + */ protected $isAutomated; /** * @@ -87,21 +92,31 @@ public function setIsOfficial(?bool $isOfficial): self return $this; } /** - * - * - * @return bool|null - */ + * Whether this repository has automated builds enabled. + +


+ + > **Deprecated**: This field is deprecated and will always be "false". + + * + * @return bool|null + */ public function getIsAutomated(): ?bool { return $this->isAutomated; } /** - * - * - * @param bool|null $isAutomated - * - * @return self - */ + * Whether this repository has automated builds enabled. + +


+ + > **Deprecated**: This field is deprecated and will always be "false". + + * + * @param bool|null $isAutomated + * + * @return self + */ public function setIsAutomated(?bool $isAutomated): self { $this->initialized['isAutomated'] = true; diff --git a/generated/Model/IndexInfo.php b/generated/Model/IndexInfo.php new file mode 100644 index 000000000..7962f47f9 --- /dev/null +++ b/generated/Model/IndexInfo.php @@ -0,0 +1,163 @@ +initialized); + } + /** + * Name of the registry, such as "docker.io". + * + * @var string|null + */ + protected $name; + /** + * List of mirrors, expressed as URIs. + * + * @var list|null + */ + protected $mirrors; + /** + * Indicates if the registry is part of the list of insecure + registries. + + If `false`, the registry is insecure. Insecure registries accept + un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from + unknown CAs) communication. + + > **Warning**: Insecure registries can be useful when running a local + > registry. However, because its use creates security vulnerabilities + > it should ONLY be enabled for testing purposes. For increased + > security, users should add their CA to their system's list of + > trusted CAs instead of enabling this option. + + * + * @var bool|null + */ + protected $secure; + /** + * Indicates whether this is an official registry (i.e., Docker Hub / docker.io) + * + * @var bool|null + */ + protected $official; + /** + * Name of the registry, such as "docker.io". + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * Name of the registry, such as "docker.io". + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * List of mirrors, expressed as URIs. + * + * @return list|null + */ + public function getMirrors(): ?array + { + return $this->mirrors; + } + /** + * List of mirrors, expressed as URIs. + * + * @param list|null $mirrors + * + * @return self + */ + public function setMirrors(?array $mirrors): self + { + $this->initialized['mirrors'] = true; + $this->mirrors = $mirrors; + return $this; + } + /** + * Indicates if the registry is part of the list of insecure + registries. + + If `false`, the registry is insecure. Insecure registries accept + un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from + unknown CAs) communication. + + > **Warning**: Insecure registries can be useful when running a local + > registry. However, because its use creates security vulnerabilities + > it should ONLY be enabled for testing purposes. For increased + > security, users should add their CA to their system's list of + > trusted CAs instead of enabling this option. + + * + * @return bool|null + */ + public function getSecure(): ?bool + { + return $this->secure; + } + /** + * Indicates if the registry is part of the list of insecure + registries. + + If `false`, the registry is insecure. Insecure registries accept + un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from + unknown CAs) communication. + + > **Warning**: Insecure registries can be useful when running a local + > registry. However, because its use creates security vulnerabilities + > it should ONLY be enabled for testing purposes. For increased + > security, users should add their CA to their system's list of + > trusted CAs instead of enabling this option. + + * + * @param bool|null $secure + * + * @return self + */ + public function setSecure(?bool $secure): self + { + $this->initialized['secure'] = true; + $this->secure = $secure; + return $this; + } + /** + * Indicates whether this is an official registry (i.e., Docker Hub / docker.io) + * + * @return bool|null + */ + public function getOfficial(): ?bool + { + return $this->official; + } + /** + * Indicates whether this is an official registry (i.e., Docker Hub / docker.io) + * + * @param bool|null $official + * + * @return self + */ + public function setOfficial(?bool $official): self + { + $this->initialized['official'] = true; + $this->official = $official; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/InfoGetResponse200.php b/generated/Model/InfoGetResponse200.php deleted file mode 100644 index 2e19dcf5f..000000000 --- a/generated/Model/InfoGetResponse200.php +++ /dev/null @@ -1,1163 +0,0 @@ -initialized); - } - /** - * - * - * @var string|null - */ - protected $architecture; - /** - * - * - * @var int|null - */ - protected $containers; - /** - * - * - * @var int|null - */ - protected $containersRunning; - /** - * - * - * @var int|null - */ - protected $containersStopped; - /** - * - * - * @var int|null - */ - protected $containersPaused; - /** - * - * - * @var bool|null - */ - protected $cpuCfsPeriod; - /** - * - * - * @var bool|null - */ - protected $cpuCfsQuota; - /** - * - * - * @var bool|null - */ - protected $debug; - /** - * - * - * @var string|null - */ - protected $discoveryBackend; - /** - * - * - * @var string|null - */ - protected $dockerRootDir; - /** - * - * - * @var string|null - */ - protected $driver; - /** - * - * - * @var list>|null - */ - protected $driverStatus; - /** - * - * - * @var list>|null - */ - protected $systemStatus; - /** - * - * - * @var InfoGetResponse200Plugins|null - */ - protected $plugins; - /** - * - * - * @var bool|null - */ - protected $experimentalBuild; - /** - * - * - * @var string|null - */ - protected $httpProxy; - /** - * - * - * @var string|null - */ - protected $httpsProxy; - /** - * - * - * @var string|null - */ - protected $iD; - /** - * - * - * @var bool|null - */ - protected $iPv4Forwarding; - /** - * - * - * @var int|null - */ - protected $images; - /** - * - * - * @var string|null - */ - protected $indexServerAddress; - /** - * - * - * @var string|null - */ - protected $initPath; - /** - * - * - * @var string|null - */ - protected $initSha1; - /** - * - * - * @var string|null - */ - protected $kernelVersion; - /** - * - * - * @var list|null - */ - protected $labels; - /** - * - * - * @var int|null - */ - protected $memTotal; - /** - * - * - * @var bool|null - */ - protected $memoryLimit; - /** - * - * - * @var int|null - */ - protected $nCPU; - /** - * - * - * @var int|null - */ - protected $nEventsListener; - /** - * - * - * @var int|null - */ - protected $nFd; - /** - * - * - * @var int|null - */ - protected $nGoroutines; - /** - * - * - * @var string|null - */ - protected $name; - /** - * - * - * @var string|null - */ - protected $noProxy; - /** - * - * - * @var bool|null - */ - protected $oomKillDisable; - /** - * - * - * @var string|null - */ - protected $oSType; - /** - * - * - * @var int|null - */ - protected $oomScoreAdj; - /** - * - * - * @var string|null - */ - protected $operatingSystem; - /** - * - * - * @var InfoGetResponse200RegistryConfig|null - */ - protected $registryConfig; - /** - * - * - * @var bool|null - */ - protected $swapLimit; - /** - * - * - * @var string|null - */ - protected $systemTime; - /** - * - * - * @var string|null - */ - protected $serverVersion; - /** - * - * - * @return string|null - */ - public function getArchitecture(): ?string - { - return $this->architecture; - } - /** - * - * - * @param string|null $architecture - * - * @return self - */ - public function setArchitecture(?string $architecture): self - { - $this->initialized['architecture'] = true; - $this->architecture = $architecture; - return $this; - } - /** - * - * - * @return int|null - */ - public function getContainers(): ?int - { - return $this->containers; - } - /** - * - * - * @param int|null $containers - * - * @return self - */ - public function setContainers(?int $containers): self - { - $this->initialized['containers'] = true; - $this->containers = $containers; - return $this; - } - /** - * - * - * @return int|null - */ - public function getContainersRunning(): ?int - { - return $this->containersRunning; - } - /** - * - * - * @param int|null $containersRunning - * - * @return self - */ - public function setContainersRunning(?int $containersRunning): self - { - $this->initialized['containersRunning'] = true; - $this->containersRunning = $containersRunning; - return $this; - } - /** - * - * - * @return int|null - */ - public function getContainersStopped(): ?int - { - return $this->containersStopped; - } - /** - * - * - * @param int|null $containersStopped - * - * @return self - */ - public function setContainersStopped(?int $containersStopped): self - { - $this->initialized['containersStopped'] = true; - $this->containersStopped = $containersStopped; - return $this; - } - /** - * - * - * @return int|null - */ - public function getContainersPaused(): ?int - { - return $this->containersPaused; - } - /** - * - * - * @param int|null $containersPaused - * - * @return self - */ - public function setContainersPaused(?int $containersPaused): self - { - $this->initialized['containersPaused'] = true; - $this->containersPaused = $containersPaused; - return $this; - } - /** - * - * - * @return bool|null - */ - public function getCpuCfsPeriod(): ?bool - { - return $this->cpuCfsPeriod; - } - /** - * - * - * @param bool|null $cpuCfsPeriod - * - * @return self - */ - public function setCpuCfsPeriod(?bool $cpuCfsPeriod): self - { - $this->initialized['cpuCfsPeriod'] = true; - $this->cpuCfsPeriod = $cpuCfsPeriod; - return $this; - } - /** - * - * - * @return bool|null - */ - public function getCpuCfsQuota(): ?bool - { - return $this->cpuCfsQuota; - } - /** - * - * - * @param bool|null $cpuCfsQuota - * - * @return self - */ - public function setCpuCfsQuota(?bool $cpuCfsQuota): self - { - $this->initialized['cpuCfsQuota'] = true; - $this->cpuCfsQuota = $cpuCfsQuota; - return $this; - } - /** - * - * - * @return bool|null - */ - public function getDebug(): ?bool - { - return $this->debug; - } - /** - * - * - * @param bool|null $debug - * - * @return self - */ - public function setDebug(?bool $debug): self - { - $this->initialized['debug'] = true; - $this->debug = $debug; - return $this; - } - /** - * - * - * @return string|null - */ - public function getDiscoveryBackend(): ?string - { - return $this->discoveryBackend; - } - /** - * - * - * @param string|null $discoveryBackend - * - * @return self - */ - public function setDiscoveryBackend(?string $discoveryBackend): self - { - $this->initialized['discoveryBackend'] = true; - $this->discoveryBackend = $discoveryBackend; - return $this; - } - /** - * - * - * @return string|null - */ - public function getDockerRootDir(): ?string - { - return $this->dockerRootDir; - } - /** - * - * - * @param string|null $dockerRootDir - * - * @return self - */ - public function setDockerRootDir(?string $dockerRootDir): self - { - $this->initialized['dockerRootDir'] = true; - $this->dockerRootDir = $dockerRootDir; - return $this; - } - /** - * - * - * @return string|null - */ - public function getDriver(): ?string - { - return $this->driver; - } - /** - * - * - * @param string|null $driver - * - * @return self - */ - public function setDriver(?string $driver): self - { - $this->initialized['driver'] = true; - $this->driver = $driver; - return $this; - } - /** - * - * - * @return list>|null - */ - public function getDriverStatus(): ?array - { - return $this->driverStatus; - } - /** - * - * - * @param list>|null $driverStatus - * - * @return self - */ - public function setDriverStatus(?array $driverStatus): self - { - $this->initialized['driverStatus'] = true; - $this->driverStatus = $driverStatus; - return $this; - } - /** - * - * - * @return list>|null - */ - public function getSystemStatus(): ?array - { - return $this->systemStatus; - } - /** - * - * - * @param list>|null $systemStatus - * - * @return self - */ - public function setSystemStatus(?array $systemStatus): self - { - $this->initialized['systemStatus'] = true; - $this->systemStatus = $systemStatus; - return $this; - } - /** - * - * - * @return InfoGetResponse200Plugins|null - */ - public function getPlugins(): ?InfoGetResponse200Plugins - { - return $this->plugins; - } - /** - * - * - * @param InfoGetResponse200Plugins|null $plugins - * - * @return self - */ - public function setPlugins(?InfoGetResponse200Plugins $plugins): self - { - $this->initialized['plugins'] = true; - $this->plugins = $plugins; - return $this; - } - /** - * - * - * @return bool|null - */ - public function getExperimentalBuild(): ?bool - { - return $this->experimentalBuild; - } - /** - * - * - * @param bool|null $experimentalBuild - * - * @return self - */ - public function setExperimentalBuild(?bool $experimentalBuild): self - { - $this->initialized['experimentalBuild'] = true; - $this->experimentalBuild = $experimentalBuild; - return $this; - } - /** - * - * - * @return string|null - */ - public function getHttpProxy(): ?string - { - return $this->httpProxy; - } - /** - * - * - * @param string|null $httpProxy - * - * @return self - */ - public function setHttpProxy(?string $httpProxy): self - { - $this->initialized['httpProxy'] = true; - $this->httpProxy = $httpProxy; - return $this; - } - /** - * - * - * @return string|null - */ - public function getHttpsProxy(): ?string - { - return $this->httpsProxy; - } - /** - * - * - * @param string|null $httpsProxy - * - * @return self - */ - public function setHttpsProxy(?string $httpsProxy): self - { - $this->initialized['httpsProxy'] = true; - $this->httpsProxy = $httpsProxy; - return $this; - } - /** - * - * - * @return string|null - */ - public function getID(): ?string - { - return $this->iD; - } - /** - * - * - * @param string|null $iD - * - * @return self - */ - public function setID(?string $iD): self - { - $this->initialized['iD'] = true; - $this->iD = $iD; - return $this; - } - /** - * - * - * @return bool|null - */ - public function getIPv4Forwarding(): ?bool - { - return $this->iPv4Forwarding; - } - /** - * - * - * @param bool|null $iPv4Forwarding - * - * @return self - */ - public function setIPv4Forwarding(?bool $iPv4Forwarding): self - { - $this->initialized['iPv4Forwarding'] = true; - $this->iPv4Forwarding = $iPv4Forwarding; - return $this; - } - /** - * - * - * @return int|null - */ - public function getImages(): ?int - { - return $this->images; - } - /** - * - * - * @param int|null $images - * - * @return self - */ - public function setImages(?int $images): self - { - $this->initialized['images'] = true; - $this->images = $images; - return $this; - } - /** - * - * - * @return string|null - */ - public function getIndexServerAddress(): ?string - { - return $this->indexServerAddress; - } - /** - * - * - * @param string|null $indexServerAddress - * - * @return self - */ - public function setIndexServerAddress(?string $indexServerAddress): self - { - $this->initialized['indexServerAddress'] = true; - $this->indexServerAddress = $indexServerAddress; - return $this; - } - /** - * - * - * @return string|null - */ - public function getInitPath(): ?string - { - return $this->initPath; - } - /** - * - * - * @param string|null $initPath - * - * @return self - */ - public function setInitPath(?string $initPath): self - { - $this->initialized['initPath'] = true; - $this->initPath = $initPath; - return $this; - } - /** - * - * - * @return string|null - */ - public function getInitSha1(): ?string - { - return $this->initSha1; - } - /** - * - * - * @param string|null $initSha1 - * - * @return self - */ - public function setInitSha1(?string $initSha1): self - { - $this->initialized['initSha1'] = true; - $this->initSha1 = $initSha1; - return $this; - } - /** - * - * - * @return string|null - */ - public function getKernelVersion(): ?string - { - return $this->kernelVersion; - } - /** - * - * - * @param string|null $kernelVersion - * - * @return self - */ - public function setKernelVersion(?string $kernelVersion): self - { - $this->initialized['kernelVersion'] = true; - $this->kernelVersion = $kernelVersion; - return $this; - } - /** - * - * - * @return list|null - */ - public function getLabels(): ?array - { - return $this->labels; - } - /** - * - * - * @param list|null $labels - * - * @return self - */ - public function setLabels(?array $labels): self - { - $this->initialized['labels'] = true; - $this->labels = $labels; - return $this; - } - /** - * - * - * @return int|null - */ - public function getMemTotal(): ?int - { - return $this->memTotal; - } - /** - * - * - * @param int|null $memTotal - * - * @return self - */ - public function setMemTotal(?int $memTotal): self - { - $this->initialized['memTotal'] = true; - $this->memTotal = $memTotal; - return $this; - } - /** - * - * - * @return bool|null - */ - public function getMemoryLimit(): ?bool - { - return $this->memoryLimit; - } - /** - * - * - * @param bool|null $memoryLimit - * - * @return self - */ - public function setMemoryLimit(?bool $memoryLimit): self - { - $this->initialized['memoryLimit'] = true; - $this->memoryLimit = $memoryLimit; - return $this; - } - /** - * - * - * @return int|null - */ - public function getNCPU(): ?int - { - return $this->nCPU; - } - /** - * - * - * @param int|null $nCPU - * - * @return self - */ - public function setNCPU(?int $nCPU): self - { - $this->initialized['nCPU'] = true; - $this->nCPU = $nCPU; - return $this; - } - /** - * - * - * @return int|null - */ - public function getNEventsListener(): ?int - { - return $this->nEventsListener; - } - /** - * - * - * @param int|null $nEventsListener - * - * @return self - */ - public function setNEventsListener(?int $nEventsListener): self - { - $this->initialized['nEventsListener'] = true; - $this->nEventsListener = $nEventsListener; - return $this; - } - /** - * - * - * @return int|null - */ - public function getNFd(): ?int - { - return $this->nFd; - } - /** - * - * - * @param int|null $nFd - * - * @return self - */ - public function setNFd(?int $nFd): self - { - $this->initialized['nFd'] = true; - $this->nFd = $nFd; - return $this; - } - /** - * - * - * @return int|null - */ - public function getNGoroutines(): ?int - { - return $this->nGoroutines; - } - /** - * - * - * @param int|null $nGoroutines - * - * @return self - */ - public function setNGoroutines(?int $nGoroutines): self - { - $this->initialized['nGoroutines'] = true; - $this->nGoroutines = $nGoroutines; - return $this; - } - /** - * - * - * @return string|null - */ - public function getName(): ?string - { - return $this->name; - } - /** - * - * - * @param string|null $name - * - * @return self - */ - public function setName(?string $name): self - { - $this->initialized['name'] = true; - $this->name = $name; - return $this; - } - /** - * - * - * @return string|null - */ - public function getNoProxy(): ?string - { - return $this->noProxy; - } - /** - * - * - * @param string|null $noProxy - * - * @return self - */ - public function setNoProxy(?string $noProxy): self - { - $this->initialized['noProxy'] = true; - $this->noProxy = $noProxy; - return $this; - } - /** - * - * - * @return bool|null - */ - public function getOomKillDisable(): ?bool - { - return $this->oomKillDisable; - } - /** - * - * - * @param bool|null $oomKillDisable - * - * @return self - */ - public function setOomKillDisable(?bool $oomKillDisable): self - { - $this->initialized['oomKillDisable'] = true; - $this->oomKillDisable = $oomKillDisable; - return $this; - } - /** - * - * - * @return string|null - */ - public function getOSType(): ?string - { - return $this->oSType; - } - /** - * - * - * @param string|null $oSType - * - * @return self - */ - public function setOSType(?string $oSType): self - { - $this->initialized['oSType'] = true; - $this->oSType = $oSType; - return $this; - } - /** - * - * - * @return int|null - */ - public function getOomScoreAdj(): ?int - { - return $this->oomScoreAdj; - } - /** - * - * - * @param int|null $oomScoreAdj - * - * @return self - */ - public function setOomScoreAdj(?int $oomScoreAdj): self - { - $this->initialized['oomScoreAdj'] = true; - $this->oomScoreAdj = $oomScoreAdj; - return $this; - } - /** - * - * - * @return string|null - */ - public function getOperatingSystem(): ?string - { - return $this->operatingSystem; - } - /** - * - * - * @param string|null $operatingSystem - * - * @return self - */ - public function setOperatingSystem(?string $operatingSystem): self - { - $this->initialized['operatingSystem'] = true; - $this->operatingSystem = $operatingSystem; - return $this; - } - /** - * - * - * @return InfoGetResponse200RegistryConfig|null - */ - public function getRegistryConfig(): ?InfoGetResponse200RegistryConfig - { - return $this->registryConfig; - } - /** - * - * - * @param InfoGetResponse200RegistryConfig|null $registryConfig - * - * @return self - */ - public function setRegistryConfig(?InfoGetResponse200RegistryConfig $registryConfig): self - { - $this->initialized['registryConfig'] = true; - $this->registryConfig = $registryConfig; - return $this; - } - /** - * - * - * @return bool|null - */ - public function getSwapLimit(): ?bool - { - return $this->swapLimit; - } - /** - * - * - * @param bool|null $swapLimit - * - * @return self - */ - public function setSwapLimit(?bool $swapLimit): self - { - $this->initialized['swapLimit'] = true; - $this->swapLimit = $swapLimit; - return $this; - } - /** - * - * - * @return string|null - */ - public function getSystemTime(): ?string - { - return $this->systemTime; - } - /** - * - * - * @param string|null $systemTime - * - * @return self - */ - public function setSystemTime(?string $systemTime): self - { - $this->initialized['systemTime'] = true; - $this->systemTime = $systemTime; - return $this; - } - /** - * - * - * @return string|null - */ - public function getServerVersion(): ?string - { - return $this->serverVersion; - } - /** - * - * - * @param string|null $serverVersion - * - * @return self - */ - public function setServerVersion(?string $serverVersion): self - { - $this->initialized['serverVersion'] = true; - $this->serverVersion = $serverVersion; - return $this; - } -} \ No newline at end of file diff --git a/generated/Model/InfoGetResponse200Plugins.php b/generated/Model/InfoGetResponse200Plugins.php deleted file mode 100644 index 63fb7587d..000000000 --- a/generated/Model/InfoGetResponse200Plugins.php +++ /dev/null @@ -1,71 +0,0 @@ -initialized); - } - /** - * - * - * @var list|null - */ - protected $volume; - /** - * - * - * @var list|null - */ - protected $network; - /** - * - * - * @return list|null - */ - public function getVolume(): ?array - { - return $this->volume; - } - /** - * - * - * @param list|null $volume - * - * @return self - */ - public function setVolume(?array $volume): self - { - $this->initialized['volume'] = true; - $this->volume = $volume; - return $this; - } - /** - * - * - * @return list|null - */ - public function getNetwork(): ?array - { - return $this->network; - } - /** - * - * - * @param list|null $network - * - * @return self - */ - public function setNetwork(?array $network): self - { - $this->initialized['network'] = true; - $this->network = $network; - return $this; - } -} \ No newline at end of file diff --git a/generated/Model/InfoGetResponse200RegistryConfig.php b/generated/Model/InfoGetResponse200RegistryConfig.php deleted file mode 100644 index 49b6c765b..000000000 --- a/generated/Model/InfoGetResponse200RegistryConfig.php +++ /dev/null @@ -1,71 +0,0 @@ -initialized); - } - /** - * - * - * @var array|null - */ - protected $indexConfigs; - /** - * - * - * @var list|null - */ - protected $insecureRegistryCIDRs; - /** - * - * - * @return array|null - */ - public function getIndexConfigs(): ?iterable - { - return $this->indexConfigs; - } - /** - * - * - * @param array|null $indexConfigs - * - * @return self - */ - public function setIndexConfigs(?iterable $indexConfigs): self - { - $this->initialized['indexConfigs'] = true; - $this->indexConfigs = $indexConfigs; - return $this; - } - /** - * - * - * @return list|null - */ - public function getInsecureRegistryCIDRs(): ?array - { - return $this->insecureRegistryCIDRs; - } - /** - * - * - * @param list|null $insecureRegistryCIDRs - * - * @return self - */ - public function setInsecureRegistryCIDRs(?array $insecureRegistryCIDRs): self - { - $this->initialized['insecureRegistryCIDRs'] = true; - $this->insecureRegistryCIDRs = $insecureRegistryCIDRs; - return $this; - } -} \ No newline at end of file diff --git a/generated/Model/InfoGetResponse200RegistryConfigIndexConfigsItem.php b/generated/Model/InfoGetResponse200RegistryConfigIndexConfigsItem.php deleted file mode 100644 index 0088879a9..000000000 --- a/generated/Model/InfoGetResponse200RegistryConfigIndexConfigsItem.php +++ /dev/null @@ -1,127 +0,0 @@ -initialized); - } - /** - * - * - * @var list|null - */ - protected $mirrors; - /** - * - * - * @var string|null - */ - protected $name; - /** - * - * - * @var bool|null - */ - protected $official; - /** - * - * - * @var bool|null - */ - protected $secure; - /** - * - * - * @return list|null - */ - public function getMirrors(): ?array - { - return $this->mirrors; - } - /** - * - * - * @param list|null $mirrors - * - * @return self - */ - public function setMirrors(?array $mirrors): self - { - $this->initialized['mirrors'] = true; - $this->mirrors = $mirrors; - return $this; - } - /** - * - * - * @return string|null - */ - public function getName(): ?string - { - return $this->name; - } - /** - * - * - * @param string|null $name - * - * @return self - */ - public function setName(?string $name): self - { - $this->initialized['name'] = true; - $this->name = $name; - return $this; - } - /** - * - * - * @return bool|null - */ - public function getOfficial(): ?bool - { - return $this->official; - } - /** - * - * - * @param bool|null $official - * - * @return self - */ - public function setOfficial(?bool $official): self - { - $this->initialized['official'] = true; - $this->official = $official; - return $this; - } - /** - * - * - * @return bool|null - */ - public function getSecure(): ?bool - { - return $this->secure; - } - /** - * - * - * @param bool|null $secure - * - * @return self - */ - public function setSecure(?bool $secure): self - { - $this->initialized['secure'] = true; - $this->secure = $secure; - return $this; - } -} \ No newline at end of file diff --git a/generated/Model/SwarmGetResponse200JoinTokens.php b/generated/Model/JoinTokens.php similarity index 97% rename from generated/Model/SwarmGetResponse200JoinTokens.php rename to generated/Model/JoinTokens.php index 2ad824ed2..ea97d5c0d 100644 --- a/generated/Model/SwarmGetResponse200JoinTokens.php +++ b/generated/Model/JoinTokens.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class SwarmGetResponse200JoinTokens +class JoinTokens { /** * @var array diff --git a/generated/Model/NodeDescriptionResources.php b/generated/Model/Limit.php similarity index 64% rename from generated/Model/NodeDescriptionResources.php rename to generated/Model/Limit.php index 5d81e1556..420b47725 100644 --- a/generated/Model/NodeDescriptionResources.php +++ b/generated/Model/Limit.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class NodeDescriptionResources +class Limit { /** * @var array @@ -24,6 +24,12 @@ public function isInitialized($property): bool * @var int|null */ protected $memoryBytes; + /** + * Limits the maximum number of PIDs in the container. Set `0` for unlimited. + * + * @var int|null + */ + protected $pids = 0; /** * * @@ -68,4 +74,26 @@ public function setMemoryBytes(?int $memoryBytes): self $this->memoryBytes = $memoryBytes; return $this; } + /** + * Limits the maximum number of PIDs in the container. Set `0` for unlimited. + * + * @return int|null + */ + public function getPids(): ?int + { + return $this->pids; + } + /** + * Limits the maximum number of PIDs in the container. Set `0` for unlimited. + * + * @param int|null $pids + * + * @return self + */ + public function setPids(?int $pids): self + { + $this->initialized['pids'] = true; + $this->pids = $pids; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/ManagerStatus.php b/generated/Model/ManagerStatus.php new file mode 100644 index 000000000..421f54feb --- /dev/null +++ b/generated/Model/ManagerStatus.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * + * + * @var bool|null + */ + protected $leader = false; + /** + * Reachability represents the reachability of a node. + * + * @var string|null + */ + protected $reachability; + /** + * The IP address and port at which the manager is reachable. + * + * @var string|null + */ + protected $addr; + /** + * + * + * @return bool|null + */ + public function getLeader(): ?bool + { + return $this->leader; + } + /** + * + * + * @param bool|null $leader + * + * @return self + */ + public function setLeader(?bool $leader): self + { + $this->initialized['leader'] = true; + $this->leader = $leader; + return $this; + } + /** + * Reachability represents the reachability of a node. + * + * @return string|null + */ + public function getReachability(): ?string + { + return $this->reachability; + } + /** + * Reachability represents the reachability of a node. + * + * @param string|null $reachability + * + * @return self + */ + public function setReachability(?string $reachability): self + { + $this->initialized['reachability'] = true; + $this->reachability = $reachability; + return $this; + } + /** + * The IP address and port at which the manager is reachable. + * + * @return string|null + */ + public function getAddr(): ?string + { + return $this->addr; + } + /** + * The IP address and port at which the manager is reachable. + * + * @param string|null $addr + * + * @return self + */ + public function setAddr(?string $addr): self + { + $this->initialized['addr'] = true; + $this->addr = $addr; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Mount.php b/generated/Model/Mount.php index b4158c176..f285d0a68 100644 --- a/generated/Model/Mount.php +++ b/generated/Model/Mount.php @@ -21,7 +21,7 @@ public function isInitialized($property): bool /** * Mount source (e.g. a volume name, a host path). * - * @var mixed|null + * @var string|null */ protected $source; /** @@ -30,6 +30,8 @@ public function isInitialized($property): bool - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. + - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. + - `cluster` a Swarm cluster volume * * @var string|null @@ -41,6 +43,12 @@ public function isInitialized($property): bool * @var bool|null */ protected $readOnly; + /** + * The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`. + * + * @var string|null + */ + protected $consistency; /** * Optional configuration for the `bind` type. * @@ -84,20 +92,20 @@ public function setTarget(?string $target): self /** * Mount source (e.g. a volume name, a host path). * - * @return mixed + * @return string|null */ - public function getSource() + public function getSource(): ?string { return $this->source; } /** * Mount source (e.g. a volume name, a host path). * - * @param mixed $source + * @param string|null $source * * @return self */ - public function setSource($source): self + public function setSource(?string $source): self { $this->initialized['source'] = true; $this->source = $source; @@ -109,6 +117,8 @@ public function setSource($source): self - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. + - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. + - `cluster` a Swarm cluster volume * * @return string|null @@ -123,6 +133,8 @@ public function getType(): ?string - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. + - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. + - `cluster` a Swarm cluster volume * * @param string|null $type @@ -157,6 +169,28 @@ public function setReadOnly(?bool $readOnly): self $this->readOnly = $readOnly; return $this; } + /** + * The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`. + * + * @return string|null + */ + public function getConsistency(): ?string + { + return $this->consistency; + } + /** + * The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`. + * + * @param string|null $consistency + * + * @return self + */ + public function setConsistency(?string $consistency): self + { + $this->initialized['consistency'] = true; + $this->consistency = $consistency; + return $this; + } /** * Optional configuration for the `bind` type. * diff --git a/generated/Model/MountBindOptions.php b/generated/Model/MountBindOptions.php index 4f5bbe6e5..487cc8df7 100644 --- a/generated/Model/MountBindOptions.php +++ b/generated/Model/MountBindOptions.php @@ -15,29 +15,159 @@ public function isInitialized($property): bool /** * A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. * - * @var mixed|null + * @var string|null */ protected $propagation; + /** + * Disable recursive bind mount. + * + * @var bool|null + */ + protected $nonRecursive = false; + /** + * Create mount point on host if missing + * + * @var bool|null + */ + protected $createMountpoint = false; + /** + * Make the mount non-recursively read-only, but still leave the mount recursive + (unless NonRecursive is set to `true` in conjunction). + + Added in v1.44, before that version all read-only mounts were + non-recursive by default. To match the previous behaviour this + will default to `true` for clients on versions prior to v1.44. + + * + * @var bool|null + */ + protected $readOnlyNonRecursive = false; + /** + * Raise an error if the mount cannot be made recursively read-only. + * + * @var bool|null + */ + protected $readOnlyForceRecursive = false; /** * A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. * - * @return mixed + * @return string|null */ - public function getPropagation() + public function getPropagation(): ?string { return $this->propagation; } /** * A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. * - * @param mixed $propagation + * @param string|null $propagation * * @return self */ - public function setPropagation($propagation): self + public function setPropagation(?string $propagation): self { $this->initialized['propagation'] = true; $this->propagation = $propagation; return $this; } + /** + * Disable recursive bind mount. + * + * @return bool|null + */ + public function getNonRecursive(): ?bool + { + return $this->nonRecursive; + } + /** + * Disable recursive bind mount. + * + * @param bool|null $nonRecursive + * + * @return self + */ + public function setNonRecursive(?bool $nonRecursive): self + { + $this->initialized['nonRecursive'] = true; + $this->nonRecursive = $nonRecursive; + return $this; + } + /** + * Create mount point on host if missing + * + * @return bool|null + */ + public function getCreateMountpoint(): ?bool + { + return $this->createMountpoint; + } + /** + * Create mount point on host if missing + * + * @param bool|null $createMountpoint + * + * @return self + */ + public function setCreateMountpoint(?bool $createMountpoint): self + { + $this->initialized['createMountpoint'] = true; + $this->createMountpoint = $createMountpoint; + return $this; + } + /** + * Make the mount non-recursively read-only, but still leave the mount recursive + (unless NonRecursive is set to `true` in conjunction). + + Added in v1.44, before that version all read-only mounts were + non-recursive by default. To match the previous behaviour this + will default to `true` for clients on versions prior to v1.44. + + * + * @return bool|null + */ + public function getReadOnlyNonRecursive(): ?bool + { + return $this->readOnlyNonRecursive; + } + /** + * Make the mount non-recursively read-only, but still leave the mount recursive + (unless NonRecursive is set to `true` in conjunction). + + Added in v1.44, before that version all read-only mounts were + non-recursive by default. To match the previous behaviour this + will default to `true` for clients on versions prior to v1.44. + + * + * @param bool|null $readOnlyNonRecursive + * + * @return self + */ + public function setReadOnlyNonRecursive(?bool $readOnlyNonRecursive): self + { + $this->initialized['readOnlyNonRecursive'] = true; + $this->readOnlyNonRecursive = $readOnlyNonRecursive; + return $this; + } + /** + * Raise an error if the mount cannot be made recursively read-only. + * + * @return bool|null + */ + public function getReadOnlyForceRecursive(): ?bool + { + return $this->readOnlyForceRecursive; + } + /** + * Raise an error if the mount cannot be made recursively read-only. + * + * @param bool|null $readOnlyForceRecursive + * + * @return self + */ + public function setReadOnlyForceRecursive(?bool $readOnlyForceRecursive): self + { + $this->initialized['readOnlyForceRecursive'] = true; + $this->readOnlyForceRecursive = $readOnlyForceRecursive; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/MountPoint.php b/generated/Model/MountPoint.php index 634667c9d..086b7f538 100644 --- a/generated/Model/MountPoint.php +++ b/generated/Model/MountPoint.php @@ -18,6 +18,8 @@ public function isInitialized($property): bool - `bind` a mount of a file or directory from the host into the container. - `volume` a docker volume with the given `Name`. - `tmpfs` a `tmpfs`. + - `npipe` a named pipe from the host into the container. + - `cluster` a Swarm cluster volume * * @var string|null @@ -88,6 +90,8 @@ public function isInitialized($property): bool - `bind` a mount of a file or directory from the host into the container. - `volume` a docker volume with the given `Name`. - `tmpfs` a `tmpfs`. + - `npipe` a named pipe from the host into the container. + - `cluster` a Swarm cluster volume * * @return string|null @@ -102,6 +106,8 @@ public function getType(): ?string - `bind` a mount of a file or directory from the host into the container. - `volume` a docker volume with the given `Name`. - `tmpfs` a `tmpfs`. + - `npipe` a named pipe from the host into the container. + - `cluster` a Swarm cluster volume * * @param string|null $type diff --git a/generated/Model/MountTmpfsOptions.php b/generated/Model/MountTmpfsOptions.php index 1ec96a6bb..4e0b1ce96 100644 --- a/generated/Model/MountTmpfsOptions.php +++ b/generated/Model/MountTmpfsOptions.php @@ -24,6 +24,16 @@ public function isInitialized($property): bool * @var int|null */ protected $mode; + /** + * The options to be passed to the tmpfs mount. An array of arrays. + Flag options should be provided as 1-length arrays. Other types + should be provided as as 2-length arrays, where the first item is + the key and the second the value. + + * + * @var list>|null + */ + protected $options; /** * The size for the tmpfs mount in bytes. * @@ -68,4 +78,34 @@ public function setMode(?int $mode): self $this->mode = $mode; return $this; } + /** + * The options to be passed to the tmpfs mount. An array of arrays. + Flag options should be provided as 1-length arrays. Other types + should be provided as as 2-length arrays, where the first item is + the key and the second the value. + + * + * @return list>|null + */ + public function getOptions(): ?array + { + return $this->options; + } + /** + * The options to be passed to the tmpfs mount. An array of arrays. + Flag options should be provided as 1-length arrays. Other types + should be provided as as 2-length arrays, where the first item is + the key and the second the value. + + * + * @param list>|null $options + * + * @return self + */ + public function setOptions(?array $options): self + { + $this->initialized['options'] = true; + $this->options = $options; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/MountVolumeOptions.php b/generated/Model/MountVolumeOptions.php index b55d15f8c..b79033693 100644 --- a/generated/Model/MountVolumeOptions.php +++ b/generated/Model/MountVolumeOptions.php @@ -30,6 +30,12 @@ public function isInitialized($property): bool * @var MountVolumeOptionsDriverConfig|null */ protected $driverConfig; + /** + * Source path inside the volume. Must be relative without any back traversals. + * + * @var string|null + */ + protected $subpath; /** * Populate volume with data from the target. * @@ -96,4 +102,26 @@ public function setDriverConfig(?MountVolumeOptionsDriverConfig $driverConfig): $this->driverConfig = $driverConfig; return $this; } + /** + * Source path inside the volume. Must be relative without any back traversals. + * + * @return string|null + */ + public function getSubpath(): ?string + { + return $this->subpath; + } + /** + * Source path inside the volume. Must be relative without any back traversals. + * + * @param string|null $subpath + * + * @return self + */ + public function setSubpath(?string $subpath): self + { + $this->initialized['subpath'] = true; + $this->subpath = $subpath; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/Network.php b/generated/Model/Network.php index 0a299b0fd..ddbd7fcaf 100644 --- a/generated/Model/Network.php +++ b/generated/Model/Network.php @@ -13,37 +13,49 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * + * Name of the network. * * @var string|null */ protected $name; /** - * + * ID that uniquely identifies a network on a single machine. * * @var string|null */ protected $id; /** - * - * - * @var string|null - */ + * Date and time at which the network was created in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @var string|null + */ protected $created; /** - * - * - * @var string|null - */ + * The level at which the network exists (e.g. `swarm` for cluster-wide + or `local` for machine level) + + * + * @var string|null + */ protected $scope; /** - * + * The name of the driver used to create the network (e.g. `bridge`, + `overlay`). + + * + * @var string|null + */ + protected $driver; + /** + * Whether the network was created with IPv4 enabled. * - * @var string|null + * @var bool|null */ - protected $driver; + protected $enableIPv4; /** - * + * Whether the network was created with IPv6 enabled. * * @var bool|null */ @@ -55,31 +67,73 @@ public function isInitialized($property): bool */ protected $iPAM; /** - * + * Whether the network is created to only allow internal networking + connectivity. + + * + * @var bool|null + */ + protected $internal = false; + /** + * Whether a global / swarm scope network is manually attachable by regular + containers from workers in swarm mode. + + * + * @var bool|null + */ + protected $attachable = false; + /** + * Whether the network is providing the routing-mesh for the swarm cluster. * * @var bool|null */ - protected $internal; + protected $ingress = false; /** - * + * The config-only network source to provide the configuration for + this network. + + * + * @var ConfigReference|null + */ + protected $configFrom; + /** + * Whether the network is a config-only network. Config-only networks are + placeholder networks for network configurations to be used by other + networks. Config-only networks cannot be used directly to run containers + or services. + + * + * @var bool|null + */ + protected $configOnly = false; + /** + * Contains endpoints attached to the network. * * @var array|null */ protected $containers; /** - * + * Network-specific options uses when creating the network. * * @var array|null */ protected $options; /** - * + * User-defined key/value metadata. * * @var array|null */ protected $labels; /** - * + * List of peer nodes for an overlay network. This field is only present + for overlay networks, and omitted for other network types. + + * + * @var list|null + */ + protected $peers; + /** + * Name of the network. * * @return string|null */ @@ -88,7 +142,7 @@ public function getName(): ?string return $this->name; } /** - * + * Name of the network. * * @param string|null $name * @@ -101,7 +155,7 @@ public function setName(?string $name): self return $this; } /** - * + * ID that uniquely identifies a network on a single machine. * * @return string|null */ @@ -110,7 +164,7 @@ public function getId(): ?string return $this->id; } /** - * + * ID that uniquely identifies a network on a single machine. * * @param string|null $id * @@ -123,21 +177,25 @@ public function setId(?string $id): self return $this; } /** - * - * - * @return string|null - */ + * Date and time at which the network was created in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @return string|null + */ public function getCreated(): ?string { return $this->created; } /** - * - * - * @param string|null $created - * - * @return self - */ + * Date and time at which the network was created in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @param string|null $created + * + * @return self + */ public function setCreated(?string $created): self { $this->initialized['created'] = true; @@ -145,21 +203,25 @@ public function setCreated(?string $created): self return $this; } /** - * - * - * @return string|null - */ + * The level at which the network exists (e.g. `swarm` for cluster-wide + or `local` for machine level) + + * + * @return string|null + */ public function getScope(): ?string { return $this->scope; } /** - * - * - * @param string|null $scope - * - * @return self - */ + * The level at which the network exists (e.g. `swarm` for cluster-wide + or `local` for machine level) + + * + * @param string|null $scope + * + * @return self + */ public function setScope(?string $scope): self { $this->initialized['scope'] = true; @@ -167,29 +229,55 @@ public function setScope(?string $scope): self return $this; } /** - * - * - * @return string|null - */ + * The name of the driver used to create the network (e.g. `bridge`, + `overlay`). + + * + * @return string|null + */ public function getDriver(): ?string { return $this->driver; } /** - * + * The name of the driver used to create the network (e.g. `bridge`, + `overlay`). + + * + * @param string|null $driver + * + * @return self + */ + public function setDriver(?string $driver): self + { + $this->initialized['driver'] = true; + $this->driver = $driver; + return $this; + } + /** + * Whether the network was created with IPv4 enabled. + * + * @return bool|null + */ + public function getEnableIPv4(): ?bool + { + return $this->enableIPv4; + } + /** + * Whether the network was created with IPv4 enabled. * - * @param string|null $driver + * @param bool|null $enableIPv4 * * @return self */ - public function setDriver(?string $driver): self + public function setEnableIPv4(?bool $enableIPv4): self { - $this->initialized['driver'] = true; - $this->driver = $driver; + $this->initialized['enableIPv4'] = true; + $this->enableIPv4 = $enableIPv4; return $this; } /** - * + * Whether the network was created with IPv6 enabled. * * @return bool|null */ @@ -198,7 +286,7 @@ public function getEnableIPv6(): ?bool return $this->enableIPv6; } /** - * + * Whether the network was created with IPv6 enabled. * * @param bool|null $enableIPv6 * @@ -233,29 +321,137 @@ public function setIPAM(?IPAM $iPAM): self return $this; } /** - * + * Whether the network is created to only allow internal networking + connectivity. + + * + * @return bool|null + */ + public function getInternal(): ?bool + { + return $this->internal; + } + /** + * Whether the network is created to only allow internal networking + connectivity. + + * + * @param bool|null $internal + * + * @return self + */ + public function setInternal(?bool $internal): self + { + $this->initialized['internal'] = true; + $this->internal = $internal; + return $this; + } + /** + * Whether a global / swarm scope network is manually attachable by regular + containers from workers in swarm mode. + + * + * @return bool|null + */ + public function getAttachable(): ?bool + { + return $this->attachable; + } + /** + * Whether a global / swarm scope network is manually attachable by regular + containers from workers in swarm mode. + + * + * @param bool|null $attachable + * + * @return self + */ + public function setAttachable(?bool $attachable): self + { + $this->initialized['attachable'] = true; + $this->attachable = $attachable; + return $this; + } + /** + * Whether the network is providing the routing-mesh for the swarm cluster. * * @return bool|null */ - public function getInternal(): ?bool + public function getIngress(): ?bool { - return $this->internal; + return $this->ingress; } /** - * + * Whether the network is providing the routing-mesh for the swarm cluster. * - * @param bool|null $internal + * @param bool|null $ingress * * @return self */ - public function setInternal(?bool $internal): self + public function setIngress(?bool $ingress): self { - $this->initialized['internal'] = true; - $this->internal = $internal; + $this->initialized['ingress'] = true; + $this->ingress = $ingress; return $this; } /** - * + * The config-only network source to provide the configuration for + this network. + + * + * @return ConfigReference|null + */ + public function getConfigFrom(): ?ConfigReference + { + return $this->configFrom; + } + /** + * The config-only network source to provide the configuration for + this network. + + * + * @param ConfigReference|null $configFrom + * + * @return self + */ + public function setConfigFrom(?ConfigReference $configFrom): self + { + $this->initialized['configFrom'] = true; + $this->configFrom = $configFrom; + return $this; + } + /** + * Whether the network is a config-only network. Config-only networks are + placeholder networks for network configurations to be used by other + networks. Config-only networks cannot be used directly to run containers + or services. + + * + * @return bool|null + */ + public function getConfigOnly(): ?bool + { + return $this->configOnly; + } + /** + * Whether the network is a config-only network. Config-only networks are + placeholder networks for network configurations to be used by other + networks. Config-only networks cannot be used directly to run containers + or services. + + * + * @param bool|null $configOnly + * + * @return self + */ + public function setConfigOnly(?bool $configOnly): self + { + $this->initialized['configOnly'] = true; + $this->configOnly = $configOnly; + return $this; + } + /** + * Contains endpoints attached to the network. * * @return array|null */ @@ -264,7 +460,7 @@ public function getContainers(): ?iterable return $this->containers; } /** - * + * Contains endpoints attached to the network. * * @param array|null $containers * @@ -277,7 +473,7 @@ public function setContainers(?iterable $containers): self return $this; } /** - * + * Network-specific options uses when creating the network. * * @return array|null */ @@ -286,7 +482,7 @@ public function getOptions(): ?iterable return $this->options; } /** - * + * Network-specific options uses when creating the network. * * @param array|null $options * @@ -299,7 +495,7 @@ public function setOptions(?iterable $options): self return $this; } /** - * + * User-defined key/value metadata. * * @return array|null */ @@ -308,7 +504,7 @@ public function getLabels(): ?iterable return $this->labels; } /** - * + * User-defined key/value metadata. * * @param array|null $labels * @@ -320,4 +516,30 @@ public function setLabels(?iterable $labels): self $this->labels = $labels; return $this; } + /** + * List of peer nodes for an overlay network. This field is only present + for overlay networks, and omitted for other network types. + + * + * @return list|null + */ + public function getPeers(): ?array + { + return $this->peers; + } + /** + * List of peer nodes for an overlay network. This field is only present + for overlay networks, and omitted for other network types. + + * + * @param list|null $peers + * + * @return self + */ + public function setPeers(?array $peers): self + { + $this->initialized['peers'] = true; + $this->peers = $peers; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/ServiceSpecNetworksItem.php b/generated/Model/NetworkAttachmentConfig.php similarity index 50% rename from generated/Model/ServiceSpecNetworksItem.php rename to generated/Model/NetworkAttachmentConfig.php index 0fd6b0837..2114e31a9 100644 --- a/generated/Model/ServiceSpecNetworksItem.php +++ b/generated/Model/NetworkAttachmentConfig.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class ServiceSpecNetworksItem +class NetworkAttachmentConfig { /** * @var array @@ -13,19 +13,25 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * + * The target network for attachment. Must be a network name or ID. * * @var string|null */ protected $target; /** - * + * Discoverable alternate names for the service on this network. * * @var list|null */ protected $aliases; /** - * + * Driver attachment options for the network target. + * + * @var array|null + */ + protected $driverOpts; + /** + * The target network for attachment. Must be a network name or ID. * * @return string|null */ @@ -34,7 +40,7 @@ public function getTarget(): ?string return $this->target; } /** - * + * The target network for attachment. Must be a network name or ID. * * @param string|null $target * @@ -47,7 +53,7 @@ public function setTarget(?string $target): self return $this; } /** - * + * Discoverable alternate names for the service on this network. * * @return list|null */ @@ -56,7 +62,7 @@ public function getAliases(): ?array return $this->aliases; } /** - * + * Discoverable alternate names for the service on this network. * * @param list|null $aliases * @@ -68,4 +74,26 @@ public function setAliases(?array $aliases): self $this->aliases = $aliases; return $this; } + /** + * Driver attachment options for the network target. + * + * @return array|null + */ + public function getDriverOpts(): ?iterable + { + return $this->driverOpts; + } + /** + * Driver attachment options for the network target. + * + * @param array|null $driverOpts + * + * @return self + */ + public function setDriverOpts(?iterable $driverOpts): self + { + $this->initialized['driverOpts'] = true; + $this->driverOpts = $driverOpts; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/NetworkConfig.php b/generated/Model/NetworkConfig.php deleted file mode 100644 index bfebc39cb..000000000 --- a/generated/Model/NetworkConfig.php +++ /dev/null @@ -1,211 +0,0 @@ -initialized); - } - /** - * - * - * @var string|null - */ - protected $bridge; - /** - * - * - * @var string|null - */ - protected $gateway; - /** - * - * - * @var string|null - */ - protected $address; - /** - * - * - * @var int|null - */ - protected $iPPrefixLen; - /** - * - * - * @var string|null - */ - protected $macAddress; - /** - * - * - * @var string|null - */ - protected $portMapping; - /** - * - * - * @var list|null - */ - protected $ports; - /** - * - * - * @return string|null - */ - public function getBridge(): ?string - { - return $this->bridge; - } - /** - * - * - * @param string|null $bridge - * - * @return self - */ - public function setBridge(?string $bridge): self - { - $this->initialized['bridge'] = true; - $this->bridge = $bridge; - return $this; - } - /** - * - * - * @return string|null - */ - public function getGateway(): ?string - { - return $this->gateway; - } - /** - * - * - * @param string|null $gateway - * - * @return self - */ - public function setGateway(?string $gateway): self - { - $this->initialized['gateway'] = true; - $this->gateway = $gateway; - return $this; - } - /** - * - * - * @return string|null - */ - public function getAddress(): ?string - { - return $this->address; - } - /** - * - * - * @param string|null $address - * - * @return self - */ - public function setAddress(?string $address): self - { - $this->initialized['address'] = true; - $this->address = $address; - return $this; - } - /** - * - * - * @return int|null - */ - public function getIPPrefixLen(): ?int - { - return $this->iPPrefixLen; - } - /** - * - * - * @param int|null $iPPrefixLen - * - * @return self - */ - public function setIPPrefixLen(?int $iPPrefixLen): self - { - $this->initialized['iPPrefixLen'] = true; - $this->iPPrefixLen = $iPPrefixLen; - return $this; - } - /** - * - * - * @return string|null - */ - public function getMacAddress(): ?string - { - return $this->macAddress; - } - /** - * - * - * @param string|null $macAddress - * - * @return self - */ - public function setMacAddress(?string $macAddress): self - { - $this->initialized['macAddress'] = true; - $this->macAddress = $macAddress; - return $this; - } - /** - * - * - * @return string|null - */ - public function getPortMapping(): ?string - { - return $this->portMapping; - } - /** - * - * - * @param string|null $portMapping - * - * @return self - */ - public function setPortMapping(?string $portMapping): self - { - $this->initialized['portMapping'] = true; - $this->portMapping = $portMapping; - return $this; - } - /** - * - * - * @return list|null - */ - public function getPorts(): ?array - { - return $this->ports; - } - /** - * - * - * @param list|null $ports - * - * @return self - */ - public function setPorts(?array $ports): self - { - $this->initialized['ports'] = true; - $this->ports = $ports; - return $this; - } -} \ No newline at end of file diff --git a/generated/Model/NetworkContainer.php b/generated/Model/NetworkContainer.php index 1a540d6c4..5ef28fb10 100644 --- a/generated/Model/NetworkContainer.php +++ b/generated/Model/NetworkContainer.php @@ -12,6 +12,12 @@ public function isInitialized($property): bool { return array_key_exists($property, $this->initialized); } + /** + * + * + * @var string|null + */ + protected $name; /** * * @@ -36,6 +42,28 @@ public function isInitialized($property): bool * @var string|null */ protected $iPv6Address; + /** + * + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } /** * * diff --git a/generated/Model/NetworksCreatePostResponse201.php b/generated/Model/NetworkCreateResponse.php similarity index 86% rename from generated/Model/NetworksCreatePostResponse201.php rename to generated/Model/NetworkCreateResponse.php index 691c8f597..97671413b 100644 --- a/generated/Model/NetworksCreatePostResponse201.php +++ b/generated/Model/NetworkCreateResponse.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class NetworksCreatePostResponse201 +class NetworkCreateResponse { /** * @var array @@ -19,7 +19,7 @@ public function isInitialized($property): bool */ protected $id; /** - * + * Warnings encountered when creating the container * * @var string|null */ @@ -47,7 +47,7 @@ public function setId(?string $id): self return $this; } /** - * + * Warnings encountered when creating the container * * @return string|null */ @@ -56,7 +56,7 @@ public function getWarning(): ?string return $this->warning; } /** - * + * Warnings encountered when creating the container * * @param string|null $warning * diff --git a/generated/Model/NetworkSettings.php b/generated/Model/NetworkSettings.php new file mode 100644 index 000000000..0423b45e1 --- /dev/null +++ b/generated/Model/NetworkSettings.php @@ -0,0 +1,780 @@ +initialized); + } + /** + * Name of the default bridge interface when dockerd's --bridge flag is set. + * + * @var string|null + */ + protected $bridge; + /** + * SandboxID uniquely represents a container's network stack. + * + * @var string|null + */ + protected $sandboxID; + /** + * Indicates if hairpin NAT should be enabled on the virtual interface. + + Deprecated: This field is never set and will be removed in a future release. + + * + * @var bool|null + */ + protected $hairpinMode; + /** + * IPv6 unicast address using the link-local prefix. + + Deprecated: This field is never set and will be removed in a future release. + + * + * @var string|null + */ + protected $linkLocalIPv6Address; + /** + * Prefix length of the IPv6 unicast address. + + Deprecated: This field is never set and will be removed in a future release. + + * + * @var int|null + */ + protected $linkLocalIPv6PrefixLen; + /** + * PortMap describes the mapping of container ports to host ports, using the + container's port-number and protocol as key in the format `/`, + for example, `80/udp`. + + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. + + * + * @var array>|null + */ + protected $ports; + /** + * SandboxKey is the full path of the netns handle + * + * @var string|null + */ + protected $sandboxKey; + /** + * Deprecated: This field is never set and will be removed in a future release. + * + * @var list
|null + */ + protected $secondaryIPAddresses; + /** + * Deprecated: This field is never set and will be removed in a future release. + * + * @var list
|null + */ + protected $secondaryIPv6Addresses; + /** + * EndpointID uniquely represents a service endpoint in a Sandbox. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @var string|null + */ + protected $endpointID; + /** + * Gateway address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @var string|null + */ + protected $gateway; + /** + * Global IPv6 address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @var string|null + */ + protected $globalIPv6Address; + /** + * Mask length of the global IPv6 address. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @var int|null + */ + protected $globalIPv6PrefixLen; + /** + * IPv4 address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @var string|null + */ + protected $iPAddress; + /** + * Mask length of the IPv4 address. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @var int|null + */ + protected $iPPrefixLen; + /** + * IPv6 gateway address for this network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @var string|null + */ + protected $iPv6Gateway; + /** + * MAC address for the container on the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @var string|null + */ + protected $macAddress; + /** + * Information about all networks that the container is connected to. + * + * @var array|null + */ + protected $networks; + /** + * Name of the default bridge interface when dockerd's --bridge flag is set. + * + * @return string|null + */ + public function getBridge(): ?string + { + return $this->bridge; + } + /** + * Name of the default bridge interface when dockerd's --bridge flag is set. + * + * @param string|null $bridge + * + * @return self + */ + public function setBridge(?string $bridge): self + { + $this->initialized['bridge'] = true; + $this->bridge = $bridge; + return $this; + } + /** + * SandboxID uniquely represents a container's network stack. + * + * @return string|null + */ + public function getSandboxID(): ?string + { + return $this->sandboxID; + } + /** + * SandboxID uniquely represents a container's network stack. + * + * @param string|null $sandboxID + * + * @return self + */ + public function setSandboxID(?string $sandboxID): self + { + $this->initialized['sandboxID'] = true; + $this->sandboxID = $sandboxID; + return $this; + } + /** + * Indicates if hairpin NAT should be enabled on the virtual interface. + + Deprecated: This field is never set and will be removed in a future release. + + * + * @return bool|null + */ + public function getHairpinMode(): ?bool + { + return $this->hairpinMode; + } + /** + * Indicates if hairpin NAT should be enabled on the virtual interface. + + Deprecated: This field is never set and will be removed in a future release. + + * + * @param bool|null $hairpinMode + * + * @return self + */ + public function setHairpinMode(?bool $hairpinMode): self + { + $this->initialized['hairpinMode'] = true; + $this->hairpinMode = $hairpinMode; + return $this; + } + /** + * IPv6 unicast address using the link-local prefix. + + Deprecated: This field is never set and will be removed in a future release. + + * + * @return string|null + */ + public function getLinkLocalIPv6Address(): ?string + { + return $this->linkLocalIPv6Address; + } + /** + * IPv6 unicast address using the link-local prefix. + + Deprecated: This field is never set and will be removed in a future release. + + * + * @param string|null $linkLocalIPv6Address + * + * @return self + */ + public function setLinkLocalIPv6Address(?string $linkLocalIPv6Address): self + { + $this->initialized['linkLocalIPv6Address'] = true; + $this->linkLocalIPv6Address = $linkLocalIPv6Address; + return $this; + } + /** + * Prefix length of the IPv6 unicast address. + + Deprecated: This field is never set and will be removed in a future release. + + * + * @return int|null + */ + public function getLinkLocalIPv6PrefixLen(): ?int + { + return $this->linkLocalIPv6PrefixLen; + } + /** + * Prefix length of the IPv6 unicast address. + + Deprecated: This field is never set and will be removed in a future release. + + * + * @param int|null $linkLocalIPv6PrefixLen + * + * @return self + */ + public function setLinkLocalIPv6PrefixLen(?int $linkLocalIPv6PrefixLen): self + { + $this->initialized['linkLocalIPv6PrefixLen'] = true; + $this->linkLocalIPv6PrefixLen = $linkLocalIPv6PrefixLen; + return $this; + } + /** + * PortMap describes the mapping of container ports to host ports, using the + container's port-number and protocol as key in the format `/`, + for example, `80/udp`. + + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. + + * + * @return array>|null + */ + public function getPorts(): ?iterable + { + return $this->ports; + } + /** + * PortMap describes the mapping of container ports to host ports, using the + container's port-number and protocol as key in the format `/`, + for example, `80/udp`. + + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. + + * + * @param array>|null $ports + * + * @return self + */ + public function setPorts(?iterable $ports): self + { + $this->initialized['ports'] = true; + $this->ports = $ports; + return $this; + } + /** + * SandboxKey is the full path of the netns handle + * + * @return string|null + */ + public function getSandboxKey(): ?string + { + return $this->sandboxKey; + } + /** + * SandboxKey is the full path of the netns handle + * + * @param string|null $sandboxKey + * + * @return self + */ + public function setSandboxKey(?string $sandboxKey): self + { + $this->initialized['sandboxKey'] = true; + $this->sandboxKey = $sandboxKey; + return $this; + } + /** + * Deprecated: This field is never set and will be removed in a future release. + * + * @return list
|null + */ + public function getSecondaryIPAddresses(): ?array + { + return $this->secondaryIPAddresses; + } + /** + * Deprecated: This field is never set and will be removed in a future release. + * + * @param list
|null $secondaryIPAddresses + * + * @return self + */ + public function setSecondaryIPAddresses(?array $secondaryIPAddresses): self + { + $this->initialized['secondaryIPAddresses'] = true; + $this->secondaryIPAddresses = $secondaryIPAddresses; + return $this; + } + /** + * Deprecated: This field is never set and will be removed in a future release. + * + * @return list
|null + */ + public function getSecondaryIPv6Addresses(): ?array + { + return $this->secondaryIPv6Addresses; + } + /** + * Deprecated: This field is never set and will be removed in a future release. + * + * @param list
|null $secondaryIPv6Addresses + * + * @return self + */ + public function setSecondaryIPv6Addresses(?array $secondaryIPv6Addresses): self + { + $this->initialized['secondaryIPv6Addresses'] = true; + $this->secondaryIPv6Addresses = $secondaryIPv6Addresses; + return $this; + } + /** + * EndpointID uniquely represents a service endpoint in a Sandbox. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @return string|null + */ + public function getEndpointID(): ?string + { + return $this->endpointID; + } + /** + * EndpointID uniquely represents a service endpoint in a Sandbox. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @param string|null $endpointID + * + * @return self + */ + public function setEndpointID(?string $endpointID): self + { + $this->initialized['endpointID'] = true; + $this->endpointID = $endpointID; + return $this; + } + /** + * Gateway address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @return string|null + */ + public function getGateway(): ?string + { + return $this->gateway; + } + /** + * Gateway address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @param string|null $gateway + * + * @return self + */ + public function setGateway(?string $gateway): self + { + $this->initialized['gateway'] = true; + $this->gateway = $gateway; + return $this; + } + /** + * Global IPv6 address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @return string|null + */ + public function getGlobalIPv6Address(): ?string + { + return $this->globalIPv6Address; + } + /** + * Global IPv6 address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @param string|null $globalIPv6Address + * + * @return self + */ + public function setGlobalIPv6Address(?string $globalIPv6Address): self + { + $this->initialized['globalIPv6Address'] = true; + $this->globalIPv6Address = $globalIPv6Address; + return $this; + } + /** + * Mask length of the global IPv6 address. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @return int|null + */ + public function getGlobalIPv6PrefixLen(): ?int + { + return $this->globalIPv6PrefixLen; + } + /** + * Mask length of the global IPv6 address. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @param int|null $globalIPv6PrefixLen + * + * @return self + */ + public function setGlobalIPv6PrefixLen(?int $globalIPv6PrefixLen): self + { + $this->initialized['globalIPv6PrefixLen'] = true; + $this->globalIPv6PrefixLen = $globalIPv6PrefixLen; + return $this; + } + /** + * IPv4 address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @return string|null + */ + public function getIPAddress(): ?string + { + return $this->iPAddress; + } + /** + * IPv4 address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @param string|null $iPAddress + * + * @return self + */ + public function setIPAddress(?string $iPAddress): self + { + $this->initialized['iPAddress'] = true; + $this->iPAddress = $iPAddress; + return $this; + } + /** + * Mask length of the IPv4 address. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @return int|null + */ + public function getIPPrefixLen(): ?int + { + return $this->iPPrefixLen; + } + /** + * Mask length of the IPv4 address. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @param int|null $iPPrefixLen + * + * @return self + */ + public function setIPPrefixLen(?int $iPPrefixLen): self + { + $this->initialized['iPPrefixLen'] = true; + $this->iPPrefixLen = $iPPrefixLen; + return $this; + } + /** + * IPv6 gateway address for this network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @return string|null + */ + public function getIPv6Gateway(): ?string + { + return $this->iPv6Gateway; + } + /** + * IPv6 gateway address for this network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @param string|null $iPv6Gateway + * + * @return self + */ + public function setIPv6Gateway(?string $iPv6Gateway): self + { + $this->initialized['iPv6Gateway'] = true; + $this->iPv6Gateway = $iPv6Gateway; + return $this; + } + /** + * MAC address for the container on the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @return string|null + */ + public function getMacAddress(): ?string + { + return $this->macAddress; + } + /** + * MAC address for the container on the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + + * + * @param string|null $macAddress + * + * @return self + */ + public function setMacAddress(?string $macAddress): self + { + $this->initialized['macAddress'] = true; + $this->macAddress = $macAddress; + return $this; + } + /** + * Information about all networks that the container is connected to. + * + * @return array|null + */ + public function getNetworks(): ?iterable + { + return $this->networks; + } + /** + * Information about all networks that the container is connected to. + * + * @param array|null $networks + * + * @return self + */ + public function setNetworks(?iterable $networks): self + { + $this->initialized['networks'] = true; + $this->networks = $networks; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/NetworkingConfig.php b/generated/Model/NetworkingConfig.php new file mode 100644 index 000000000..dca491189 --- /dev/null +++ b/generated/Model/NetworkingConfig.php @@ -0,0 +1,52 @@ +initialized); + } + /** + * A mapping of network name to endpoint configuration for that network. + The endpoint configuration can be left empty to connect to that + network with no particular endpoint configuration. + + * + * @var array|null + */ + protected $endpointsConfig; + /** + * A mapping of network name to endpoint configuration for that network. + The endpoint configuration can be left empty to connect to that + network with no particular endpoint configuration. + + * + * @return array|null + */ + public function getEndpointsConfig(): ?iterable + { + return $this->endpointsConfig; + } + /** + * A mapping of network name to endpoint configuration for that network. + The endpoint configuration can be left empty to connect to that + network with no particular endpoint configuration. + + * + * @param array|null $endpointsConfig + * + * @return self + */ + public function setEndpointsConfig(?iterable $endpointsConfig): self + { + $this->initialized['endpointsConfig'] = true; + $this->endpointsConfig = $endpointsConfig; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/NetworksCreatePostBody.php b/generated/Model/NetworksCreatePostBody.php index ea51ecbaa..c93a3346a 100644 --- a/generated/Model/NetworksCreatePostBody.php +++ b/generated/Model/NetworksCreatePostBody.php @@ -18,30 +18,74 @@ public function isInitialized($property): bool * @var string|null */ protected $name; - /** - * Check for networks with duplicate names. - * - * @var bool|null - */ - protected $checkDuplicate; /** * Name of the network driver plugin to use. * * @var string|null */ protected $driver = 'bridge'; + /** + * The level at which the network exists (e.g. `swarm` for cluster-wide + or `local` for machine level). + + * + * @var string|null + */ + protected $scope; /** * Restrict external access to the network. * * @var bool|null */ protected $internal; + /** + * Globally scoped network is manually attachable by regular + containers from workers in swarm mode. + + * + * @var bool|null + */ + protected $attachable; + /** + * Ingress network is the network which provides the routing-mesh + in swarm mode. + + * + * @var bool|null + */ + protected $ingress; + /** + * Creates a config-only network. Config-only networks are placeholder + networks for network configurations to be used by other networks. + Config-only networks cannot be used directly to run containers + or services. + + * + * @var bool|null + */ + protected $configOnly = false; + /** + * The config-only network source to provide the configuration for + this network. + + * + * @var ConfigReference|null + */ + protected $configFrom; /** * * * @var IPAM|null */ protected $iPAM; + /** + * Enable IPv4 on the network. + To disable IPv4, the daemon must be started with experimental features enabled. + + * + * @var bool|null + */ + protected $enableIPv4; /** * Enable IPv6 on the network. * @@ -82,28 +126,6 @@ public function setName(?string $name): self $this->name = $name; return $this; } - /** - * Check for networks with duplicate names. - * - * @return bool|null - */ - public function getCheckDuplicate(): ?bool - { - return $this->checkDuplicate; - } - /** - * Check for networks with duplicate names. - * - * @param bool|null $checkDuplicate - * - * @return self - */ - public function setCheckDuplicate(?bool $checkDuplicate): self - { - $this->initialized['checkDuplicate'] = true; - $this->checkDuplicate = $checkDuplicate; - return $this; - } /** * Name of the network driver plugin to use. * @@ -126,6 +148,32 @@ public function setDriver(?string $driver): self $this->driver = $driver; return $this; } + /** + * The level at which the network exists (e.g. `swarm` for cluster-wide + or `local` for machine level). + + * + * @return string|null + */ + public function getScope(): ?string + { + return $this->scope; + } + /** + * The level at which the network exists (e.g. `swarm` for cluster-wide + or `local` for machine level). + + * + * @param string|null $scope + * + * @return self + */ + public function setScope(?string $scope): self + { + $this->initialized['scope'] = true; + $this->scope = $scope; + return $this; + } /** * Restrict external access to the network. * @@ -148,6 +196,114 @@ public function setInternal(?bool $internal): self $this->internal = $internal; return $this; } + /** + * Globally scoped network is manually attachable by regular + containers from workers in swarm mode. + + * + * @return bool|null + */ + public function getAttachable(): ?bool + { + return $this->attachable; + } + /** + * Globally scoped network is manually attachable by regular + containers from workers in swarm mode. + + * + * @param bool|null $attachable + * + * @return self + */ + public function setAttachable(?bool $attachable): self + { + $this->initialized['attachable'] = true; + $this->attachable = $attachable; + return $this; + } + /** + * Ingress network is the network which provides the routing-mesh + in swarm mode. + + * + * @return bool|null + */ + public function getIngress(): ?bool + { + return $this->ingress; + } + /** + * Ingress network is the network which provides the routing-mesh + in swarm mode. + + * + * @param bool|null $ingress + * + * @return self + */ + public function setIngress(?bool $ingress): self + { + $this->initialized['ingress'] = true; + $this->ingress = $ingress; + return $this; + } + /** + * Creates a config-only network. Config-only networks are placeholder + networks for network configurations to be used by other networks. + Config-only networks cannot be used directly to run containers + or services. + + * + * @return bool|null + */ + public function getConfigOnly(): ?bool + { + return $this->configOnly; + } + /** + * Creates a config-only network. Config-only networks are placeholder + networks for network configurations to be used by other networks. + Config-only networks cannot be used directly to run containers + or services. + + * + * @param bool|null $configOnly + * + * @return self + */ + public function setConfigOnly(?bool $configOnly): self + { + $this->initialized['configOnly'] = true; + $this->configOnly = $configOnly; + return $this; + } + /** + * The config-only network source to provide the configuration for + this network. + + * + * @return ConfigReference|null + */ + public function getConfigFrom(): ?ConfigReference + { + return $this->configFrom; + } + /** + * The config-only network source to provide the configuration for + this network. + + * + * @param ConfigReference|null $configFrom + * + * @return self + */ + public function setConfigFrom(?ConfigReference $configFrom): self + { + $this->initialized['configFrom'] = true; + $this->configFrom = $configFrom; + return $this; + } /** * * @@ -170,6 +326,32 @@ public function setIPAM(?IPAM $iPAM): self $this->iPAM = $iPAM; return $this; } + /** + * Enable IPv4 on the network. + To disable IPv4, the daemon must be started with experimental features enabled. + + * + * @return bool|null + */ + public function getEnableIPv4(): ?bool + { + return $this->enableIPv4; + } + /** + * Enable IPv4 on the network. + To disable IPv4, the daemon must be started with experimental features enabled. + + * + * @param bool|null $enableIPv4 + * + * @return self + */ + public function setEnableIPv4(?bool $enableIPv4): self + { + $this->initialized['enableIPv4'] = true; + $this->enableIPv4 = $enableIPv4; + return $this; + } /** * Enable IPv6 on the network. * diff --git a/generated/Model/NetworksPrunePostResponse200.php b/generated/Model/NetworksPrunePostResponse200.php index 5f7d8596e..53433241e 100644 --- a/generated/Model/NetworksPrunePostResponse200.php +++ b/generated/Model/NetworksPrunePostResponse200.php @@ -17,27 +17,27 @@ public function isInitialized($property): bool * * @var list|null */ - protected $volumesDeleted; + protected $networksDeleted; /** * Networks that were deleted * * @return list|null */ - public function getVolumesDeleted(): ?array + public function getNetworksDeleted(): ?array { - return $this->volumesDeleted; + return $this->networksDeleted; } /** * Networks that were deleted * - * @param list|null $volumesDeleted + * @param list|null $networksDeleted * * @return self */ - public function setVolumesDeleted(?array $volumesDeleted): self + public function setNetworksDeleted(?array $networksDeleted): self { - $this->initialized['volumesDeleted'] = true; - $this->volumesDeleted = $volumesDeleted; + $this->initialized['networksDeleted'] = true; + $this->networksDeleted = $networksDeleted; return $this; } } \ No newline at end of file diff --git a/generated/Model/Node.php b/generated/Model/Node.php index 0191d6ded..26eaff79e 100644 --- a/generated/Model/Node.php +++ b/generated/Model/Node.php @@ -19,22 +19,36 @@ public function isInitialized($property): bool */ protected $iD; /** - * - * - * @var NodeVersion|null - */ + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @var ObjectVersion|null + */ protected $version; /** - * - * - * @var string|null - */ + * Date and time at which the node was added to the swarm in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @var string|null + */ protected $createdAt; /** - * - * - * @var string|null - */ + * Date and time at which the node was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @var string|null + */ protected $updatedAt; /** * @@ -43,11 +57,32 @@ public function isInitialized($property): bool */ protected $spec; /** - * - * - * @var NodeDescription|null - */ + * NodeDescription encapsulates the properties of the Node as reported by the + agent. + + * + * @var NodeDescription|null + */ protected $description; + /** + * NodeStatus represents the status of a node. + + It provides the current status of the node, as seen by the manager. + + * + * @var NodeStatus|null + */ + protected $status; + /** + * ManagerStatus represents the status of a manager. + + It provides the current status of a node's manager component, if the node + is a manager. + + * + * @var ManagerStatus|null + */ + protected $managerStatus; /** * * @@ -71,43 +106,67 @@ public function setID(?string $iD): self return $this; } /** - * - * - * @return NodeVersion|null - */ - public function getVersion(): ?NodeVersion + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @return ObjectVersion|null + */ + public function getVersion(): ?ObjectVersion { return $this->version; } /** - * - * - * @param NodeVersion|null $version - * - * @return self - */ - public function setVersion(?NodeVersion $version): self + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @param ObjectVersion|null $version + * + * @return self + */ + public function setVersion(?ObjectVersion $version): self { $this->initialized['version'] = true; $this->version = $version; return $this; } /** - * - * - * @return string|null - */ + * Date and time at which the node was added to the swarm in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @return string|null + */ public function getCreatedAt(): ?string { return $this->createdAt; } /** - * - * - * @param string|null $createdAt - * - * @return self - */ + * Date and time at which the node was added to the swarm in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @param string|null $createdAt + * + * @return self + */ public function setCreatedAt(?string $createdAt): self { $this->initialized['createdAt'] = true; @@ -115,21 +174,25 @@ public function setCreatedAt(?string $createdAt): self return $this; } /** - * - * - * @return string|null - */ + * Date and time at which the node was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @return string|null + */ public function getUpdatedAt(): ?string { return $this->updatedAt; } /** - * - * - * @param string|null $updatedAt - * - * @return self - */ + * Date and time at which the node was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @param string|null $updatedAt + * + * @return self + */ public function setUpdatedAt(?string $updatedAt): self { $this->initialized['updatedAt'] = true; @@ -159,25 +222,87 @@ public function setSpec(?NodeSpec $spec): self return $this; } /** - * - * - * @return NodeDescription|null - */ + * NodeDescription encapsulates the properties of the Node as reported by the + agent. + + * + * @return NodeDescription|null + */ public function getDescription(): ?NodeDescription { return $this->description; } /** - * - * - * @param NodeDescription|null $description - * - * @return self - */ + * NodeDescription encapsulates the properties of the Node as reported by the + agent. + + * + * @param NodeDescription|null $description + * + * @return self + */ public function setDescription(?NodeDescription $description): self { $this->initialized['description'] = true; $this->description = $description; return $this; } + /** + * NodeStatus represents the status of a node. + + It provides the current status of the node, as seen by the manager. + + * + * @return NodeStatus|null + */ + public function getStatus(): ?NodeStatus + { + return $this->status; + } + /** + * NodeStatus represents the status of a node. + + It provides the current status of the node, as seen by the manager. + + * + * @param NodeStatus|null $status + * + * @return self + */ + public function setStatus(?NodeStatus $status): self + { + $this->initialized['status'] = true; + $this->status = $status; + return $this; + } + /** + * ManagerStatus represents the status of a manager. + + It provides the current status of a node's manager component, if the node + is a manager. + + * + * @return ManagerStatus|null + */ + public function getManagerStatus(): ?ManagerStatus + { + return $this->managerStatus; + } + /** + * ManagerStatus represents the status of a manager. + + It provides the current status of a node's manager component, if the node + is a manager. + + * + * @param ManagerStatus|null $managerStatus + * + * @return self + */ + public function setManagerStatus(?ManagerStatus $managerStatus): self + { + $this->initialized['managerStatus'] = true; + $this->managerStatus = $managerStatus; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/NodeDescription.php b/generated/Model/NodeDescription.php index 5d9a78084..65a0c2410 100644 --- a/generated/Model/NodeDescription.php +++ b/generated/Model/NodeDescription.php @@ -19,23 +19,33 @@ public function isInitialized($property): bool */ protected $hostname; /** - * + * Platform represents the platform (Arch/OS). * - * @var NodeDescriptionPlatform|null + * @var Platform|null */ protected $platform; /** - * - * - * @var NodeDescriptionResources|null - */ + * An object describing the resources which can be advertised by a node and + requested by a task. + + * + * @var ResourceObject|null + */ protected $resources; /** - * + * EngineDescription provides information about an engine. * - * @var NodeDescriptionEngine|null + * @var EngineDescription|null */ protected $engine; + /** + * Information about the issuer of leaf TLS certificates and the trusted root + CA certificate. + + * + * @var TLSInfo|null + */ + protected $tLSInfo; /** * * @@ -59,69 +69,99 @@ public function setHostname(?string $hostname): self return $this; } /** - * + * Platform represents the platform (Arch/OS). * - * @return NodeDescriptionPlatform|null + * @return Platform|null */ - public function getPlatform(): ?NodeDescriptionPlatform + public function getPlatform(): ?Platform { return $this->platform; } /** - * + * Platform represents the platform (Arch/OS). * - * @param NodeDescriptionPlatform|null $platform + * @param Platform|null $platform * * @return self */ - public function setPlatform(?NodeDescriptionPlatform $platform): self + public function setPlatform(?Platform $platform): self { $this->initialized['platform'] = true; $this->platform = $platform; return $this; } /** - * - * - * @return NodeDescriptionResources|null - */ - public function getResources(): ?NodeDescriptionResources + * An object describing the resources which can be advertised by a node and + requested by a task. + + * + * @return ResourceObject|null + */ + public function getResources(): ?ResourceObject { return $this->resources; } /** - * - * - * @param NodeDescriptionResources|null $resources - * - * @return self - */ - public function setResources(?NodeDescriptionResources $resources): self + * An object describing the resources which can be advertised by a node and + requested by a task. + + * + * @param ResourceObject|null $resources + * + * @return self + */ + public function setResources(?ResourceObject $resources): self { $this->initialized['resources'] = true; $this->resources = $resources; return $this; } /** - * + * EngineDescription provides information about an engine. * - * @return NodeDescriptionEngine|null + * @return EngineDescription|null */ - public function getEngine(): ?NodeDescriptionEngine + public function getEngine(): ?EngineDescription { return $this->engine; } /** - * + * EngineDescription provides information about an engine. * - * @param NodeDescriptionEngine|null $engine + * @param EngineDescription|null $engine * * @return self */ - public function setEngine(?NodeDescriptionEngine $engine): self + public function setEngine(?EngineDescription $engine): self { $this->initialized['engine'] = true; $this->engine = $engine; return $this; } + /** + * Information about the issuer of leaf TLS certificates and the trusted root + CA certificate. + + * + * @return TLSInfo|null + */ + public function getTLSInfo(): ?TLSInfo + { + return $this->tLSInfo; + } + /** + * Information about the issuer of leaf TLS certificates and the trusted root + CA certificate. + + * + * @param TLSInfo|null $tLSInfo + * + * @return self + */ + public function setTLSInfo(?TLSInfo $tLSInfo): self + { + $this->initialized['tLSInfo'] = true; + $this->tLSInfo = $tLSInfo; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/NodeStatus.php b/generated/Model/NodeStatus.php new file mode 100644 index 000000000..7de305801 --- /dev/null +++ b/generated/Model/NodeStatus.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * NodeState represents the state of a node. + * + * @var string|null + */ + protected $state; + /** + * + * + * @var string|null + */ + protected $message; + /** + * IP address of the node. + * + * @var string|null + */ + protected $addr; + /** + * NodeState represents the state of a node. + * + * @return string|null + */ + public function getState(): ?string + { + return $this->state; + } + /** + * NodeState represents the state of a node. + * + * @param string|null $state + * + * @return self + */ + public function setState(?string $state): self + { + $this->initialized['state'] = true; + $this->state = $state; + return $this; + } + /** + * + * + * @return string|null + */ + public function getMessage(): ?string + { + return $this->message; + } + /** + * + * + * @param string|null $message + * + * @return self + */ + public function setMessage(?string $message): self + { + $this->initialized['message'] = true; + $this->message = $message; + return $this; + } + /** + * IP address of the node. + * + * @return string|null + */ + public function getAddr(): ?string + { + return $this->addr; + } + /** + * IP address of the node. + * + * @param string|null $addr + * + * @return self + */ + public function setAddr(?string $addr): self + { + $this->initialized['addr'] = true; + $this->addr = $addr; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/OCIDescriptor.php b/generated/Model/OCIDescriptor.php new file mode 100644 index 000000000..c60481c8c --- /dev/null +++ b/generated/Model/OCIDescriptor.php @@ -0,0 +1,99 @@ +initialized); + } + /** + * The media type of the object this schema refers to. + * + * @var string|null + */ + protected $mediaType; + /** + * The digest of the targeted content. + * + * @var string|null + */ + protected $digest; + /** + * The size in bytes of the blob. + * + * @var int|null + */ + protected $size; + /** + * The media type of the object this schema refers to. + * + * @return string|null + */ + public function getMediaType(): ?string + { + return $this->mediaType; + } + /** + * The media type of the object this schema refers to. + * + * @param string|null $mediaType + * + * @return self + */ + public function setMediaType(?string $mediaType): self + { + $this->initialized['mediaType'] = true; + $this->mediaType = $mediaType; + return $this; + } + /** + * The digest of the targeted content. + * + * @return string|null + */ + public function getDigest(): ?string + { + return $this->digest; + } + /** + * The digest of the targeted content. + * + * @param string|null $digest + * + * @return self + */ + public function setDigest(?string $digest): self + { + $this->initialized['digest'] = true; + $this->digest = $digest; + return $this; + } + /** + * The size in bytes of the blob. + * + * @return int|null + */ + public function getSize(): ?int + { + return $this->size; + } + /** + * The size in bytes of the blob. + * + * @param int|null $size + * + * @return self + */ + public function setSize(?int $size): self + { + $this->initialized['size'] = true; + $this->size = $size; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/OCIPlatform.php b/generated/Model/OCIPlatform.php new file mode 100644 index 000000000..720745860 --- /dev/null +++ b/generated/Model/OCIPlatform.php @@ -0,0 +1,173 @@ +initialized); + } + /** + * The CPU architecture, for example `amd64` or `ppc64`. + * + * @var string|null + */ + protected $architecture; + /** + * The operating system, for example `linux` or `windows`. + * + * @var string|null + */ + protected $os; + /** + * Optional field specifying the operating system version, for example on + Windows `10.0.19041.1165`. + + * + * @var string|null + */ + protected $osVersion; + /** + * Optional field specifying an array of strings, each listing a required + OS feature (for example on Windows `win32k`). + + * + * @var list|null + */ + protected $osFeatures; + /** + * Optional field specifying a variant of the CPU, for example `v7` to + specify ARMv7 when architecture is `arm`. + + * + * @var string|null + */ + protected $variant; + /** + * The CPU architecture, for example `amd64` or `ppc64`. + * + * @return string|null + */ + public function getArchitecture(): ?string + { + return $this->architecture; + } + /** + * The CPU architecture, for example `amd64` or `ppc64`. + * + * @param string|null $architecture + * + * @return self + */ + public function setArchitecture(?string $architecture): self + { + $this->initialized['architecture'] = true; + $this->architecture = $architecture; + return $this; + } + /** + * The operating system, for example `linux` or `windows`. + * + * @return string|null + */ + public function getOs(): ?string + { + return $this->os; + } + /** + * The operating system, for example `linux` or `windows`. + * + * @param string|null $os + * + * @return self + */ + public function setOs(?string $os): self + { + $this->initialized['os'] = true; + $this->os = $os; + return $this; + } + /** + * Optional field specifying the operating system version, for example on + Windows `10.0.19041.1165`. + + * + * @return string|null + */ + public function getOsVersion(): ?string + { + return $this->osVersion; + } + /** + * Optional field specifying the operating system version, for example on + Windows `10.0.19041.1165`. + + * + * @param string|null $osVersion + * + * @return self + */ + public function setOsVersion(?string $osVersion): self + { + $this->initialized['osVersion'] = true; + $this->osVersion = $osVersion; + return $this; + } + /** + * Optional field specifying an array of strings, each listing a required + OS feature (for example on Windows `win32k`). + + * + * @return list|null + */ + public function getOsFeatures(): ?array + { + return $this->osFeatures; + } + /** + * Optional field specifying an array of strings, each listing a required + OS feature (for example on Windows `win32k`). + + * + * @param list|null $osFeatures + * + * @return self + */ + public function setOsFeatures(?array $osFeatures): self + { + $this->initialized['osFeatures'] = true; + $this->osFeatures = $osFeatures; + return $this; + } + /** + * Optional field specifying a variant of the CPU, for example `v7` to + specify ARMv7 when architecture is `arm`. + + * + * @return string|null + */ + public function getVariant(): ?string + { + return $this->variant; + } + /** + * Optional field specifying a variant of the CPU, for example `v7` to + specify ARMv7 when architecture is `arm`. + + * + * @param string|null $variant + * + * @return self + */ + public function setVariant(?string $variant): self + { + $this->initialized['variant'] = true; + $this->variant = $variant; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SecretVersion.php b/generated/Model/ObjectVersion.php similarity index 97% rename from generated/Model/SecretVersion.php rename to generated/Model/ObjectVersion.php index 6884f3180..f03a8407c 100644 --- a/generated/Model/SecretVersion.php +++ b/generated/Model/ObjectVersion.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class SecretVersion +class ObjectVersion { /** * @var array diff --git a/generated/Model/PeerInfo.php b/generated/Model/PeerInfo.php new file mode 100644 index 000000000..ab3419a4d --- /dev/null +++ b/generated/Model/PeerInfo.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * ID of the peer-node in the Swarm cluster. + * + * @var string|null + */ + protected $name; + /** + * IP-address of the peer-node in the Swarm cluster. + * + * @var string|null + */ + protected $iP; + /** + * ID of the peer-node in the Swarm cluster. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * ID of the peer-node in the Swarm cluster. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * IP-address of the peer-node in the Swarm cluster. + * + * @return string|null + */ + public function getIP(): ?string + { + return $this->iP; + } + /** + * IP-address of the peer-node in the Swarm cluster. + * + * @param string|null $iP + * + * @return self + */ + public function setIP(?string $iP): self + { + $this->initialized['iP'] = true; + $this->iP = $iP; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PeerNode.php b/generated/Model/PeerNode.php new file mode 100644 index 000000000..2cce643c4 --- /dev/null +++ b/generated/Model/PeerNode.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * Unique identifier of for this node in the swarm. + * + * @var string|null + */ + protected $nodeID; + /** + * IP address and ports at which this node can be reached. + * + * @var string|null + */ + protected $addr; + /** + * Unique identifier of for this node in the swarm. + * + * @return string|null + */ + public function getNodeID(): ?string + { + return $this->nodeID; + } + /** + * Unique identifier of for this node in the swarm. + * + * @param string|null $nodeID + * + * @return self + */ + public function setNodeID(?string $nodeID): self + { + $this->initialized['nodeID'] = true; + $this->nodeID = $nodeID; + return $this; + } + /** + * IP address and ports at which this node can be reached. + * + * @return string|null + */ + public function getAddr(): ?string + { + return $this->addr; + } + /** + * IP address and ports at which this node can be reached. + * + * @param string|null $addr + * + * @return self + */ + public function setAddr(?string $addr): self + { + $this->initialized['addr'] = true; + $this->addr = $addr; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/NodeDescriptionPlatform.php b/generated/Model/Platform.php similarity index 59% rename from generated/Model/NodeDescriptionPlatform.php rename to generated/Model/Platform.php index 95d17e440..e8c77e294 100644 --- a/generated/Model/NodeDescriptionPlatform.php +++ b/generated/Model/Platform.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class NodeDescriptionPlatform +class Platform { /** * @var array @@ -13,33 +13,39 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * - * - * @var string|null - */ + * Architecture represents the hardware architecture (for example, + `x86_64`). + + * + * @var string|null + */ protected $architecture; /** - * + * OS represents the Operating System (for example, `linux` or `windows`). * * @var string|null */ protected $oS; /** - * - * - * @return string|null - */ + * Architecture represents the hardware architecture (for example, + `x86_64`). + + * + * @return string|null + */ public function getArchitecture(): ?string { return $this->architecture; } /** - * - * - * @param string|null $architecture - * - * @return self - */ + * Architecture represents the hardware architecture (for example, + `x86_64`). + + * + * @param string|null $architecture + * + * @return self + */ public function setArchitecture(?string $architecture): self { $this->initialized['architecture'] = true; @@ -47,7 +53,7 @@ public function setArchitecture(?string $architecture): self return $this; } /** - * + * OS represents the Operating System (for example, `linux` or `windows`). * * @return string|null */ @@ -56,7 +62,7 @@ public function getOS(): ?string return $this->oS; } /** - * + * OS represents the Operating System (for example, `linux` or `windows`). * * @param string|null $oS * diff --git a/generated/Model/Plugin.php b/generated/Model/Plugin.php index 578202b37..df9f4fff1 100644 --- a/generated/Model/Plugin.php +++ b/generated/Model/Plugin.php @@ -25,7 +25,7 @@ public function isInitialized($property): bool */ protected $name; /** - * True when the plugin is running. False when the plugin is not running, only installed. + * True if the plugin is running. False if the plugin is not running, only installed. * * @var bool|null */ @@ -36,6 +36,12 @@ public function isInitialized($property): bool * @var PluginSettings|null */ protected $settings; + /** + * plugin remote reference used to push/pull the plugin + * + * @var string|null + */ + protected $pluginReference; /** * The config of a plugin. * @@ -87,7 +93,7 @@ public function setName(?string $name): self return $this; } /** - * True when the plugin is running. False when the plugin is not running, only installed. + * True if the plugin is running. False if the plugin is not running, only installed. * * @return bool|null */ @@ -96,7 +102,7 @@ public function getEnabled(): ?bool return $this->enabled; } /** - * True when the plugin is running. False when the plugin is not running, only installed. + * True if the plugin is running. False if the plugin is not running, only installed. * * @param bool|null $enabled * @@ -130,6 +136,28 @@ public function setSettings(?PluginSettings $settings): self $this->settings = $settings; return $this; } + /** + * plugin remote reference used to push/pull the plugin + * + * @return string|null + */ + public function getPluginReference(): ?string + { + return $this->pluginReference; + } + /** + * plugin remote reference used to push/pull the plugin + * + * @param string|null $pluginReference + * + * @return self + */ + public function setPluginReference(?string $pluginReference): self + { + $this->initialized['pluginReference'] = true; + $this->pluginReference = $pluginReference; + return $this; + } /** * The config of a plugin. * diff --git a/generated/Model/PluginConfig.php b/generated/Model/PluginConfig.php index 1f8a0b32e..01ebe10f5 100644 --- a/generated/Model/PluginConfig.php +++ b/generated/Model/PluginConfig.php @@ -12,6 +12,12 @@ public function isInitialized($property): bool { return array_key_exists($property, $this->initialized); } + /** + * Docker Version used to create the plugin + * + * @var string|null + */ + protected $dockerVersion; /** * * @@ -66,6 +72,18 @@ public function isInitialized($property): bool * @var string|null */ protected $propagatedMount; + /** + * + * + * @var bool|null + */ + protected $ipcHost; + /** + * + * + * @var bool|null + */ + protected $pidHost; /** * * @@ -90,6 +108,28 @@ public function isInitialized($property): bool * @var PluginConfigRootfs|null */ protected $rootfs; + /** + * Docker Version used to create the plugin + * + * @return string|null + */ + public function getDockerVersion(): ?string + { + return $this->dockerVersion; + } + /** + * Docker Version used to create the plugin + * + * @param string|null $dockerVersion + * + * @return self + */ + public function setDockerVersion(?string $dockerVersion): self + { + $this->initialized['dockerVersion'] = true; + $this->dockerVersion = $dockerVersion; + return $this; + } /** * * @@ -288,6 +328,50 @@ public function setPropagatedMount(?string $propagatedMount): self $this->propagatedMount = $propagatedMount; return $this; } + /** + * + * + * @return bool|null + */ + public function getIpcHost(): ?bool + { + return $this->ipcHost; + } + /** + * + * + * @param bool|null $ipcHost + * + * @return self + */ + public function setIpcHost(?bool $ipcHost): self + { + $this->initialized['ipcHost'] = true; + $this->ipcHost = $ipcHost; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getPidHost(): ?bool + { + return $this->pidHost; + } + /** + * + * + * @param bool|null $pidHost + * + * @return self + */ + public function setPidHost(?bool $pidHost): self + { + $this->initialized['pidHost'] = true; + $this->pidHost = $pidHost; + return $this; + } /** * * diff --git a/generated/Model/PluginConfigInterface.php b/generated/Model/PluginConfigInterface.php index df7fda035..aa1f4243a 100644 --- a/generated/Model/PluginConfigInterface.php +++ b/generated/Model/PluginConfigInterface.php @@ -24,6 +24,12 @@ public function isInitialized($property): bool * @var string|null */ protected $socket; + /** + * Protocol to use for clients connecting to the plugin. + * + * @var string|null + */ + protected $protocolScheme; /** * * @@ -68,4 +74,26 @@ public function setSocket(?string $socket): self $this->socket = $socket; return $this; } + /** + * Protocol to use for clients connecting to the plugin. + * + * @return string|null + */ + public function getProtocolScheme(): ?string + { + return $this->protocolScheme; + } + /** + * Protocol to use for clients connecting to the plugin. + * + * @param string|null $protocolScheme + * + * @return self + */ + public function setProtocolScheme(?string $protocolScheme): self + { + $this->initialized['protocolScheme'] = true; + $this->protocolScheme = $protocolScheme; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/PluginsPullPostBodyItem.php b/generated/Model/PluginPrivilege.php similarity index 98% rename from generated/Model/PluginsPullPostBodyItem.php rename to generated/Model/PluginPrivilege.php index 904a80ed7..5256dc872 100644 --- a/generated/Model/PluginsPullPostBodyItem.php +++ b/generated/Model/PluginPrivilege.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class PluginsPullPostBodyItem +class PluginPrivilege { /** * @var array diff --git a/generated/Model/PluginsInfo.php b/generated/Model/PluginsInfo.php new file mode 100644 index 000000000..8732c314e --- /dev/null +++ b/generated/Model/PluginsInfo.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * Names of available volume-drivers, and network-driver plugins. + * + * @var list|null + */ + protected $volume; + /** + * Names of available network-drivers, and network-driver plugins. + * + * @var list|null + */ + protected $network; + /** + * Names of available authorization plugins. + * + * @var list|null + */ + protected $authorization; + /** + * Names of available logging-drivers, and logging-driver plugins. + * + * @var list|null + */ + protected $log; + /** + * Names of available volume-drivers, and network-driver plugins. + * + * @return list|null + */ + public function getVolume(): ?array + { + return $this->volume; + } + /** + * Names of available volume-drivers, and network-driver plugins. + * + * @param list|null $volume + * + * @return self + */ + public function setVolume(?array $volume): self + { + $this->initialized['volume'] = true; + $this->volume = $volume; + return $this; + } + /** + * Names of available network-drivers, and network-driver plugins. + * + * @return list|null + */ + public function getNetwork(): ?array + { + return $this->network; + } + /** + * Names of available network-drivers, and network-driver plugins. + * + * @param list|null $network + * + * @return self + */ + public function setNetwork(?array $network): self + { + $this->initialized['network'] = true; + $this->network = $network; + return $this; + } + /** + * Names of available authorization plugins. + * + * @return list|null + */ + public function getAuthorization(): ?array + { + return $this->authorization; + } + /** + * Names of available authorization plugins. + * + * @param list|null $authorization + * + * @return self + */ + public function setAuthorization(?array $authorization): self + { + $this->initialized['authorization'] = true; + $this->authorization = $authorization; + return $this; + } + /** + * Names of available logging-drivers, and logging-driver plugins. + * + * @return list|null + */ + public function getLog(): ?array + { + return $this->log; + } + /** + * Names of available logging-drivers, and logging-driver plugins. + * + * @param list|null $log + * + * @return self + */ + public function setLog(?array $log): self + { + $this->initialized['log'] = true; + $this->log = $log; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Port.php b/generated/Model/Port.php index 2a991d0d3..8f2df6c60 100644 --- a/generated/Model/Port.php +++ b/generated/Model/Port.php @@ -13,7 +13,7 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * + * Host IP address that the container's port is mapped to * * @var string|null */ @@ -37,7 +37,7 @@ public function isInitialized($property): bool */ protected $type; /** - * + * Host IP address that the container's port is mapped to * * @return string|null */ @@ -46,7 +46,7 @@ public function getIP(): ?string return $this->iP; } /** - * + * Host IP address that the container's port is mapped to * * @param string|null $iP * diff --git a/generated/Model/HostConfigPortBindingsItem.php b/generated/Model/PortBinding.php similarity index 74% rename from generated/Model/HostConfigPortBindingsItem.php rename to generated/Model/PortBinding.php index 7d8164e88..d5ce1ef28 100644 --- a/generated/Model/HostConfigPortBindingsItem.php +++ b/generated/Model/PortBinding.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class HostConfigPortBindingsItem +class PortBinding { /** * @var array @@ -13,19 +13,19 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * The host IP address + * Host IP address that the container's port is mapped to. * * @var string|null */ protected $hostIp; /** - * The host port number, as a string + * Host port number that the container's port is mapped to. * * @var string|null */ protected $hostPort; /** - * The host IP address + * Host IP address that the container's port is mapped to. * * @return string|null */ @@ -34,7 +34,7 @@ public function getHostIp(): ?string return $this->hostIp; } /** - * The host IP address + * Host IP address that the container's port is mapped to. * * @param string|null $hostIp * @@ -47,7 +47,7 @@ public function setHostIp(?string $hostIp): self return $this; } /** - * The host port number, as a string + * Host port number that the container's port is mapped to. * * @return string|null */ @@ -56,7 +56,7 @@ public function getHostPort(): ?string return $this->hostPort; } /** - * The host port number, as a string + * Host port number that the container's port is mapped to. * * @param string|null $hostPort * diff --git a/generated/Model/ServiceVersion.php b/generated/Model/PortStatus.php similarity index 51% rename from generated/Model/ServiceVersion.php rename to generated/Model/PortStatus.php index aa2b2430f..17c5a7253 100644 --- a/generated/Model/ServiceVersion.php +++ b/generated/Model/PortStatus.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class ServiceVersion +class PortStatus { /** * @var array @@ -15,29 +15,29 @@ public function isInitialized($property): bool /** * * - * @var int|null + * @var list|null */ - protected $index; + protected $ports; /** * * - * @return int|null + * @return list|null */ - public function getIndex(): ?int + public function getPorts(): ?array { - return $this->index; + return $this->ports; } /** * * - * @param int|null $index + * @param list|null $ports * * @return self */ - public function setIndex(?int $index): self + public function setPorts(?array $ports): self { - $this->initialized['index'] = true; - $this->index = $index; + $this->initialized['ports'] = true; + $this->ports = $ports; return $this; } } \ No newline at end of file diff --git a/generated/Model/ProgressDetail.php b/generated/Model/ProgressDetail.php index b35b3ba2f..416a169d9 100644 --- a/generated/Model/ProgressDetail.php +++ b/generated/Model/ProgressDetail.php @@ -17,33 +17,33 @@ public function isInitialized($property): bool * * @var int|null */ - protected $code; + protected $current; /** * * * @var int|null */ - protected $message; + protected $total; /** * * * @return int|null */ - public function getCode(): ?int + public function getCurrent(): ?int { - return $this->code; + return $this->current; } /** * * - * @param int|null $code + * @param int|null $current * * @return self */ - public function setCode(?int $code): self + public function setCurrent(?int $current): self { - $this->initialized['code'] = true; - $this->code = $code; + $this->initialized['current'] = true; + $this->current = $current; return $this; } /** @@ -51,21 +51,21 @@ public function setCode(?int $code): self * * @return int|null */ - public function getMessage(): ?int + public function getTotal(): ?int { - return $this->message; + return $this->total; } /** * * - * @param int|null $message + * @param int|null $total * * @return self */ - public function setMessage(?int $message): self + public function setTotal(?int $total): self { - $this->initialized['message'] = true; - $this->message = $message; + $this->initialized['total'] = true; + $this->total = $total; return $this; } } \ No newline at end of file diff --git a/generated/Model/RegistryServiceConfig.php b/generated/Model/RegistryServiceConfig.php new file mode 100644 index 000000000..d95150c48 --- /dev/null +++ b/generated/Model/RegistryServiceConfig.php @@ -0,0 +1,353 @@ +initialized); + } + /** + * List of IP ranges to which nondistributable artifacts can be pushed, + using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). + + Some images (for example, Windows base images) contain artifacts + whose distribution is restricted by license. When these images are + pushed to a registry, restricted artifacts are not included. + + This configuration override this behavior, and enables the daemon to + push nondistributable artifacts to all registries whose resolved IP + address is within the subnet described by the CIDR syntax. + + This option is useful when pushing images containing + nondistributable artifacts to a registry on an air-gapped network so + hosts on that network can pull the images without connecting to + another server. + + > **Warning**: Nondistributable artifacts typically have restrictions + > on how and where they can be distributed and shared. Only use this + > feature to push artifacts to private registries and ensure that you + > are in compliance with any terms that cover redistributing + > nondistributable artifacts. + + * + * @var list|null + */ + protected $allowNondistributableArtifactsCIDRs; + /** + * List of registry hostnames to which nondistributable artifacts can be + pushed, using the format `[:]` or `[:]`. + + Some images (for example, Windows base images) contain artifacts + whose distribution is restricted by license. When these images are + pushed to a registry, restricted artifacts are not included. + + This configuration override this behavior for the specified + registries. + + This option is useful when pushing images containing + nondistributable artifacts to a registry on an air-gapped network so + hosts on that network can pull the images without connecting to + another server. + + > **Warning**: Nondistributable artifacts typically have restrictions + > on how and where they can be distributed and shared. Only use this + > feature to push artifacts to private registries and ensure that you + > are in compliance with any terms that cover redistributing + > nondistributable artifacts. + + * + * @var list|null + */ + protected $allowNondistributableArtifactsHostnames; + /** + * List of IP ranges of insecure registries, using the CIDR syntax + ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries + accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates + from unknown CAs) communication. + + By default, local registries (`127.0.0.0/8`) are configured as + insecure. All other registries are secure. Communicating with an + insecure registry is not possible if the daemon assumes that registry + is secure. + + This configuration override this behavior, insecure communication with + registries whose resolved IP address is within the subnet described by + the CIDR syntax. + + Registries can also be marked insecure by hostname. Those registries + are listed under `IndexConfigs` and have their `Secure` field set to + `false`. + + > **Warning**: Using this option can be useful when running a local + > registry, but introduces security vulnerabilities. This option + > should therefore ONLY be used for testing purposes. For increased + > security, users should add their CA to their system's list of trusted + > CAs instead of enabling this option. + + * + * @var list|null + */ + protected $insecureRegistryCIDRs; + /** + * + * + * @var array|null + */ + protected $indexConfigs; + /** + * List of registry URLs that act as a mirror for the official + (`docker.io`) registry. + + * + * @var list|null + */ + protected $mirrors; + /** + * List of IP ranges to which nondistributable artifacts can be pushed, + using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). + + Some images (for example, Windows base images) contain artifacts + whose distribution is restricted by license. When these images are + pushed to a registry, restricted artifacts are not included. + + This configuration override this behavior, and enables the daemon to + push nondistributable artifacts to all registries whose resolved IP + address is within the subnet described by the CIDR syntax. + + This option is useful when pushing images containing + nondistributable artifacts to a registry on an air-gapped network so + hosts on that network can pull the images without connecting to + another server. + + > **Warning**: Nondistributable artifacts typically have restrictions + > on how and where they can be distributed and shared. Only use this + > feature to push artifacts to private registries and ensure that you + > are in compliance with any terms that cover redistributing + > nondistributable artifacts. + + * + * @return list|null + */ + public function getAllowNondistributableArtifactsCIDRs(): ?array + { + return $this->allowNondistributableArtifactsCIDRs; + } + /** + * List of IP ranges to which nondistributable artifacts can be pushed, + using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). + + Some images (for example, Windows base images) contain artifacts + whose distribution is restricted by license. When these images are + pushed to a registry, restricted artifacts are not included. + + This configuration override this behavior, and enables the daemon to + push nondistributable artifacts to all registries whose resolved IP + address is within the subnet described by the CIDR syntax. + + This option is useful when pushing images containing + nondistributable artifacts to a registry on an air-gapped network so + hosts on that network can pull the images without connecting to + another server. + + > **Warning**: Nondistributable artifacts typically have restrictions + > on how and where they can be distributed and shared. Only use this + > feature to push artifacts to private registries and ensure that you + > are in compliance with any terms that cover redistributing + > nondistributable artifacts. + + * + * @param list|null $allowNondistributableArtifactsCIDRs + * + * @return self + */ + public function setAllowNondistributableArtifactsCIDRs(?array $allowNondistributableArtifactsCIDRs): self + { + $this->initialized['allowNondistributableArtifactsCIDRs'] = true; + $this->allowNondistributableArtifactsCIDRs = $allowNondistributableArtifactsCIDRs; + return $this; + } + /** + * List of registry hostnames to which nondistributable artifacts can be + pushed, using the format `[:]` or `[:]`. + + Some images (for example, Windows base images) contain artifacts + whose distribution is restricted by license. When these images are + pushed to a registry, restricted artifacts are not included. + + This configuration override this behavior for the specified + registries. + + This option is useful when pushing images containing + nondistributable artifacts to a registry on an air-gapped network so + hosts on that network can pull the images without connecting to + another server. + + > **Warning**: Nondistributable artifacts typically have restrictions + > on how and where they can be distributed and shared. Only use this + > feature to push artifacts to private registries and ensure that you + > are in compliance with any terms that cover redistributing + > nondistributable artifacts. + + * + * @return list|null + */ + public function getAllowNondistributableArtifactsHostnames(): ?array + { + return $this->allowNondistributableArtifactsHostnames; + } + /** + * List of registry hostnames to which nondistributable artifacts can be + pushed, using the format `[:]` or `[:]`. + + Some images (for example, Windows base images) contain artifacts + whose distribution is restricted by license. When these images are + pushed to a registry, restricted artifacts are not included. + + This configuration override this behavior for the specified + registries. + + This option is useful when pushing images containing + nondistributable artifacts to a registry on an air-gapped network so + hosts on that network can pull the images without connecting to + another server. + + > **Warning**: Nondistributable artifacts typically have restrictions + > on how and where they can be distributed and shared. Only use this + > feature to push artifacts to private registries and ensure that you + > are in compliance with any terms that cover redistributing + > nondistributable artifacts. + + * + * @param list|null $allowNondistributableArtifactsHostnames + * + * @return self + */ + public function setAllowNondistributableArtifactsHostnames(?array $allowNondistributableArtifactsHostnames): self + { + $this->initialized['allowNondistributableArtifactsHostnames'] = true; + $this->allowNondistributableArtifactsHostnames = $allowNondistributableArtifactsHostnames; + return $this; + } + /** + * List of IP ranges of insecure registries, using the CIDR syntax + ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries + accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates + from unknown CAs) communication. + + By default, local registries (`127.0.0.0/8`) are configured as + insecure. All other registries are secure. Communicating with an + insecure registry is not possible if the daemon assumes that registry + is secure. + + This configuration override this behavior, insecure communication with + registries whose resolved IP address is within the subnet described by + the CIDR syntax. + + Registries can also be marked insecure by hostname. Those registries + are listed under `IndexConfigs` and have their `Secure` field set to + `false`. + + > **Warning**: Using this option can be useful when running a local + > registry, but introduces security vulnerabilities. This option + > should therefore ONLY be used for testing purposes. For increased + > security, users should add their CA to their system's list of trusted + > CAs instead of enabling this option. + + * + * @return list|null + */ + public function getInsecureRegistryCIDRs(): ?array + { + return $this->insecureRegistryCIDRs; + } + /** + * List of IP ranges of insecure registries, using the CIDR syntax + ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries + accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates + from unknown CAs) communication. + + By default, local registries (`127.0.0.0/8`) are configured as + insecure. All other registries are secure. Communicating with an + insecure registry is not possible if the daemon assumes that registry + is secure. + + This configuration override this behavior, insecure communication with + registries whose resolved IP address is within the subnet described by + the CIDR syntax. + + Registries can also be marked insecure by hostname. Those registries + are listed under `IndexConfigs` and have their `Secure` field set to + `false`. + + > **Warning**: Using this option can be useful when running a local + > registry, but introduces security vulnerabilities. This option + > should therefore ONLY be used for testing purposes. For increased + > security, users should add their CA to their system's list of trusted + > CAs instead of enabling this option. + + * + * @param list|null $insecureRegistryCIDRs + * + * @return self + */ + public function setInsecureRegistryCIDRs(?array $insecureRegistryCIDRs): self + { + $this->initialized['insecureRegistryCIDRs'] = true; + $this->insecureRegistryCIDRs = $insecureRegistryCIDRs; + return $this; + } + /** + * + * + * @return array|null + */ + public function getIndexConfigs(): ?iterable + { + return $this->indexConfigs; + } + /** + * + * + * @param array|null $indexConfigs + * + * @return self + */ + public function setIndexConfigs(?iterable $indexConfigs): self + { + $this->initialized['indexConfigs'] = true; + $this->indexConfigs = $indexConfigs; + return $this; + } + /** + * List of registry URLs that act as a mirror for the official + (`docker.io`) registry. + + * + * @return list|null + */ + public function getMirrors(): ?array + { + return $this->mirrors; + } + /** + * List of registry URLs that act as a mirror for the official + (`docker.io`) registry. + + * + * @param list|null $mirrors + * + * @return self + */ + public function setMirrors(?array $mirrors): self + { + $this->initialized['mirrors'] = true; + $this->mirrors = $mirrors; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecResourcesLimits.php b/generated/Model/ResourceObject.php similarity index 53% rename from generated/Model/TaskSpecResourcesLimits.php rename to generated/Model/ResourceObject.php index 748bf3ff3..2af2622aa 100644 --- a/generated/Model/TaskSpecResourcesLimits.php +++ b/generated/Model/ResourceObject.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class TaskSpecResourcesLimits +class ResourceObject { /** * @var array @@ -13,19 +13,27 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * CPU limit in units of 10-9 CPU shares. + * * * @var int|null */ protected $nanoCPUs; /** - * Memory limit in Bytes. + * * * @var int|null */ protected $memoryBytes; /** - * CPU limit in units of 10-9 CPU shares. + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + String resources (e.g, `GPU=UUID1`). + + * + * @var list|null + */ + protected $genericResources; + /** + * * * @return int|null */ @@ -34,7 +42,7 @@ public function getNanoCPUs(): ?int return $this->nanoCPUs; } /** - * CPU limit in units of 10-9 CPU shares. + * * * @param int|null $nanoCPUs * @@ -47,7 +55,7 @@ public function setNanoCPUs(?int $nanoCPUs): self return $this; } /** - * Memory limit in Bytes. + * * * @return int|null */ @@ -56,7 +64,7 @@ public function getMemoryBytes(): ?int return $this->memoryBytes; } /** - * Memory limit in Bytes. + * * * @param int|null $memoryBytes * @@ -68,4 +76,30 @@ public function setMemoryBytes(?int $memoryBytes): self $this->memoryBytes = $memoryBytes; return $this; } + /** + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + String resources (e.g, `GPU=UUID1`). + + * + * @return list|null + */ + public function getGenericResources(): ?array + { + return $this->genericResources; + } + /** + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + String resources (e.g, `GPU=UUID1`). + + * + * @param list|null $genericResources + * + * @return self + */ + public function setGenericResources(?array $genericResources): self + { + $this->initialized['genericResources'] = true; + $this->genericResources = $genericResources; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/Resources.php b/generated/Model/Resources.php index d794e2054..9ee9e8871 100644 --- a/generated/Model/Resources.php +++ b/generated/Model/Resources.php @@ -13,10 +13,12 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * An integer value representing this container's relative CPU weight versus other containers. - * - * @var int|null - */ + * An integer value representing this container's relative CPU weight + versus other containers. + + * + * @var int|null + */ protected $cpuShares; /** * Memory limit in bytes. @@ -25,10 +27,14 @@ public function isInitialized($property): bool */ protected $memory = 0; /** - * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. - * - * @var string|null - */ + * Path to `cgroups` under which the container's `cgroup` is created. If + the path is not absolute, the path is considered to be relative to the + `cgroups` path of the init process. Cgroups are created if they do not + already exist. + + * + * @var string|null + */ protected $cgroupParent; /** * Block IO weight (relative weight). @@ -37,34 +43,59 @@ public function isInitialized($property): bool */ protected $blkioWeight; /** - * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. - * - * @var list|null - */ + * Block IO weight (relative device weight) in the form: + + ``` + [{"Path": "device_path", "Weight": weight}] + ``` + + * + * @var list|null + */ protected $blkioWeightDevice; /** - * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @var list|null - */ + * Limit read rate (bytes per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @var list|null + */ protected $blkioDeviceReadBps; /** - * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @var list|null - */ + * Limit write rate (bytes per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @var list|null + */ protected $blkioDeviceWriteBps; /** - * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @var list|null - */ + * Limit read rate (IO per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @var list|null + */ protected $blkioDeviceReadIOps; /** - * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @var list|null - */ + * Limit write rate (IO per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @var list|null + */ protected $blkioDeviceWriteIOps; /** * The length of a CPU period in microseconds. @@ -79,28 +110,34 @@ public function isInitialized($property): bool */ protected $cpuQuota; /** - * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @var int|null - */ + * The length of a CPU real-time period in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @var int|null + */ protected $cpuRealtimePeriod; /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @var int|null - */ + * The length of a CPU real-time runtime in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @var int|null + */ protected $cpuRealtimeRuntime; /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * * @var string|null */ protected $cpusetCpus; /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. - * - * @var string|null - */ + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + effective on NUMA systems. + + * + * @var string|null + */ protected $cpusetMems; /** * A list of devices to add to the container. @@ -109,17 +146,28 @@ public function isInitialized($property): bool */ protected $devices; /** - * Disk limit (in bytes). + * a list of cgroup rules to apply to the container * - * @var int|null + * @var list|null */ - protected $diskQuota; + protected $deviceCgroupRules; /** - * Kernel memory limit in bytes. + * A list of requests for devices to be sent to device drivers. * - * @var int|null + * @var list|null */ - protected $kernelMemory; + protected $deviceRequests; + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + OCI runtime in use, this option may be ignored. It is no longer supported + by the default (runc) runtime. + + This field is omitted when empty. + + * + * @var int|null + */ + protected $kernelMemoryTCP; /** * Memory soft limit in bytes. * @@ -127,16 +175,20 @@ public function isInitialized($property): bool */ protected $memoryReservation; /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. - * - * @var int|null - */ + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + swap. + + * + * @var int|null + */ protected $memorySwap; /** - * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. - * - * @var int|null - */ + * Tune a container's memory swappiness behavior. Accepts an integer + between 0 and 100. + + * + * @var int|null + */ protected $memorySwappiness; /** * CPU quota in units of 10-9 CPUs. @@ -151,21 +203,39 @@ public function isInitialized($property): bool */ protected $oomKillDisable; /** - * Tune a container's pids limit. Set -1 for unlimited. - * - * @var int|null - */ + * Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + + * + * @var bool|null + */ + protected $init; + /** + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + to not change. + + * + * @var int|null + */ protected $pidsLimit; /** - * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" - * - * @var list|null - */ + * A list of resource limits to set in the container. For example: + + ``` + {"Name": "nofile", "Soft": 1024, "Hard": 2048} + ``` + + * + * @var list|null + */ protected $ulimits; /** * The number of usable CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @var int|null @@ -174,7 +244,9 @@ public function isInitialized($property): bool /** * The usable percentage of the available CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @var int|null @@ -187,27 +259,33 @@ public function isInitialized($property): bool */ protected $iOMaximumIOps; /** - * Maximum IO in bytes per second for the container system drive (Windows only) - * - * @var int|null - */ + * Maximum IO in bytes per second for the container system drive + (Windows only). + + * + * @var int|null + */ protected $iOMaximumBandwidth; /** - * An integer value representing this container's relative CPU weight versus other containers. - * - * @return int|null - */ + * An integer value representing this container's relative CPU weight + versus other containers. + + * + * @return int|null + */ public function getCpuShares(): ?int { return $this->cpuShares; } /** - * An integer value representing this container's relative CPU weight versus other containers. - * - * @param int|null $cpuShares - * - * @return self - */ + * An integer value representing this container's relative CPU weight + versus other containers. + + * + * @param int|null $cpuShares + * + * @return self + */ public function setCpuShares(?int $cpuShares): self { $this->initialized['cpuShares'] = true; @@ -237,21 +315,29 @@ public function setMemory(?int $memory): self return $this; } /** - * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. - * - * @return string|null - */ + * Path to `cgroups` under which the container's `cgroup` is created. If + the path is not absolute, the path is considered to be relative to the + `cgroups` path of the init process. Cgroups are created if they do not + already exist. + + * + * @return string|null + */ public function getCgroupParent(): ?string { return $this->cgroupParent; } /** - * Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. - * - * @param string|null $cgroupParent - * - * @return self - */ + * Path to `cgroups` under which the container's `cgroup` is created. If + the path is not absolute, the path is considered to be relative to the + `cgroups` path of the init process. Cgroups are created if they do not + already exist. + + * + * @param string|null $cgroupParent + * + * @return self + */ public function setCgroupParent(?string $cgroupParent): self { $this->initialized['cgroupParent'] = true; @@ -281,21 +367,31 @@ public function setBlkioWeight(?int $blkioWeight): self return $this; } /** - * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. - * - * @return list|null - */ + * Block IO weight (relative device weight) in the form: + + ``` + [{"Path": "device_path", "Weight": weight}] + ``` + + * + * @return list|null + */ public function getBlkioWeightDevice(): ?array { return $this->blkioWeightDevice; } /** - * Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. - * - * @param list|null $blkioWeightDevice - * - * @return self - */ + * Block IO weight (relative device weight) in the form: + + ``` + [{"Path": "device_path", "Weight": weight}] + ``` + + * + * @param list|null $blkioWeightDevice + * + * @return self + */ public function setBlkioWeightDevice(?array $blkioWeightDevice): self { $this->initialized['blkioWeightDevice'] = true; @@ -303,21 +399,31 @@ public function setBlkioWeightDevice(?array $blkioWeightDevice): self return $this; } /** - * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @return list|null - */ + * Limit read rate (bytes per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @return list|null + */ public function getBlkioDeviceReadBps(): ?array { return $this->blkioDeviceReadBps; } /** - * Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @param list|null $blkioDeviceReadBps - * - * @return self - */ + * Limit read rate (bytes per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @param list|null $blkioDeviceReadBps + * + * @return self + */ public function setBlkioDeviceReadBps(?array $blkioDeviceReadBps): self { $this->initialized['blkioDeviceReadBps'] = true; @@ -325,21 +431,31 @@ public function setBlkioDeviceReadBps(?array $blkioDeviceReadBps): self return $this; } /** - * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @return list|null - */ + * Limit write rate (bytes per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @return list|null + */ public function getBlkioDeviceWriteBps(): ?array { return $this->blkioDeviceWriteBps; } /** - * Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @param list|null $blkioDeviceWriteBps - * - * @return self - */ + * Limit write rate (bytes per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @param list|null $blkioDeviceWriteBps + * + * @return self + */ public function setBlkioDeviceWriteBps(?array $blkioDeviceWriteBps): self { $this->initialized['blkioDeviceWriteBps'] = true; @@ -347,21 +463,31 @@ public function setBlkioDeviceWriteBps(?array $blkioDeviceWriteBps): self return $this; } /** - * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @return list|null - */ + * Limit read rate (IO per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @return list|null + */ public function getBlkioDeviceReadIOps(): ?array { return $this->blkioDeviceReadIOps; } /** - * Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @param list|null $blkioDeviceReadIOps - * - * @return self - */ + * Limit read rate (IO per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @param list|null $blkioDeviceReadIOps + * + * @return self + */ public function setBlkioDeviceReadIOps(?array $blkioDeviceReadIOps): self { $this->initialized['blkioDeviceReadIOps'] = true; @@ -369,21 +495,31 @@ public function setBlkioDeviceReadIOps(?array $blkioDeviceReadIOps): self return $this; } /** - * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @return list|null - */ + * Limit write rate (IO per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @return list|null + */ public function getBlkioDeviceWriteIOps(): ?array { return $this->blkioDeviceWriteIOps; } /** - * Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - * - * @param list|null $blkioDeviceWriteIOps - * - * @return self - */ + * Limit write rate (IO per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + + * + * @param list|null $blkioDeviceWriteIOps + * + * @return self + */ public function setBlkioDeviceWriteIOps(?array $blkioDeviceWriteIOps): self { $this->initialized['blkioDeviceWriteIOps'] = true; @@ -435,21 +571,25 @@ public function setCpuQuota(?int $cpuQuota): self return $this; } /** - * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @return int|null - */ + * The length of a CPU real-time period in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @return int|null + */ public function getCpuRealtimePeriod(): ?int { return $this->cpuRealtimePeriod; } /** - * The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @param int|null $cpuRealtimePeriod - * - * @return self - */ + * The length of a CPU real-time period in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @param int|null $cpuRealtimePeriod + * + * @return self + */ public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self { $this->initialized['cpuRealtimePeriod'] = true; @@ -457,21 +597,25 @@ public function setCpuRealtimePeriod(?int $cpuRealtimePeriod): self return $this; } /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @return int|null - */ + * The length of a CPU real-time runtime in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @return int|null + */ public function getCpuRealtimeRuntime(): ?int { return $this->cpuRealtimeRuntime; } /** - * The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - * - * @param int|null $cpuRealtimeRuntime - * - * @return self - */ + * The length of a CPU real-time runtime in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + + * + * @param int|null $cpuRealtimeRuntime + * + * @return self + */ public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self { $this->initialized['cpuRealtimeRuntime'] = true; @@ -479,7 +623,7 @@ public function setCpuRealtimeRuntime(?int $cpuRealtimeRuntime): self return $this; } /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * * @return string|null */ @@ -488,7 +632,7 @@ public function getCpusetCpus(): ?string return $this->cpusetCpus; } /** - * CPUs in which to allow execution (e.g., `0-3`, `0,1`) + * CPUs in which to allow execution (e.g., `0-3`, `0,1`). * * @param string|null $cpusetCpus * @@ -501,21 +645,25 @@ public function setCpusetCpus(?string $cpusetCpus): self return $this; } /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. - * - * @return string|null - */ + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + effective on NUMA systems. + + * + * @return string|null + */ public function getCpusetMems(): ?string { return $this->cpusetMems; } /** - * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. - * - * @param string|null $cpusetMems - * - * @return self - */ + * Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + effective on NUMA systems. + + * + * @param string|null $cpusetMems + * + * @return self + */ public function setCpusetMems(?string $cpusetMems): self { $this->initialized['cpusetMems'] = true; @@ -545,47 +693,79 @@ public function setDevices(?array $devices): self return $this; } /** - * Disk limit (in bytes). + * a list of cgroup rules to apply to the container * - * @return int|null + * @return list|null */ - public function getDiskQuota(): ?int + public function getDeviceCgroupRules(): ?array { - return $this->diskQuota; + return $this->deviceCgroupRules; } /** - * Disk limit (in bytes). + * a list of cgroup rules to apply to the container * - * @param int|null $diskQuota + * @param list|null $deviceCgroupRules * * @return self */ - public function setDiskQuota(?int $diskQuota): self + public function setDeviceCgroupRules(?array $deviceCgroupRules): self { - $this->initialized['diskQuota'] = true; - $this->diskQuota = $diskQuota; + $this->initialized['deviceCgroupRules'] = true; + $this->deviceCgroupRules = $deviceCgroupRules; return $this; } /** - * Kernel memory limit in bytes. + * A list of requests for devices to be sent to device drivers. * - * @return int|null + * @return list|null */ - public function getKernelMemory(): ?int + public function getDeviceRequests(): ?array { - return $this->kernelMemory; + return $this->deviceRequests; } /** - * Kernel memory limit in bytes. + * A list of requests for devices to be sent to device drivers. * - * @param int|null $kernelMemory + * @param list|null $deviceRequests * * @return self */ - public function setKernelMemory(?int $kernelMemory): self + public function setDeviceRequests(?array $deviceRequests): self + { + $this->initialized['deviceRequests'] = true; + $this->deviceRequests = $deviceRequests; + return $this; + } + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + OCI runtime in use, this option may be ignored. It is no longer supported + by the default (runc) runtime. + + This field is omitted when empty. + + * + * @return int|null + */ + public function getKernelMemoryTCP(): ?int + { + return $this->kernelMemoryTCP; + } + /** + * Hard limit for kernel TCP buffer memory (in bytes). Depending on the + OCI runtime in use, this option may be ignored. It is no longer supported + by the default (runc) runtime. + + This field is omitted when empty. + + * + * @param int|null $kernelMemoryTCP + * + * @return self + */ + public function setKernelMemoryTCP(?int $kernelMemoryTCP): self { - $this->initialized['kernelMemory'] = true; - $this->kernelMemory = $kernelMemory; + $this->initialized['kernelMemoryTCP'] = true; + $this->kernelMemoryTCP = $kernelMemoryTCP; return $this; } /** @@ -611,21 +791,25 @@ public function setMemoryReservation(?int $memoryReservation): self return $this; } /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. - * - * @return int|null - */ + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + swap. + + * + * @return int|null + */ public function getMemorySwap(): ?int { return $this->memorySwap; } /** - * Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. - * - * @param int|null $memorySwap - * - * @return self - */ + * Total memory limit (memory + swap). Set as `-1` to enable unlimited + swap. + + * + * @param int|null $memorySwap + * + * @return self + */ public function setMemorySwap(?int $memorySwap): self { $this->initialized['memorySwap'] = true; @@ -633,21 +817,25 @@ public function setMemorySwap(?int $memorySwap): self return $this; } /** - * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. - * - * @return int|null - */ + * Tune a container's memory swappiness behavior. Accepts an integer + between 0 and 100. + + * + * @return int|null + */ public function getMemorySwappiness(): ?int { return $this->memorySwappiness; } /** - * Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. - * - * @param int|null $memorySwappiness - * - * @return self - */ + * Tune a container's memory swappiness behavior. Accepts an integer + between 0 and 100. + + * + * @param int|null $memorySwappiness + * + * @return self + */ public function setMemorySwappiness(?int $memorySwappiness): self { $this->initialized['memorySwappiness'] = true; @@ -699,21 +887,53 @@ public function setOomKillDisable(?bool $oomKillDisable): self return $this; } /** - * Tune a container's pids limit. Set -1 for unlimited. - * - * @return int|null - */ + * Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + + * + * @return bool|null + */ + public function getInit(): ?bool + { + return $this->init; + } + /** + * Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + + * + * @param bool|null $init + * + * @return self + */ + public function setInit(?bool $init): self + { + $this->initialized['init'] = true; + $this->init = $init; + return $this; + } + /** + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + to not change. + + * + * @return int|null + */ public function getPidsLimit(): ?int { return $this->pidsLimit; } /** - * Tune a container's pids limit. Set -1 for unlimited. - * - * @param int|null $pidsLimit - * - * @return self - */ + * Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + to not change. + + * + * @param int|null $pidsLimit + * + * @return self + */ public function setPidsLimit(?int $pidsLimit): self { $this->initialized['pidsLimit'] = true; @@ -721,21 +941,31 @@ public function setPidsLimit(?int $pidsLimit): self return $this; } /** - * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" - * - * @return list|null - */ + * A list of resource limits to set in the container. For example: + + ``` + {"Name": "nofile", "Soft": 1024, "Hard": 2048} + ``` + + * + * @return list|null + */ public function getUlimits(): ?array { return $this->ulimits; } /** - * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" - * - * @param list|null $ulimits - * - * @return self - */ + * A list of resource limits to set in the container. For example: + + ``` + {"Name": "nofile", "Soft": 1024, "Hard": 2048} + ``` + + * + * @param list|null $ulimits + * + * @return self + */ public function setUlimits(?array $ulimits): self { $this->initialized['ulimits'] = true; @@ -745,7 +975,9 @@ public function setUlimits(?array $ulimits): self /** * The number of usable CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @return int|null @@ -757,7 +989,9 @@ public function getCpuCount(): ?int /** * The number of usable CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @param int|null $cpuCount @@ -773,7 +1007,9 @@ public function setCpuCount(?int $cpuCount): self /** * The usable percentage of the available CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @return int|null @@ -785,7 +1021,9 @@ public function getCpuPercent(): ?int /** * The usable percentage of the available CPUs (Windows only). - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. * * @param int|null $cpuPercent @@ -821,21 +1059,25 @@ public function setIOMaximumIOps(?int $iOMaximumIOps): self return $this; } /** - * Maximum IO in bytes per second for the container system drive (Windows only) - * - * @return int|null - */ + * Maximum IO in bytes per second for the container system drive + (Windows only). + + * + * @return int|null + */ public function getIOMaximumBandwidth(): ?int { return $this->iOMaximumBandwidth; } /** - * Maximum IO in bytes per second for the container system drive (Windows only) - * - * @param int|null $iOMaximumBandwidth - * - * @return self - */ + * Maximum IO in bytes per second for the container system drive + (Windows only). + + * + * @param int|null $iOMaximumBandwidth + * + * @return self + */ public function setIOMaximumBandwidth(?int $iOMaximumBandwidth): self { $this->initialized['iOMaximumBandwidth'] = true; diff --git a/generated/Model/RestartPolicy.php b/generated/Model/RestartPolicy.php index 218d4a5f4..0588717c8 100644 --- a/generated/Model/RestartPolicy.php +++ b/generated/Model/RestartPolicy.php @@ -13,7 +13,9 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * - `always` Always restart + * - Empty string means not to restart + - `no` Do not automatically restart + - `always` Always restart - `unless-stopped` Restart always except when the user has manually stopped the container - `on-failure` Restart only when the container exit code is non-zero @@ -22,13 +24,15 @@ public function isInitialized($property): bool */ protected $name; /** - * If `on-failure` is used, the number of times to retry before giving up + * If `on-failure` is used, the number of times to retry before giving up. * * @var int|null */ protected $maximumRetryCount; /** - * - `always` Always restart + * - Empty string means not to restart + - `no` Do not automatically restart + - `always` Always restart - `unless-stopped` Restart always except when the user has manually stopped the container - `on-failure` Restart only when the container exit code is non-zero @@ -40,7 +44,9 @@ public function getName(): ?string return $this->name; } /** - * - `always` Always restart + * - Empty string means not to restart + - `no` Do not automatically restart + - `always` Always restart - `unless-stopped` Restart always except when the user has manually stopped the container - `on-failure` Restart only when the container exit code is non-zero @@ -56,7 +62,7 @@ public function setName(?string $name): self return $this; } /** - * If `on-failure` is used, the number of times to retry before giving up + * If `on-failure` is used, the number of times to retry before giving up. * * @return int|null */ @@ -65,7 +71,7 @@ public function getMaximumRetryCount(): ?int return $this->maximumRetryCount; } /** - * If `on-failure` is used, the number of times to retry before giving up + * If `on-failure` is used, the number of times to retry before giving up. * * @param int|null $maximumRetryCount * diff --git a/generated/Model/Runtime.php b/generated/Model/Runtime.php new file mode 100644 index 000000000..ac2d66b81 --- /dev/null +++ b/generated/Model/Runtime.php @@ -0,0 +1,153 @@ +initialized); + } + /** + * Name and, optional, path, of the OCI executable binary. + + If the path is omitted, the daemon searches the host's `$PATH` for the + binary and uses the first result. + + * + * @var string|null + */ + protected $path; + /** + * List of command-line arguments to pass to the runtime when invoked. + * + * @var list|null + */ + protected $runtimeArgs; + /** + * Information specific to the runtime. + + While this API specification does not define data provided by runtimes, + the following well-known properties may be provided by runtimes: + + `org.opencontainers.runtime-spec.features`: features structure as defined + in the [OCI Runtime Specification](https://github.com/opencontainers/runtime-spec/blob/main/features.md), + in a JSON string representation. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + + * + * @var array|null + */ + protected $status; + /** + * Name and, optional, path, of the OCI executable binary. + + If the path is omitted, the daemon searches the host's `$PATH` for the + binary and uses the first result. + + * + * @return string|null + */ + public function getPath(): ?string + { + return $this->path; + } + /** + * Name and, optional, path, of the OCI executable binary. + + If the path is omitted, the daemon searches the host's `$PATH` for the + binary and uses the first result. + + * + * @param string|null $path + * + * @return self + */ + public function setPath(?string $path): self + { + $this->initialized['path'] = true; + $this->path = $path; + return $this; + } + /** + * List of command-line arguments to pass to the runtime when invoked. + * + * @return list|null + */ + public function getRuntimeArgs(): ?array + { + return $this->runtimeArgs; + } + /** + * List of command-line arguments to pass to the runtime when invoked. + * + * @param list|null $runtimeArgs + * + * @return self + */ + public function setRuntimeArgs(?array $runtimeArgs): self + { + $this->initialized['runtimeArgs'] = true; + $this->runtimeArgs = $runtimeArgs; + return $this; + } + /** + * Information specific to the runtime. + + While this API specification does not define data provided by runtimes, + the following well-known properties may be provided by runtimes: + + `org.opencontainers.runtime-spec.features`: features structure as defined + in the [OCI Runtime Specification](https://github.com/opencontainers/runtime-spec/blob/main/features.md), + in a JSON string representation. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + + * + * @return array|null + */ + public function getStatus(): ?iterable + { + return $this->status; + } + /** + * Information specific to the runtime. + + While this API specification does not define data provided by runtimes, + the following well-known properties may be provided by runtimes: + + `org.opencontainers.runtime-spec.features`: features structure as defined + in the [OCI Runtime Specification](https://github.com/opencontainers/runtime-spec/blob/main/features.md), + in a JSON string representation. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + + * + * @param array|null $status + * + * @return self + */ + public function setStatus(?iterable $status): self + { + $this->initialized['status'] = true; + $this->status = $status; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Secret.php b/generated/Model/Secret.php index bd046075f..1d1775f3f 100644 --- a/generated/Model/Secret.php +++ b/generated/Model/Secret.php @@ -19,10 +19,20 @@ public function isInitialized($property): bool */ protected $iD; /** - * - * - * @var SecretVersion|null - */ + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @var ObjectVersion|null + */ protected $version; /** * @@ -37,9 +47,9 @@ public function isInitialized($property): bool */ protected $updatedAt; /** - * User modifiable configuration for a service. + * * - * @var ServiceSpec|null + * @var SecretSpec|null */ protected $spec; /** @@ -65,22 +75,42 @@ public function setID(?string $iD): self return $this; } /** - * - * - * @return SecretVersion|null - */ - public function getVersion(): ?SecretVersion + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @return ObjectVersion|null + */ + public function getVersion(): ?ObjectVersion { return $this->version; } /** - * - * - * @param SecretVersion|null $version - * - * @return self - */ - public function setVersion(?SecretVersion $version): self + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @param ObjectVersion|null $version + * + * @return self + */ + public function setVersion(?ObjectVersion $version): self { $this->initialized['version'] = true; $this->version = $version; @@ -131,22 +161,22 @@ public function setUpdatedAt(?string $updatedAt): self return $this; } /** - * User modifiable configuration for a service. + * * - * @return ServiceSpec|null + * @return SecretSpec|null */ - public function getSpec(): ?ServiceSpec + public function getSpec(): ?SecretSpec { return $this->spec; } /** - * User modifiable configuration for a service. + * * - * @param ServiceSpec|null $spec + * @param SecretSpec|null $spec * * @return self */ - public function setSpec(?ServiceSpec $spec): self + public function setSpec(?SecretSpec $spec): self { $this->initialized['spec'] = true; $this->spec = $spec; diff --git a/generated/Model/SecretSpec.php b/generated/Model/SecretSpec.php index fbff241d2..464757680 100644 --- a/generated/Model/SecretSpec.php +++ b/generated/Model/SecretSpec.php @@ -25,11 +25,28 @@ public function isInitialized($property): bool */ protected $labels; /** - * Base64-url-safe-encoded secret data + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + data to store as secret. + + This field is only used to _create_ a secret, and is not returned by + other endpoints. + + * + * @var string|null + */ + protected $data; + /** + * Driver represents a driver (network, logging, secrets). * - * @var list|null + * @var Driver|null */ - protected $data; + protected $driver; + /** + * Driver represents a driver (network, logging, secrets). + * + * @var Driver|null + */ + protected $templating; /** * User-defined name of the secret. * @@ -75,25 +92,79 @@ public function setLabels(?iterable $labels): self return $this; } /** - * Base64-url-safe-encoded secret data + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + data to store as secret. + + This field is only used to _create_ a secret, and is not returned by + other endpoints. + + * + * @return string|null + */ + public function getData(): ?string + { + return $this->data; + } + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + data to store as secret. + + This field is only used to _create_ a secret, and is not returned by + other endpoints. + + * + * @param string|null $data + * + * @return self + */ + public function setData(?string $data): self + { + $this->initialized['data'] = true; + $this->data = $data; + return $this; + } + /** + * Driver represents a driver (network, logging, secrets). * - * @return list|null + * @return Driver|null */ - public function getData(): ?array + public function getDriver(): ?Driver { - return $this->data; + return $this->driver; } /** - * Base64-url-safe-encoded secret data + * Driver represents a driver (network, logging, secrets). * - * @param list|null $data + * @param Driver|null $driver * * @return self */ - public function setData(?array $data): self + public function setDriver(?Driver $driver): self { - $this->initialized['data'] = true; - $this->data = $data; + $this->initialized['driver'] = true; + $this->driver = $driver; + return $this; + } + /** + * Driver represents a driver (network, logging, secrets). + * + * @return Driver|null + */ + public function getTemplating(): ?Driver + { + return $this->templating; + } + /** + * Driver represents a driver (network, logging, secrets). + * + * @param Driver|null $templating + * + * @return self + */ + public function setTemplating(?Driver $templating): self + { + $this->initialized['templating'] = true; + $this->templating = $templating; return $this; } } \ No newline at end of file diff --git a/generated/Model/SecretsCreatePostBody.php b/generated/Model/SecretsCreatePostBody.php index 50bb37fe9..03b302bb1 100644 --- a/generated/Model/SecretsCreatePostBody.php +++ b/generated/Model/SecretsCreatePostBody.php @@ -25,11 +25,28 @@ public function isInitialized($property): bool */ protected $labels; /** - * Base64-url-safe-encoded secret data + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + data to store as secret. + + This field is only used to _create_ a secret, and is not returned by + other endpoints. + + * + * @var string|null + */ + protected $data; + /** + * Driver represents a driver (network, logging, secrets). * - * @var list|null + * @var Driver|null */ - protected $data; + protected $driver; + /** + * Driver represents a driver (network, logging, secrets). + * + * @var Driver|null + */ + protected $templating; /** * User-defined name of the secret. * @@ -75,25 +92,79 @@ public function setLabels(?iterable $labels): self return $this; } /** - * Base64-url-safe-encoded secret data + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + data to store as secret. + + This field is only used to _create_ a secret, and is not returned by + other endpoints. + + * + * @return string|null + */ + public function getData(): ?string + { + return $this->data; + } + /** + * Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + data to store as secret. + + This field is only used to _create_ a secret, and is not returned by + other endpoints. + + * + * @param string|null $data + * + * @return self + */ + public function setData(?string $data): self + { + $this->initialized['data'] = true; + $this->data = $data; + return $this; + } + /** + * Driver represents a driver (network, logging, secrets). * - * @return list|null + * @return Driver|null */ - public function getData(): ?array + public function getDriver(): ?Driver { - return $this->data; + return $this->driver; } /** - * Base64-url-safe-encoded secret data + * Driver represents a driver (network, logging, secrets). * - * @param list|null $data + * @param Driver|null $driver * * @return self */ - public function setData(?array $data): self + public function setDriver(?Driver $driver): self { - $this->initialized['data'] = true; - $this->data = $data; + $this->initialized['driver'] = true; + $this->driver = $driver; + return $this; + } + /** + * Driver represents a driver (network, logging, secrets). + * + * @return Driver|null + */ + public function getTemplating(): ?Driver + { + return $this->templating; + } + /** + * Driver represents a driver (network, logging, secrets). + * + * @param Driver|null $templating + * + * @return self + */ + public function setTemplating(?Driver $templating): self + { + $this->initialized['templating'] = true; + $this->templating = $templating; return $this; } } \ No newline at end of file diff --git a/generated/Model/Service.php b/generated/Model/Service.php index ef32d8166..a90ca9e13 100644 --- a/generated/Model/Service.php +++ b/generated/Model/Service.php @@ -19,10 +19,20 @@ public function isInitialized($property): bool */ protected $iD; /** - * - * - * @var ServiceVersion|null - */ + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @var ObjectVersion|null + */ protected $version; /** * @@ -54,6 +64,24 @@ public function isInitialized($property): bool * @var ServiceUpdateStatus|null */ protected $updateStatus; + /** + * The status of the service's tasks. Provided only when requested as + part of a ServiceList operation. + + * + * @var ServiceServiceStatus|null + */ + protected $serviceStatus; + /** + * The status of the service when it is in one of ReplicatedJob or + GlobalJob modes. Absent on Replicated and Global mode services. The + JobIteration is an ObjectVersion, but unlike the Service's version, + does not need to be sent with an update request. + + * + * @var ServiceJobStatus|null + */ + protected $jobStatus; /** * * @@ -77,22 +105,42 @@ public function setID(?string $iD): self return $this; } /** - * - * - * @return ServiceVersion|null - */ - public function getVersion(): ?ServiceVersion + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @return ObjectVersion|null + */ + public function getVersion(): ?ObjectVersion { return $this->version; } /** - * - * - * @param ServiceVersion|null $version - * - * @return self - */ - public function setVersion(?ServiceVersion $version): self + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @param ObjectVersion|null $version + * + * @return self + */ + public function setVersion(?ObjectVersion $version): self { $this->initialized['version'] = true; $this->version = $version; @@ -208,4 +256,60 @@ public function setUpdateStatus(?ServiceUpdateStatus $updateStatus): self $this->updateStatus = $updateStatus; return $this; } + /** + * The status of the service's tasks. Provided only when requested as + part of a ServiceList operation. + + * + * @return ServiceServiceStatus|null + */ + public function getServiceStatus(): ?ServiceServiceStatus + { + return $this->serviceStatus; + } + /** + * The status of the service's tasks. Provided only when requested as + part of a ServiceList operation. + + * + * @param ServiceServiceStatus|null $serviceStatus + * + * @return self + */ + public function setServiceStatus(?ServiceServiceStatus $serviceStatus): self + { + $this->initialized['serviceStatus'] = true; + $this->serviceStatus = $serviceStatus; + return $this; + } + /** + * The status of the service when it is in one of ReplicatedJob or + GlobalJob modes. Absent on Replicated and Global mode services. The + JobIteration is an ObjectVersion, but unlike the Service's version, + does not need to be sent with an update request. + + * + * @return ServiceJobStatus|null + */ + public function getJobStatus(): ?ServiceJobStatus + { + return $this->jobStatus; + } + /** + * The status of the service when it is in one of ReplicatedJob or + GlobalJob modes. Absent on Replicated and Global mode services. The + JobIteration is an ObjectVersion, but unlike the Service's version, + does not need to be sent with an update request. + + * + * @param ServiceJobStatus|null $jobStatus + * + * @return self + */ + public function setJobStatus(?ServiceJobStatus $jobStatus): self + { + $this->initialized['jobStatus'] = true; + $this->jobStatus = $jobStatus; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/ServiceCreateResponse.php b/generated/Model/ServiceCreateResponse.php new file mode 100644 index 000000000..4446b9fc3 --- /dev/null +++ b/generated/Model/ServiceCreateResponse.php @@ -0,0 +1,80 @@ +initialized); + } + /** + * The ID of the created service. + * + * @var string|null + */ + protected $iD; + /** + * Optional warning message. + + FIXME(thaJeztah): this should have "omitempty" in the generated type. + + * + * @var list|null + */ + protected $warnings; + /** + * The ID of the created service. + * + * @return string|null + */ + public function getID(): ?string + { + return $this->iD; + } + /** + * The ID of the created service. + * + * @param string|null $iD + * + * @return self + */ + public function setID(?string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + return $this; + } + /** + * Optional warning message. + + FIXME(thaJeztah): this should have "omitempty" in the generated type. + + * + * @return list|null + */ + public function getWarnings(): ?array + { + return $this->warnings; + } + /** + * Optional warning message. + + FIXME(thaJeztah): this should have "omitempty" in the generated type. + + * + * @param list|null $warnings + * + * @return self + */ + public function setWarnings(?array $warnings): self + { + $this->initialized['warnings'] = true; + $this->warnings = $warnings; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServiceJobStatus.php b/generated/Model/ServiceJobStatus.php new file mode 100644 index 000000000..b55c8c154 --- /dev/null +++ b/generated/Model/ServiceJobStatus.php @@ -0,0 +1,107 @@ +initialized); + } + /** + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @var ObjectVersion|null + */ + protected $jobIteration; + /** + * The last time, as observed by the server, that this job was + started. + + * + * @var string|null + */ + protected $lastExecution; + /** + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @return ObjectVersion|null + */ + public function getJobIteration(): ?ObjectVersion + { + return $this->jobIteration; + } + /** + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @param ObjectVersion|null $jobIteration + * + * @return self + */ + public function setJobIteration(?ObjectVersion $jobIteration): self + { + $this->initialized['jobIteration'] = true; + $this->jobIteration = $jobIteration; + return $this; + } + /** + * The last time, as observed by the server, that this job was + started. + + * + * @return string|null + */ + public function getLastExecution(): ?string + { + return $this->lastExecution; + } + /** + * The last time, as observed by the server, that this job was + started. + + * + * @param string|null $lastExecution + * + * @return self + */ + public function setLastExecution(?string $lastExecution): self + { + $this->initialized['lastExecution'] = true; + $this->lastExecution = $lastExecution; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServiceServiceStatus.php b/generated/Model/ServiceServiceStatus.php new file mode 100644 index 000000000..a664fbccc --- /dev/null +++ b/generated/Model/ServiceServiceStatus.php @@ -0,0 +1,126 @@ +initialized); + } + /** + * The number of tasks for the service currently in the Running state. + * + * @var int|null + */ + protected $runningTasks; + /** + * The number of tasks for the service desired to be running. + For replicated services, this is the replica count from the + service spec. For global services, this is computed by taking + count of all tasks for the service with a Desired State other + than Shutdown. + + * + * @var int|null + */ + protected $desiredTasks; + /** + * The number of tasks for a job that are in the Completed state. + This field must be cross-referenced with the service type, as the + value of 0 may mean the service is not in a job mode, or it may + mean the job-mode service has no tasks yet Completed. + + * + * @var int|null + */ + protected $completedTasks; + /** + * The number of tasks for the service currently in the Running state. + * + * @return int|null + */ + public function getRunningTasks(): ?int + { + return $this->runningTasks; + } + /** + * The number of tasks for the service currently in the Running state. + * + * @param int|null $runningTasks + * + * @return self + */ + public function setRunningTasks(?int $runningTasks): self + { + $this->initialized['runningTasks'] = true; + $this->runningTasks = $runningTasks; + return $this; + } + /** + * The number of tasks for the service desired to be running. + For replicated services, this is the replica count from the + service spec. For global services, this is computed by taking + count of all tasks for the service with a Desired State other + than Shutdown. + + * + * @return int|null + */ + public function getDesiredTasks(): ?int + { + return $this->desiredTasks; + } + /** + * The number of tasks for the service desired to be running. + For replicated services, this is the replica count from the + service spec. For global services, this is computed by taking + count of all tasks for the service with a Desired State other + than Shutdown. + + * + * @param int|null $desiredTasks + * + * @return self + */ + public function setDesiredTasks(?int $desiredTasks): self + { + $this->initialized['desiredTasks'] = true; + $this->desiredTasks = $desiredTasks; + return $this; + } + /** + * The number of tasks for a job that are in the Completed state. + This field must be cross-referenced with the service type, as the + value of 0 may mean the service is not in a job mode, or it may + mean the job-mode service has no tasks yet Completed. + + * + * @return int|null + */ + public function getCompletedTasks(): ?int + { + return $this->completedTasks; + } + /** + * The number of tasks for a job that are in the Completed state. + This field must be cross-referenced with the service type, as the + value of 0 may mean the service is not in a job mode, or it may + mean the job-mode service has no tasks yet Completed. + + * + * @param int|null $completedTasks + * + * @return self + */ + public function setCompletedTasks(?int $completedTasks): self + { + $this->initialized['completedTasks'] = true; + $this->completedTasks = $completedTasks; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServiceSpec.php b/generated/Model/ServiceSpec.php index 4534d4389..e56dd3cf7 100644 --- a/generated/Model/ServiceSpec.php +++ b/generated/Model/ServiceSpec.php @@ -43,10 +43,19 @@ public function isInitialized($property): bool */ protected $updateConfig; /** - * Array of network names or IDs to attach the service to. + * Specification for the rollback strategy of the service. * - * @var list|null + * @var ServiceSpecRollbackConfig|null */ + protected $rollbackConfig; + /** + * Specifies which networks the service should attach to. + + Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + + * + * @var list|null + */ protected $networks; /** * Properties that can be configured to access and load balance a service. @@ -165,21 +174,49 @@ public function setUpdateConfig(?ServiceSpecUpdateConfig $updateConfig): self return $this; } /** - * Array of network names or IDs to attach the service to. + * Specification for the rollback strategy of the service. * - * @return list|null + * @return ServiceSpecRollbackConfig|null */ - public function getNetworks(): ?array + public function getRollbackConfig(): ?ServiceSpecRollbackConfig { - return $this->networks; + return $this->rollbackConfig; } /** - * Array of network names or IDs to attach the service to. + * Specification for the rollback strategy of the service. * - * @param list|null $networks + * @param ServiceSpecRollbackConfig|null $rollbackConfig * * @return self */ + public function setRollbackConfig(?ServiceSpecRollbackConfig $rollbackConfig): self + { + $this->initialized['rollbackConfig'] = true; + $this->rollbackConfig = $rollbackConfig; + return $this; + } + /** + * Specifies which networks the service should attach to. + + Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + + * + * @return list|null + */ + public function getNetworks(): ?array + { + return $this->networks; + } + /** + * Specifies which networks the service should attach to. + + Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + + * + * @param list|null $networks + * + * @return self + */ public function setNetworks(?array $networks): self { $this->initialized['networks'] = true; diff --git a/generated/Model/ServiceSpecMode.php b/generated/Model/ServiceSpecMode.php index d1b49a2cb..d7ad7f096 100644 --- a/generated/Model/ServiceSpecMode.php +++ b/generated/Model/ServiceSpecMode.php @@ -24,6 +24,22 @@ public function isInitialized($property): bool * @var mixed|null */ protected $global; + /** + * The mode used for services with a finite number of tasks that run + to a completed state. + + * + * @var ServiceSpecModeReplicatedJob|null + */ + protected $replicatedJob; + /** + * The mode used for services which run a task to the completed state + on each valid node. + + * + * @var mixed|null + */ + protected $globalJob; /** * * @@ -68,4 +84,56 @@ public function setGlobal($global): self $this->global = $global; return $this; } + /** + * The mode used for services with a finite number of tasks that run + to a completed state. + + * + * @return ServiceSpecModeReplicatedJob|null + */ + public function getReplicatedJob(): ?ServiceSpecModeReplicatedJob + { + return $this->replicatedJob; + } + /** + * The mode used for services with a finite number of tasks that run + to a completed state. + + * + * @param ServiceSpecModeReplicatedJob|null $replicatedJob + * + * @return self + */ + public function setReplicatedJob(?ServiceSpecModeReplicatedJob $replicatedJob): self + { + $this->initialized['replicatedJob'] = true; + $this->replicatedJob = $replicatedJob; + return $this; + } + /** + * The mode used for services which run a task to the completed state + on each valid node. + + * + * @return mixed + */ + public function getGlobalJob() + { + return $this->globalJob; + } + /** + * The mode used for services which run a task to the completed state + on each valid node. + + * + * @param mixed $globalJob + * + * @return self + */ + public function setGlobalJob($globalJob): self + { + $this->initialized['globalJob'] = true; + $this->globalJob = $globalJob; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/ServiceSpecModeReplicatedJob.php b/generated/Model/ServiceSpecModeReplicatedJob.php new file mode 100644 index 000000000..06fd7d8dd --- /dev/null +++ b/generated/Model/ServiceSpecModeReplicatedJob.php @@ -0,0 +1,77 @@ +initialized); + } + /** + * The maximum number of replicas to run simultaneously. + * + * @var int|null + */ + protected $maxConcurrent = 1; + /** + * The total number of replicas desired to reach the Completed + state. If unset, will default to the value of `MaxConcurrent` + + * + * @var int|null + */ + protected $totalCompletions; + /** + * The maximum number of replicas to run simultaneously. + * + * @return int|null + */ + public function getMaxConcurrent(): ?int + { + return $this->maxConcurrent; + } + /** + * The maximum number of replicas to run simultaneously. + * + * @param int|null $maxConcurrent + * + * @return self + */ + public function setMaxConcurrent(?int $maxConcurrent): self + { + $this->initialized['maxConcurrent'] = true; + $this->maxConcurrent = $maxConcurrent; + return $this; + } + /** + * The total number of replicas desired to reach the Completed + state. If unset, will default to the value of `MaxConcurrent` + + * + * @return int|null + */ + public function getTotalCompletions(): ?int + { + return $this->totalCompletions; + } + /** + * The total number of replicas desired to reach the Completed + state. If unset, will default to the value of `MaxConcurrent` + + * + * @param int|null $totalCompletions + * + * @return self + */ + public function setTotalCompletions(?int $totalCompletions): self + { + $this->initialized['totalCompletions'] = true; + $this->totalCompletions = $totalCompletions; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServiceSpecRollbackConfig.php b/generated/Model/ServiceSpecRollbackConfig.php new file mode 100644 index 000000000..006f9b988 --- /dev/null +++ b/generated/Model/ServiceSpecRollbackConfig.php @@ -0,0 +1,219 @@ +initialized); + } + /** + * Maximum number of tasks to be rolled back in one iteration (0 means + unlimited parallelism). + + * + * @var int|null + */ + protected $parallelism; + /** + * Amount of time between rollback iterations, in nanoseconds. + * + * @var int|null + */ + protected $delay; + /** + * Action to take if an rolled back task fails to run, or stops + running during the rollback. + + * + * @var string|null + */ + protected $failureAction; + /** + * Amount of time to monitor each rolled back task for failures, in + nanoseconds. + + * + * @var int|null + */ + protected $monitor; + /** + * The fraction of tasks that may fail during a rollback before the + failure action is invoked, specified as a floating point number + between 0 and 1. + + * + * @var float|null + */ + protected $maxFailureRatio = 0; + /** + * The order of operations when rolling back a task. Either the old + task is shut down before the new task is started, or the new task + is started before the old task is shut down. + + * + * @var string|null + */ + protected $order; + /** + * Maximum number of tasks to be rolled back in one iteration (0 means + unlimited parallelism). + + * + * @return int|null + */ + public function getParallelism(): ?int + { + return $this->parallelism; + } + /** + * Maximum number of tasks to be rolled back in one iteration (0 means + unlimited parallelism). + + * + * @param int|null $parallelism + * + * @return self + */ + public function setParallelism(?int $parallelism): self + { + $this->initialized['parallelism'] = true; + $this->parallelism = $parallelism; + return $this; + } + /** + * Amount of time between rollback iterations, in nanoseconds. + * + * @return int|null + */ + public function getDelay(): ?int + { + return $this->delay; + } + /** + * Amount of time between rollback iterations, in nanoseconds. + * + * @param int|null $delay + * + * @return self + */ + public function setDelay(?int $delay): self + { + $this->initialized['delay'] = true; + $this->delay = $delay; + return $this; + } + /** + * Action to take if an rolled back task fails to run, or stops + running during the rollback. + + * + * @return string|null + */ + public function getFailureAction(): ?string + { + return $this->failureAction; + } + /** + * Action to take if an rolled back task fails to run, or stops + running during the rollback. + + * + * @param string|null $failureAction + * + * @return self + */ + public function setFailureAction(?string $failureAction): self + { + $this->initialized['failureAction'] = true; + $this->failureAction = $failureAction; + return $this; + } + /** + * Amount of time to monitor each rolled back task for failures, in + nanoseconds. + + * + * @return int|null + */ + public function getMonitor(): ?int + { + return $this->monitor; + } + /** + * Amount of time to monitor each rolled back task for failures, in + nanoseconds. + + * + * @param int|null $monitor + * + * @return self + */ + public function setMonitor(?int $monitor): self + { + $this->initialized['monitor'] = true; + $this->monitor = $monitor; + return $this; + } + /** + * The fraction of tasks that may fail during a rollback before the + failure action is invoked, specified as a floating point number + between 0 and 1. + + * + * @return float|null + */ + public function getMaxFailureRatio(): ?float + { + return $this->maxFailureRatio; + } + /** + * The fraction of tasks that may fail during a rollback before the + failure action is invoked, specified as a floating point number + between 0 and 1. + + * + * @param float|null $maxFailureRatio + * + * @return self + */ + public function setMaxFailureRatio(?float $maxFailureRatio): self + { + $this->initialized['maxFailureRatio'] = true; + $this->maxFailureRatio = $maxFailureRatio; + return $this; + } + /** + * The order of operations when rolling back a task. Either the old + task is shut down before the new task is started, or the new task + is started before the old task is shut down. + + * + * @return string|null + */ + public function getOrder(): ?string + { + return $this->order; + } + /** + * The order of operations when rolling back a task. Either the old + task is shut down before the new task is started, or the new task + is started before the old task is shut down. + + * + * @param string|null $order + * + * @return self + */ + public function setOrder(?string $order): self + { + $this->initialized['order'] = true; + $this->order = $order; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ServiceSpecUpdateConfig.php b/generated/Model/ServiceSpecUpdateConfig.php index 2166e575c..69ca0c1fe 100644 --- a/generated/Model/ServiceSpecUpdateConfig.php +++ b/generated/Model/ServiceSpecUpdateConfig.php @@ -13,10 +13,12 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism). - * - * @var int|null - */ + * Maximum number of tasks to be updated in one iteration (0 means + unlimited parallelism). + + * + * @var int|null + */ protected $parallelism; /** * Amount of time between updates, in nanoseconds. @@ -25,39 +27,59 @@ public function isInitialized($property): bool */ protected $delay; /** - * Action to take if an updated task fails to run, or stops running during the update. - * - * @var string|null - */ + * Action to take if an updated task fails to run, or stops running + during the update. + + * + * @var string|null + */ protected $failureAction; /** - * Amount of time to monitor each updated task for failures, in nanoseconds. - * - * @var int|null - */ + * Amount of time to monitor each updated task for failures, in + nanoseconds. + + * + * @var int|null + */ protected $monitor; /** - * The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1. - * - * @var float|null - */ + * The fraction of tasks that may fail during an update before the + failure action is invoked, specified as a floating point number + between 0 and 1. + + * + * @var float|null + */ protected $maxFailureRatio = 0; /** - * Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism). - * - * @return int|null - */ + * The order of operations when rolling out an updated task. Either + the old task is shut down before the new task is started, or the + new task is started before the old task is shut down. + + * + * @var string|null + */ + protected $order; + /** + * Maximum number of tasks to be updated in one iteration (0 means + unlimited parallelism). + + * + * @return int|null + */ public function getParallelism(): ?int { return $this->parallelism; } /** - * Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism). - * - * @param int|null $parallelism - * - * @return self - */ + * Maximum number of tasks to be updated in one iteration (0 means + unlimited parallelism). + + * + * @param int|null $parallelism + * + * @return self + */ public function setParallelism(?int $parallelism): self { $this->initialized['parallelism'] = true; @@ -87,21 +109,25 @@ public function setDelay(?int $delay): self return $this; } /** - * Action to take if an updated task fails to run, or stops running during the update. - * - * @return string|null - */ + * Action to take if an updated task fails to run, or stops running + during the update. + + * + * @return string|null + */ public function getFailureAction(): ?string { return $this->failureAction; } /** - * Action to take if an updated task fails to run, or stops running during the update. - * - * @param string|null $failureAction - * - * @return self - */ + * Action to take if an updated task fails to run, or stops running + during the update. + + * + * @param string|null $failureAction + * + * @return self + */ public function setFailureAction(?string $failureAction): self { $this->initialized['failureAction'] = true; @@ -109,21 +135,25 @@ public function setFailureAction(?string $failureAction): self return $this; } /** - * Amount of time to monitor each updated task for failures, in nanoseconds. - * - * @return int|null - */ + * Amount of time to monitor each updated task for failures, in + nanoseconds. + + * + * @return int|null + */ public function getMonitor(): ?int { return $this->monitor; } /** - * Amount of time to monitor each updated task for failures, in nanoseconds. - * - * @param int|null $monitor - * - * @return self - */ + * Amount of time to monitor each updated task for failures, in + nanoseconds. + + * + * @param int|null $monitor + * + * @return self + */ public function setMonitor(?int $monitor): self { $this->initialized['monitor'] = true; @@ -131,25 +161,59 @@ public function setMonitor(?int $monitor): self return $this; } /** - * The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1. - * - * @return float|null - */ + * The fraction of tasks that may fail during an update before the + failure action is invoked, specified as a floating point number + between 0 and 1. + + * + * @return float|null + */ public function getMaxFailureRatio(): ?float { return $this->maxFailureRatio; } /** - * The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1. - * - * @param float|null $maxFailureRatio - * - * @return self - */ + * The fraction of tasks that may fail during an update before the + failure action is invoked, specified as a floating point number + between 0 and 1. + + * + * @param float|null $maxFailureRatio + * + * @return self + */ public function setMaxFailureRatio(?float $maxFailureRatio): self { $this->initialized['maxFailureRatio'] = true; $this->maxFailureRatio = $maxFailureRatio; return $this; } + /** + * The order of operations when rolling out an updated task. Either + the old task is shut down before the new task is started, or the + new task is started before the old task is shut down. + + * + * @return string|null + */ + public function getOrder(): ?string + { + return $this->order; + } + /** + * The order of operations when rolling out an updated task. Either + the old task is shut down before the new task is started, or the + new task is started before the old task is shut down. + + * + * @param string|null $order + * + * @return self + */ + public function setOrder(?string $order): self + { + $this->initialized['order'] = true; + $this->order = $order; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/ServicesCreatePostBody.php b/generated/Model/ServicesCreatePostBody.php index 3170bbcb0..76fd40e43 100644 --- a/generated/Model/ServicesCreatePostBody.php +++ b/generated/Model/ServicesCreatePostBody.php @@ -43,10 +43,19 @@ public function isInitialized($property): bool */ protected $updateConfig; /** - * Array of network names or IDs to attach the service to. + * Specification for the rollback strategy of the service. * - * @var list|null + * @var ServiceSpecRollbackConfig|null */ + protected $rollbackConfig; + /** + * Specifies which networks the service should attach to. + + Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + + * + * @var list|null + */ protected $networks; /** * Properties that can be configured to access and load balance a service. @@ -165,21 +174,49 @@ public function setUpdateConfig(?ServiceSpecUpdateConfig $updateConfig): self return $this; } /** - * Array of network names or IDs to attach the service to. + * Specification for the rollback strategy of the service. * - * @return list|null + * @return ServiceSpecRollbackConfig|null */ - public function getNetworks(): ?array + public function getRollbackConfig(): ?ServiceSpecRollbackConfig { - return $this->networks; + return $this->rollbackConfig; } /** - * Array of network names or IDs to attach the service to. + * Specification for the rollback strategy of the service. * - * @param list|null $networks + * @param ServiceSpecRollbackConfig|null $rollbackConfig * * @return self */ + public function setRollbackConfig(?ServiceSpecRollbackConfig $rollbackConfig): self + { + $this->initialized['rollbackConfig'] = true; + $this->rollbackConfig = $rollbackConfig; + return $this; + } + /** + * Specifies which networks the service should attach to. + + Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + + * + * @return list|null + */ + public function getNetworks(): ?array + { + return $this->networks; + } + /** + * Specifies which networks the service should attach to. + + Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + + * + * @param list|null $networks + * + * @return self + */ public function setNetworks(?array $networks): self { $this->initialized['networks'] = true; diff --git a/generated/Model/ServicesIdUpdatePostBody.php b/generated/Model/ServicesIdUpdatePostBody.php index f91e96c5b..65f9b16c1 100644 --- a/generated/Model/ServicesIdUpdatePostBody.php +++ b/generated/Model/ServicesIdUpdatePostBody.php @@ -43,10 +43,19 @@ public function isInitialized($property): bool */ protected $updateConfig; /** - * Array of network names or IDs to attach the service to. + * Specification for the rollback strategy of the service. * - * @var list|null + * @var ServiceSpecRollbackConfig|null */ + protected $rollbackConfig; + /** + * Specifies which networks the service should attach to. + + Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + + * + * @var list|null + */ protected $networks; /** * Properties that can be configured to access and load balance a service. @@ -165,21 +174,49 @@ public function setUpdateConfig(?ServiceSpecUpdateConfig $updateConfig): self return $this; } /** - * Array of network names or IDs to attach the service to. + * Specification for the rollback strategy of the service. * - * @return list|null + * @return ServiceSpecRollbackConfig|null */ - public function getNetworks(): ?array + public function getRollbackConfig(): ?ServiceSpecRollbackConfig { - return $this->networks; + return $this->rollbackConfig; } /** - * Array of network names or IDs to attach the service to. + * Specification for the rollback strategy of the service. * - * @param list|null $networks + * @param ServiceSpecRollbackConfig|null $rollbackConfig * * @return self */ + public function setRollbackConfig(?ServiceSpecRollbackConfig $rollbackConfig): self + { + $this->initialized['rollbackConfig'] = true; + $this->rollbackConfig = $rollbackConfig; + return $this; + } + /** + * Specifies which networks the service should attach to. + + Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + + * + * @return list|null + */ + public function getNetworks(): ?array + { + return $this->networks; + } + /** + * Specifies which networks the service should attach to. + + Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + + * + * @param list|null $networks + * + * @return self + */ public function setNetworks(?array $networks): self { $this->initialized['networks'] = true; diff --git a/generated/Model/Swarm.php b/generated/Model/Swarm.php new file mode 100644 index 000000000..2ea6922c2 --- /dev/null +++ b/generated/Model/Swarm.php @@ -0,0 +1,392 @@ +initialized); + } + /** + * The ID of the swarm. + * + * @var string|null + */ + protected $iD; + /** + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @var ObjectVersion|null + */ + protected $version; + /** + * Date and time at which the swarm was initialised in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @var string|null + */ + protected $createdAt; + /** + * Date and time at which the swarm was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @var string|null + */ + protected $updatedAt; + /** + * User modifiable swarm configuration. + * + * @var SwarmSpec|null + */ + protected $spec; + /** + * Information about the issuer of leaf TLS certificates and the trusted root + CA certificate. + + * + * @var TLSInfo|null + */ + protected $tLSInfo; + /** + * Whether there is currently a root CA rotation in progress for the swarm + * + * @var bool|null + */ + protected $rootRotationInProgress; + /** + * DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + If no port is set or is set to 0, the default port (4789) is used. + + * + * @var int|null + */ + protected $dataPathPort = 4789; + /** + * Default Address Pool specifies default subnet pools for global scope + networks. + + * + * @var list|null + */ + protected $defaultAddrPool; + /** + * SubnetSize specifies the subnet size of the networks created from the + default subnet pool. + + * + * @var int|null + */ + protected $subnetSize = 24; + /** + * JoinTokens contains the tokens workers and managers need to join the swarm. + * + * @var JoinTokens|null + */ + protected $joinTokens; + /** + * The ID of the swarm. + * + * @return string|null + */ + public function getID(): ?string + { + return $this->iD; + } + /** + * The ID of the swarm. + * + * @param string|null $iD + * + * @return self + */ + public function setID(?string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + return $this; + } + /** + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @return ObjectVersion|null + */ + public function getVersion(): ?ObjectVersion + { + return $this->version; + } + /** + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @param ObjectVersion|null $version + * + * @return self + */ + public function setVersion(?ObjectVersion $version): self + { + $this->initialized['version'] = true; + $this->version = $version; + return $this; + } + /** + * Date and time at which the swarm was initialised in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @return string|null + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + /** + * Date and time at which the swarm was initialised in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @param string|null $createdAt + * + * @return self + */ + public function setCreatedAt(?string $createdAt): self + { + $this->initialized['createdAt'] = true; + $this->createdAt = $createdAt; + return $this; + } + /** + * Date and time at which the swarm was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @return string|null + */ + public function getUpdatedAt(): ?string + { + return $this->updatedAt; + } + /** + * Date and time at which the swarm was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + * + * @param string|null $updatedAt + * + * @return self + */ + public function setUpdatedAt(?string $updatedAt): self + { + $this->initialized['updatedAt'] = true; + $this->updatedAt = $updatedAt; + return $this; + } + /** + * User modifiable swarm configuration. + * + * @return SwarmSpec|null + */ + public function getSpec(): ?SwarmSpec + { + return $this->spec; + } + /** + * User modifiable swarm configuration. + * + * @param SwarmSpec|null $spec + * + * @return self + */ + public function setSpec(?SwarmSpec $spec): self + { + $this->initialized['spec'] = true; + $this->spec = $spec; + return $this; + } + /** + * Information about the issuer of leaf TLS certificates and the trusted root + CA certificate. + + * + * @return TLSInfo|null + */ + public function getTLSInfo(): ?TLSInfo + { + return $this->tLSInfo; + } + /** + * Information about the issuer of leaf TLS certificates and the trusted root + CA certificate. + + * + * @param TLSInfo|null $tLSInfo + * + * @return self + */ + public function setTLSInfo(?TLSInfo $tLSInfo): self + { + $this->initialized['tLSInfo'] = true; + $this->tLSInfo = $tLSInfo; + return $this; + } + /** + * Whether there is currently a root CA rotation in progress for the swarm + * + * @return bool|null + */ + public function getRootRotationInProgress(): ?bool + { + return $this->rootRotationInProgress; + } + /** + * Whether there is currently a root CA rotation in progress for the swarm + * + * @param bool|null $rootRotationInProgress + * + * @return self + */ + public function setRootRotationInProgress(?bool $rootRotationInProgress): self + { + $this->initialized['rootRotationInProgress'] = true; + $this->rootRotationInProgress = $rootRotationInProgress; + return $this; + } + /** + * DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + If no port is set or is set to 0, the default port (4789) is used. + + * + * @return int|null + */ + public function getDataPathPort(): ?int + { + return $this->dataPathPort; + } + /** + * DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + If no port is set or is set to 0, the default port (4789) is used. + + * + * @param int|null $dataPathPort + * + * @return self + */ + public function setDataPathPort(?int $dataPathPort): self + { + $this->initialized['dataPathPort'] = true; + $this->dataPathPort = $dataPathPort; + return $this; + } + /** + * Default Address Pool specifies default subnet pools for global scope + networks. + + * + * @return list|null + */ + public function getDefaultAddrPool(): ?array + { + return $this->defaultAddrPool; + } + /** + * Default Address Pool specifies default subnet pools for global scope + networks. + + * + * @param list|null $defaultAddrPool + * + * @return self + */ + public function setDefaultAddrPool(?array $defaultAddrPool): self + { + $this->initialized['defaultAddrPool'] = true; + $this->defaultAddrPool = $defaultAddrPool; + return $this; + } + /** + * SubnetSize specifies the subnet size of the networks created from the + default subnet pool. + + * + * @return int|null + */ + public function getSubnetSize(): ?int + { + return $this->subnetSize; + } + /** + * SubnetSize specifies the subnet size of the networks created from the + default subnet pool. + + * + * @param int|null $subnetSize + * + * @return self + */ + public function setSubnetSize(?int $subnetSize): self + { + $this->initialized['subnetSize'] = true; + $this->subnetSize = $subnetSize; + return $this; + } + /** + * JoinTokens contains the tokens workers and managers need to join the swarm. + * + * @return JoinTokens|null + */ + public function getJoinTokens(): ?JoinTokens + { + return $this->joinTokens; + } + /** + * JoinTokens contains the tokens workers and managers need to join the swarm. + * + * @param JoinTokens|null $joinTokens + * + * @return self + */ + public function setJoinTokens(?JoinTokens $joinTokens): self + { + $this->initialized['joinTokens'] = true; + $this->joinTokens = $joinTokens; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmGetResponse200.php b/generated/Model/SwarmGetResponse200.php deleted file mode 100644 index a013e8a8c..000000000 --- a/generated/Model/SwarmGetResponse200.php +++ /dev/null @@ -1,183 +0,0 @@ -initialized); - } - /** - * The ID of the swarm. - * - * @var string|null - */ - protected $iD; - /** - * - * - * @var ClusterInfoVersion|null - */ - protected $version; - /** - * - * - * @var string|null - */ - protected $createdAt; - /** - * - * - * @var string|null - */ - protected $updatedAt; - /** - * User modifiable swarm configuration. - * - * @var SwarmSpec|null - */ - protected $spec; - /** - * The tokens workers and managers need to join the swarm. - * - * @var SwarmGetResponse200JoinTokens|null - */ - protected $joinTokens; - /** - * The ID of the swarm. - * - * @return string|null - */ - public function getID(): ?string - { - return $this->iD; - } - /** - * The ID of the swarm. - * - * @param string|null $iD - * - * @return self - */ - public function setID(?string $iD): self - { - $this->initialized['iD'] = true; - $this->iD = $iD; - return $this; - } - /** - * - * - * @return ClusterInfoVersion|null - */ - public function getVersion(): ?ClusterInfoVersion - { - return $this->version; - } - /** - * - * - * @param ClusterInfoVersion|null $version - * - * @return self - */ - public function setVersion(?ClusterInfoVersion $version): self - { - $this->initialized['version'] = true; - $this->version = $version; - return $this; - } - /** - * - * - * @return string|null - */ - public function getCreatedAt(): ?string - { - return $this->createdAt; - } - /** - * - * - * @param string|null $createdAt - * - * @return self - */ - public function setCreatedAt(?string $createdAt): self - { - $this->initialized['createdAt'] = true; - $this->createdAt = $createdAt; - return $this; - } - /** - * - * - * @return string|null - */ - public function getUpdatedAt(): ?string - { - return $this->updatedAt; - } - /** - * - * - * @param string|null $updatedAt - * - * @return self - */ - public function setUpdatedAt(?string $updatedAt): self - { - $this->initialized['updatedAt'] = true; - $this->updatedAt = $updatedAt; - return $this; - } - /** - * User modifiable swarm configuration. - * - * @return SwarmSpec|null - */ - public function getSpec(): ?SwarmSpec - { - return $this->spec; - } - /** - * User modifiable swarm configuration. - * - * @param SwarmSpec|null $spec - * - * @return self - */ - public function setSpec(?SwarmSpec $spec): self - { - $this->initialized['spec'] = true; - $this->spec = $spec; - return $this; - } - /** - * The tokens workers and managers need to join the swarm. - * - * @return SwarmGetResponse200JoinTokens|null - */ - public function getJoinTokens(): ?SwarmGetResponse200JoinTokens - { - return $this->joinTokens; - } - /** - * The tokens workers and managers need to join the swarm. - * - * @param SwarmGetResponse200JoinTokens|null $joinTokens - * - * @return self - */ - public function setJoinTokens(?SwarmGetResponse200JoinTokens $joinTokens): self - { - $this->initialized['joinTokens'] = true; - $this->joinTokens = $joinTokens; - return $this; - } -} \ No newline at end of file diff --git a/generated/Model/SwarmInfo.php b/generated/Model/SwarmInfo.php new file mode 100644 index 000000000..c44145b1d --- /dev/null +++ b/generated/Model/SwarmInfo.php @@ -0,0 +1,279 @@ +initialized); + } + /** + * Unique identifier of for this node in the swarm. + * + * @var string|null + */ + protected $nodeID = ''; + /** + * IP address at which this node can be reached by other nodes in the + swarm. + + * + * @var string|null + */ + protected $nodeAddr = ''; + /** + * Current local status of this node. + * + * @var string|null + */ + protected $localNodeState = ''; + /** + * + * + * @var bool|null + */ + protected $controlAvailable = false; + /** + * + * + * @var string|null + */ + protected $error = ''; + /** + * List of ID's and addresses of other managers in the swarm. + * + * @var list|null + */ + protected $remoteManagers; + /** + * Total number of nodes in the swarm. + * + * @var int|null + */ + protected $nodes; + /** + * Total number of managers in the swarm. + * + * @var int|null + */ + protected $managers; + /** + * ClusterInfo represents information about the swarm as is returned by the + "/info" endpoint. Join-tokens are not included. + + * + * @var ClusterInfo|null + */ + protected $cluster; + /** + * Unique identifier of for this node in the swarm. + * + * @return string|null + */ + public function getNodeID(): ?string + { + return $this->nodeID; + } + /** + * Unique identifier of for this node in the swarm. + * + * @param string|null $nodeID + * + * @return self + */ + public function setNodeID(?string $nodeID): self + { + $this->initialized['nodeID'] = true; + $this->nodeID = $nodeID; + return $this; + } + /** + * IP address at which this node can be reached by other nodes in the + swarm. + + * + * @return string|null + */ + public function getNodeAddr(): ?string + { + return $this->nodeAddr; + } + /** + * IP address at which this node can be reached by other nodes in the + swarm. + + * + * @param string|null $nodeAddr + * + * @return self + */ + public function setNodeAddr(?string $nodeAddr): self + { + $this->initialized['nodeAddr'] = true; + $this->nodeAddr = $nodeAddr; + return $this; + } + /** + * Current local status of this node. + * + * @return string|null + */ + public function getLocalNodeState(): ?string + { + return $this->localNodeState; + } + /** + * Current local status of this node. + * + * @param string|null $localNodeState + * + * @return self + */ + public function setLocalNodeState(?string $localNodeState): self + { + $this->initialized['localNodeState'] = true; + $this->localNodeState = $localNodeState; + return $this; + } + /** + * + * + * @return bool|null + */ + public function getControlAvailable(): ?bool + { + return $this->controlAvailable; + } + /** + * + * + * @param bool|null $controlAvailable + * + * @return self + */ + public function setControlAvailable(?bool $controlAvailable): self + { + $this->initialized['controlAvailable'] = true; + $this->controlAvailable = $controlAvailable; + return $this; + } + /** + * + * + * @return string|null + */ + public function getError(): ?string + { + return $this->error; + } + /** + * + * + * @param string|null $error + * + * @return self + */ + public function setError(?string $error): self + { + $this->initialized['error'] = true; + $this->error = $error; + return $this; + } + /** + * List of ID's and addresses of other managers in the swarm. + * + * @return list|null + */ + public function getRemoteManagers(): ?array + { + return $this->remoteManagers; + } + /** + * List of ID's and addresses of other managers in the swarm. + * + * @param list|null $remoteManagers + * + * @return self + */ + public function setRemoteManagers(?array $remoteManagers): self + { + $this->initialized['remoteManagers'] = true; + $this->remoteManagers = $remoteManagers; + return $this; + } + /** + * Total number of nodes in the swarm. + * + * @return int|null + */ + public function getNodes(): ?int + { + return $this->nodes; + } + /** + * Total number of nodes in the swarm. + * + * @param int|null $nodes + * + * @return self + */ + public function setNodes(?int $nodes): self + { + $this->initialized['nodes'] = true; + $this->nodes = $nodes; + return $this; + } + /** + * Total number of managers in the swarm. + * + * @return int|null + */ + public function getManagers(): ?int + { + return $this->managers; + } + /** + * Total number of managers in the swarm. + * + * @param int|null $managers + * + * @return self + */ + public function setManagers(?int $managers): self + { + $this->initialized['managers'] = true; + $this->managers = $managers; + return $this; + } + /** + * ClusterInfo represents information about the swarm as is returned by the + "/info" endpoint. Join-tokens are not included. + + * + * @return ClusterInfo|null + */ + public function getCluster(): ?ClusterInfo + { + return $this->cluster; + } + /** + * ClusterInfo represents information about the swarm as is returned by the + "/info" endpoint. Join-tokens are not included. + + * + * @param ClusterInfo|null $cluster + * + * @return self + */ + public function setCluster(?ClusterInfo $cluster): self + { + $this->initialized['cluster'] = true; + $this->cluster = $cluster; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SwarmInitPostBody.php b/generated/Model/SwarmInitPostBody.php index 23dbfea0b..87cd2a01c 100644 --- a/generated/Model/SwarmInitPostBody.php +++ b/generated/Model/SwarmInitPostBody.php @@ -13,23 +13,76 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used. - * - * @var string|null - */ + * Listen address used for inter-manager communication, as well + as determining the networking interface used for the VXLAN + Tunnel Endpoint (VTEP). This can either be an address/port + combination in the form `192.168.1.1:4567`, or an interface + followed by a port number, like `eth0:4567`. If the port number + is omitted, the default swarm listening port is used. + + * + * @var string|null + */ protected $listenAddr; /** - * Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. - * - * @var string|null - */ + * Externally reachable address advertised to other nodes. This + can either be an address/port combination in the form + `192.168.1.1:4567`, or an interface followed by a port number, + like `eth0:4567`. If the port number is omitted, the port + number from the listen address is used. If `AdvertiseAddr` is + not specified, it will be automatically detected when possible. + + * + * @var string|null + */ protected $advertiseAddr; + /** + * Address or interface to use for data path traffic (format: + ``), for example, `192.168.1.1`, or an interface, + like `eth0`. If `DataPathAddr` is unspecified, the same address + as `AdvertiseAddr` is used. + + The `DataPathAddr` specifies the address that global scope + network drivers will publish towards other nodes in order to + reach the containers running on this node. Using this parameter + it is possible to separate the container data traffic from the + management traffic of the cluster. + + * + * @var string|null + */ + protected $dataPathAddr; + /** + * DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + if no port is set or is set to 0, default port 4789 will be used. + + * + * @var int|null + */ + protected $dataPathPort; + /** + * Default Address Pool specifies default subnet pools for global + scope networks. + + * + * @var list|null + */ + protected $defaultAddrPool; /** * Force creation of a new swarm. * * @var bool|null */ protected $forceNewCluster; + /** + * SubnetSize specifies the subnet size of the networks created + from the default subnet pool. + + * + * @var int|null + */ + protected $subnetSize; /** * User modifiable swarm configuration. * @@ -37,21 +90,33 @@ public function isInitialized($property): bool */ protected $spec; /** - * Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used. - * - * @return string|null - */ + * Listen address used for inter-manager communication, as well + as determining the networking interface used for the VXLAN + Tunnel Endpoint (VTEP). This can either be an address/port + combination in the form `192.168.1.1:4567`, or an interface + followed by a port number, like `eth0:4567`. If the port number + is omitted, the default swarm listening port is used. + + * + * @return string|null + */ public function getListenAddr(): ?string { return $this->listenAddr; } /** - * Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used. - * - * @param string|null $listenAddr - * - * @return self - */ + * Listen address used for inter-manager communication, as well + as determining the networking interface used for the VXLAN + Tunnel Endpoint (VTEP). This can either be an address/port + combination in the form `192.168.1.1:4567`, or an interface + followed by a port number, like `eth0:4567`. If the port number + is omitted, the default swarm listening port is used. + + * + * @param string|null $listenAddr + * + * @return self + */ public function setListenAddr(?string $listenAddr): self { $this->initialized['listenAddr'] = true; @@ -59,27 +124,135 @@ public function setListenAddr(?string $listenAddr): self return $this; } /** - * Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. - * - * @return string|null - */ + * Externally reachable address advertised to other nodes. This + can either be an address/port combination in the form + `192.168.1.1:4567`, or an interface followed by a port number, + like `eth0:4567`. If the port number is omitted, the port + number from the listen address is used. If `AdvertiseAddr` is + not specified, it will be automatically detected when possible. + + * + * @return string|null + */ public function getAdvertiseAddr(): ?string { return $this->advertiseAddr; } /** - * Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. - * - * @param string|null $advertiseAddr - * - * @return self - */ + * Externally reachable address advertised to other nodes. This + can either be an address/port combination in the form + `192.168.1.1:4567`, or an interface followed by a port number, + like `eth0:4567`. If the port number is omitted, the port + number from the listen address is used. If `AdvertiseAddr` is + not specified, it will be automatically detected when possible. + + * + * @param string|null $advertiseAddr + * + * @return self + */ public function setAdvertiseAddr(?string $advertiseAddr): self { $this->initialized['advertiseAddr'] = true; $this->advertiseAddr = $advertiseAddr; return $this; } + /** + * Address or interface to use for data path traffic (format: + ``), for example, `192.168.1.1`, or an interface, + like `eth0`. If `DataPathAddr` is unspecified, the same address + as `AdvertiseAddr` is used. + + The `DataPathAddr` specifies the address that global scope + network drivers will publish towards other nodes in order to + reach the containers running on this node. Using this parameter + it is possible to separate the container data traffic from the + management traffic of the cluster. + + * + * @return string|null + */ + public function getDataPathAddr(): ?string + { + return $this->dataPathAddr; + } + /** + * Address or interface to use for data path traffic (format: + ``), for example, `192.168.1.1`, or an interface, + like `eth0`. If `DataPathAddr` is unspecified, the same address + as `AdvertiseAddr` is used. + + The `DataPathAddr` specifies the address that global scope + network drivers will publish towards other nodes in order to + reach the containers running on this node. Using this parameter + it is possible to separate the container data traffic from the + management traffic of the cluster. + + * + * @param string|null $dataPathAddr + * + * @return self + */ + public function setDataPathAddr(?string $dataPathAddr): self + { + $this->initialized['dataPathAddr'] = true; + $this->dataPathAddr = $dataPathAddr; + return $this; + } + /** + * DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + if no port is set or is set to 0, default port 4789 will be used. + + * + * @return int|null + */ + public function getDataPathPort(): ?int + { + return $this->dataPathPort; + } + /** + * DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + if no port is set or is set to 0, default port 4789 will be used. + + * + * @param int|null $dataPathPort + * + * @return self + */ + public function setDataPathPort(?int $dataPathPort): self + { + $this->initialized['dataPathPort'] = true; + $this->dataPathPort = $dataPathPort; + return $this; + } + /** + * Default Address Pool specifies default subnet pools for global + scope networks. + + * + * @return list|null + */ + public function getDefaultAddrPool(): ?array + { + return $this->defaultAddrPool; + } + /** + * Default Address Pool specifies default subnet pools for global + scope networks. + + * + * @param list|null $defaultAddrPool + * + * @return self + */ + public function setDefaultAddrPool(?array $defaultAddrPool): self + { + $this->initialized['defaultAddrPool'] = true; + $this->defaultAddrPool = $defaultAddrPool; + return $this; + } /** * Force creation of a new swarm. * @@ -102,6 +275,32 @@ public function setForceNewCluster(?bool $forceNewCluster): self $this->forceNewCluster = $forceNewCluster; return $this; } + /** + * SubnetSize specifies the subnet size of the networks created + from the default subnet pool. + + * + * @return int|null + */ + public function getSubnetSize(): ?int + { + return $this->subnetSize; + } + /** + * SubnetSize specifies the subnet size of the networks created + from the default subnet pool. + + * + * @param int|null $subnetSize + * + * @return self + */ + public function setSubnetSize(?int $subnetSize): self + { + $this->initialized['subnetSize'] = true; + $this->subnetSize = $subnetSize; + return $this; + } /** * User modifiable swarm configuration. * diff --git a/generated/Model/SwarmJoinPostBody.php b/generated/Model/SwarmJoinPostBody.php index 1f9b8a19b..bd102e1fd 100644 --- a/generated/Model/SwarmJoinPostBody.php +++ b/generated/Model/SwarmJoinPostBody.php @@ -13,21 +13,46 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). - * - * @var string|null - */ + * Listen address used for inter-manager communication if the node + gets promoted to manager, as well as determining the networking + interface used for the VXLAN Tunnel Endpoint (VTEP). + + * + * @var string|null + */ protected $listenAddr; /** - * Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. - * - * @var string|null - */ + * Externally reachable address advertised to other nodes. This + can either be an address/port combination in the form + `192.168.1.1:4567`, or an interface followed by a port number, + like `eth0:4567`. If the port number is omitted, the port + number from the listen address is used. If `AdvertiseAddr` is + not specified, it will be automatically detected when possible. + + * + * @var string|null + */ protected $advertiseAddr; + /** + * Address or interface to use for data path traffic (format: + ``), for example, `192.168.1.1`, or an interface, + like `eth0`. If `DataPathAddr` is unspecified, the same address + as `AdvertiseAddr` is used. + + The `DataPathAddr` specifies the address that global scope + network drivers will publish towards other nodes in order to + reach the containers running on this node. Using this parameter + it is possible to separate the container data traffic from the + management traffic of the cluster. + + * + * @var string|null + */ + protected $dataPathAddr; /** * Addresses of manager nodes already participating in the swarm. * - * @var string|null + * @var list|null */ protected $remoteAddrs; /** @@ -37,21 +62,27 @@ public function isInitialized($property): bool */ protected $joinToken; /** - * Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). - * - * @return string|null - */ + * Listen address used for inter-manager communication if the node + gets promoted to manager, as well as determining the networking + interface used for the VXLAN Tunnel Endpoint (VTEP). + + * + * @return string|null + */ public function getListenAddr(): ?string { return $this->listenAddr; } /** - * Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). - * - * @param string|null $listenAddr - * - * @return self - */ + * Listen address used for inter-manager communication if the node + gets promoted to manager, as well as determining the networking + interface used for the VXLAN Tunnel Endpoint (VTEP). + + * + * @param string|null $listenAddr + * + * @return self + */ public function setListenAddr(?string $listenAddr): self { $this->initialized['listenAddr'] = true; @@ -59,44 +90,98 @@ public function setListenAddr(?string $listenAddr): self return $this; } /** - * Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. - * - * @return string|null - */ + * Externally reachable address advertised to other nodes. This + can either be an address/port combination in the form + `192.168.1.1:4567`, or an interface followed by a port number, + like `eth0:4567`. If the port number is omitted, the port + number from the listen address is used. If `AdvertiseAddr` is + not specified, it will be automatically detected when possible. + + * + * @return string|null + */ public function getAdvertiseAddr(): ?string { return $this->advertiseAddr; } /** - * Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. - * - * @param string|null $advertiseAddr - * - * @return self - */ + * Externally reachable address advertised to other nodes. This + can either be an address/port combination in the form + `192.168.1.1:4567`, or an interface followed by a port number, + like `eth0:4567`. If the port number is omitted, the port + number from the listen address is used. If `AdvertiseAddr` is + not specified, it will be automatically detected when possible. + + * + * @param string|null $advertiseAddr + * + * @return self + */ public function setAdvertiseAddr(?string $advertiseAddr): self { $this->initialized['advertiseAddr'] = true; $this->advertiseAddr = $advertiseAddr; return $this; } + /** + * Address or interface to use for data path traffic (format: + ``), for example, `192.168.1.1`, or an interface, + like `eth0`. If `DataPathAddr` is unspecified, the same address + as `AdvertiseAddr` is used. + + The `DataPathAddr` specifies the address that global scope + network drivers will publish towards other nodes in order to + reach the containers running on this node. Using this parameter + it is possible to separate the container data traffic from the + management traffic of the cluster. + + * + * @return string|null + */ + public function getDataPathAddr(): ?string + { + return $this->dataPathAddr; + } + /** + * Address or interface to use for data path traffic (format: + ``), for example, `192.168.1.1`, or an interface, + like `eth0`. If `DataPathAddr` is unspecified, the same address + as `AdvertiseAddr` is used. + + The `DataPathAddr` specifies the address that global scope + network drivers will publish towards other nodes in order to + reach the containers running on this node. Using this parameter + it is possible to separate the container data traffic from the + management traffic of the cluster. + + * + * @param string|null $dataPathAddr + * + * @return self + */ + public function setDataPathAddr(?string $dataPathAddr): self + { + $this->initialized['dataPathAddr'] = true; + $this->dataPathAddr = $dataPathAddr; + return $this; + } /** * Addresses of manager nodes already participating in the swarm. * - * @return string|null + * @return list|null */ - public function getRemoteAddrs(): ?string + public function getRemoteAddrs(): ?array { return $this->remoteAddrs; } /** * Addresses of manager nodes already participating in the swarm. * - * @param string|null $remoteAddrs + * @param list|null $remoteAddrs * * @return self */ - public function setRemoteAddrs(?string $remoteAddrs): self + public function setRemoteAddrs(?array $remoteAddrs): self { $this->initialized['remoteAddrs'] = true; $this->remoteAddrs = $remoteAddrs; diff --git a/generated/Model/SwarmSpecCAConfig.php b/generated/Model/SwarmSpecCAConfig.php index 429776dc4..b1a4313e7 100644 --- a/generated/Model/SwarmSpecCAConfig.php +++ b/generated/Model/SwarmSpecCAConfig.php @@ -19,11 +19,38 @@ public function isInitialized($property): bool */ protected $nodeCertExpiry; /** - * Configuration for forwarding signing requests to an external certificate authority. - * - * @var list|null - */ + * Configuration for forwarding signing requests to an external + certificate authority. + + * + * @var list|null + */ protected $externalCAs; + /** + * The desired signing CA certificate for all swarm node TLS leaf + certificates, in PEM format. + + * + * @var string|null + */ + protected $signingCACert; + /** + * The desired signing CA key for all swarm node TLS leaf certificates, + in PEM format. + + * + * @var string|null + */ + protected $signingCAKey; + /** + * An integer whose purpose is to force swarm to generate a new + signing CA certificate and key, if none have been specified in + `SigningCACert` and `SigningCAKey` + + * + * @var int|null + */ + protected $forceRotate; /** * The duration node certificates are issued for. * @@ -47,25 +74,109 @@ public function setNodeCertExpiry(?int $nodeCertExpiry): self return $this; } /** - * Configuration for forwarding signing requests to an external certificate authority. - * - * @return list|null - */ + * Configuration for forwarding signing requests to an external + certificate authority. + + * + * @return list|null + */ public function getExternalCAs(): ?array { return $this->externalCAs; } /** - * Configuration for forwarding signing requests to an external certificate authority. - * - * @param list|null $externalCAs - * - * @return self - */ + * Configuration for forwarding signing requests to an external + certificate authority. + + * + * @param list|null $externalCAs + * + * @return self + */ public function setExternalCAs(?array $externalCAs): self { $this->initialized['externalCAs'] = true; $this->externalCAs = $externalCAs; return $this; } + /** + * The desired signing CA certificate for all swarm node TLS leaf + certificates, in PEM format. + + * + * @return string|null + */ + public function getSigningCACert(): ?string + { + return $this->signingCACert; + } + /** + * The desired signing CA certificate for all swarm node TLS leaf + certificates, in PEM format. + + * + * @param string|null $signingCACert + * + * @return self + */ + public function setSigningCACert(?string $signingCACert): self + { + $this->initialized['signingCACert'] = true; + $this->signingCACert = $signingCACert; + return $this; + } + /** + * The desired signing CA key for all swarm node TLS leaf certificates, + in PEM format. + + * + * @return string|null + */ + public function getSigningCAKey(): ?string + { + return $this->signingCAKey; + } + /** + * The desired signing CA key for all swarm node TLS leaf certificates, + in PEM format. + + * + * @param string|null $signingCAKey + * + * @return self + */ + public function setSigningCAKey(?string $signingCAKey): self + { + $this->initialized['signingCAKey'] = true; + $this->signingCAKey = $signingCAKey; + return $this; + } + /** + * An integer whose purpose is to force swarm to generate a new + signing CA certificate and key, if none have been specified in + `SigningCACert` and `SigningCAKey` + + * + * @return int|null + */ + public function getForceRotate(): ?int + { + return $this->forceRotate; + } + /** + * An integer whose purpose is to force swarm to generate a new + signing CA certificate and key, if none have been specified in + `SigningCACert` and `SigningCAKey` + + * + * @param int|null $forceRotate + * + * @return self + */ + public function setForceRotate(?int $forceRotate): self + { + $this->initialized['forceRotate'] = true; + $this->forceRotate = $forceRotate; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/SwarmSpecCAConfigExternalCAsItem.php b/generated/Model/SwarmSpecCAConfigExternalCAsItem.php index 7a0664ba5..c055ba65a 100644 --- a/generated/Model/SwarmSpecCAConfigExternalCAsItem.php +++ b/generated/Model/SwarmSpecCAConfigExternalCAsItem.php @@ -13,10 +13,12 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * Protocol for communication with the external CA (currently only `cfssl` is supported). - * - * @var string|null - */ + * Protocol for communication with the external CA (currently + only `cfssl` is supported). + + * + * @var string|null + */ protected $protocol = 'cfssl'; /** * URL where certificate signing requests should be sent. @@ -25,27 +27,42 @@ public function isInitialized($property): bool */ protected $uRL; /** - * An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver. - * - * @var array|null - */ + * An object with key/value pairs that are interpreted as + protocol-specific options for the external CA driver. + + * + * @var array|null + */ protected $options; /** - * Protocol for communication with the external CA (currently only `cfssl` is supported). - * - * @return string|null - */ + * The root CA certificate (in PEM format) this external CA uses + to issue TLS certificates (assumed to be to the current swarm + root CA certificate if not provided). + + * + * @var string|null + */ + protected $cACert; + /** + * Protocol for communication with the external CA (currently + only `cfssl` is supported). + + * + * @return string|null + */ public function getProtocol(): ?string { return $this->protocol; } /** - * Protocol for communication with the external CA (currently only `cfssl` is supported). - * - * @param string|null $protocol - * - * @return self - */ + * Protocol for communication with the external CA (currently + only `cfssl` is supported). + + * + * @param string|null $protocol + * + * @return self + */ public function setProtocol(?string $protocol): self { $this->initialized['protocol'] = true; @@ -75,25 +92,57 @@ public function setURL(?string $uRL): self return $this; } /** - * An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver. - * - * @return array|null - */ + * An object with key/value pairs that are interpreted as + protocol-specific options for the external CA driver. + + * + * @return array|null + */ public function getOptions(): ?iterable { return $this->options; } /** - * An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver. - * - * @param array|null $options - * - * @return self - */ + * An object with key/value pairs that are interpreted as + protocol-specific options for the external CA driver. + + * + * @param array|null $options + * + * @return self + */ public function setOptions(?iterable $options): self { $this->initialized['options'] = true; $this->options = $options; return $this; } + /** + * The root CA certificate (in PEM format) this external CA uses + to issue TLS certificates (assumed to be to the current swarm + root CA certificate if not provided). + + * + * @return string|null + */ + public function getCACert(): ?string + { + return $this->cACert; + } + /** + * The root CA certificate (in PEM format) this external CA uses + to issue TLS certificates (assumed to be to the current swarm + root CA certificate if not provided). + + * + * @param string|null $cACert + * + * @return self + */ + public function setCACert(?string $cACert): self + { + $this->initialized['cACert'] = true; + $this->cACert = $cACert; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/SwarmSpecEncryptionConfig.php b/generated/Model/SwarmSpecEncryptionConfig.php index c582a9907..c52b09f4b 100644 --- a/generated/Model/SwarmSpecEncryptionConfig.php +++ b/generated/Model/SwarmSpecEncryptionConfig.php @@ -13,27 +13,33 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * If set, generate a key and use it to lock data stored on the managers. - * - * @var bool|null - */ + * If set, generate a key and use it to lock data stored on the + managers. + + * + * @var bool|null + */ protected $autoLockManagers; /** - * If set, generate a key and use it to lock data stored on the managers. - * - * @return bool|null - */ + * If set, generate a key and use it to lock data stored on the + managers. + + * + * @return bool|null + */ public function getAutoLockManagers(): ?bool { return $this->autoLockManagers; } /** - * If set, generate a key and use it to lock data stored on the managers. - * - * @param bool|null $autoLockManagers - * - * @return self - */ + * If set, generate a key and use it to lock data stored on the + managers. + + * + * @param bool|null $autoLockManagers + * + * @return self + */ public function setAutoLockManagers(?bool $autoLockManagers): self { $this->initialized['autoLockManagers'] = true; diff --git a/generated/Model/SwarmSpecOrchestration.php b/generated/Model/SwarmSpecOrchestration.php index f415d4fa6..2d846d470 100644 --- a/generated/Model/SwarmSpecOrchestration.php +++ b/generated/Model/SwarmSpecOrchestration.php @@ -13,27 +13,33 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks. - * - * @var int|null - */ + * The number of historic tasks to keep per instance or node. If + negative, never remove completed or failed tasks. + + * + * @var int|null + */ protected $taskHistoryRetentionLimit; /** - * The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks. - * - * @return int|null - */ + * The number of historic tasks to keep per instance or node. If + negative, never remove completed or failed tasks. + + * + * @return int|null + */ public function getTaskHistoryRetentionLimit(): ?int { return $this->taskHistoryRetentionLimit; } /** - * The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks. - * - * @param int|null $taskHistoryRetentionLimit - * - * @return self - */ + * The number of historic tasks to keep per instance or node. If + negative, never remove completed or failed tasks. + + * + * @param int|null $taskHistoryRetentionLimit + * + * @return self + */ public function setTaskHistoryRetentionLimit(?int $taskHistoryRetentionLimit): self { $this->initialized['taskHistoryRetentionLimit'] = true; diff --git a/generated/Model/SwarmSpecRaft.php b/generated/Model/SwarmSpecRaft.php index ab36fc82b..1bfed0859 100644 --- a/generated/Model/SwarmSpecRaft.php +++ b/generated/Model/SwarmSpecRaft.php @@ -25,24 +25,31 @@ public function isInitialized($property): bool */ protected $keepOldSnapshots; /** - * The number of log entries to keep around to sync up slow followers after a snapshot is created. - * - * @var int|null - */ + * The number of log entries to keep around to sync up slow followers + after a snapshot is created. + + * + * @var int|null + */ protected $logEntriesForSlowFollowers; /** - * The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`. + * The number of ticks that a follower will wait for a message from + the leader before becoming a candidate and starting an election. + `ElectionTick` must be greater than `HeartbeatTick`. - A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + A tick currently defaults to one second, so these translate + directly to seconds currently, but this is NOT guaranteed. * * @var int|null */ protected $electionTick; /** - * The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. + * The number of ticks between heartbeats. Every HeartbeatTick ticks, + the leader will send a heartbeat to the followers. - A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + A tick currently defaults to one second, so these translate + directly to seconds currently, but this is NOT guaranteed. * * @var int|null @@ -93,21 +100,25 @@ public function setKeepOldSnapshots(?int $keepOldSnapshots): self return $this; } /** - * The number of log entries to keep around to sync up slow followers after a snapshot is created. - * - * @return int|null - */ + * The number of log entries to keep around to sync up slow followers + after a snapshot is created. + + * + * @return int|null + */ public function getLogEntriesForSlowFollowers(): ?int { return $this->logEntriesForSlowFollowers; } /** - * The number of log entries to keep around to sync up slow followers after a snapshot is created. - * - * @param int|null $logEntriesForSlowFollowers - * - * @return self - */ + * The number of log entries to keep around to sync up slow followers + after a snapshot is created. + + * + * @param int|null $logEntriesForSlowFollowers + * + * @return self + */ public function setLogEntriesForSlowFollowers(?int $logEntriesForSlowFollowers): self { $this->initialized['logEntriesForSlowFollowers'] = true; @@ -115,9 +126,12 @@ public function setLogEntriesForSlowFollowers(?int $logEntriesForSlowFollowers): return $this; } /** - * The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`. + * The number of ticks that a follower will wait for a message from + the leader before becoming a candidate and starting an election. + `ElectionTick` must be greater than `HeartbeatTick`. - A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + A tick currently defaults to one second, so these translate + directly to seconds currently, but this is NOT guaranteed. * * @return int|null @@ -127,9 +141,12 @@ public function getElectionTick(): ?int return $this->electionTick; } /** - * The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`. + * The number of ticks that a follower will wait for a message from + the leader before becoming a candidate and starting an election. + `ElectionTick` must be greater than `HeartbeatTick`. - A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + A tick currently defaults to one second, so these translate + directly to seconds currently, but this is NOT guaranteed. * * @param int|null $electionTick @@ -143,9 +160,11 @@ public function setElectionTick(?int $electionTick): self return $this; } /** - * The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. + * The number of ticks between heartbeats. Every HeartbeatTick ticks, + the leader will send a heartbeat to the followers. - A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + A tick currently defaults to one second, so these translate + directly to seconds currently, but this is NOT guaranteed. * * @return int|null @@ -155,9 +174,11 @@ public function getHeartbeatTick(): ?int return $this->heartbeatTick; } /** - * The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. + * The number of ticks between heartbeats. Every HeartbeatTick ticks, + the leader will send a heartbeat to the followers. - A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + A tick currently defaults to one second, so these translate + directly to seconds currently, but this is NOT guaranteed. * * @param int|null $heartbeatTick diff --git a/generated/Model/SwarmSpecTaskDefaults.php b/generated/Model/SwarmSpecTaskDefaults.php index cc2fcafe1..d6d82443a 100644 --- a/generated/Model/SwarmSpecTaskDefaults.php +++ b/generated/Model/SwarmSpecTaskDefaults.php @@ -13,18 +13,22 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * The log driver to use for tasks created in the orchestrator if unspecified by a service. + * The log driver to use for tasks created in the orchestrator if + unspecified by a service. - Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated. + Updating this value only affects new tasks. Existing tasks continue + to use their previously configured log driver until recreated. * * @var SwarmSpecTaskDefaultsLogDriver|null */ protected $logDriver; /** - * The log driver to use for tasks created in the orchestrator if unspecified by a service. + * The log driver to use for tasks created in the orchestrator if + unspecified by a service. - Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated. + Updating this value only affects new tasks. Existing tasks continue + to use their previously configured log driver until recreated. * * @return SwarmSpecTaskDefaultsLogDriver|null @@ -34,9 +38,11 @@ public function getLogDriver(): ?SwarmSpecTaskDefaultsLogDriver return $this->logDriver; } /** - * The log driver to use for tasks created in the orchestrator if unspecified by a service. + * The log driver to use for tasks created in the orchestrator if + unspecified by a service. - Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated. + Updating this value only affects new tasks. Existing tasks continue + to use their previously configured log driver until recreated. * * @param SwarmSpecTaskDefaultsLogDriver|null $logDriver diff --git a/generated/Model/SwarmSpecTaskDefaultsLogDriver.php b/generated/Model/SwarmSpecTaskDefaultsLogDriver.php index 4fd58aa5f..0163ce020 100644 --- a/generated/Model/SwarmSpecTaskDefaultsLogDriver.php +++ b/generated/Model/SwarmSpecTaskDefaultsLogDriver.php @@ -13,19 +13,21 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * + * The log driver to use as a default for new tasks. * * @var string|null */ protected $name; /** - * - * - * @var array|null - */ + * Driver-specific options for the selected log driver, specified + as key/value pairs. + + * + * @var array|null + */ protected $options; /** - * + * The log driver to use as a default for new tasks. * * @return string|null */ @@ -34,7 +36,7 @@ public function getName(): ?string return $this->name; } /** - * + * The log driver to use as a default for new tasks. * * @param string|null $name * @@ -47,21 +49,25 @@ public function setName(?string $name): self return $this; } /** - * - * - * @return array|null - */ + * Driver-specific options for the selected log driver, specified + as key/value pairs. + + * + * @return array|null + */ public function getOptions(): ?iterable { return $this->options; } /** - * - * - * @param array|null $options - * - * @return self - */ + * Driver-specific options for the selected log driver, specified + as key/value pairs. + + * + * @param array|null $options + * + * @return self + */ public function setOptions(?iterable $options): self { $this->initialized['options'] = true; diff --git a/generated/Model/SystemDfGetResponse200.php b/generated/Model/SystemDfGetResponse200.php index a62574985..77bd1b73e 100644 --- a/generated/Model/SystemDfGetResponse200.php +++ b/generated/Model/SystemDfGetResponse200.php @@ -27,7 +27,7 @@ public function isInitialized($property): bool /** * * - * @var list>|null + * @var list|null */ protected $containers; /** @@ -36,6 +36,12 @@ public function isInitialized($property): bool * @var list|null */ protected $volumes; + /** + * + * + * @var list|null + */ + protected $buildCache; /** * * @@ -83,7 +89,7 @@ public function setImages(?array $images): self /** * * - * @return list>|null + * @return list|null */ public function getContainers(): ?array { @@ -92,7 +98,7 @@ public function getContainers(): ?array /** * * - * @param list>|null $containers + * @param list|null $containers * * @return self */ @@ -124,4 +130,26 @@ public function setVolumes(?array $volumes): self $this->volumes = $volumes; return $this; } + /** + * + * + * @return list|null + */ + public function getBuildCache(): ?array + { + return $this->buildCache; + } + /** + * + * + * @param list|null $buildCache + * + * @return self + */ + public function setBuildCache(?array $buildCache): self + { + $this->initialized['buildCache'] = true; + $this->buildCache = $buildCache; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/SystemInfo.php b/generated/Model/SystemInfo.php new file mode 100644 index 000000000..40361b020 --- /dev/null +++ b/generated/Model/SystemInfo.php @@ -0,0 +1,2297 @@ +initialized); + } + /** + * Unique identifier of the daemon. + +


+ + > **Note**: The format of the ID itself is not part of the API, and + > should not be considered stable. + + * + * @var string|null + */ + protected $iD; + /** + * Total number of containers on the host. + * + * @var int|null + */ + protected $containers; + /** + * Number of containers with status `"running"`. + * + * @var int|null + */ + protected $containersRunning; + /** + * Number of containers with status `"paused"`. + * + * @var int|null + */ + protected $containersPaused; + /** + * Number of containers with status `"stopped"`. + * + * @var int|null + */ + protected $containersStopped; + /** + * Total number of images on the host. + + Both _tagged_ and _untagged_ (dangling) images are counted. + + * + * @var int|null + */ + protected $images; + /** + * Name of the storage driver in use. + * + * @var string|null + */ + protected $driver; + /** + * Information specific to the storage driver, provided as + "label" / "value" pairs. + + This information is provided by the storage driver, and formatted + in a way consistent with the output of `docker info` on the command + line. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + + * + * @var list>|null + */ + protected $driverStatus; + /** + * Root directory of persistent Docker state. + + Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` + on Windows. + + * + * @var string|null + */ + protected $dockerRootDir; + /** + * Available plugins per type. + +


+ + > **Note**: Only unmanaged (V1) plugins are included in this list. + > V1 plugins are "lazily" loaded, and are not returned in this list + > if there is no resource using the plugin. + + * + * @var PluginsInfo|null + */ + protected $plugins; + /** + * Indicates if the host has memory limit support enabled. + * + * @var bool|null + */ + protected $memoryLimit; + /** + * Indicates if the host has memory swap limit support enabled. + * + * @var bool|null + */ + protected $swapLimit; + /** + * Indicates if the host has kernel memory TCP limit support enabled. This + field is omitted if not supported. + + Kernel memory TCP limits are not supported when using cgroups v2, which + does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. + + * + * @var bool|null + */ + protected $kernelMemoryTCP; + /** + * Indicates if CPU CFS(Completely Fair Scheduler) period is supported by + the host. + + * + * @var bool|null + */ + protected $cpuCfsPeriod; + /** + * Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by + the host. + + * + * @var bool|null + */ + protected $cpuCfsQuota; + /** + * Indicates if CPU Shares limiting is supported by the host. + * + * @var bool|null + */ + protected $cPUShares; + /** + * Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. + + See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) + + * + * @var bool|null + */ + protected $cPUSet; + /** + * Indicates if the host kernel has PID limit support enabled. + * + * @var bool|null + */ + protected $pidsLimit; + /** + * Indicates if OOM killer disable is supported on the host. + * + * @var bool|null + */ + protected $oomKillDisable; + /** + * Indicates IPv4 forwarding is enabled. + * + * @var bool|null + */ + protected $iPv4Forwarding; + /** + * Indicates if `bridge-nf-call-iptables` is available on the host. + * + * @var bool|null + */ + protected $bridgeNfIptables; + /** + * Indicates if `bridge-nf-call-ip6tables` is available on the host. + * + * @var bool|null + */ + protected $bridgeNfIp6tables; + /** + * Indicates if the daemon is running in debug-mode / with debug-level + logging enabled. + + * + * @var bool|null + */ + protected $debug; + /** + * The total number of file Descriptors in use by the daemon process. + + This information is only returned if debug-mode is enabled. + + * + * @var int|null + */ + protected $nFd; + /** + * The number of goroutines that currently exist. + + This information is only returned if debug-mode is enabled. + + * + * @var int|null + */ + protected $nGoroutines; + /** + * Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + format with nano-seconds. + + * + * @var string|null + */ + protected $systemTime; + /** + * The logging driver to use as a default for new containers. + * + * @var string|null + */ + protected $loggingDriver; + /** + * The driver to use for managing cgroups. + * + * @var string|null + */ + protected $cgroupDriver = 'cgroupfs'; + /** + * The version of the cgroup. + * + * @var string|null + */ + protected $cgroupVersion = '1'; + /** + * Number of event listeners subscribed. + * + * @var int|null + */ + protected $nEventsListener; + /** + * Kernel version of the host. + + On Linux, this information obtained from `uname`. On Windows this + information is queried from the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ + registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. + + * + * @var string|null + */ + protected $kernelVersion; + /** + * Name of the host's operating system, for example: "Ubuntu 24.04 LTS" + or "Windows Server 2016 Datacenter" + + * + * @var string|null + */ + protected $operatingSystem; + /** + * Version of the host's operating system + +


+ + > **Note**: The information returned in this field, including its + > very existence, and the formatting of values, should not be considered + > stable, and may change without notice. + + * + * @var string|null + */ + protected $oSVersion; + /** + * Generic type of the operating system of the host, as returned by the + Go runtime (`GOOS`). + + Currently returned values are "linux" and "windows". A full list of + possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + + * + * @var string|null + */ + protected $oSType; + /** + * Hardware architecture of the host, as returned by the Go runtime + (`GOARCH`). + + A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + + * + * @var string|null + */ + protected $architecture; + /** + * The number of logical CPUs usable by the daemon. + + The number of available CPUs is checked by querying the operating + system when the daemon starts. Changes to operating system CPU + allocation after the daemon is started are not reflected. + + * + * @var int|null + */ + protected $nCPU; + /** + * Total amount of physical memory available on the host, in bytes. + * + * @var int|null + */ + protected $memTotal; + /** + * Address / URL of the index server that is used for image search, + and as a default for user authentication for Docker Hub and Docker Cloud. + + * + * @var string|null + */ + protected $indexServerAddress = 'https://index.docker.io/v1/'; + /** + * RegistryServiceConfig stores daemon registry services configuration. + * + * @var RegistryServiceConfig|null + */ + protected $registryConfig; + /** + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + String resources (e.g, `GPU=UUID1`). + + * + * @var list|null + */ + protected $genericResources; + /** + * HTTP-proxy configured for the daemon. This value is obtained from the + [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + are masked in the API response. + + Containers do not automatically inherit this configuration. + + * + * @var string|null + */ + protected $httpProxy; + /** + * HTTPS-proxy configured for the daemon. This value is obtained from the + [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + are masked in the API response. + + Containers do not automatically inherit this configuration. + + * + * @var string|null + */ + protected $httpsProxy; + /** + * Comma-separated list of domain extensions for which no proxy should be + used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) + environment variable. + + Containers do not automatically inherit this configuration. + + * + * @var string|null + */ + protected $noProxy; + /** + * Hostname of the host. + * + * @var string|null + */ + protected $name; + /** + * User-defined labels (key/value metadata) as set on the daemon. + +


+ + > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, + > set through the daemon configuration, and _node_ labels, set from a + > manager node in the Swarm. Node labels are not included in this + > field. Node labels can be retrieved using the `/nodes/(id)` endpoint + > on a manager node in the Swarm. + + * + * @var list|null + */ + protected $labels; + /** + * Indicates if experimental features are enabled on the daemon. + * + * @var bool|null + */ + protected $experimentalBuild; + /** + * Version string of the daemon. + * + * @var string|null + */ + protected $serverVersion; + /** + * List of [OCI compliant](https://github.com/opencontainers/runtime-spec) + runtimes configured on the daemon. Keys hold the "name" used to + reference the runtime. + + The Docker daemon relies on an OCI compliant runtime (invoked via the + `containerd` daemon) as its interface to the Linux kernel namespaces, + cgroups, and SELinux. + + The default runtime is `runc`, and automatically configured. Additional + runtimes can be configured by the user and will be listed here. + + * + * @var array|null + */ + protected $runtimes; + /** + * Name of the default OCI runtime that is used when starting containers. + + The default can be overridden per-container at create time. + + * + * @var string|null + */ + protected $defaultRuntime = 'runc'; + /** + * Represents generic information about swarm. + * + * @var SwarmInfo|null + */ + protected $swarm; + /** + * Indicates if live restore is enabled. + + If enabled, containers are kept running when the daemon is shutdown + or upon daemon start if running containers are detected. + + * + * @var bool|null + */ + protected $liveRestoreEnabled = false; + /** + * Represents the isolation technology to use as a default for containers. + The supported values are platform-specific. + + If no isolation value is specified on daemon start, on Windows client, + the default is `hyperv`, and on Windows server, the default is `process`. + + This option is currently not used on other platforms. + + * + * @var string|null + */ + protected $isolation = 'default'; + /** + * Name and, optional, path of the `docker-init` binary. + + If the path is omitted, the daemon searches the host's `$PATH` for the + binary and uses the first result. + + * + * @var string|null + */ + protected $initBinary; + /** + * Commit holds the Git-commit (SHA1) that a binary was built from, as + reported in the version-string of external tools, such as `containerd`, + or `runC`. + + * + * @var Commit|null + */ + protected $containerdCommit; + /** + * Commit holds the Git-commit (SHA1) that a binary was built from, as + reported in the version-string of external tools, such as `containerd`, + or `runC`. + + * + * @var Commit|null + */ + protected $runcCommit; + /** + * Commit holds the Git-commit (SHA1) that a binary was built from, as + reported in the version-string of external tools, such as `containerd`, + or `runC`. + + * + * @var Commit|null + */ + protected $initCommit; + /** + * List of security features that are enabled on the daemon, such as + apparmor, seccomp, SELinux, user-namespaces (userns), rootless and + no-new-privileges. + + Additional configuration options for each security feature may + be present, and are included as a comma-separated list of key/value + pairs. + + * + * @var list|null + */ + protected $securityOptions; + /** + * Reports a summary of the product license on the daemon. + + If a commercial license has been applied to the daemon, information + such as number of nodes, and expiration are included. + + * + * @var string|null + */ + protected $productLicense; + /** + * List of custom default address pools for local networks, which can be + specified in the daemon.json file or dockerd option. + + Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 + 10.10.[0-255].0/24 address pools. + + * + * @var list|null + */ + protected $defaultAddressPools; + /** + * List of warnings / informational messages about missing features, or + issues related to the daemon configuration. + + These messages can be printed by the client as information to the user. + + * + * @var list|null + */ + protected $warnings; + /** + * List of directories where (Container Device Interface) CDI + specifications are located. + + These specifications define vendor-specific modifications to an OCI + runtime specification for a container being created. + + An empty list indicates that CDI device injection is disabled. + + Note that since using CDI device injection requires the daemon to have + experimental enabled. For non-experimental daemons an empty list will + always be returned. + + * + * @var list|null + */ + protected $cDISpecDirs; + /** + * Information for connecting to the containerd instance that is used by the daemon. + This is included for debugging purposes only. + + * + * @var ContainerdInfo|null + */ + protected $containerd; + /** + * Unique identifier of the daemon. + +


+ + > **Note**: The format of the ID itself is not part of the API, and + > should not be considered stable. + + * + * @return string|null + */ + public function getID(): ?string + { + return $this->iD; + } + /** + * Unique identifier of the daemon. + +


+ + > **Note**: The format of the ID itself is not part of the API, and + > should not be considered stable. + + * + * @param string|null $iD + * + * @return self + */ + public function setID(?string $iD): self + { + $this->initialized['iD'] = true; + $this->iD = $iD; + return $this; + } + /** + * Total number of containers on the host. + * + * @return int|null + */ + public function getContainers(): ?int + { + return $this->containers; + } + /** + * Total number of containers on the host. + * + * @param int|null $containers + * + * @return self + */ + public function setContainers(?int $containers): self + { + $this->initialized['containers'] = true; + $this->containers = $containers; + return $this; + } + /** + * Number of containers with status `"running"`. + * + * @return int|null + */ + public function getContainersRunning(): ?int + { + return $this->containersRunning; + } + /** + * Number of containers with status `"running"`. + * + * @param int|null $containersRunning + * + * @return self + */ + public function setContainersRunning(?int $containersRunning): self + { + $this->initialized['containersRunning'] = true; + $this->containersRunning = $containersRunning; + return $this; + } + /** + * Number of containers with status `"paused"`. + * + * @return int|null + */ + public function getContainersPaused(): ?int + { + return $this->containersPaused; + } + /** + * Number of containers with status `"paused"`. + * + * @param int|null $containersPaused + * + * @return self + */ + public function setContainersPaused(?int $containersPaused): self + { + $this->initialized['containersPaused'] = true; + $this->containersPaused = $containersPaused; + return $this; + } + /** + * Number of containers with status `"stopped"`. + * + * @return int|null + */ + public function getContainersStopped(): ?int + { + return $this->containersStopped; + } + /** + * Number of containers with status `"stopped"`. + * + * @param int|null $containersStopped + * + * @return self + */ + public function setContainersStopped(?int $containersStopped): self + { + $this->initialized['containersStopped'] = true; + $this->containersStopped = $containersStopped; + return $this; + } + /** + * Total number of images on the host. + + Both _tagged_ and _untagged_ (dangling) images are counted. + + * + * @return int|null + */ + public function getImages(): ?int + { + return $this->images; + } + /** + * Total number of images on the host. + + Both _tagged_ and _untagged_ (dangling) images are counted. + + * + * @param int|null $images + * + * @return self + */ + public function setImages(?int $images): self + { + $this->initialized['images'] = true; + $this->images = $images; + return $this; + } + /** + * Name of the storage driver in use. + * + * @return string|null + */ + public function getDriver(): ?string + { + return $this->driver; + } + /** + * Name of the storage driver in use. + * + * @param string|null $driver + * + * @return self + */ + public function setDriver(?string $driver): self + { + $this->initialized['driver'] = true; + $this->driver = $driver; + return $this; + } + /** + * Information specific to the storage driver, provided as + "label" / "value" pairs. + + This information is provided by the storage driver, and formatted + in a way consistent with the output of `docker info` on the command + line. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + + * + * @return list>|null + */ + public function getDriverStatus(): ?array + { + return $this->driverStatus; + } + /** + * Information specific to the storage driver, provided as + "label" / "value" pairs. + + This information is provided by the storage driver, and formatted + in a way consistent with the output of `docker info` on the command + line. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + + * + * @param list>|null $driverStatus + * + * @return self + */ + public function setDriverStatus(?array $driverStatus): self + { + $this->initialized['driverStatus'] = true; + $this->driverStatus = $driverStatus; + return $this; + } + /** + * Root directory of persistent Docker state. + + Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` + on Windows. + + * + * @return string|null + */ + public function getDockerRootDir(): ?string + { + return $this->dockerRootDir; + } + /** + * Root directory of persistent Docker state. + + Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` + on Windows. + + * + * @param string|null $dockerRootDir + * + * @return self + */ + public function setDockerRootDir(?string $dockerRootDir): self + { + $this->initialized['dockerRootDir'] = true; + $this->dockerRootDir = $dockerRootDir; + return $this; + } + /** + * Available plugins per type. + +


+ + > **Note**: Only unmanaged (V1) plugins are included in this list. + > V1 plugins are "lazily" loaded, and are not returned in this list + > if there is no resource using the plugin. + + * + * @return PluginsInfo|null + */ + public function getPlugins(): ?PluginsInfo + { + return $this->plugins; + } + /** + * Available plugins per type. + +


+ + > **Note**: Only unmanaged (V1) plugins are included in this list. + > V1 plugins are "lazily" loaded, and are not returned in this list + > if there is no resource using the plugin. + + * + * @param PluginsInfo|null $plugins + * + * @return self + */ + public function setPlugins(?PluginsInfo $plugins): self + { + $this->initialized['plugins'] = true; + $this->plugins = $plugins; + return $this; + } + /** + * Indicates if the host has memory limit support enabled. + * + * @return bool|null + */ + public function getMemoryLimit(): ?bool + { + return $this->memoryLimit; + } + /** + * Indicates if the host has memory limit support enabled. + * + * @param bool|null $memoryLimit + * + * @return self + */ + public function setMemoryLimit(?bool $memoryLimit): self + { + $this->initialized['memoryLimit'] = true; + $this->memoryLimit = $memoryLimit; + return $this; + } + /** + * Indicates if the host has memory swap limit support enabled. + * + * @return bool|null + */ + public function getSwapLimit(): ?bool + { + return $this->swapLimit; + } + /** + * Indicates if the host has memory swap limit support enabled. + * + * @param bool|null $swapLimit + * + * @return self + */ + public function setSwapLimit(?bool $swapLimit): self + { + $this->initialized['swapLimit'] = true; + $this->swapLimit = $swapLimit; + return $this; + } + /** + * Indicates if the host has kernel memory TCP limit support enabled. This + field is omitted if not supported. + + Kernel memory TCP limits are not supported when using cgroups v2, which + does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. + + * + * @return bool|null + */ + public function getKernelMemoryTCP(): ?bool + { + return $this->kernelMemoryTCP; + } + /** + * Indicates if the host has kernel memory TCP limit support enabled. This + field is omitted if not supported. + + Kernel memory TCP limits are not supported when using cgroups v2, which + does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. + + * + * @param bool|null $kernelMemoryTCP + * + * @return self + */ + public function setKernelMemoryTCP(?bool $kernelMemoryTCP): self + { + $this->initialized['kernelMemoryTCP'] = true; + $this->kernelMemoryTCP = $kernelMemoryTCP; + return $this; + } + /** + * Indicates if CPU CFS(Completely Fair Scheduler) period is supported by + the host. + + * + * @return bool|null + */ + public function getCpuCfsPeriod(): ?bool + { + return $this->cpuCfsPeriod; + } + /** + * Indicates if CPU CFS(Completely Fair Scheduler) period is supported by + the host. + + * + * @param bool|null $cpuCfsPeriod + * + * @return self + */ + public function setCpuCfsPeriod(?bool $cpuCfsPeriod): self + { + $this->initialized['cpuCfsPeriod'] = true; + $this->cpuCfsPeriod = $cpuCfsPeriod; + return $this; + } + /** + * Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by + the host. + + * + * @return bool|null + */ + public function getCpuCfsQuota(): ?bool + { + return $this->cpuCfsQuota; + } + /** + * Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by + the host. + + * + * @param bool|null $cpuCfsQuota + * + * @return self + */ + public function setCpuCfsQuota(?bool $cpuCfsQuota): self + { + $this->initialized['cpuCfsQuota'] = true; + $this->cpuCfsQuota = $cpuCfsQuota; + return $this; + } + /** + * Indicates if CPU Shares limiting is supported by the host. + * + * @return bool|null + */ + public function getCPUShares(): ?bool + { + return $this->cPUShares; + } + /** + * Indicates if CPU Shares limiting is supported by the host. + * + * @param bool|null $cPUShares + * + * @return self + */ + public function setCPUShares(?bool $cPUShares): self + { + $this->initialized['cPUShares'] = true; + $this->cPUShares = $cPUShares; + return $this; + } + /** + * Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. + + See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) + + * + * @return bool|null + */ + public function getCPUSet(): ?bool + { + return $this->cPUSet; + } + /** + * Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. + + See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) + + * + * @param bool|null $cPUSet + * + * @return self + */ + public function setCPUSet(?bool $cPUSet): self + { + $this->initialized['cPUSet'] = true; + $this->cPUSet = $cPUSet; + return $this; + } + /** + * Indicates if the host kernel has PID limit support enabled. + * + * @return bool|null + */ + public function getPidsLimit(): ?bool + { + return $this->pidsLimit; + } + /** + * Indicates if the host kernel has PID limit support enabled. + * + * @param bool|null $pidsLimit + * + * @return self + */ + public function setPidsLimit(?bool $pidsLimit): self + { + $this->initialized['pidsLimit'] = true; + $this->pidsLimit = $pidsLimit; + return $this; + } + /** + * Indicates if OOM killer disable is supported on the host. + * + * @return bool|null + */ + public function getOomKillDisable(): ?bool + { + return $this->oomKillDisable; + } + /** + * Indicates if OOM killer disable is supported on the host. + * + * @param bool|null $oomKillDisable + * + * @return self + */ + public function setOomKillDisable(?bool $oomKillDisable): self + { + $this->initialized['oomKillDisable'] = true; + $this->oomKillDisable = $oomKillDisable; + return $this; + } + /** + * Indicates IPv4 forwarding is enabled. + * + * @return bool|null + */ + public function getIPv4Forwarding(): ?bool + { + return $this->iPv4Forwarding; + } + /** + * Indicates IPv4 forwarding is enabled. + * + * @param bool|null $iPv4Forwarding + * + * @return self + */ + public function setIPv4Forwarding(?bool $iPv4Forwarding): self + { + $this->initialized['iPv4Forwarding'] = true; + $this->iPv4Forwarding = $iPv4Forwarding; + return $this; + } + /** + * Indicates if `bridge-nf-call-iptables` is available on the host. + * + * @return bool|null + */ + public function getBridgeNfIptables(): ?bool + { + return $this->bridgeNfIptables; + } + /** + * Indicates if `bridge-nf-call-iptables` is available on the host. + * + * @param bool|null $bridgeNfIptables + * + * @return self + */ + public function setBridgeNfIptables(?bool $bridgeNfIptables): self + { + $this->initialized['bridgeNfIptables'] = true; + $this->bridgeNfIptables = $bridgeNfIptables; + return $this; + } + /** + * Indicates if `bridge-nf-call-ip6tables` is available on the host. + * + * @return bool|null + */ + public function getBridgeNfIp6tables(): ?bool + { + return $this->bridgeNfIp6tables; + } + /** + * Indicates if `bridge-nf-call-ip6tables` is available on the host. + * + * @param bool|null $bridgeNfIp6tables + * + * @return self + */ + public function setBridgeNfIp6tables(?bool $bridgeNfIp6tables): self + { + $this->initialized['bridgeNfIp6tables'] = true; + $this->bridgeNfIp6tables = $bridgeNfIp6tables; + return $this; + } + /** + * Indicates if the daemon is running in debug-mode / with debug-level + logging enabled. + + * + * @return bool|null + */ + public function getDebug(): ?bool + { + return $this->debug; + } + /** + * Indicates if the daemon is running in debug-mode / with debug-level + logging enabled. + + * + * @param bool|null $debug + * + * @return self + */ + public function setDebug(?bool $debug): self + { + $this->initialized['debug'] = true; + $this->debug = $debug; + return $this; + } + /** + * The total number of file Descriptors in use by the daemon process. + + This information is only returned if debug-mode is enabled. + + * + * @return int|null + */ + public function getNFd(): ?int + { + return $this->nFd; + } + /** + * The total number of file Descriptors in use by the daemon process. + + This information is only returned if debug-mode is enabled. + + * + * @param int|null $nFd + * + * @return self + */ + public function setNFd(?int $nFd): self + { + $this->initialized['nFd'] = true; + $this->nFd = $nFd; + return $this; + } + /** + * The number of goroutines that currently exist. + + This information is only returned if debug-mode is enabled. + + * + * @return int|null + */ + public function getNGoroutines(): ?int + { + return $this->nGoroutines; + } + /** + * The number of goroutines that currently exist. + + This information is only returned if debug-mode is enabled. + + * + * @param int|null $nGoroutines + * + * @return self + */ + public function setNGoroutines(?int $nGoroutines): self + { + $this->initialized['nGoroutines'] = true; + $this->nGoroutines = $nGoroutines; + return $this; + } + /** + * Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + format with nano-seconds. + + * + * @return string|null + */ + public function getSystemTime(): ?string + { + return $this->systemTime; + } + /** + * Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + format with nano-seconds. + + * + * @param string|null $systemTime + * + * @return self + */ + public function setSystemTime(?string $systemTime): self + { + $this->initialized['systemTime'] = true; + $this->systemTime = $systemTime; + return $this; + } + /** + * The logging driver to use as a default for new containers. + * + * @return string|null + */ + public function getLoggingDriver(): ?string + { + return $this->loggingDriver; + } + /** + * The logging driver to use as a default for new containers. + * + * @param string|null $loggingDriver + * + * @return self + */ + public function setLoggingDriver(?string $loggingDriver): self + { + $this->initialized['loggingDriver'] = true; + $this->loggingDriver = $loggingDriver; + return $this; + } + /** + * The driver to use for managing cgroups. + * + * @return string|null + */ + public function getCgroupDriver(): ?string + { + return $this->cgroupDriver; + } + /** + * The driver to use for managing cgroups. + * + * @param string|null $cgroupDriver + * + * @return self + */ + public function setCgroupDriver(?string $cgroupDriver): self + { + $this->initialized['cgroupDriver'] = true; + $this->cgroupDriver = $cgroupDriver; + return $this; + } + /** + * The version of the cgroup. + * + * @return string|null + */ + public function getCgroupVersion(): ?string + { + return $this->cgroupVersion; + } + /** + * The version of the cgroup. + * + * @param string|null $cgroupVersion + * + * @return self + */ + public function setCgroupVersion(?string $cgroupVersion): self + { + $this->initialized['cgroupVersion'] = true; + $this->cgroupVersion = $cgroupVersion; + return $this; + } + /** + * Number of event listeners subscribed. + * + * @return int|null + */ + public function getNEventsListener(): ?int + { + return $this->nEventsListener; + } + /** + * Number of event listeners subscribed. + * + * @param int|null $nEventsListener + * + * @return self + */ + public function setNEventsListener(?int $nEventsListener): self + { + $this->initialized['nEventsListener'] = true; + $this->nEventsListener = $nEventsListener; + return $this; + } + /** + * Kernel version of the host. + + On Linux, this information obtained from `uname`. On Windows this + information is queried from the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ + registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. + + * + * @return string|null + */ + public function getKernelVersion(): ?string + { + return $this->kernelVersion; + } + /** + * Kernel version of the host. + + On Linux, this information obtained from `uname`. On Windows this + information is queried from the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ + registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. + + * + * @param string|null $kernelVersion + * + * @return self + */ + public function setKernelVersion(?string $kernelVersion): self + { + $this->initialized['kernelVersion'] = true; + $this->kernelVersion = $kernelVersion; + return $this; + } + /** + * Name of the host's operating system, for example: "Ubuntu 24.04 LTS" + or "Windows Server 2016 Datacenter" + + * + * @return string|null + */ + public function getOperatingSystem(): ?string + { + return $this->operatingSystem; + } + /** + * Name of the host's operating system, for example: "Ubuntu 24.04 LTS" + or "Windows Server 2016 Datacenter" + + * + * @param string|null $operatingSystem + * + * @return self + */ + public function setOperatingSystem(?string $operatingSystem): self + { + $this->initialized['operatingSystem'] = true; + $this->operatingSystem = $operatingSystem; + return $this; + } + /** + * Version of the host's operating system + +


+ + > **Note**: The information returned in this field, including its + > very existence, and the formatting of values, should not be considered + > stable, and may change without notice. + + * + * @return string|null + */ + public function getOSVersion(): ?string + { + return $this->oSVersion; + } + /** + * Version of the host's operating system + +


+ + > **Note**: The information returned in this field, including its + > very existence, and the formatting of values, should not be considered + > stable, and may change without notice. + + * + * @param string|null $oSVersion + * + * @return self + */ + public function setOSVersion(?string $oSVersion): self + { + $this->initialized['oSVersion'] = true; + $this->oSVersion = $oSVersion; + return $this; + } + /** + * Generic type of the operating system of the host, as returned by the + Go runtime (`GOOS`). + + Currently returned values are "linux" and "windows". A full list of + possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + + * + * @return string|null + */ + public function getOSType(): ?string + { + return $this->oSType; + } + /** + * Generic type of the operating system of the host, as returned by the + Go runtime (`GOOS`). + + Currently returned values are "linux" and "windows". A full list of + possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + + * + * @param string|null $oSType + * + * @return self + */ + public function setOSType(?string $oSType): self + { + $this->initialized['oSType'] = true; + $this->oSType = $oSType; + return $this; + } + /** + * Hardware architecture of the host, as returned by the Go runtime + (`GOARCH`). + + A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + + * + * @return string|null + */ + public function getArchitecture(): ?string + { + return $this->architecture; + } + /** + * Hardware architecture of the host, as returned by the Go runtime + (`GOARCH`). + + A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + + * + * @param string|null $architecture + * + * @return self + */ + public function setArchitecture(?string $architecture): self + { + $this->initialized['architecture'] = true; + $this->architecture = $architecture; + return $this; + } + /** + * The number of logical CPUs usable by the daemon. + + The number of available CPUs is checked by querying the operating + system when the daemon starts. Changes to operating system CPU + allocation after the daemon is started are not reflected. + + * + * @return int|null + */ + public function getNCPU(): ?int + { + return $this->nCPU; + } + /** + * The number of logical CPUs usable by the daemon. + + The number of available CPUs is checked by querying the operating + system when the daemon starts. Changes to operating system CPU + allocation after the daemon is started are not reflected. + + * + * @param int|null $nCPU + * + * @return self + */ + public function setNCPU(?int $nCPU): self + { + $this->initialized['nCPU'] = true; + $this->nCPU = $nCPU; + return $this; + } + /** + * Total amount of physical memory available on the host, in bytes. + * + * @return int|null + */ + public function getMemTotal(): ?int + { + return $this->memTotal; + } + /** + * Total amount of physical memory available on the host, in bytes. + * + * @param int|null $memTotal + * + * @return self + */ + public function setMemTotal(?int $memTotal): self + { + $this->initialized['memTotal'] = true; + $this->memTotal = $memTotal; + return $this; + } + /** + * Address / URL of the index server that is used for image search, + and as a default for user authentication for Docker Hub and Docker Cloud. + + * + * @return string|null + */ + public function getIndexServerAddress(): ?string + { + return $this->indexServerAddress; + } + /** + * Address / URL of the index server that is used for image search, + and as a default for user authentication for Docker Hub and Docker Cloud. + + * + * @param string|null $indexServerAddress + * + * @return self + */ + public function setIndexServerAddress(?string $indexServerAddress): self + { + $this->initialized['indexServerAddress'] = true; + $this->indexServerAddress = $indexServerAddress; + return $this; + } + /** + * RegistryServiceConfig stores daemon registry services configuration. + * + * @return RegistryServiceConfig|null + */ + public function getRegistryConfig(): ?RegistryServiceConfig + { + return $this->registryConfig; + } + /** + * RegistryServiceConfig stores daemon registry services configuration. + * + * @param RegistryServiceConfig|null $registryConfig + * + * @return self + */ + public function setRegistryConfig(?RegistryServiceConfig $registryConfig): self + { + $this->initialized['registryConfig'] = true; + $this->registryConfig = $registryConfig; + return $this; + } + /** + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + String resources (e.g, `GPU=UUID1`). + + * + * @return list|null + */ + public function getGenericResources(): ?array + { + return $this->genericResources; + } + /** + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + String resources (e.g, `GPU=UUID1`). + + * + * @param list|null $genericResources + * + * @return self + */ + public function setGenericResources(?array $genericResources): self + { + $this->initialized['genericResources'] = true; + $this->genericResources = $genericResources; + return $this; + } + /** + * HTTP-proxy configured for the daemon. This value is obtained from the + [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + are masked in the API response. + + Containers do not automatically inherit this configuration. + + * + * @return string|null + */ + public function getHttpProxy(): ?string + { + return $this->httpProxy; + } + /** + * HTTP-proxy configured for the daemon. This value is obtained from the + [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + are masked in the API response. + + Containers do not automatically inherit this configuration. + + * + * @param string|null $httpProxy + * + * @return self + */ + public function setHttpProxy(?string $httpProxy): self + { + $this->initialized['httpProxy'] = true; + $this->httpProxy = $httpProxy; + return $this; + } + /** + * HTTPS-proxy configured for the daemon. This value is obtained from the + [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + are masked in the API response. + + Containers do not automatically inherit this configuration. + + * + * @return string|null + */ + public function getHttpsProxy(): ?string + { + return $this->httpsProxy; + } + /** + * HTTPS-proxy configured for the daemon. This value is obtained from the + [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + are masked in the API response. + + Containers do not automatically inherit this configuration. + + * + * @param string|null $httpsProxy + * + * @return self + */ + public function setHttpsProxy(?string $httpsProxy): self + { + $this->initialized['httpsProxy'] = true; + $this->httpsProxy = $httpsProxy; + return $this; + } + /** + * Comma-separated list of domain extensions for which no proxy should be + used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) + environment variable. + + Containers do not automatically inherit this configuration. + + * + * @return string|null + */ + public function getNoProxy(): ?string + { + return $this->noProxy; + } + /** + * Comma-separated list of domain extensions for which no proxy should be + used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) + environment variable. + + Containers do not automatically inherit this configuration. + + * + * @param string|null $noProxy + * + * @return self + */ + public function setNoProxy(?string $noProxy): self + { + $this->initialized['noProxy'] = true; + $this->noProxy = $noProxy; + return $this; + } + /** + * Hostname of the host. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * Hostname of the host. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * User-defined labels (key/value metadata) as set on the daemon. + +


+ + > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, + > set through the daemon configuration, and _node_ labels, set from a + > manager node in the Swarm. Node labels are not included in this + > field. Node labels can be retrieved using the `/nodes/(id)` endpoint + > on a manager node in the Swarm. + + * + * @return list|null + */ + public function getLabels(): ?array + { + return $this->labels; + } + /** + * User-defined labels (key/value metadata) as set on the daemon. + +


+ + > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, + > set through the daemon configuration, and _node_ labels, set from a + > manager node in the Swarm. Node labels are not included in this + > field. Node labels can be retrieved using the `/nodes/(id)` endpoint + > on a manager node in the Swarm. + + * + * @param list|null $labels + * + * @return self + */ + public function setLabels(?array $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } + /** + * Indicates if experimental features are enabled on the daemon. + * + * @return bool|null + */ + public function getExperimentalBuild(): ?bool + { + return $this->experimentalBuild; + } + /** + * Indicates if experimental features are enabled on the daemon. + * + * @param bool|null $experimentalBuild + * + * @return self + */ + public function setExperimentalBuild(?bool $experimentalBuild): self + { + $this->initialized['experimentalBuild'] = true; + $this->experimentalBuild = $experimentalBuild; + return $this; + } + /** + * Version string of the daemon. + * + * @return string|null + */ + public function getServerVersion(): ?string + { + return $this->serverVersion; + } + /** + * Version string of the daemon. + * + * @param string|null $serverVersion + * + * @return self + */ + public function setServerVersion(?string $serverVersion): self + { + $this->initialized['serverVersion'] = true; + $this->serverVersion = $serverVersion; + return $this; + } + /** + * List of [OCI compliant](https://github.com/opencontainers/runtime-spec) + runtimes configured on the daemon. Keys hold the "name" used to + reference the runtime. + + The Docker daemon relies on an OCI compliant runtime (invoked via the + `containerd` daemon) as its interface to the Linux kernel namespaces, + cgroups, and SELinux. + + The default runtime is `runc`, and automatically configured. Additional + runtimes can be configured by the user and will be listed here. + + * + * @return array|null + */ + public function getRuntimes(): ?iterable + { + return $this->runtimes; + } + /** + * List of [OCI compliant](https://github.com/opencontainers/runtime-spec) + runtimes configured on the daemon. Keys hold the "name" used to + reference the runtime. + + The Docker daemon relies on an OCI compliant runtime (invoked via the + `containerd` daemon) as its interface to the Linux kernel namespaces, + cgroups, and SELinux. + + The default runtime is `runc`, and automatically configured. Additional + runtimes can be configured by the user and will be listed here. + + * + * @param array|null $runtimes + * + * @return self + */ + public function setRuntimes(?iterable $runtimes): self + { + $this->initialized['runtimes'] = true; + $this->runtimes = $runtimes; + return $this; + } + /** + * Name of the default OCI runtime that is used when starting containers. + + The default can be overridden per-container at create time. + + * + * @return string|null + */ + public function getDefaultRuntime(): ?string + { + return $this->defaultRuntime; + } + /** + * Name of the default OCI runtime that is used when starting containers. + + The default can be overridden per-container at create time. + + * + * @param string|null $defaultRuntime + * + * @return self + */ + public function setDefaultRuntime(?string $defaultRuntime): self + { + $this->initialized['defaultRuntime'] = true; + $this->defaultRuntime = $defaultRuntime; + return $this; + } + /** + * Represents generic information about swarm. + * + * @return SwarmInfo|null + */ + public function getSwarm(): ?SwarmInfo + { + return $this->swarm; + } + /** + * Represents generic information about swarm. + * + * @param SwarmInfo|null $swarm + * + * @return self + */ + public function setSwarm(?SwarmInfo $swarm): self + { + $this->initialized['swarm'] = true; + $this->swarm = $swarm; + return $this; + } + /** + * Indicates if live restore is enabled. + + If enabled, containers are kept running when the daemon is shutdown + or upon daemon start if running containers are detected. + + * + * @return bool|null + */ + public function getLiveRestoreEnabled(): ?bool + { + return $this->liveRestoreEnabled; + } + /** + * Indicates if live restore is enabled. + + If enabled, containers are kept running when the daemon is shutdown + or upon daemon start if running containers are detected. + + * + * @param bool|null $liveRestoreEnabled + * + * @return self + */ + public function setLiveRestoreEnabled(?bool $liveRestoreEnabled): self + { + $this->initialized['liveRestoreEnabled'] = true; + $this->liveRestoreEnabled = $liveRestoreEnabled; + return $this; + } + /** + * Represents the isolation technology to use as a default for containers. + The supported values are platform-specific. + + If no isolation value is specified on daemon start, on Windows client, + the default is `hyperv`, and on Windows server, the default is `process`. + + This option is currently not used on other platforms. + + * + * @return string|null + */ + public function getIsolation(): ?string + { + return $this->isolation; + } + /** + * Represents the isolation technology to use as a default for containers. + The supported values are platform-specific. + + If no isolation value is specified on daemon start, on Windows client, + the default is `hyperv`, and on Windows server, the default is `process`. + + This option is currently not used on other platforms. + + * + * @param string|null $isolation + * + * @return self + */ + public function setIsolation(?string $isolation): self + { + $this->initialized['isolation'] = true; + $this->isolation = $isolation; + return $this; + } + /** + * Name and, optional, path of the `docker-init` binary. + + If the path is omitted, the daemon searches the host's `$PATH` for the + binary and uses the first result. + + * + * @return string|null + */ + public function getInitBinary(): ?string + { + return $this->initBinary; + } + /** + * Name and, optional, path of the `docker-init` binary. + + If the path is omitted, the daemon searches the host's `$PATH` for the + binary and uses the first result. + + * + * @param string|null $initBinary + * + * @return self + */ + public function setInitBinary(?string $initBinary): self + { + $this->initialized['initBinary'] = true; + $this->initBinary = $initBinary; + return $this; + } + /** + * Commit holds the Git-commit (SHA1) that a binary was built from, as + reported in the version-string of external tools, such as `containerd`, + or `runC`. + + * + * @return Commit|null + */ + public function getContainerdCommit(): ?Commit + { + return $this->containerdCommit; + } + /** + * Commit holds the Git-commit (SHA1) that a binary was built from, as + reported in the version-string of external tools, such as `containerd`, + or `runC`. + + * + * @param Commit|null $containerdCommit + * + * @return self + */ + public function setContainerdCommit(?Commit $containerdCommit): self + { + $this->initialized['containerdCommit'] = true; + $this->containerdCommit = $containerdCommit; + return $this; + } + /** + * Commit holds the Git-commit (SHA1) that a binary was built from, as + reported in the version-string of external tools, such as `containerd`, + or `runC`. + + * + * @return Commit|null + */ + public function getRuncCommit(): ?Commit + { + return $this->runcCommit; + } + /** + * Commit holds the Git-commit (SHA1) that a binary was built from, as + reported in the version-string of external tools, such as `containerd`, + or `runC`. + + * + * @param Commit|null $runcCommit + * + * @return self + */ + public function setRuncCommit(?Commit $runcCommit): self + { + $this->initialized['runcCommit'] = true; + $this->runcCommit = $runcCommit; + return $this; + } + /** + * Commit holds the Git-commit (SHA1) that a binary was built from, as + reported in the version-string of external tools, such as `containerd`, + or `runC`. + + * + * @return Commit|null + */ + public function getInitCommit(): ?Commit + { + return $this->initCommit; + } + /** + * Commit holds the Git-commit (SHA1) that a binary was built from, as + reported in the version-string of external tools, such as `containerd`, + or `runC`. + + * + * @param Commit|null $initCommit + * + * @return self + */ + public function setInitCommit(?Commit $initCommit): self + { + $this->initialized['initCommit'] = true; + $this->initCommit = $initCommit; + return $this; + } + /** + * List of security features that are enabled on the daemon, such as + apparmor, seccomp, SELinux, user-namespaces (userns), rootless and + no-new-privileges. + + Additional configuration options for each security feature may + be present, and are included as a comma-separated list of key/value + pairs. + + * + * @return list|null + */ + public function getSecurityOptions(): ?array + { + return $this->securityOptions; + } + /** + * List of security features that are enabled on the daemon, such as + apparmor, seccomp, SELinux, user-namespaces (userns), rootless and + no-new-privileges. + + Additional configuration options for each security feature may + be present, and are included as a comma-separated list of key/value + pairs. + + * + * @param list|null $securityOptions + * + * @return self + */ + public function setSecurityOptions(?array $securityOptions): self + { + $this->initialized['securityOptions'] = true; + $this->securityOptions = $securityOptions; + return $this; + } + /** + * Reports a summary of the product license on the daemon. + + If a commercial license has been applied to the daemon, information + such as number of nodes, and expiration are included. + + * + * @return string|null + */ + public function getProductLicense(): ?string + { + return $this->productLicense; + } + /** + * Reports a summary of the product license on the daemon. + + If a commercial license has been applied to the daemon, information + such as number of nodes, and expiration are included. + + * + * @param string|null $productLicense + * + * @return self + */ + public function setProductLicense(?string $productLicense): self + { + $this->initialized['productLicense'] = true; + $this->productLicense = $productLicense; + return $this; + } + /** + * List of custom default address pools for local networks, which can be + specified in the daemon.json file or dockerd option. + + Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 + 10.10.[0-255].0/24 address pools. + + * + * @return list|null + */ + public function getDefaultAddressPools(): ?array + { + return $this->defaultAddressPools; + } + /** + * List of custom default address pools for local networks, which can be + specified in the daemon.json file or dockerd option. + + Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 + 10.10.[0-255].0/24 address pools. + + * + * @param list|null $defaultAddressPools + * + * @return self + */ + public function setDefaultAddressPools(?array $defaultAddressPools): self + { + $this->initialized['defaultAddressPools'] = true; + $this->defaultAddressPools = $defaultAddressPools; + return $this; + } + /** + * List of warnings / informational messages about missing features, or + issues related to the daemon configuration. + + These messages can be printed by the client as information to the user. + + * + * @return list|null + */ + public function getWarnings(): ?array + { + return $this->warnings; + } + /** + * List of warnings / informational messages about missing features, or + issues related to the daemon configuration. + + These messages can be printed by the client as information to the user. + + * + * @param list|null $warnings + * + * @return self + */ + public function setWarnings(?array $warnings): self + { + $this->initialized['warnings'] = true; + $this->warnings = $warnings; + return $this; + } + /** + * List of directories where (Container Device Interface) CDI + specifications are located. + + These specifications define vendor-specific modifications to an OCI + runtime specification for a container being created. + + An empty list indicates that CDI device injection is disabled. + + Note that since using CDI device injection requires the daemon to have + experimental enabled. For non-experimental daemons an empty list will + always be returned. + + * + * @return list|null + */ + public function getCDISpecDirs(): ?array + { + return $this->cDISpecDirs; + } + /** + * List of directories where (Container Device Interface) CDI + specifications are located. + + These specifications define vendor-specific modifications to an OCI + runtime specification for a container being created. + + An empty list indicates that CDI device injection is disabled. + + Note that since using CDI device injection requires the daemon to have + experimental enabled. For non-experimental daemons an empty list will + always be returned. + + * + * @param list|null $cDISpecDirs + * + * @return self + */ + public function setCDISpecDirs(?array $cDISpecDirs): self + { + $this->initialized['cDISpecDirs'] = true; + $this->cDISpecDirs = $cDISpecDirs; + return $this; + } + /** + * Information for connecting to the containerd instance that is used by the daemon. + This is included for debugging purposes only. + + * + * @return ContainerdInfo|null + */ + public function getContainerd(): ?ContainerdInfo + { + return $this->containerd; + } + /** + * Information for connecting to the containerd instance that is used by the daemon. + This is included for debugging purposes only. + + * + * @param ContainerdInfo|null $containerd + * + * @return self + */ + public function setContainerd(?ContainerdInfo $containerd): self + { + $this->initialized['containerd'] = true; + $this->containerd = $containerd; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/SystemInfoDefaultAddressPoolsItem.php b/generated/Model/SystemInfoDefaultAddressPoolsItem.php new file mode 100644 index 000000000..d151a3d3c --- /dev/null +++ b/generated/Model/SystemInfoDefaultAddressPoolsItem.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * The network address in CIDR format + * + * @var string|null + */ + protected $base; + /** + * The network pool size + * + * @var int|null + */ + protected $size; + /** + * The network address in CIDR format + * + * @return string|null + */ + public function getBase(): ?string + { + return $this->base; + } + /** + * The network address in CIDR format + * + * @param string|null $base + * + * @return self + */ + public function setBase(?string $base): self + { + $this->initialized['base'] = true; + $this->base = $base; + return $this; + } + /** + * The network pool size + * + * @return int|null + */ + public function getSize(): ?int + { + return $this->size; + } + /** + * The network pool size + * + * @param int|null $size + * + * @return self + */ + public function setSize(?int $size): self + { + $this->initialized['size'] = true; + $this->size = $size; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/VersionGetResponse200.php b/generated/Model/SystemVersion.php similarity index 54% rename from generated/Model/VersionGetResponse200.php rename to generated/Model/SystemVersion.php index 5e7690153..53999bdc3 100644 --- a/generated/Model/VersionGetResponse200.php +++ b/generated/Model/SystemVersion.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class VersionGetResponse200 +class SystemVersion { /** * @var array @@ -15,65 +15,129 @@ public function isInitialized($property): bool /** * * + * @var SystemVersionPlatform|null + */ + protected $platform; + /** + * Information about system components + * + * @var list|null + */ + protected $components; + /** + * The version of the daemon + * * @var string|null */ protected $version; /** - * + * The default (and highest) API version that is supported by the daemon * * @var string|null */ protected $apiVersion; /** - * + * The minimum API version that is supported by the daemon * * @var string|null */ protected $minAPIVersion; /** - * + * The Git commit of the source code that was used to build the daemon * * @var string|null */ protected $gitCommit; /** - * - * - * @var string|null - */ + * The version Go used to compile the daemon, and the version of the Go + runtime in use. + + * + * @var string|null + */ protected $goVersion; /** - * + * The operating system that the daemon is running on ("linux" or "windows") * * @var string|null */ protected $os; /** - * + * The architecture that the daemon is running on * * @var string|null */ protected $arch; /** - * + * The kernel version (`uname -r`) that the daemon is running on. + + This field is omitted when empty. + + * + * @var string|null + */ + protected $kernelVersion; + /** + * Indicates if the daemon is started with experimental features enabled. + + This field is omitted when empty / false. + + * + * @var bool|null + */ + protected $experimental; + /** + * The date and time that the daemon was compiled. * * @var string|null */ - protected $kernelVersion; + protected $buildTime; /** * * - * @var bool|null + * @return SystemVersionPlatform|null */ - protected $experimental; + public function getPlatform(): ?SystemVersionPlatform + { + return $this->platform; + } /** * * - * @var string|null + * @param SystemVersionPlatform|null $platform + * + * @return self */ - protected $buildTime; + public function setPlatform(?SystemVersionPlatform $platform): self + { + $this->initialized['platform'] = true; + $this->platform = $platform; + return $this; + } /** - * + * Information about system components + * + * @return list|null + */ + public function getComponents(): ?array + { + return $this->components; + } + /** + * Information about system components + * + * @param list|null $components + * + * @return self + */ + public function setComponents(?array $components): self + { + $this->initialized['components'] = true; + $this->components = $components; + return $this; + } + /** + * The version of the daemon * * @return string|null */ @@ -82,7 +146,7 @@ public function getVersion(): ?string return $this->version; } /** - * + * The version of the daemon * * @param string|null $version * @@ -95,7 +159,7 @@ public function setVersion(?string $version): self return $this; } /** - * + * The default (and highest) API version that is supported by the daemon * * @return string|null */ @@ -104,7 +168,7 @@ public function getApiVersion(): ?string return $this->apiVersion; } /** - * + * The default (and highest) API version that is supported by the daemon * * @param string|null $apiVersion * @@ -117,7 +181,7 @@ public function setApiVersion(?string $apiVersion): self return $this; } /** - * + * The minimum API version that is supported by the daemon * * @return string|null */ @@ -126,7 +190,7 @@ public function getMinAPIVersion(): ?string return $this->minAPIVersion; } /** - * + * The minimum API version that is supported by the daemon * * @param string|null $minAPIVersion * @@ -139,7 +203,7 @@ public function setMinAPIVersion(?string $minAPIVersion): self return $this; } /** - * + * The Git commit of the source code that was used to build the daemon * * @return string|null */ @@ -148,7 +212,7 @@ public function getGitCommit(): ?string return $this->gitCommit; } /** - * + * The Git commit of the source code that was used to build the daemon * * @param string|null $gitCommit * @@ -161,21 +225,25 @@ public function setGitCommit(?string $gitCommit): self return $this; } /** - * - * - * @return string|null - */ + * The version Go used to compile the daemon, and the version of the Go + runtime in use. + + * + * @return string|null + */ public function getGoVersion(): ?string { return $this->goVersion; } /** - * - * - * @param string|null $goVersion - * - * @return self - */ + * The version Go used to compile the daemon, and the version of the Go + runtime in use. + + * + * @param string|null $goVersion + * + * @return self + */ public function setGoVersion(?string $goVersion): self { $this->initialized['goVersion'] = true; @@ -183,7 +251,7 @@ public function setGoVersion(?string $goVersion): self return $this; } /** - * + * The operating system that the daemon is running on ("linux" or "windows") * * @return string|null */ @@ -192,7 +260,7 @@ public function getOs(): ?string return $this->os; } /** - * + * The operating system that the daemon is running on ("linux" or "windows") * * @param string|null $os * @@ -205,7 +273,7 @@ public function setOs(?string $os): self return $this; } /** - * + * The architecture that the daemon is running on * * @return string|null */ @@ -214,7 +282,7 @@ public function getArch(): ?string return $this->arch; } /** - * + * The architecture that the daemon is running on * * @param string|null $arch * @@ -227,21 +295,27 @@ public function setArch(?string $arch): self return $this; } /** - * - * - * @return string|null - */ + * The kernel version (`uname -r`) that the daemon is running on. + + This field is omitted when empty. + + * + * @return string|null + */ public function getKernelVersion(): ?string { return $this->kernelVersion; } /** - * - * - * @param string|null $kernelVersion - * - * @return self - */ + * The kernel version (`uname -r`) that the daemon is running on. + + This field is omitted when empty. + + * + * @param string|null $kernelVersion + * + * @return self + */ public function setKernelVersion(?string $kernelVersion): self { $this->initialized['kernelVersion'] = true; @@ -249,21 +323,27 @@ public function setKernelVersion(?string $kernelVersion): self return $this; } /** - * - * - * @return bool|null - */ + * Indicates if the daemon is started with experimental features enabled. + + This field is omitted when empty / false. + + * + * @return bool|null + */ public function getExperimental(): ?bool { return $this->experimental; } /** - * - * - * @param bool|null $experimental - * - * @return self - */ + * Indicates if the daemon is started with experimental features enabled. + + This field is omitted when empty / false. + + * + * @param bool|null $experimental + * + * @return self + */ public function setExperimental(?bool $experimental): self { $this->initialized['experimental'] = true; @@ -271,7 +351,7 @@ public function setExperimental(?bool $experimental): self return $this; } /** - * + * The date and time that the daemon was compiled. * * @return string|null */ @@ -280,7 +360,7 @@ public function getBuildTime(): ?string return $this->buildTime; } /** - * + * The date and time that the daemon was compiled. * * @param string|null $buildTime * diff --git a/generated/Model/SystemVersionComponentsItem.php b/generated/Model/SystemVersionComponentsItem.php new file mode 100644 index 000000000..eb863450c --- /dev/null +++ b/generated/Model/SystemVersionComponentsItem.php @@ -0,0 +1,117 @@ +initialized); + } + /** + * Name of the component + * + * @var string|null + */ + protected $name; + /** + * Version of the component + * + * @var string|null + */ + protected $version; + /** + * Key/value pairs of strings with additional information about the + component. These values are intended for informational purposes + only, and their content is not defined, and not part of the API + specification. + + These messages can be printed by the client as information to the user. + + * + * @var mixed|null + */ + protected $details; + /** + * Name of the component + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * Name of the component + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * Version of the component + * + * @return string|null + */ + public function getVersion(): ?string + { + return $this->version; + } + /** + * Version of the component + * + * @param string|null $version + * + * @return self + */ + public function setVersion(?string $version): self + { + $this->initialized['version'] = true; + $this->version = $version; + return $this; + } + /** + * Key/value pairs of strings with additional information about the + component. These values are intended for informational purposes + only, and their content is not defined, and not part of the API + specification. + + These messages can be printed by the client as information to the user. + + * + * @return mixed + */ + public function getDetails() + { + return $this->details; + } + /** + * Key/value pairs of strings with additional information about the + component. These values are intended for informational purposes + only, and their content is not defined, and not part of the API + specification. + + These messages can be printed by the client as information to the user. + + * + * @param mixed $details + * + * @return self + */ + public function setDetails($details): self + { + $this->initialized['details'] = true; + $this->details = $details; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/ContainerSummaryItemHostConfig.php b/generated/Model/SystemVersionPlatform.php similarity index 56% rename from generated/Model/ContainerSummaryItemHostConfig.php rename to generated/Model/SystemVersionPlatform.php index d50dbb9e2..a454ca5e8 100644 --- a/generated/Model/ContainerSummaryItemHostConfig.php +++ b/generated/Model/SystemVersionPlatform.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class ContainerSummaryItemHostConfig +class SystemVersionPlatform { /** * @var array @@ -17,27 +17,27 @@ public function isInitialized($property): bool * * @var string|null */ - protected $networkMode; + protected $name; /** * * * @return string|null */ - public function getNetworkMode(): ?string + public function getName(): ?string { - return $this->networkMode; + return $this->name; } /** * * - * @param string|null $networkMode + * @param string|null $name * * @return self */ - public function setNetworkMode(?string $networkMode): self + public function setName(?string $name): self { - $this->initialized['networkMode'] = true; - $this->networkMode = $networkMode; + $this->initialized['name'] = true; + $this->name = $name; return $this; } } \ No newline at end of file diff --git a/generated/Model/TLSInfo.php b/generated/Model/TLSInfo.php new file mode 100644 index 000000000..2ed425120 --- /dev/null +++ b/generated/Model/TLSInfo.php @@ -0,0 +1,105 @@ +initialized); + } + /** + * The root CA certificate(s) that are used to validate leaf TLS + certificates. + + * + * @var string|null + */ + protected $trustRoot; + /** + * The base64-url-safe-encoded raw subject bytes of the issuer. + * + * @var string|null + */ + protected $certIssuerSubject; + /** + * The base64-url-safe-encoded raw public key bytes of the issuer. + * + * @var string|null + */ + protected $certIssuerPublicKey; + /** + * The root CA certificate(s) that are used to validate leaf TLS + certificates. + + * + * @return string|null + */ + public function getTrustRoot(): ?string + { + return $this->trustRoot; + } + /** + * The root CA certificate(s) that are used to validate leaf TLS + certificates. + + * + * @param string|null $trustRoot + * + * @return self + */ + public function setTrustRoot(?string $trustRoot): self + { + $this->initialized['trustRoot'] = true; + $this->trustRoot = $trustRoot; + return $this; + } + /** + * The base64-url-safe-encoded raw subject bytes of the issuer. + * + * @return string|null + */ + public function getCertIssuerSubject(): ?string + { + return $this->certIssuerSubject; + } + /** + * The base64-url-safe-encoded raw subject bytes of the issuer. + * + * @param string|null $certIssuerSubject + * + * @return self + */ + public function setCertIssuerSubject(?string $certIssuerSubject): self + { + $this->initialized['certIssuerSubject'] = true; + $this->certIssuerSubject = $certIssuerSubject; + return $this; + } + /** + * The base64-url-safe-encoded raw public key bytes of the issuer. + * + * @return string|null + */ + public function getCertIssuerPublicKey(): ?string + { + return $this->certIssuerPublicKey; + } + /** + * The base64-url-safe-encoded raw public key bytes of the issuer. + * + * @param string|null $certIssuerPublicKey + * + * @return self + */ + public function setCertIssuerPublicKey(?string $certIssuerPublicKey): self + { + $this->initialized['certIssuerPublicKey'] = true; + $this->certIssuerPublicKey = $certIssuerPublicKey; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/Task.php b/generated/Model/Task.php index 0b7c4a4e6..954aca608 100644 --- a/generated/Model/Task.php +++ b/generated/Model/Task.php @@ -19,10 +19,20 @@ public function isInitialized($property): bool */ protected $iD; /** - * - * - * @var TaskVersion|null - */ + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @var ObjectVersion|null + */ protected $version; /** * @@ -73,7 +83,15 @@ public function isInitialized($property): bool */ protected $nodeID; /** - * + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + String resources (e.g, `GPU=UUID1`). + + * + * @var list|null + */ + protected $assignedGenericResources; + /** + * represents the status of a task. * * @var TaskStatus|null */ @@ -84,6 +102,22 @@ public function isInitialized($property): bool * @var string|null */ protected $desiredState; + /** + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @var ObjectVersion|null + */ + protected $jobIteration; /** * The ID of the task. * @@ -107,22 +141,42 @@ public function setID(?string $iD): self return $this; } /** - * - * - * @return TaskVersion|null - */ - public function getVersion(): ?TaskVersion + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @return ObjectVersion|null + */ + public function getVersion(): ?ObjectVersion { return $this->version; } /** - * - * - * @param TaskVersion|null $version - * - * @return self - */ - public function setVersion(?TaskVersion $version): self + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @param ObjectVersion|null $version + * + * @return self + */ + public function setVersion(?ObjectVersion $version): self { $this->initialized['version'] = true; $this->version = $version; @@ -305,7 +359,33 @@ public function setNodeID(?string $nodeID): self return $this; } /** - * + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + String resources (e.g, `GPU=UUID1`). + + * + * @return list|null + */ + public function getAssignedGenericResources(): ?array + { + return $this->assignedGenericResources; + } + /** + * User-defined resources can be either Integer resources (e.g, `SSD=3`) or + String resources (e.g, `GPU=UUID1`). + + * + * @param list|null $assignedGenericResources + * + * @return self + */ + public function setAssignedGenericResources(?array $assignedGenericResources): self + { + $this->initialized['assignedGenericResources'] = true; + $this->assignedGenericResources = $assignedGenericResources; + return $this; + } + /** + * represents the status of a task. * * @return TaskStatus|null */ @@ -314,7 +394,7 @@ public function getStatus(): ?TaskStatus return $this->status; } /** - * + * represents the status of a task. * * @param TaskStatus|null $status * @@ -348,4 +428,46 @@ public function setDesiredState(?string $desiredState): self $this->desiredState = $desiredState; return $this; } + /** + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @return ObjectVersion|null + */ + public function getJobIteration(): ?ObjectVersion + { + return $this->jobIteration; + } + /** + * The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + + * + * @param ObjectVersion|null $jobIteration + * + * @return self + */ + public function setJobIteration(?ObjectVersion $jobIteration): self + { + $this->initialized['jobIteration'] = true; + $this->jobIteration = $jobIteration; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/TaskSpec.php b/generated/Model/TaskSpec.php index c0fba2aa9..e4225d3bf 100644 --- a/generated/Model/TaskSpec.php +++ b/generated/Model/TaskSpec.php @@ -13,22 +13,63 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * - * - * @var TaskSpecContainerSpec|null - */ + * Plugin spec for the service. *(Experimental release only.)* + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + + * + * @var TaskSpecPluginSpec|null + */ + protected $pluginSpec; + /** + * Container spec for the service. + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + + * + * @var TaskSpecContainerSpec|null + */ protected $containerSpec; /** - * Resource requirements which apply to each individual container created as part of the service. - * - * @var TaskSpecResources|null - */ + * Read-only spec type for non-swarm containers attached to swarm overlay + networks. + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + + * + * @var TaskSpecNetworkAttachmentSpec|null + */ + protected $networkAttachmentSpec; + /** + * Resource requirements which apply to each individual container created + as part of the service. + + * + * @var TaskSpecResources|null + */ protected $resources; /** - * Specification for the restart policy which applies to containers created as part of this service. - * - * @var TaskSpecRestartPolicy|null - */ + * Specification for the restart policy which applies to containers + created as part of this service. + + * + * @var TaskSpecRestartPolicy|null + */ protected $restartPolicy; /** * @@ -37,39 +78,104 @@ public function isInitialized($property): bool */ protected $placement; /** - * A counter that triggers an update even if no relevant parameters have been changed. - * - * @var int|null - */ + * A counter that triggers an update even if no relevant parameters have + been changed. + + * + * @var int|null + */ protected $forceUpdate; /** - * + * Runtime is the type of runtime specified for the task executor. * - * @var list|null + * @var string|null */ - protected $networks; + protected $runtime; /** - * Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified. + * Specifies which networks the service should attach to. * - * @var TaskSpecLogDriver|null + * @var list|null */ + protected $networks; + /** + * Specifies the log driver to use for tasks created from this spec. If + not present, the default one for the swarm will be used, finally + falling back to the engine default if not specified. + + * + * @var TaskSpecLogDriver|null + */ protected $logDriver; /** - * - * - * @return TaskSpecContainerSpec|null - */ + * Plugin spec for the service. *(Experimental release only.)* + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + + * + * @return TaskSpecPluginSpec|null + */ + public function getPluginSpec(): ?TaskSpecPluginSpec + { + return $this->pluginSpec; + } + /** + * Plugin spec for the service. *(Experimental release only.)* + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + + * + * @param TaskSpecPluginSpec|null $pluginSpec + * + * @return self + */ + public function setPluginSpec(?TaskSpecPluginSpec $pluginSpec): self + { + $this->initialized['pluginSpec'] = true; + $this->pluginSpec = $pluginSpec; + return $this; + } + /** + * Container spec for the service. + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + + * + * @return TaskSpecContainerSpec|null + */ public function getContainerSpec(): ?TaskSpecContainerSpec { return $this->containerSpec; } /** - * - * - * @param TaskSpecContainerSpec|null $containerSpec - * - * @return self - */ + * Container spec for the service. + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + + * + * @param TaskSpecContainerSpec|null $containerSpec + * + * @return self + */ public function setContainerSpec(?TaskSpecContainerSpec $containerSpec): self { $this->initialized['containerSpec'] = true; @@ -77,21 +183,65 @@ public function setContainerSpec(?TaskSpecContainerSpec $containerSpec): self return $this; } /** - * Resource requirements which apply to each individual container created as part of the service. - * - * @return TaskSpecResources|null - */ + * Read-only spec type for non-swarm containers attached to swarm overlay + networks. + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + + * + * @return TaskSpecNetworkAttachmentSpec|null + */ + public function getNetworkAttachmentSpec(): ?TaskSpecNetworkAttachmentSpec + { + return $this->networkAttachmentSpec; + } + /** + * Read-only spec type for non-swarm containers attached to swarm overlay + networks. + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + + * + * @param TaskSpecNetworkAttachmentSpec|null $networkAttachmentSpec + * + * @return self + */ + public function setNetworkAttachmentSpec(?TaskSpecNetworkAttachmentSpec $networkAttachmentSpec): self + { + $this->initialized['networkAttachmentSpec'] = true; + $this->networkAttachmentSpec = $networkAttachmentSpec; + return $this; + } + /** + * Resource requirements which apply to each individual container created + as part of the service. + + * + * @return TaskSpecResources|null + */ public function getResources(): ?TaskSpecResources { return $this->resources; } /** - * Resource requirements which apply to each individual container created as part of the service. - * - * @param TaskSpecResources|null $resources - * - * @return self - */ + * Resource requirements which apply to each individual container created + as part of the service. + + * + * @param TaskSpecResources|null $resources + * + * @return self + */ public function setResources(?TaskSpecResources $resources): self { $this->initialized['resources'] = true; @@ -99,21 +249,25 @@ public function setResources(?TaskSpecResources $resources): self return $this; } /** - * Specification for the restart policy which applies to containers created as part of this service. - * - * @return TaskSpecRestartPolicy|null - */ + * Specification for the restart policy which applies to containers + created as part of this service. + + * + * @return TaskSpecRestartPolicy|null + */ public function getRestartPolicy(): ?TaskSpecRestartPolicy { return $this->restartPolicy; } /** - * Specification for the restart policy which applies to containers created as part of this service. - * - * @param TaskSpecRestartPolicy|null $restartPolicy - * - * @return self - */ + * Specification for the restart policy which applies to containers + created as part of this service. + + * + * @param TaskSpecRestartPolicy|null $restartPolicy + * + * @return self + */ public function setRestartPolicy(?TaskSpecRestartPolicy $restartPolicy): self { $this->initialized['restartPolicy'] = true; @@ -143,40 +297,66 @@ public function setPlacement(?TaskSpecPlacement $placement): self return $this; } /** - * A counter that triggers an update even if no relevant parameters have been changed. - * - * @return int|null - */ + * A counter that triggers an update even if no relevant parameters have + been changed. + + * + * @return int|null + */ public function getForceUpdate(): ?int { return $this->forceUpdate; } /** - * A counter that triggers an update even if no relevant parameters have been changed. + * A counter that triggers an update even if no relevant parameters have + been changed. + + * + * @param int|null $forceUpdate + * + * @return self + */ + public function setForceUpdate(?int $forceUpdate): self + { + $this->initialized['forceUpdate'] = true; + $this->forceUpdate = $forceUpdate; + return $this; + } + /** + * Runtime is the type of runtime specified for the task executor. * - * @param int|null $forceUpdate + * @return string|null + */ + public function getRuntime(): ?string + { + return $this->runtime; + } + /** + * Runtime is the type of runtime specified for the task executor. + * + * @param string|null $runtime * * @return self */ - public function setForceUpdate(?int $forceUpdate): self + public function setRuntime(?string $runtime): self { - $this->initialized['forceUpdate'] = true; - $this->forceUpdate = $forceUpdate; + $this->initialized['runtime'] = true; + $this->runtime = $runtime; return $this; } /** - * + * Specifies which networks the service should attach to. * - * @return list|null + * @return list|null */ public function getNetworks(): ?array { return $this->networks; } /** - * + * Specifies which networks the service should attach to. * - * @param list|null $networks + * @param list|null $networks * * @return self */ @@ -187,21 +367,27 @@ public function setNetworks(?array $networks): self return $this; } /** - * Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified. - * - * @return TaskSpecLogDriver|null - */ + * Specifies the log driver to use for tasks created from this spec. If + not present, the default one for the swarm will be used, finally + falling back to the engine default if not specified. + + * + * @return TaskSpecLogDriver|null + */ public function getLogDriver(): ?TaskSpecLogDriver { return $this->logDriver; } /** - * Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified. - * - * @param TaskSpecLogDriver|null $logDriver - * - * @return self - */ + * Specifies the log driver to use for tasks created from this spec. If + not present, the default one for the swarm will be used, finally + falling back to the engine default if not specified. + + * + * @param TaskSpecLogDriver|null $logDriver + * + * @return self + */ public function setLogDriver(?TaskSpecLogDriver $logDriver): self { $this->initialized['logDriver'] = true; diff --git a/generated/Model/TaskSpecContainerSpec.php b/generated/Model/TaskSpecContainerSpec.php index fe97adac5..18bfa5aba 100644 --- a/generated/Model/TaskSpecContainerSpec.php +++ b/generated/Model/TaskSpecContainerSpec.php @@ -13,11 +13,17 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * The image name to use for the container. + * The image name to use for the container * * @var string|null */ protected $image; + /** + * User-defined key/value data. + * + * @var array|null + */ + protected $labels; /** * The command to be run in the image. * @@ -30,6 +36,14 @@ public function isInitialized($property): bool * @var list|null */ protected $args; + /** + * The hostname to use for the container, as a valid + [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. + + * + * @var string|null + */ + protected $hostname; /** * A list of environment variables in the form `VAR=value`. * @@ -49,11 +63,17 @@ public function isInitialized($property): bool */ protected $user; /** - * User-defined key/value data. + * A list of additional groups that the container process will run as. * - * @var array|null + * @var list|null */ - protected $labels; + protected $groups; + /** + * Security options for the container + * + * @var TaskSpecContainerSpecPrivileges|null + */ + protected $privileges; /** * Whether a pseudo-TTY should be allocated. * @@ -61,25 +81,143 @@ public function isInitialized($property): bool */ protected $tTY; /** - * Specification for mounts to be added to containers created as part of the service. + * Open `stdin` * - * @var list|null + * @var bool|null */ - protected $mounts; + protected $openStdin; /** - * Amount of time to wait for the container to terminate before forcefully killing it. + * Mount the container's root filesystem as read only. * - * @var int|null + * @var bool|null */ - protected $stopGracePeriod; + protected $readOnly; + /** + * Specification for mounts to be added to containers created as part + of the service. + + * + * @var list|null + */ + protected $mounts; /** - * Specification for DNS related configurations in resolver configuration file (`resolv.conf`). + * Signal to stop the container. * - * @var TaskSpecContainerSpecDNSConfig|null + * @var string|null */ + protected $stopSignal; + /** + * Amount of time to wait for the container to terminate before + forcefully killing it. + + * + * @var int|null + */ + protected $stopGracePeriod; + /** + * A test to perform to check that the container is healthy. + * + * @var HealthConfig|null + */ + protected $healthCheck; + /** + * A list of hostname/IP mappings to add to the container's `hosts` + file. The format of extra hosts is specified in the + [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) + man page: + + IP_address canonical_hostname [aliases...] + + * + * @var list|null + */ + protected $hosts; + /** + * Specification for DNS related configurations in resolver configuration + file (`resolv.conf`). + + * + * @var TaskSpecContainerSpecDNSConfig|null + */ protected $dNSConfig; /** - * The image name to use for the container. + * Secrets contains references to zero or more secrets that will be + exposed to the service. + + * + * @var list|null + */ + protected $secrets; + /** + * An integer value containing the score given to the container in + order to tune OOM killer preferences. + + * + * @var int|null + */ + protected $oomScoreAdj; + /** + * Configs contains references to zero or more configs that will be + exposed to the service. + + * + * @var list|null + */ + protected $configs; + /** + * Isolation technology of the containers running the service. + (Windows only) + + * + * @var string|null + */ + protected $isolation; + /** + * Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + + * + * @var bool|null + */ + protected $init; + /** + * Set kernel namedspaced parameters (sysctls) in the container. + The Sysctls option on services accepts the same sysctls as the + are supported on containers. Note that while the same sysctls are + supported, no guarantees or checks are made about their + suitability for a clustered environment, and it's up to the user + to determine whether a given sysctl will work properly in a + Service. + + * + * @var array|null + */ + protected $sysctls; + /** + * A list of kernel capabilities to add to the default set + for the container. + + * + * @var list|null + */ + protected $capabilityAdd; + /** + * A list of kernel capabilities to drop from the default set + for the container. + + * + * @var list|null + */ + protected $capabilityDrop; + /** + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + * + * @var list|null + */ + protected $ulimits; + /** + * The image name to use for the container * * @return string|null */ @@ -88,7 +226,7 @@ public function getImage(): ?string return $this->image; } /** - * The image name to use for the container. + * The image name to use for the container * * @param string|null $image * @@ -100,6 +238,28 @@ public function setImage(?string $image): self $this->image = $image; return $this; } + /** + * User-defined key/value data. + * + * @return array|null + */ + public function getLabels(): ?iterable + { + return $this->labels; + } + /** + * User-defined key/value data. + * + * @param array|null $labels + * + * @return self + */ + public function setLabels(?iterable $labels): self + { + $this->initialized['labels'] = true; + $this->labels = $labels; + return $this; + } /** * The command to be run in the image. * @@ -144,6 +304,32 @@ public function setArgs(?array $args): self $this->args = $args; return $this; } + /** + * The hostname to use for the container, as a valid + [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. + + * + * @return string|null + */ + public function getHostname(): ?string + { + return $this->hostname; + } + /** + * The hostname to use for the container, as a valid + [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. + + * + * @param string|null $hostname + * + * @return self + */ + public function setHostname(?string $hostname): self + { + $this->initialized['hostname'] = true; + $this->hostname = $hostname; + return $this; + } /** * A list of environment variables in the form `VAR=value`. * @@ -211,25 +397,47 @@ public function setUser(?string $user): self return $this; } /** - * User-defined key/value data. + * A list of additional groups that the container process will run as. * - * @return array|null + * @return list|null */ - public function getLabels(): ?iterable + public function getGroups(): ?array { - return $this->labels; + return $this->groups; } /** - * User-defined key/value data. + * A list of additional groups that the container process will run as. * - * @param array|null $labels + * @param list|null $groups * * @return self */ - public function setLabels(?iterable $labels): self + public function setGroups(?array $groups): self { - $this->initialized['labels'] = true; - $this->labels = $labels; + $this->initialized['groups'] = true; + $this->groups = $groups; + return $this; + } + /** + * Security options for the container + * + * @return TaskSpecContainerSpecPrivileges|null + */ + public function getPrivileges(): ?TaskSpecContainerSpecPrivileges + { + return $this->privileges; + } + /** + * Security options for the container + * + * @param TaskSpecContainerSpecPrivileges|null $privileges + * + * @return self + */ + public function setPrivileges(?TaskSpecContainerSpecPrivileges $privileges): self + { + $this->initialized['privileges'] = true; + $this->privileges = $privileges; return $this; } /** @@ -255,21 +463,69 @@ public function setTTY(?bool $tTY): self return $this; } /** - * Specification for mounts to be added to containers created as part of the service. + * Open `stdin` * - * @return list|null + * @return bool|null */ - public function getMounts(): ?array + public function getOpenStdin(): ?bool { - return $this->mounts; + return $this->openStdin; } /** - * Specification for mounts to be added to containers created as part of the service. + * Open `stdin` * - * @param list|null $mounts + * @param bool|null $openStdin * * @return self */ + public function setOpenStdin(?bool $openStdin): self + { + $this->initialized['openStdin'] = true; + $this->openStdin = $openStdin; + return $this; + } + /** + * Mount the container's root filesystem as read only. + * + * @return bool|null + */ + public function getReadOnly(): ?bool + { + return $this->readOnly; + } + /** + * Mount the container's root filesystem as read only. + * + * @param bool|null $readOnly + * + * @return self + */ + public function setReadOnly(?bool $readOnly): self + { + $this->initialized['readOnly'] = true; + $this->readOnly = $readOnly; + return $this; + } + /** + * Specification for mounts to be added to containers created as part + of the service. + + * + * @return list|null + */ + public function getMounts(): ?array + { + return $this->mounts; + } + /** + * Specification for mounts to be added to containers created as part + of the service. + + * + * @param list|null $mounts + * + * @return self + */ public function setMounts(?array $mounts): self { $this->initialized['mounts'] = true; @@ -277,21 +533,47 @@ public function setMounts(?array $mounts): self return $this; } /** - * Amount of time to wait for the container to terminate before forcefully killing it. + * Signal to stop the container. * - * @return int|null + * @return string|null */ - public function getStopGracePeriod(): ?int + public function getStopSignal(): ?string { - return $this->stopGracePeriod; + return $this->stopSignal; } /** - * Amount of time to wait for the container to terminate before forcefully killing it. + * Signal to stop the container. * - * @param int|null $stopGracePeriod + * @param string|null $stopSignal * * @return self */ + public function setStopSignal(?string $stopSignal): self + { + $this->initialized['stopSignal'] = true; + $this->stopSignal = $stopSignal; + return $this; + } + /** + * Amount of time to wait for the container to terminate before + forcefully killing it. + + * + * @return int|null + */ + public function getStopGracePeriod(): ?int + { + return $this->stopGracePeriod; + } + /** + * Amount of time to wait for the container to terminate before + forcefully killing it. + + * + * @param int|null $stopGracePeriod + * + * @return self + */ public function setStopGracePeriod(?int $stopGracePeriod): self { $this->initialized['stopGracePeriod'] = true; @@ -299,25 +581,327 @@ public function setStopGracePeriod(?int $stopGracePeriod): self return $this; } /** - * Specification for DNS related configurations in resolver configuration file (`resolv.conf`). + * A test to perform to check that the container is healthy. * - * @return TaskSpecContainerSpecDNSConfig|null + * @return HealthConfig|null */ - public function getDNSConfig(): ?TaskSpecContainerSpecDNSConfig + public function getHealthCheck(): ?HealthConfig { - return $this->dNSConfig; + return $this->healthCheck; } /** - * Specification for DNS related configurations in resolver configuration file (`resolv.conf`). + * A test to perform to check that the container is healthy. * - * @param TaskSpecContainerSpecDNSConfig|null $dNSConfig + * @param HealthConfig|null $healthCheck * * @return self */ + public function setHealthCheck(?HealthConfig $healthCheck): self + { + $this->initialized['healthCheck'] = true; + $this->healthCheck = $healthCheck; + return $this; + } + /** + * A list of hostname/IP mappings to add to the container's `hosts` + file. The format of extra hosts is specified in the + [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) + man page: + + IP_address canonical_hostname [aliases...] + + * + * @return list|null + */ + public function getHosts(): ?array + { + return $this->hosts; + } + /** + * A list of hostname/IP mappings to add to the container's `hosts` + file. The format of extra hosts is specified in the + [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) + man page: + + IP_address canonical_hostname [aliases...] + + * + * @param list|null $hosts + * + * @return self + */ + public function setHosts(?array $hosts): self + { + $this->initialized['hosts'] = true; + $this->hosts = $hosts; + return $this; + } + /** + * Specification for DNS related configurations in resolver configuration + file (`resolv.conf`). + + * + * @return TaskSpecContainerSpecDNSConfig|null + */ + public function getDNSConfig(): ?TaskSpecContainerSpecDNSConfig + { + return $this->dNSConfig; + } + /** + * Specification for DNS related configurations in resolver configuration + file (`resolv.conf`). + + * + * @param TaskSpecContainerSpecDNSConfig|null $dNSConfig + * + * @return self + */ public function setDNSConfig(?TaskSpecContainerSpecDNSConfig $dNSConfig): self { $this->initialized['dNSConfig'] = true; $this->dNSConfig = $dNSConfig; return $this; } + /** + * Secrets contains references to zero or more secrets that will be + exposed to the service. + + * + * @return list|null + */ + public function getSecrets(): ?array + { + return $this->secrets; + } + /** + * Secrets contains references to zero or more secrets that will be + exposed to the service. + + * + * @param list|null $secrets + * + * @return self + */ + public function setSecrets(?array $secrets): self + { + $this->initialized['secrets'] = true; + $this->secrets = $secrets; + return $this; + } + /** + * An integer value containing the score given to the container in + order to tune OOM killer preferences. + + * + * @return int|null + */ + public function getOomScoreAdj(): ?int + { + return $this->oomScoreAdj; + } + /** + * An integer value containing the score given to the container in + order to tune OOM killer preferences. + + * + * @param int|null $oomScoreAdj + * + * @return self + */ + public function setOomScoreAdj(?int $oomScoreAdj): self + { + $this->initialized['oomScoreAdj'] = true; + $this->oomScoreAdj = $oomScoreAdj; + return $this; + } + /** + * Configs contains references to zero or more configs that will be + exposed to the service. + + * + * @return list|null + */ + public function getConfigs(): ?array + { + return $this->configs; + } + /** + * Configs contains references to zero or more configs that will be + exposed to the service. + + * + * @param list|null $configs + * + * @return self + */ + public function setConfigs(?array $configs): self + { + $this->initialized['configs'] = true; + $this->configs = $configs; + return $this; + } + /** + * Isolation technology of the containers running the service. + (Windows only) + + * + * @return string|null + */ + public function getIsolation(): ?string + { + return $this->isolation; + } + /** + * Isolation technology of the containers running the service. + (Windows only) + + * + * @param string|null $isolation + * + * @return self + */ + public function setIsolation(?string $isolation): self + { + $this->initialized['isolation'] = true; + $this->isolation = $isolation; + return $this; + } + /** + * Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + + * + * @return bool|null + */ + public function getInit(): ?bool + { + return $this->init; + } + /** + * Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + + * + * @param bool|null $init + * + * @return self + */ + public function setInit(?bool $init): self + { + $this->initialized['init'] = true; + $this->init = $init; + return $this; + } + /** + * Set kernel namedspaced parameters (sysctls) in the container. + The Sysctls option on services accepts the same sysctls as the + are supported on containers. Note that while the same sysctls are + supported, no guarantees or checks are made about their + suitability for a clustered environment, and it's up to the user + to determine whether a given sysctl will work properly in a + Service. + + * + * @return array|null + */ + public function getSysctls(): ?iterable + { + return $this->sysctls; + } + /** + * Set kernel namedspaced parameters (sysctls) in the container. + The Sysctls option on services accepts the same sysctls as the + are supported on containers. Note that while the same sysctls are + supported, no guarantees or checks are made about their + suitability for a clustered environment, and it's up to the user + to determine whether a given sysctl will work properly in a + Service. + + * + * @param array|null $sysctls + * + * @return self + */ + public function setSysctls(?iterable $sysctls): self + { + $this->initialized['sysctls'] = true; + $this->sysctls = $sysctls; + return $this; + } + /** + * A list of kernel capabilities to add to the default set + for the container. + + * + * @return list|null + */ + public function getCapabilityAdd(): ?array + { + return $this->capabilityAdd; + } + /** + * A list of kernel capabilities to add to the default set + for the container. + + * + * @param list|null $capabilityAdd + * + * @return self + */ + public function setCapabilityAdd(?array $capabilityAdd): self + { + $this->initialized['capabilityAdd'] = true; + $this->capabilityAdd = $capabilityAdd; + return $this; + } + /** + * A list of kernel capabilities to drop from the default set + for the container. + + * + * @return list|null + */ + public function getCapabilityDrop(): ?array + { + return $this->capabilityDrop; + } + /** + * A list of kernel capabilities to drop from the default set + for the container. + + * + * @param list|null $capabilityDrop + * + * @return self + */ + public function setCapabilityDrop(?array $capabilityDrop): self + { + $this->initialized['capabilityDrop'] = true; + $this->capabilityDrop = $capabilityDrop; + return $this; + } + /** + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + * + * @return list|null + */ + public function getUlimits(): ?array + { + return $this->ulimits; + } + /** + * A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + * + * @param list|null $ulimits + * + * @return self + */ + public function setUlimits(?array $ulimits): self + { + $this->initialized['ulimits'] = true; + $this->ulimits = $ulimits; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/TaskSpecContainerSpecConfigsItem.php b/generated/Model/TaskSpecContainerSpecConfigsItem.php new file mode 100644 index 000000000..1710292bc --- /dev/null +++ b/generated/Model/TaskSpecContainerSpecConfigsItem.php @@ -0,0 +1,178 @@ +initialized); + } + /** + * File represents a specific target that is backed by a file. + +


+ + > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive + + * + * @var TaskSpecContainerSpecConfigsItemFile|null + */ + protected $file; + /** + * Runtime represents a target that is not mounted into the + container but is used by the task + +


+ + > **Note**: `Configs.File` and `Configs.Runtime` are mutually + > exclusive + + * + * @var mixed|null + */ + protected $runtime; + /** + * ConfigID represents the ID of the specific config that we're + referencing. + + * + * @var string|null + */ + protected $configID; + /** + * ConfigName is the name of the config that this references, + but this is just provided for lookup/display purposes. The + config in the reference will be identified by its ID. + + * + * @var string|null + */ + protected $configName; + /** + * File represents a specific target that is backed by a file. + +


+ + > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive + + * + * @return TaskSpecContainerSpecConfigsItemFile|null + */ + public function getFile(): ?TaskSpecContainerSpecConfigsItemFile + { + return $this->file; + } + /** + * File represents a specific target that is backed by a file. + +


+ + > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive + + * + * @param TaskSpecContainerSpecConfigsItemFile|null $file + * + * @return self + */ + public function setFile(?TaskSpecContainerSpecConfigsItemFile $file): self + { + $this->initialized['file'] = true; + $this->file = $file; + return $this; + } + /** + * Runtime represents a target that is not mounted into the + container but is used by the task + +


+ + > **Note**: `Configs.File` and `Configs.Runtime` are mutually + > exclusive + + * + * @return mixed + */ + public function getRuntime() + { + return $this->runtime; + } + /** + * Runtime represents a target that is not mounted into the + container but is used by the task + +


+ + > **Note**: `Configs.File` and `Configs.Runtime` are mutually + > exclusive + + * + * @param mixed $runtime + * + * @return self + */ + public function setRuntime($runtime): self + { + $this->initialized['runtime'] = true; + $this->runtime = $runtime; + return $this; + } + /** + * ConfigID represents the ID of the specific config that we're + referencing. + + * + * @return string|null + */ + public function getConfigID(): ?string + { + return $this->configID; + } + /** + * ConfigID represents the ID of the specific config that we're + referencing. + + * + * @param string|null $configID + * + * @return self + */ + public function setConfigID(?string $configID): self + { + $this->initialized['configID'] = true; + $this->configID = $configID; + return $this; + } + /** + * ConfigName is the name of the config that this references, + but this is just provided for lookup/display purposes. The + config in the reference will be identified by its ID. + + * + * @return string|null + */ + public function getConfigName(): ?string + { + return $this->configName; + } + /** + * ConfigName is the name of the config that this references, + but this is just provided for lookup/display purposes. The + config in the reference will be identified by its ID. + + * + * @param string|null $configName + * + * @return self + */ + public function setConfigName(?string $configName): self + { + $this->initialized['configName'] = true; + $this->configName = $configName; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecContainerSpecConfigsItemFile.php b/generated/Model/TaskSpecContainerSpecConfigsItemFile.php new file mode 100644 index 000000000..14f86ed71 --- /dev/null +++ b/generated/Model/TaskSpecContainerSpecConfigsItemFile.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * Name represents the final filename in the filesystem. + * + * @var string|null + */ + protected $name; + /** + * UID represents the file UID. + * + * @var string|null + */ + protected $uID; + /** + * GID represents the file GID. + * + * @var string|null + */ + protected $gID; + /** + * Mode represents the FileMode of the file. + * + * @var int|null + */ + protected $mode; + /** + * Name represents the final filename in the filesystem. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * Name represents the final filename in the filesystem. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * UID represents the file UID. + * + * @return string|null + */ + public function getUID(): ?string + { + return $this->uID; + } + /** + * UID represents the file UID. + * + * @param string|null $uID + * + * @return self + */ + public function setUID(?string $uID): self + { + $this->initialized['uID'] = true; + $this->uID = $uID; + return $this; + } + /** + * GID represents the file GID. + * + * @return string|null + */ + public function getGID(): ?string + { + return $this->gID; + } + /** + * GID represents the file GID. + * + * @param string|null $gID + * + * @return self + */ + public function setGID(?string $gID): self + { + $this->initialized['gID'] = true; + $this->gID = $gID; + return $this; + } + /** + * Mode represents the FileMode of the file. + * + * @return int|null + */ + public function getMode(): ?int + { + return $this->mode; + } + /** + * Mode represents the FileMode of the file. + * + * @param int|null $mode + * + * @return self + */ + public function setMode(?int $mode): self + { + $this->initialized['mode'] = true; + $this->mode = $mode; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecContainerSpecDNSConfig.php b/generated/Model/TaskSpecContainerSpecDNSConfig.php index 730b5e301..5ee8a0fc8 100644 --- a/generated/Model/TaskSpecContainerSpecDNSConfig.php +++ b/generated/Model/TaskSpecContainerSpecDNSConfig.php @@ -25,10 +25,12 @@ public function isInitialized($property): bool */ protected $search; /** - * A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.). - * - * @var list|null - */ + * A list of internal resolver variables to be modified (e.g., + `debug`, `ndots:3`, etc.). + + * + * @var list|null + */ protected $options; /** * The IP addresses of the name servers. @@ -75,21 +77,25 @@ public function setSearch(?array $search): self return $this; } /** - * A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.). - * - * @return list|null - */ + * A list of internal resolver variables to be modified (e.g., + `debug`, `ndots:3`, etc.). + + * + * @return list|null + */ public function getOptions(): ?array { return $this->options; } /** - * A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.). - * - * @param list|null $options - * - * @return self - */ + * A list of internal resolver variables to be modified (e.g., + `debug`, `ndots:3`, etc.). + + * + * @param list|null $options + * + * @return self + */ public function setOptions(?array $options): self { $this->initialized['options'] = true; diff --git a/generated/Model/TaskSpecContainerSpecPrivileges.php b/generated/Model/TaskSpecContainerSpecPrivileges.php new file mode 100644 index 000000000..e633ebbb7 --- /dev/null +++ b/generated/Model/TaskSpecContainerSpecPrivileges.php @@ -0,0 +1,155 @@ +initialized); + } + /** + * CredentialSpec for managed service account (Windows only) + * + * @var TaskSpecContainerSpecPrivilegesCredentialSpec|null + */ + protected $credentialSpec; + /** + * SELinux labels of the container + * + * @var TaskSpecContainerSpecPrivilegesSELinuxContext|null + */ + protected $sELinuxContext; + /** + * Options for configuring seccomp on the container + * + * @var TaskSpecContainerSpecPrivilegesSeccomp|null + */ + protected $seccomp; + /** + * Options for configuring AppArmor on the container + * + * @var TaskSpecContainerSpecPrivilegesAppArmor|null + */ + protected $appArmor; + /** + * Configuration of the no_new_privs bit in the container + * + * @var bool|null + */ + protected $noNewPrivileges; + /** + * CredentialSpec for managed service account (Windows only) + * + * @return TaskSpecContainerSpecPrivilegesCredentialSpec|null + */ + public function getCredentialSpec(): ?TaskSpecContainerSpecPrivilegesCredentialSpec + { + return $this->credentialSpec; + } + /** + * CredentialSpec for managed service account (Windows only) + * + * @param TaskSpecContainerSpecPrivilegesCredentialSpec|null $credentialSpec + * + * @return self + */ + public function setCredentialSpec(?TaskSpecContainerSpecPrivilegesCredentialSpec $credentialSpec): self + { + $this->initialized['credentialSpec'] = true; + $this->credentialSpec = $credentialSpec; + return $this; + } + /** + * SELinux labels of the container + * + * @return TaskSpecContainerSpecPrivilegesSELinuxContext|null + */ + public function getSELinuxContext(): ?TaskSpecContainerSpecPrivilegesSELinuxContext + { + return $this->sELinuxContext; + } + /** + * SELinux labels of the container + * + * @param TaskSpecContainerSpecPrivilegesSELinuxContext|null $sELinuxContext + * + * @return self + */ + public function setSELinuxContext(?TaskSpecContainerSpecPrivilegesSELinuxContext $sELinuxContext): self + { + $this->initialized['sELinuxContext'] = true; + $this->sELinuxContext = $sELinuxContext; + return $this; + } + /** + * Options for configuring seccomp on the container + * + * @return TaskSpecContainerSpecPrivilegesSeccomp|null + */ + public function getSeccomp(): ?TaskSpecContainerSpecPrivilegesSeccomp + { + return $this->seccomp; + } + /** + * Options for configuring seccomp on the container + * + * @param TaskSpecContainerSpecPrivilegesSeccomp|null $seccomp + * + * @return self + */ + public function setSeccomp(?TaskSpecContainerSpecPrivilegesSeccomp $seccomp): self + { + $this->initialized['seccomp'] = true; + $this->seccomp = $seccomp; + return $this; + } + /** + * Options for configuring AppArmor on the container + * + * @return TaskSpecContainerSpecPrivilegesAppArmor|null + */ + public function getAppArmor(): ?TaskSpecContainerSpecPrivilegesAppArmor + { + return $this->appArmor; + } + /** + * Options for configuring AppArmor on the container + * + * @param TaskSpecContainerSpecPrivilegesAppArmor|null $appArmor + * + * @return self + */ + public function setAppArmor(?TaskSpecContainerSpecPrivilegesAppArmor $appArmor): self + { + $this->initialized['appArmor'] = true; + $this->appArmor = $appArmor; + return $this; + } + /** + * Configuration of the no_new_privs bit in the container + * + * @return bool|null + */ + public function getNoNewPrivileges(): ?bool + { + return $this->noNewPrivileges; + } + /** + * Configuration of the no_new_privs bit in the container + * + * @param bool|null $noNewPrivileges + * + * @return self + */ + public function setNoNewPrivileges(?bool $noNewPrivileges): self + { + $this->initialized['noNewPrivileges'] = true; + $this->noNewPrivileges = $noNewPrivileges; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/NodeVersion.php b/generated/Model/TaskSpecContainerSpecPrivilegesAppArmor.php similarity index 54% rename from generated/Model/NodeVersion.php rename to generated/Model/TaskSpecContainerSpecPrivilegesAppArmor.php index 6b6b06660..3fdc1d0f0 100644 --- a/generated/Model/NodeVersion.php +++ b/generated/Model/TaskSpecContainerSpecPrivilegesAppArmor.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class NodeVersion +class TaskSpecContainerSpecPrivilegesAppArmor { /** * @var array @@ -15,29 +15,29 @@ public function isInitialized($property): bool /** * * - * @var int|null + * @var string|null */ - protected $index; + protected $mode; /** * * - * @return int|null + * @return string|null */ - public function getIndex(): ?int + public function getMode(): ?string { - return $this->index; + return $this->mode; } /** * * - * @param int|null $index + * @param string|null $mode * * @return self */ - public function setIndex(?int $index): self + public function setMode(?string $mode): self { - $this->initialized['index'] = true; - $this->index = $index; + $this->initialized['mode'] = true; + $this->mode = $mode; return $this; } } \ No newline at end of file diff --git a/generated/Model/TaskSpecContainerSpecPrivilegesCredentialSpec.php b/generated/Model/TaskSpecContainerSpecPrivilegesCredentialSpec.php new file mode 100644 index 000000000..1f8b77d7c --- /dev/null +++ b/generated/Model/TaskSpecContainerSpecPrivilegesCredentialSpec.php @@ -0,0 +1,192 @@ +initialized); + } + /** + * Load credential spec from a Swarm Config with the given ID. + The specified config must also be present in the Configs + field with the Runtime property set. + +


+ + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + + * + * @var string|null + */ + protected $config; + /** + * Load credential spec from this file. The file is read by + the daemon, and must be present in the `CredentialSpecs` + subdirectory in the docker data directory, which defaults + to `C:\ProgramData\Docker\` on Windows. + + For example, specifying `spec.json` loads + `C:\ProgramData\Docker\CredentialSpecs\spec.json`. + +


+ + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + + * + * @var string|null + */ + protected $file; + /** + * Load credential spec from this value in the Windows + registry. The specified registry value must be located in: + + `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` + +


+ + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + + * + * @var string|null + */ + protected $registry; + /** + * Load credential spec from a Swarm Config with the given ID. + The specified config must also be present in the Configs + field with the Runtime property set. + +


+ + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + + * + * @return string|null + */ + public function getConfig(): ?string + { + return $this->config; + } + /** + * Load credential spec from a Swarm Config with the given ID. + The specified config must also be present in the Configs + field with the Runtime property set. + +


+ + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + + * + * @param string|null $config + * + * @return self + */ + public function setConfig(?string $config): self + { + $this->initialized['config'] = true; + $this->config = $config; + return $this; + } + /** + * Load credential spec from this file. The file is read by + the daemon, and must be present in the `CredentialSpecs` + subdirectory in the docker data directory, which defaults + to `C:\ProgramData\Docker\` on Windows. + + For example, specifying `spec.json` loads + `C:\ProgramData\Docker\CredentialSpecs\spec.json`. + +


+ + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + + * + * @return string|null + */ + public function getFile(): ?string + { + return $this->file; + } + /** + * Load credential spec from this file. The file is read by + the daemon, and must be present in the `CredentialSpecs` + subdirectory in the docker data directory, which defaults + to `C:\ProgramData\Docker\` on Windows. + + For example, specifying `spec.json` loads + `C:\ProgramData\Docker\CredentialSpecs\spec.json`. + +


+ + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + + * + * @param string|null $file + * + * @return self + */ + public function setFile(?string $file): self + { + $this->initialized['file'] = true; + $this->file = $file; + return $this; + } + /** + * Load credential spec from this value in the Windows + registry. The specified registry value must be located in: + + `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` + +


+ + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + + * + * @return string|null + */ + public function getRegistry(): ?string + { + return $this->registry; + } + /** + * Load credential spec from this value in the Windows + registry. The specified registry value must be located in: + + `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` + +


+ + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + + * + * @param string|null $registry + * + * @return self + */ + public function setRegistry(?string $registry): self + { + $this->initialized['registry'] = true; + $this->registry = $registry; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecContainerSpecPrivilegesSELinuxContext.php b/generated/Model/TaskSpecContainerSpecPrivilegesSELinuxContext.php new file mode 100644 index 000000000..009cd9e0e --- /dev/null +++ b/generated/Model/TaskSpecContainerSpecPrivilegesSELinuxContext.php @@ -0,0 +1,155 @@ +initialized); + } + /** + * Disable SELinux + * + * @var bool|null + */ + protected $disable; + /** + * SELinux user label + * + * @var string|null + */ + protected $user; + /** + * SELinux role label + * + * @var string|null + */ + protected $role; + /** + * SELinux type label + * + * @var string|null + */ + protected $type; + /** + * SELinux level label + * + * @var string|null + */ + protected $level; + /** + * Disable SELinux + * + * @return bool|null + */ + public function getDisable(): ?bool + { + return $this->disable; + } + /** + * Disable SELinux + * + * @param bool|null $disable + * + * @return self + */ + public function setDisable(?bool $disable): self + { + $this->initialized['disable'] = true; + $this->disable = $disable; + return $this; + } + /** + * SELinux user label + * + * @return string|null + */ + public function getUser(): ?string + { + return $this->user; + } + /** + * SELinux user label + * + * @param string|null $user + * + * @return self + */ + public function setUser(?string $user): self + { + $this->initialized['user'] = true; + $this->user = $user; + return $this; + } + /** + * SELinux role label + * + * @return string|null + */ + public function getRole(): ?string + { + return $this->role; + } + /** + * SELinux role label + * + * @param string|null $role + * + * @return self + */ + public function setRole(?string $role): self + { + $this->initialized['role'] = true; + $this->role = $role; + return $this; + } + /** + * SELinux type label + * + * @return string|null + */ + public function getType(): ?string + { + return $this->type; + } + /** + * SELinux type label + * + * @param string|null $type + * + * @return self + */ + public function setType(?string $type): self + { + $this->initialized['type'] = true; + $this->type = $type; + return $this; + } + /** + * SELinux level label + * + * @return string|null + */ + public function getLevel(): ?string + { + return $this->level; + } + /** + * SELinux level label + * + * @param string|null $level + * + * @return self + */ + public function setLevel(?string $level): self + { + $this->initialized['level'] = true; + $this->level = $level; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecContainerSpecPrivilegesSeccomp.php b/generated/Model/TaskSpecContainerSpecPrivilegesSeccomp.php new file mode 100644 index 000000000..26f7e8c89 --- /dev/null +++ b/generated/Model/TaskSpecContainerSpecPrivilegesSeccomp.php @@ -0,0 +1,71 @@ +initialized); + } + /** + * + * + * @var string|null + */ + protected $mode; + /** + * The custom seccomp profile as a json object + * + * @var string|null + */ + protected $profile; + /** + * + * + * @return string|null + */ + public function getMode(): ?string + { + return $this->mode; + } + /** + * + * + * @param string|null $mode + * + * @return self + */ + public function setMode(?string $mode): self + { + $this->initialized['mode'] = true; + $this->mode = $mode; + return $this; + } + /** + * The custom seccomp profile as a json object + * + * @return string|null + */ + public function getProfile(): ?string + { + return $this->profile; + } + /** + * The custom seccomp profile as a json object + * + * @param string|null $profile + * + * @return self + */ + public function setProfile(?string $profile): self + { + $this->initialized['profile'] = true; + $this->profile = $profile; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecContainerSpecSecretsItem.php b/generated/Model/TaskSpecContainerSpecSecretsItem.php new file mode 100644 index 000000000..f13bb5bed --- /dev/null +++ b/generated/Model/TaskSpecContainerSpecSecretsItem.php @@ -0,0 +1,114 @@ +initialized); + } + /** + * File represents a specific target that is backed by a file. + * + * @var TaskSpecContainerSpecSecretsItemFile|null + */ + protected $file; + /** + * SecretID represents the ID of the specific secret that we're + referencing. + + * + * @var string|null + */ + protected $secretID; + /** + * SecretName is the name of the secret that this references, + but this is just provided for lookup/display purposes. The + secret in the reference will be identified by its ID. + + * + * @var string|null + */ + protected $secretName; + /** + * File represents a specific target that is backed by a file. + * + * @return TaskSpecContainerSpecSecretsItemFile|null + */ + public function getFile(): ?TaskSpecContainerSpecSecretsItemFile + { + return $this->file; + } + /** + * File represents a specific target that is backed by a file. + * + * @param TaskSpecContainerSpecSecretsItemFile|null $file + * + * @return self + */ + public function setFile(?TaskSpecContainerSpecSecretsItemFile $file): self + { + $this->initialized['file'] = true; + $this->file = $file; + return $this; + } + /** + * SecretID represents the ID of the specific secret that we're + referencing. + + * + * @return string|null + */ + public function getSecretID(): ?string + { + return $this->secretID; + } + /** + * SecretID represents the ID of the specific secret that we're + referencing. + + * + * @param string|null $secretID + * + * @return self + */ + public function setSecretID(?string $secretID): self + { + $this->initialized['secretID'] = true; + $this->secretID = $secretID; + return $this; + } + /** + * SecretName is the name of the secret that this references, + but this is just provided for lookup/display purposes. The + secret in the reference will be identified by its ID. + + * + * @return string|null + */ + public function getSecretName(): ?string + { + return $this->secretName; + } + /** + * SecretName is the name of the secret that this references, + but this is just provided for lookup/display purposes. The + secret in the reference will be identified by its ID. + + * + * @param string|null $secretName + * + * @return self + */ + public function setSecretName(?string $secretName): self + { + $this->initialized['secretName'] = true; + $this->secretName = $secretName; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecContainerSpecSecretsItemFile.php b/generated/Model/TaskSpecContainerSpecSecretsItemFile.php new file mode 100644 index 000000000..9b5f5f6c6 --- /dev/null +++ b/generated/Model/TaskSpecContainerSpecSecretsItemFile.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * Name represents the final filename in the filesystem. + * + * @var string|null + */ + protected $name; + /** + * UID represents the file UID. + * + * @var string|null + */ + protected $uID; + /** + * GID represents the file GID. + * + * @var string|null + */ + protected $gID; + /** + * Mode represents the FileMode of the file. + * + * @var int|null + */ + protected $mode; + /** + * Name represents the final filename in the filesystem. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * Name represents the final filename in the filesystem. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * UID represents the file UID. + * + * @return string|null + */ + public function getUID(): ?string + { + return $this->uID; + } + /** + * UID represents the file UID. + * + * @param string|null $uID + * + * @return self + */ + public function setUID(?string $uID): self + { + $this->initialized['uID'] = true; + $this->uID = $uID; + return $this; + } + /** + * GID represents the file GID. + * + * @return string|null + */ + public function getGID(): ?string + { + return $this->gID; + } + /** + * GID represents the file GID. + * + * @param string|null $gID + * + * @return self + */ + public function setGID(?string $gID): self + { + $this->initialized['gID'] = true; + $this->gID = $gID; + return $this; + } + /** + * Mode represents the FileMode of the file. + * + * @return int|null + */ + public function getMode(): ?int + { + return $this->mode; + } + /** + * Mode represents the FileMode of the file. + * + * @param int|null $mode + * + * @return self + */ + public function setMode(?int $mode): self + { + $this->initialized['mode'] = true; + $this->mode = $mode; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/PluginsPrivilegesGetResponse200Item.php b/generated/Model/TaskSpecContainerSpecUlimitsItem.php similarity index 54% rename from generated/Model/PluginsPrivilegesGetResponse200Item.php rename to generated/Model/TaskSpecContainerSpecUlimitsItem.php index d00b46935..7fb90de0e 100644 --- a/generated/Model/PluginsPrivilegesGetResponse200Item.php +++ b/generated/Model/TaskSpecContainerSpecUlimitsItem.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class PluginsPrivilegesGetResponse200Item +class TaskSpecContainerSpecUlimitsItem { /** * @var array @@ -13,25 +13,25 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * + * Name of ulimit * * @var string|null */ protected $name; /** - * + * Soft limit * - * @var string|null + * @var int|null */ - protected $description; + protected $soft; /** - * + * Hard limit * - * @var list|null + * @var int|null */ - protected $value; + protected $hard; /** - * + * Name of ulimit * * @return string|null */ @@ -40,7 +40,7 @@ public function getName(): ?string return $this->name; } /** - * + * Name of ulimit * * @param string|null $name * @@ -53,47 +53,47 @@ public function setName(?string $name): self return $this; } /** - * + * Soft limit * - * @return string|null + * @return int|null */ - public function getDescription(): ?string + public function getSoft(): ?int { - return $this->description; + return $this->soft; } /** - * + * Soft limit * - * @param string|null $description + * @param int|null $soft * * @return self */ - public function setDescription(?string $description): self + public function setSoft(?int $soft): self { - $this->initialized['description'] = true; - $this->description = $description; + $this->initialized['soft'] = true; + $this->soft = $soft; return $this; } /** - * + * Hard limit * - * @return list|null + * @return int|null */ - public function getValue(): ?array + public function getHard(): ?int { - return $this->value; + return $this->hard; } /** - * + * Hard limit * - * @param list|null $value + * @param int|null $hard * * @return self */ - public function setValue(?array $value): self + public function setHard(?int $hard): self { - $this->initialized['value'] = true; - $this->value = $value; + $this->initialized['hard'] = true; + $this->hard = $hard; return $this; } } \ No newline at end of file diff --git a/generated/Model/TaskSpecNetworkAttachmentSpec.php b/generated/Model/TaskSpecNetworkAttachmentSpec.php new file mode 100644 index 000000000..8191ba1eb --- /dev/null +++ b/generated/Model/TaskSpecNetworkAttachmentSpec.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * ID of the container represented by this task + * + * @var string|null + */ + protected $containerID; + /** + * ID of the container represented by this task + * + * @return string|null + */ + public function getContainerID(): ?string + { + return $this->containerID; + } + /** + * ID of the container represented by this task + * + * @param string|null $containerID + * + * @return self + */ + public function setContainerID(?string $containerID): self + { + $this->initialized['containerID'] = true; + $this->containerID = $containerID; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecNetworksItem.php b/generated/Model/TaskSpecNetworksItem.php deleted file mode 100644 index e85d3b150..000000000 --- a/generated/Model/TaskSpecNetworksItem.php +++ /dev/null @@ -1,71 +0,0 @@ -initialized); - } - /** - * - * - * @var string|null - */ - protected $target; - /** - * - * - * @var list|null - */ - protected $aliases; - /** - * - * - * @return string|null - */ - public function getTarget(): ?string - { - return $this->target; - } - /** - * - * - * @param string|null $target - * - * @return self - */ - public function setTarget(?string $target): self - { - $this->initialized['target'] = true; - $this->target = $target; - return $this; - } - /** - * - * - * @return list|null - */ - public function getAliases(): ?array - { - return $this->aliases; - } - /** - * - * - * @param list|null $aliases - * - * @return self - */ - public function setAliases(?array $aliases): self - { - $this->initialized['aliases'] = true; - $this->aliases = $aliases; - return $this; - } -} \ No newline at end of file diff --git a/generated/Model/TaskSpecPlacement.php b/generated/Model/TaskSpecPlacement.php index 4b0fe9dbe..a2362dd1d 100644 --- a/generated/Model/TaskSpecPlacement.php +++ b/generated/Model/TaskSpecPlacement.php @@ -13,31 +13,199 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * An array of constraints. - * - * @var list|null - */ + * An array of constraint expressions to limit the set of nodes where + a task can be scheduled. Constraint expressions can either use a + _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find + nodes that satisfy every expression (AND match). Constraints can + match node or Docker Engine labels as follows: + + node attribute | matches | example + ---------------------|--------------------------------|----------------------------------------------- + `node.id` | Node ID | `node.id==2ivku8v2gvtg4` + `node.hostname` | Node hostname | `node.hostname!=node-2` + `node.role` | Node role (`manager`/`worker`) | `node.role==manager` + `node.platform.os` | Node operating system | `node.platform.os==windows` + `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` + `node.labels` | User-defined node labels | `node.labels.security==high` + `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-24.04` + + `engine.labels` apply to Docker Engine labels like operating system, + drivers, etc. Swarm administrators add `node.labels` for operational + purposes by using the [`node update endpoint`](#operation/NodeUpdate). + + * + * @var list|null + */ protected $constraints; /** - * An array of constraints. - * - * @return list|null - */ + * Preferences provide a way to make the scheduler aware of factors + such as topology. They are provided in order from highest to + lowest precedence. + + * + * @var list|null + */ + protected $preferences; + /** + * Maximum number of replicas for per node (default value is 0, which + is unlimited) + + * + * @var int|null + */ + protected $maxReplicas = 0; + /** + * Platforms stores all the platforms that the service's image can + run on. This field is used in the platform filter for scheduling. + If empty, then the platform filter is off, meaning there are no + scheduling restrictions. + + * + * @var list|null + */ + protected $platforms; + /** + * An array of constraint expressions to limit the set of nodes where + a task can be scheduled. Constraint expressions can either use a + _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find + nodes that satisfy every expression (AND match). Constraints can + match node or Docker Engine labels as follows: + + node attribute | matches | example + ---------------------|--------------------------------|----------------------------------------------- + `node.id` | Node ID | `node.id==2ivku8v2gvtg4` + `node.hostname` | Node hostname | `node.hostname!=node-2` + `node.role` | Node role (`manager`/`worker`) | `node.role==manager` + `node.platform.os` | Node operating system | `node.platform.os==windows` + `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` + `node.labels` | User-defined node labels | `node.labels.security==high` + `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-24.04` + + `engine.labels` apply to Docker Engine labels like operating system, + drivers, etc. Swarm administrators add `node.labels` for operational + purposes by using the [`node update endpoint`](#operation/NodeUpdate). + + * + * @return list|null + */ public function getConstraints(): ?array { return $this->constraints; } /** - * An array of constraints. - * - * @param list|null $constraints - * - * @return self - */ + * An array of constraint expressions to limit the set of nodes where + a task can be scheduled. Constraint expressions can either use a + _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find + nodes that satisfy every expression (AND match). Constraints can + match node or Docker Engine labels as follows: + + node attribute | matches | example + ---------------------|--------------------------------|----------------------------------------------- + `node.id` | Node ID | `node.id==2ivku8v2gvtg4` + `node.hostname` | Node hostname | `node.hostname!=node-2` + `node.role` | Node role (`manager`/`worker`) | `node.role==manager` + `node.platform.os` | Node operating system | `node.platform.os==windows` + `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` + `node.labels` | User-defined node labels | `node.labels.security==high` + `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-24.04` + + `engine.labels` apply to Docker Engine labels like operating system, + drivers, etc. Swarm administrators add `node.labels` for operational + purposes by using the [`node update endpoint`](#operation/NodeUpdate). + + * + * @param list|null $constraints + * + * @return self + */ public function setConstraints(?array $constraints): self { $this->initialized['constraints'] = true; $this->constraints = $constraints; return $this; } + /** + * Preferences provide a way to make the scheduler aware of factors + such as topology. They are provided in order from highest to + lowest precedence. + + * + * @return list|null + */ + public function getPreferences(): ?array + { + return $this->preferences; + } + /** + * Preferences provide a way to make the scheduler aware of factors + such as topology. They are provided in order from highest to + lowest precedence. + + * + * @param list|null $preferences + * + * @return self + */ + public function setPreferences(?array $preferences): self + { + $this->initialized['preferences'] = true; + $this->preferences = $preferences; + return $this; + } + /** + * Maximum number of replicas for per node (default value is 0, which + is unlimited) + + * + * @return int|null + */ + public function getMaxReplicas(): ?int + { + return $this->maxReplicas; + } + /** + * Maximum number of replicas for per node (default value is 0, which + is unlimited) + + * + * @param int|null $maxReplicas + * + * @return self + */ + public function setMaxReplicas(?int $maxReplicas): self + { + $this->initialized['maxReplicas'] = true; + $this->maxReplicas = $maxReplicas; + return $this; + } + /** + * Platforms stores all the platforms that the service's image can + run on. This field is used in the platform filter for scheduling. + If empty, then the platform filter is off, meaning there are no + scheduling restrictions. + + * + * @return list|null + */ + public function getPlatforms(): ?array + { + return $this->platforms; + } + /** + * Platforms stores all the platforms that the service's image can + run on. This field is used in the platform filter for scheduling. + If empty, then the platform filter is off, meaning there are no + scheduling restrictions. + + * + * @param list|null $platforms + * + * @return self + */ + public function setPlatforms(?array $platforms): self + { + $this->initialized['platforms'] = true; + $this->platforms = $platforms; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/TaskSpecPlacementPreferencesItem.php b/generated/Model/TaskSpecPlacementPreferencesItem.php new file mode 100644 index 000000000..f2fdacac4 --- /dev/null +++ b/generated/Model/TaskSpecPlacementPreferencesItem.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * + * + * @var TaskSpecPlacementPreferencesItemSpread|null + */ + protected $spread; + /** + * + * + * @return TaskSpecPlacementPreferencesItemSpread|null + */ + public function getSpread(): ?TaskSpecPlacementPreferencesItemSpread + { + return $this->spread; + } + /** + * + * + * @param TaskSpecPlacementPreferencesItemSpread|null $spread + * + * @return self + */ + public function setSpread(?TaskSpecPlacementPreferencesItemSpread $spread): self + { + $this->initialized['spread'] = true; + $this->spread = $spread; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecPlacementPreferencesItemSpread.php b/generated/Model/TaskSpecPlacementPreferencesItemSpread.php new file mode 100644 index 000000000..e3b28c093 --- /dev/null +++ b/generated/Model/TaskSpecPlacementPreferencesItemSpread.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * label descriptor, such as `engine.labels.az`. + * + * @var string|null + */ + protected $spreadDescriptor; + /** + * label descriptor, such as `engine.labels.az`. + * + * @return string|null + */ + public function getSpreadDescriptor(): ?string + { + return $this->spreadDescriptor; + } + /** + * label descriptor, such as `engine.labels.az`. + * + * @param string|null $spreadDescriptor + * + * @return self + */ + public function setSpreadDescriptor(?string $spreadDescriptor): self + { + $this->initialized['spreadDescriptor'] = true; + $this->spreadDescriptor = $spreadDescriptor; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecPluginSpec.php b/generated/Model/TaskSpecPluginSpec.php new file mode 100644 index 000000000..12a72b236 --- /dev/null +++ b/generated/Model/TaskSpecPluginSpec.php @@ -0,0 +1,127 @@ +initialized); + } + /** + * The name or 'alias' to use for the plugin. + * + * @var string|null + */ + protected $name; + /** + * The plugin image reference to use. + * + * @var string|null + */ + protected $remote; + /** + * Disable the plugin once scheduled. + * + * @var bool|null + */ + protected $disabled; + /** + * + * + * @var list|null + */ + protected $pluginPrivilege; + /** + * The name or 'alias' to use for the plugin. + * + * @return string|null + */ + public function getName(): ?string + { + return $this->name; + } + /** + * The name or 'alias' to use for the plugin. + * + * @param string|null $name + * + * @return self + */ + public function setName(?string $name): self + { + $this->initialized['name'] = true; + $this->name = $name; + return $this; + } + /** + * The plugin image reference to use. + * + * @return string|null + */ + public function getRemote(): ?string + { + return $this->remote; + } + /** + * The plugin image reference to use. + * + * @param string|null $remote + * + * @return self + */ + public function setRemote(?string $remote): self + { + $this->initialized['remote'] = true; + $this->remote = $remote; + return $this; + } + /** + * Disable the plugin once scheduled. + * + * @return bool|null + */ + public function getDisabled(): ?bool + { + return $this->disabled; + } + /** + * Disable the plugin once scheduled. + * + * @param bool|null $disabled + * + * @return self + */ + public function setDisabled(?bool $disabled): self + { + $this->initialized['disabled'] = true; + $this->disabled = $disabled; + return $this; + } + /** + * + * + * @return list|null + */ + public function getPluginPrivilege(): ?array + { + return $this->pluginPrivilege; + } + /** + * + * + * @param list|null $pluginPrivilege + * + * @return self + */ + public function setPluginPrivilege(?array $pluginPrivilege): self + { + $this->initialized['pluginPrivilege'] = true; + $this->pluginPrivilege = $pluginPrivilege; + return $this; + } +} \ No newline at end of file diff --git a/generated/Model/TaskSpecResources.php b/generated/Model/TaskSpecResources.php index 77f0b20c8..afcc4b93b 100644 --- a/generated/Model/TaskSpecResources.php +++ b/generated/Model/TaskSpecResources.php @@ -13,56 +13,62 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * Define resources limits. + * An object describing a limit on resources which can be requested by a task. * - * @var TaskSpecResourcesLimits|null + * @var Limit|null */ protected $limits; /** - * Define resources reservation. - * - * @var TaskSpecResourcesReservations|null - */ + * An object describing the resources which can be advertised by a node and + requested by a task. + + * + * @var ResourceObject|null + */ protected $reservations; /** - * Define resources limits. + * An object describing a limit on resources which can be requested by a task. * - * @return TaskSpecResourcesLimits|null + * @return Limit|null */ - public function getLimits(): ?TaskSpecResourcesLimits + public function getLimits(): ?Limit { return $this->limits; } /** - * Define resources limits. + * An object describing a limit on resources which can be requested by a task. * - * @param TaskSpecResourcesLimits|null $limits + * @param Limit|null $limits * * @return self */ - public function setLimits(?TaskSpecResourcesLimits $limits): self + public function setLimits(?Limit $limits): self { $this->initialized['limits'] = true; $this->limits = $limits; return $this; } /** - * Define resources reservation. - * - * @return TaskSpecResourcesReservations|null - */ - public function getReservations(): ?TaskSpecResourcesReservations + * An object describing the resources which can be advertised by a node and + requested by a task. + + * + * @return ResourceObject|null + */ + public function getReservations(): ?ResourceObject { return $this->reservations; } /** - * Define resources reservation. - * - * @param TaskSpecResourcesReservations|null $reservations - * - * @return self - */ - public function setReservations(?TaskSpecResourcesReservations $reservations): self + * An object describing the resources which can be advertised by a node and + requested by a task. + + * + * @param ResourceObject|null $reservations + * + * @return self + */ + public function setReservations(?ResourceObject $reservations): self { $this->initialized['reservations'] = true; $this->reservations = $reservations; diff --git a/generated/Model/TaskSpecResourcesReservations.php b/generated/Model/TaskSpecResourcesReservations.php deleted file mode 100644 index a7766dab7..000000000 --- a/generated/Model/TaskSpecResourcesReservations.php +++ /dev/null @@ -1,71 +0,0 @@ -initialized); - } - /** - * CPU reservation in units of 10-9 CPU shares. - * - * @var int|null - */ - protected $nanoCPUs; - /** - * Memory reservation in Bytes. - * - * @var int|null - */ - protected $memoryBytes; - /** - * CPU reservation in units of 10-9 CPU shares. - * - * @return int|null - */ - public function getNanoCPUs(): ?int - { - return $this->nanoCPUs; - } - /** - * CPU reservation in units of 10-9 CPU shares. - * - * @param int|null $nanoCPUs - * - * @return self - */ - public function setNanoCPUs(?int $nanoCPUs): self - { - $this->initialized['nanoCPUs'] = true; - $this->nanoCPUs = $nanoCPUs; - return $this; - } - /** - * Memory reservation in Bytes. - * - * @return int|null - */ - public function getMemoryBytes(): ?int - { - return $this->memoryBytes; - } - /** - * Memory reservation in Bytes. - * - * @param int|null $memoryBytes - * - * @return self - */ - public function setMemoryBytes(?int $memoryBytes): self - { - $this->initialized['memoryBytes'] = true; - $this->memoryBytes = $memoryBytes; - return $this; - } -} \ No newline at end of file diff --git a/generated/Model/TaskSpecRestartPolicy.php b/generated/Model/TaskSpecRestartPolicy.php index c088edfb1..84ec6cd65 100644 --- a/generated/Model/TaskSpecRestartPolicy.php +++ b/generated/Model/TaskSpecRestartPolicy.php @@ -25,16 +25,20 @@ public function isInitialized($property): bool */ protected $delay; /** - * Maximum attempts to restart a given container before giving up (default value is 0, which is ignored). - * - * @var int|null - */ + * Maximum attempts to restart a given container before giving up + (default value is 0, which is ignored). + + * + * @var int|null + */ protected $maxAttempts = 0; /** - * Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded). - * - * @var int|null - */ + * Windows is the time window used to evaluate the restart policy + (default value is 0, which is unbounded). + + * + * @var int|null + */ protected $window = 0; /** * Condition for restart. @@ -81,21 +85,25 @@ public function setDelay(?int $delay): self return $this; } /** - * Maximum attempts to restart a given container before giving up (default value is 0, which is ignored). - * - * @return int|null - */ + * Maximum attempts to restart a given container before giving up + (default value is 0, which is ignored). + + * + * @return int|null + */ public function getMaxAttempts(): ?int { return $this->maxAttempts; } /** - * Maximum attempts to restart a given container before giving up (default value is 0, which is ignored). - * - * @param int|null $maxAttempts - * - * @return self - */ + * Maximum attempts to restart a given container before giving up + (default value is 0, which is ignored). + + * + * @param int|null $maxAttempts + * + * @return self + */ public function setMaxAttempts(?int $maxAttempts): self { $this->initialized['maxAttempts'] = true; @@ -103,21 +111,25 @@ public function setMaxAttempts(?int $maxAttempts): self return $this; } /** - * Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded). - * - * @return int|null - */ + * Windows is the time window used to evaluate the restart policy + (default value is 0, which is unbounded). + + * + * @return int|null + */ public function getWindow(): ?int { return $this->window; } /** - * Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded). - * - * @param int|null $window - * - * @return self - */ + * Windows is the time window used to evaluate the restart policy + (default value is 0, which is unbounded). + + * + * @param int|null $window + * + * @return self + */ public function setWindow(?int $window): self { $this->initialized['window'] = true; diff --git a/generated/Model/TaskStatus.php b/generated/Model/TaskStatus.php index 356bbd943..8ea03a4a5 100644 --- a/generated/Model/TaskStatus.php +++ b/generated/Model/TaskStatus.php @@ -37,11 +37,17 @@ public function isInitialized($property): bool */ protected $err; /** - * + * represents the status of a container. * - * @var TaskStatusContainerStatus|null + * @var ContainerStatus|null */ protected $containerStatus; + /** + * represents the port status of a task's host ports whose service has published host ports + * + * @var PortStatus|null + */ + protected $portStatus; /** * * @@ -131,25 +137,47 @@ public function setErr(?string $err): self return $this; } /** - * + * represents the status of a container. * - * @return TaskStatusContainerStatus|null + * @return ContainerStatus|null */ - public function getContainerStatus(): ?TaskStatusContainerStatus + public function getContainerStatus(): ?ContainerStatus { return $this->containerStatus; } /** - * + * represents the status of a container. * - * @param TaskStatusContainerStatus|null $containerStatus + * @param ContainerStatus|null $containerStatus * * @return self */ - public function setContainerStatus(?TaskStatusContainerStatus $containerStatus): self + public function setContainerStatus(?ContainerStatus $containerStatus): self { $this->initialized['containerStatus'] = true; $this->containerStatus = $containerStatus; return $this; } + /** + * represents the port status of a task's host ports whose service has published host ports + * + * @return PortStatus|null + */ + public function getPortStatus(): ?PortStatus + { + return $this->portStatus; + } + /** + * represents the port status of a task's host ports whose service has published host ports + * + * @param PortStatus|null $portStatus + * + * @return self + */ + public function setPortStatus(?PortStatus $portStatus): self + { + $this->initialized['portStatus'] = true; + $this->portStatus = $portStatus; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/TaskVersion.php b/generated/Model/TaskVersion.php deleted file mode 100644 index fc464cc69..000000000 --- a/generated/Model/TaskVersion.php +++ /dev/null @@ -1,43 +0,0 @@ -initialized); - } - /** - * - * - * @var int|null - */ - protected $index; - /** - * - * - * @return int|null - */ - public function getIndex(): ?int - { - return $this->index; - } - /** - * - * - * @param int|null $index - * - * @return self - */ - public function setIndex(?int $index): self - { - $this->initialized['index'] = true; - $this->index = $index; - return $this; - } -} \ No newline at end of file diff --git a/generated/Model/Volume.php b/generated/Model/Volume.php index fc4a896c1..22e1448c7 100644 --- a/generated/Model/Volume.php +++ b/generated/Model/Volume.php @@ -30,6 +30,12 @@ public function isInitialized($property): bool * @var string|null */ protected $mountpoint; + /** + * Date/Time the volume was created. + * + * @var string|null + */ + protected $createdAt; /** * Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: @@ -49,11 +55,21 @@ public function isInitialized($property): bool */ protected $labels; /** - * The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. - * - * @var string|null - */ + * The level at which the volume exists. Either `global` for cluster-wide, + or `local` for machine level. + + * + * @var string|null + */ protected $scope = 'local'; + /** + * Options and information specific to, and only present on, Swarm CSI + cluster volumes. + + * + * @var ClusterVolume|null + */ + protected $clusterVolume; /** * The driver specific options used when creating the volume. * @@ -61,10 +77,12 @@ public function isInitialized($property): bool */ protected $options; /** - * - * - * @var VolumeUsageData|null - */ + * Usage details about the volume. This information is used by the + `GET /system/df` endpoint, and omitted in other endpoints. + + * + * @var VolumeUsageData|null + */ protected $usageData; /** * Name of the volume. @@ -132,6 +150,28 @@ public function setMountpoint(?string $mountpoint): self $this->mountpoint = $mountpoint; return $this; } + /** + * Date/Time the volume was created. + * + * @return string|null + */ + public function getCreatedAt(): ?string + { + return $this->createdAt; + } + /** + * Date/Time the volume was created. + * + * @param string|null $createdAt + * + * @return self + */ + public function setCreatedAt(?string $createdAt): self + { + $this->initialized['createdAt'] = true; + $this->createdAt = $createdAt; + return $this; + } /** * Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: @@ -189,27 +229,57 @@ public function setLabels(?iterable $labels): self return $this; } /** - * The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. - * - * @return string|null - */ + * The level at which the volume exists. Either `global` for cluster-wide, + or `local` for machine level. + + * + * @return string|null + */ public function getScope(): ?string { return $this->scope; } /** - * The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. - * - * @param string|null $scope - * - * @return self - */ + * The level at which the volume exists. Either `global` for cluster-wide, + or `local` for machine level. + + * + * @param string|null $scope + * + * @return self + */ public function setScope(?string $scope): self { $this->initialized['scope'] = true; $this->scope = $scope; return $this; } + /** + * Options and information specific to, and only present on, Swarm CSI + cluster volumes. + + * + * @return ClusterVolume|null + */ + public function getClusterVolume(): ?ClusterVolume + { + return $this->clusterVolume; + } + /** + * Options and information specific to, and only present on, Swarm CSI + cluster volumes. + + * + * @param ClusterVolume|null $clusterVolume + * + * @return self + */ + public function setClusterVolume(?ClusterVolume $clusterVolume): self + { + $this->initialized['clusterVolume'] = true; + $this->clusterVolume = $clusterVolume; + return $this; + } /** * The driver specific options used when creating the volume. * @@ -233,21 +303,25 @@ public function setOptions(?iterable $options): self return $this; } /** - * - * - * @return VolumeUsageData|null - */ + * Usage details about the volume. This information is used by the + `GET /system/df` endpoint, and omitted in other endpoints. + + * + * @return VolumeUsageData|null + */ public function getUsageData(): ?VolumeUsageData { return $this->usageData; } /** - * - * - * @param VolumeUsageData|null $usageData - * - * @return self - */ + * Usage details about the volume. This information is used by the + `GET /system/df` endpoint, and omitted in other endpoints. + + * + * @param VolumeUsageData|null $usageData + * + * @return self + */ public function setUsageData(?VolumeUsageData $usageData): self { $this->initialized['usageData'] = true; diff --git a/generated/Model/VolumesCreatePostBody.php b/generated/Model/VolumeCreateOptions.php similarity index 65% rename from generated/Model/VolumesCreatePostBody.php rename to generated/Model/VolumeCreateOptions.php index 3f4c0c253..51bcfb03f 100644 --- a/generated/Model/VolumesCreatePostBody.php +++ b/generated/Model/VolumeCreateOptions.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class VolumesCreatePostBody +class VolumeCreateOptions { /** * @var array @@ -25,10 +25,12 @@ public function isInitialized($property): bool */ protected $driver = 'local'; /** - * A mapping of driver options and values. These options are passed directly to the driver and are driver specific. - * - * @var array|null - */ + * A mapping of driver options and values. These options are + passed directly to the driver and are driver specific. + + * + * @var array|null + */ protected $driverOpts; /** * User-defined key/value metadata. @@ -36,6 +38,12 @@ public function isInitialized($property): bool * @var array|null */ protected $labels; + /** + * Cluster-specific options used to create the volume. + * + * @var ClusterVolumeSpec|null + */ + protected $clusterVolumeSpec; /** * The new volume's name. If not specified, Docker generates a name. * @@ -81,21 +89,25 @@ public function setDriver(?string $driver): self return $this; } /** - * A mapping of driver options and values. These options are passed directly to the driver and are driver specific. - * - * @return array|null - */ + * A mapping of driver options and values. These options are + passed directly to the driver and are driver specific. + + * + * @return array|null + */ public function getDriverOpts(): ?iterable { return $this->driverOpts; } /** - * A mapping of driver options and values. These options are passed directly to the driver and are driver specific. - * - * @param array|null $driverOpts - * - * @return self - */ + * A mapping of driver options and values. These options are + passed directly to the driver and are driver specific. + + * + * @param array|null $driverOpts + * + * @return self + */ public function setDriverOpts(?iterable $driverOpts): self { $this->initialized['driverOpts'] = true; @@ -124,4 +136,26 @@ public function setLabels(?iterable $labels): self $this->labels = $labels; return $this; } + /** + * Cluster-specific options used to create the volume. + * + * @return ClusterVolumeSpec|null + */ + public function getClusterVolumeSpec(): ?ClusterVolumeSpec + { + return $this->clusterVolumeSpec; + } + /** + * Cluster-specific options used to create the volume. + * + * @param ClusterVolumeSpec|null $clusterVolumeSpec + * + * @return self + */ + public function setClusterVolumeSpec(?ClusterVolumeSpec $clusterVolumeSpec): self + { + $this->initialized['clusterVolumeSpec'] = true; + $this->clusterVolumeSpec = $clusterVolumeSpec; + return $this; + } } \ No newline at end of file diff --git a/generated/Model/VolumesGetResponse200.php b/generated/Model/VolumeListResponse.php similarity index 85% rename from generated/Model/VolumesGetResponse200.php rename to generated/Model/VolumeListResponse.php index 3e6a60637..df1f27447 100644 --- a/generated/Model/VolumesGetResponse200.php +++ b/generated/Model/VolumeListResponse.php @@ -2,7 +2,7 @@ namespace Docker\API\Model; -class VolumesGetResponse200 +class VolumeListResponse { /** * @var array @@ -19,7 +19,7 @@ public function isInitialized($property): bool */ protected $volumes; /** - * Warnings that occurred when fetching the list of volumes + * Warnings that occurred when fetching the list of volumes. * * @var list|null */ @@ -47,7 +47,7 @@ public function setVolumes(?array $volumes): self return $this; } /** - * Warnings that occurred when fetching the list of volumes + * Warnings that occurred when fetching the list of volumes. * * @return list|null */ @@ -56,7 +56,7 @@ public function getWarnings(): ?array return $this->warnings; } /** - * Warnings that occurred when fetching the list of volumes + * Warnings that occurred when fetching the list of volumes. * * @param list|null $warnings * diff --git a/generated/Model/VolumeUsageData.php b/generated/Model/VolumeUsageData.php index 81385c3dc..c53d00e20 100644 --- a/generated/Model/VolumeUsageData.php +++ b/generated/Model/VolumeUsageData.php @@ -13,33 +13,47 @@ public function isInitialized($property): bool return array_key_exists($property, $this->initialized); } /** - * The disk space used by the volume (local driver only) - * - * @var int|null - */ + * Amount of disk space used by the volume (in bytes). This information + is only available for volumes created with the `"local"` volume + driver. For volumes created with other volume drivers, this field + is set to `-1` ("not available") + + * + * @var int|null + */ protected $size = -1; /** - * The number of containers referencing this volume. - * - * @var int|null - */ + * The number of containers referencing this volume. This field + is set to `-1` if the reference-count is not available. + + * + * @var int|null + */ protected $refCount = -1; /** - * The disk space used by the volume (local driver only) - * - * @return int|null - */ + * Amount of disk space used by the volume (in bytes). This information + is only available for volumes created with the `"local"` volume + driver. For volumes created with other volume drivers, this field + is set to `-1` ("not available") + + * + * @return int|null + */ public function getSize(): ?int { return $this->size; } /** - * The disk space used by the volume (local driver only) - * - * @param int|null $size - * - * @return self - */ + * Amount of disk space used by the volume (in bytes). This information + is only available for volumes created with the `"local"` volume + driver. For volumes created with other volume drivers, this field + is set to `-1` ("not available") + + * + * @param int|null $size + * + * @return self + */ public function setSize(?int $size): self { $this->initialized['size'] = true; @@ -47,21 +61,25 @@ public function setSize(?int $size): self return $this; } /** - * The number of containers referencing this volume. - * - * @return int|null - */ + * The number of containers referencing this volume. This field + is set to `-1` if the reference-count is not available. + + * + * @return int|null + */ public function getRefCount(): ?int { return $this->refCount; } /** - * The number of containers referencing this volume. - * - * @param int|null $refCount - * - * @return self - */ + * The number of containers referencing this volume. This field + is set to `-1` if the reference-count is not available. + + * + * @param int|null $refCount + * + * @return self + */ public function setRefCount(?int $refCount): self { $this->initialized['refCount'] = true; diff --git a/generated/Model/VolumesNamePutBody.php b/generated/Model/VolumesNamePutBody.php new file mode 100644 index 000000000..c072e3427 --- /dev/null +++ b/generated/Model/VolumesNamePutBody.php @@ -0,0 +1,43 @@ +initialized); + } + /** + * Cluster-specific options used to create the volume. + * + * @var ClusterVolumeSpec|null + */ + protected $spec; + /** + * Cluster-specific options used to create the volume. + * + * @return ClusterVolumeSpec|null + */ + public function getSpec(): ?ClusterVolumeSpec + { + return $this->spec; + } + /** + * Cluster-specific options used to create the volume. + * + * @param ClusterVolumeSpec|null $spec + * + * @return self + */ + public function setSpec(?ClusterVolumeSpec $spec): self + { + $this->initialized['spec'] = true; + $this->spec = $spec; + return $this; + } +} \ No newline at end of file diff --git a/generated/Normalizer/AddressNormalizer.php b/generated/Normalizer/AddressNormalizer.php new file mode 100644 index 000000000..7c1e02ccf --- /dev/null +++ b/generated/Normalizer/AddressNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class AddressNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Address::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Address::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Address(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Addr', $data) && $data['Addr'] !== null) { + $object->setAddr($data['Addr']); + } + elseif (\array_key_exists('Addr', $data) && $data['Addr'] === null) { + $object->setAddr(null); + } + if (\array_key_exists('PrefixLen', $data) && $data['PrefixLen'] !== null) { + $object->setPrefixLen($data['PrefixLen']); + } + elseif (\array_key_exists('PrefixLen', $data) && $data['PrefixLen'] === null) { + $object->setPrefixLen(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('addr') && null !== $object->getAddr()) { + $data['Addr'] = $object->getAddr(); + } + if ($object->isInitialized('prefixLen') && null !== $object->getPrefixLen()) { + $data['PrefixLen'] = $object->getPrefixLen(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Address::class => false]; + } + } +} else { + class AddressNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Address::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Address::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Address(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Addr', $data) && $data['Addr'] !== null) { + $object->setAddr($data['Addr']); + } + elseif (\array_key_exists('Addr', $data) && $data['Addr'] === null) { + $object->setAddr(null); + } + if (\array_key_exists('PrefixLen', $data) && $data['PrefixLen'] !== null) { + $object->setPrefixLen($data['PrefixLen']); + } + elseif (\array_key_exists('PrefixLen', $data) && $data['PrefixLen'] === null) { + $object->setPrefixLen(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('addr') && null !== $object->getAddr()) { + $data['Addr'] = $object->getAddr(); + } + if ($object->isInitialized('prefixLen') && null !== $object->getPrefixLen()) { + $data['PrefixLen'] = $object->getPrefixLen(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Address::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/BuildCacheNormalizer.php b/generated/Normalizer/BuildCacheNormalizer.php new file mode 100644 index 000000000..113730f61 --- /dev/null +++ b/generated/Normalizer/BuildCacheNormalizer.php @@ -0,0 +1,314 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class BuildCacheNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\BuildCache::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\BuildCache::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\BuildCache(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Parent', $data) && $data['Parent'] !== null) { + $object->setParent($data['Parent']); + } + elseif (\array_key_exists('Parent', $data) && $data['Parent'] === null) { + $object->setParent(null); + } + if (\array_key_exists('Parents', $data) && $data['Parents'] !== null) { + $values = []; + foreach ($data['Parents'] as $value) { + $values[] = $value; + } + $object->setParents($values); + } + elseif (\array_key_exists('Parents', $data) && $data['Parents'] === null) { + $object->setParents(null); + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('InUse', $data) && $data['InUse'] !== null) { + $object->setInUse($data['InUse']); + } + elseif (\array_key_exists('InUse', $data) && $data['InUse'] === null) { + $object->setInUse(null); + } + if (\array_key_exists('Shared', $data) && $data['Shared'] !== null) { + $object->setShared($data['Shared']); + } + elseif (\array_key_exists('Shared', $data) && $data['Shared'] === null) { + $object->setShared(null); + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($data['Size']); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('LastUsedAt', $data) && $data['LastUsedAt'] !== null) { + $object->setLastUsedAt($data['LastUsedAt']); + } + elseif (\array_key_exists('LastUsedAt', $data) && $data['LastUsedAt'] === null) { + $object->setLastUsedAt(null); + } + if (\array_key_exists('UsageCount', $data) && $data['UsageCount'] !== null) { + $object->setUsageCount($data['UsageCount']); + } + elseif (\array_key_exists('UsageCount', $data) && $data['UsageCount'] === null) { + $object->setUsageCount(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('parent') && null !== $object->getParent()) { + $data['Parent'] = $object->getParent(); + } + if ($object->isInitialized('parents') && null !== $object->getParents()) { + $values = []; + foreach ($object->getParents() as $value) { + $values[] = $value; + } + $data['Parents'] = $values; + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('description') && null !== $object->getDescription()) { + $data['Description'] = $object->getDescription(); + } + if ($object->isInitialized('inUse') && null !== $object->getInUse()) { + $data['InUse'] = $object->getInUse(); + } + if ($object->isInitialized('shared') && null !== $object->getShared()) { + $data['Shared'] = $object->getShared(); + } + if ($object->isInitialized('size') && null !== $object->getSize()) { + $data['Size'] = $object->getSize(); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('lastUsedAt') && null !== $object->getLastUsedAt()) { + $data['LastUsedAt'] = $object->getLastUsedAt(); + } + if ($object->isInitialized('usageCount') && null !== $object->getUsageCount()) { + $data['UsageCount'] = $object->getUsageCount(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\BuildCache::class => false]; + } + } +} else { + class BuildCacheNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\BuildCache::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\BuildCache::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\BuildCache(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Parent', $data) && $data['Parent'] !== null) { + $object->setParent($data['Parent']); + } + elseif (\array_key_exists('Parent', $data) && $data['Parent'] === null) { + $object->setParent(null); + } + if (\array_key_exists('Parents', $data) && $data['Parents'] !== null) { + $values = []; + foreach ($data['Parents'] as $value) { + $values[] = $value; + } + $object->setParents($values); + } + elseif (\array_key_exists('Parents', $data) && $data['Parents'] === null) { + $object->setParents(null); + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Description', $data) && $data['Description'] !== null) { + $object->setDescription($data['Description']); + } + elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { + $object->setDescription(null); + } + if (\array_key_exists('InUse', $data) && $data['InUse'] !== null) { + $object->setInUse($data['InUse']); + } + elseif (\array_key_exists('InUse', $data) && $data['InUse'] === null) { + $object->setInUse(null); + } + if (\array_key_exists('Shared', $data) && $data['Shared'] !== null) { + $object->setShared($data['Shared']); + } + elseif (\array_key_exists('Shared', $data) && $data['Shared'] === null) { + $object->setShared(null); + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($data['Size']); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('LastUsedAt', $data) && $data['LastUsedAt'] !== null) { + $object->setLastUsedAt($data['LastUsedAt']); + } + elseif (\array_key_exists('LastUsedAt', $data) && $data['LastUsedAt'] === null) { + $object->setLastUsedAt(null); + } + if (\array_key_exists('UsageCount', $data) && $data['UsageCount'] !== null) { + $object->setUsageCount($data['UsageCount']); + } + elseif (\array_key_exists('UsageCount', $data) && $data['UsageCount'] === null) { + $object->setUsageCount(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('parent') && null !== $object->getParent()) { + $data['Parent'] = $object->getParent(); + } + if ($object->isInitialized('parents') && null !== $object->getParents()) { + $values = []; + foreach ($object->getParents() as $value) { + $values[] = $value; + } + $data['Parents'] = $values; + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('description') && null !== $object->getDescription()) { + $data['Description'] = $object->getDescription(); + } + if ($object->isInitialized('inUse') && null !== $object->getInUse()) { + $data['InUse'] = $object->getInUse(); + } + if ($object->isInitialized('shared') && null !== $object->getShared()) { + $data['Shared'] = $object->getShared(); + } + if ($object->isInitialized('size') && null !== $object->getSize()) { + $data['Size'] = $object->getSize(); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('lastUsedAt') && null !== $object->getLastUsedAt()) { + $data['LastUsedAt'] = $object->getLastUsedAt(); + } + if ($object->isInitialized('usageCount') && null !== $object->getUsageCount()) { + $data['UsageCount'] = $object->getUsageCount(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\BuildCache::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/BuildInfoNormalizer.php b/generated/Normalizer/BuildInfoNormalizer.php index e3fe05236..0e1ea677f 100644 --- a/generated/Normalizer/BuildInfoNormalizer.php +++ b/generated/Normalizer/BuildInfoNormalizer.php @@ -82,6 +82,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('progressDetail', $data) && $data['progressDetail'] === null) { $object->setProgressDetail(null); } + if (\array_key_exists('aux', $data) && $data['aux'] !== null) { + $object->setAux($this->denormalizer->denormalize($data['aux'], \Docker\API\Model\ImageID::class, 'json', $context)); + } + elseif (\array_key_exists('aux', $data) && $data['aux'] === null) { + $object->setAux(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -108,6 +114,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('progressDetail') && null !== $object->getProgressDetail()) { $data['progressDetail'] = $this->normalizer->normalize($object->getProgressDetail(), 'json', $context); } + if ($object->isInitialized('aux') && null !== $object->getAux()) { + $data['aux'] = $this->normalizer->normalize($object->getAux(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -187,6 +196,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('progressDetail', $data) && $data['progressDetail'] === null) { $object->setProgressDetail(null); } + if (\array_key_exists('aux', $data) && $data['aux'] !== null) { + $object->setAux($this->denormalizer->denormalize($data['aux'], \Docker\API\Model\ImageID::class, 'json', $context)); + } + elseif (\array_key_exists('aux', $data) && $data['aux'] === null) { + $object->setAux(null); + } return $object; } /** @@ -216,6 +231,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('progressDetail') && null !== $object->getProgressDetail()) { $data['progressDetail'] = $this->normalizer->normalize($object->getProgressDetail(), 'json', $context); } + if ($object->isInitialized('aux') && null !== $object->getAux()) { + $data['aux'] = $this->normalizer->normalize($object->getAux(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/BuildPrunePostResponse200Normalizer.php b/generated/Normalizer/BuildPrunePostResponse200Normalizer.php new file mode 100644 index 000000000..aed9fa906 --- /dev/null +++ b/generated/Normalizer/BuildPrunePostResponse200Normalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class BuildPrunePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\BuildPrunePostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\BuildPrunePostResponse200::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\BuildPrunePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('CachesDeleted', $data) && $data['CachesDeleted'] !== null) { + $values = []; + foreach ($data['CachesDeleted'] as $value) { + $values[] = $value; + } + $object->setCachesDeleted($values); + } + elseif (\array_key_exists('CachesDeleted', $data) && $data['CachesDeleted'] === null) { + $object->setCachesDeleted(null); + } + if (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] !== null) { + $object->setSpaceReclaimed($data['SpaceReclaimed']); + } + elseif (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] === null) { + $object->setSpaceReclaimed(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('cachesDeleted') && null !== $object->getCachesDeleted()) { + $values = []; + foreach ($object->getCachesDeleted() as $value) { + $values[] = $value; + } + $data['CachesDeleted'] = $values; + } + if ($object->isInitialized('spaceReclaimed') && null !== $object->getSpaceReclaimed()) { + $data['SpaceReclaimed'] = $object->getSpaceReclaimed(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\BuildPrunePostResponse200::class => false]; + } + } +} else { + class BuildPrunePostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\BuildPrunePostResponse200::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\BuildPrunePostResponse200::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\BuildPrunePostResponse200(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('CachesDeleted', $data) && $data['CachesDeleted'] !== null) { + $values = []; + foreach ($data['CachesDeleted'] as $value) { + $values[] = $value; + } + $object->setCachesDeleted($values); + } + elseif (\array_key_exists('CachesDeleted', $data) && $data['CachesDeleted'] === null) { + $object->setCachesDeleted(null); + } + if (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] !== null) { + $object->setSpaceReclaimed($data['SpaceReclaimed']); + } + elseif (\array_key_exists('SpaceReclaimed', $data) && $data['SpaceReclaimed'] === null) { + $object->setSpaceReclaimed(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('cachesDeleted') && null !== $object->getCachesDeleted()) { + $values = []; + foreach ($object->getCachesDeleted() as $value) { + $values[] = $value; + } + $data['CachesDeleted'] = $values; + } + if ($object->isInitialized('spaceReclaimed') && null !== $object->getSpaceReclaimed()) { + $data['SpaceReclaimed'] = $object->getSpaceReclaimed(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\BuildPrunePostResponse200::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ClusterInfoNormalizer.php b/generated/Normalizer/ClusterInfoNormalizer.php index eb343efe7..639eca276 100644 --- a/generated/Normalizer/ClusterInfoNormalizer.php +++ b/generated/Normalizer/ClusterInfoNormalizer.php @@ -47,7 +47,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setID(null); } if (\array_key_exists('Version', $data) && $data['Version'] !== null) { - $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ClusterInfoVersion::class, 'json', $context)); + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); } elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { $object->setVersion(null); @@ -70,6 +70,40 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { $object->setSpec(null); } + if (\array_key_exists('TLSInfo', $data) && $data['TLSInfo'] !== null) { + $object->setTLSInfo($this->denormalizer->denormalize($data['TLSInfo'], \Docker\API\Model\TLSInfo::class, 'json', $context)); + } + elseif (\array_key_exists('TLSInfo', $data) && $data['TLSInfo'] === null) { + $object->setTLSInfo(null); + } + if (\array_key_exists('RootRotationInProgress', $data) && $data['RootRotationInProgress'] !== null) { + $object->setRootRotationInProgress($data['RootRotationInProgress']); + } + elseif (\array_key_exists('RootRotationInProgress', $data) && $data['RootRotationInProgress'] === null) { + $object->setRootRotationInProgress(null); + } + if (\array_key_exists('DataPathPort', $data) && $data['DataPathPort'] !== null) { + $object->setDataPathPort($data['DataPathPort']); + } + elseif (\array_key_exists('DataPathPort', $data) && $data['DataPathPort'] === null) { + $object->setDataPathPort(null); + } + if (\array_key_exists('DefaultAddrPool', $data) && $data['DefaultAddrPool'] !== null) { + $values = []; + foreach ($data['DefaultAddrPool'] as $value) { + $values[] = $value; + } + $object->setDefaultAddrPool($values); + } + elseif (\array_key_exists('DefaultAddrPool', $data) && $data['DefaultAddrPool'] === null) { + $object->setDefaultAddrPool(null); + } + if (\array_key_exists('SubnetSize', $data) && $data['SubnetSize'] !== null) { + $object->setSubnetSize($data['SubnetSize']); + } + elseif (\array_key_exists('SubnetSize', $data) && $data['SubnetSize'] === null) { + $object->setSubnetSize(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -90,6 +124,25 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('spec') && null !== $object->getSpec()) { $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); } + if ($object->isInitialized('tLSInfo') && null !== $object->getTLSInfo()) { + $data['TLSInfo'] = $this->normalizer->normalize($object->getTLSInfo(), 'json', $context); + } + if ($object->isInitialized('rootRotationInProgress') && null !== $object->getRootRotationInProgress()) { + $data['RootRotationInProgress'] = $object->getRootRotationInProgress(); + } + if ($object->isInitialized('dataPathPort') && null !== $object->getDataPathPort()) { + $data['DataPathPort'] = $object->getDataPathPort(); + } + if ($object->isInitialized('defaultAddrPool') && null !== $object->getDefaultAddrPool()) { + $values = []; + foreach ($object->getDefaultAddrPool() as $value) { + $values[] = $value; + } + $data['DefaultAddrPool'] = $values; + } + if ($object->isInitialized('subnetSize') && null !== $object->getSubnetSize()) { + $data['SubnetSize'] = $object->getSubnetSize(); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -134,7 +187,7 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setID(null); } if (\array_key_exists('Version', $data) && $data['Version'] !== null) { - $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ClusterInfoVersion::class, 'json', $context)); + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); } elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { $object->setVersion(null); @@ -157,6 +210,40 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { $object->setSpec(null); } + if (\array_key_exists('TLSInfo', $data) && $data['TLSInfo'] !== null) { + $object->setTLSInfo($this->denormalizer->denormalize($data['TLSInfo'], \Docker\API\Model\TLSInfo::class, 'json', $context)); + } + elseif (\array_key_exists('TLSInfo', $data) && $data['TLSInfo'] === null) { + $object->setTLSInfo(null); + } + if (\array_key_exists('RootRotationInProgress', $data) && $data['RootRotationInProgress'] !== null) { + $object->setRootRotationInProgress($data['RootRotationInProgress']); + } + elseif (\array_key_exists('RootRotationInProgress', $data) && $data['RootRotationInProgress'] === null) { + $object->setRootRotationInProgress(null); + } + if (\array_key_exists('DataPathPort', $data) && $data['DataPathPort'] !== null) { + $object->setDataPathPort($data['DataPathPort']); + } + elseif (\array_key_exists('DataPathPort', $data) && $data['DataPathPort'] === null) { + $object->setDataPathPort(null); + } + if (\array_key_exists('DefaultAddrPool', $data) && $data['DefaultAddrPool'] !== null) { + $values = []; + foreach ($data['DefaultAddrPool'] as $value) { + $values[] = $value; + } + $object->setDefaultAddrPool($values); + } + elseif (\array_key_exists('DefaultAddrPool', $data) && $data['DefaultAddrPool'] === null) { + $object->setDefaultAddrPool(null); + } + if (\array_key_exists('SubnetSize', $data) && $data['SubnetSize'] !== null) { + $object->setSubnetSize($data['SubnetSize']); + } + elseif (\array_key_exists('SubnetSize', $data) && $data['SubnetSize'] === null) { + $object->setSubnetSize(null); + } return $object; } /** @@ -180,6 +267,25 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('spec') && null !== $object->getSpec()) { $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); } + if ($object->isInitialized('tLSInfo') && null !== $object->getTLSInfo()) { + $data['TLSInfo'] = $this->normalizer->normalize($object->getTLSInfo(), 'json', $context); + } + if ($object->isInitialized('rootRotationInProgress') && null !== $object->getRootRotationInProgress()) { + $data['RootRotationInProgress'] = $object->getRootRotationInProgress(); + } + if ($object->isInitialized('dataPathPort') && null !== $object->getDataPathPort()) { + $data['DataPathPort'] = $object->getDataPathPort(); + } + if ($object->isInitialized('defaultAddrPool') && null !== $object->getDefaultAddrPool()) { + $values = []; + foreach ($object->getDefaultAddrPool() as $value) { + $values[] = $value; + } + $data['DefaultAddrPool'] = $values; + } + if ($object->isInitialized('subnetSize') && null !== $object->getSubnetSize()) { + $data['SubnetSize'] = $object->getSubnetSize(); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/ClusterVolumeInfoNormalizer.php b/generated/Normalizer/ClusterVolumeInfoNormalizer.php new file mode 100644 index 000000000..31103db93 --- /dev/null +++ b/generated/Normalizer/ClusterVolumeInfoNormalizer.php @@ -0,0 +1,220 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ClusterVolumeInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterVolumeInfo::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolumeInfo::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterVolumeInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('CapacityBytes', $data) && $data['CapacityBytes'] !== null) { + $object->setCapacityBytes($data['CapacityBytes']); + } + elseif (\array_key_exists('CapacityBytes', $data) && $data['CapacityBytes'] === null) { + $object->setCapacityBytes(null); + } + if (\array_key_exists('VolumeContext', $data) && $data['VolumeContext'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['VolumeContext'] as $key => $value) { + $values[$key] = $value; + } + $object->setVolumeContext($values); + } + elseif (\array_key_exists('VolumeContext', $data) && $data['VolumeContext'] === null) { + $object->setVolumeContext(null); + } + if (\array_key_exists('VolumeID', $data) && $data['VolumeID'] !== null) { + $object->setVolumeID($data['VolumeID']); + } + elseif (\array_key_exists('VolumeID', $data) && $data['VolumeID'] === null) { + $object->setVolumeID(null); + } + if (\array_key_exists('AccessibleTopology', $data) && $data['AccessibleTopology'] !== null) { + $values_1 = []; + foreach ($data['AccessibleTopology'] as $value_1) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value_1 as $key_1 => $value_2) { + $values_2[$key_1] = $value_2; + } + $values_1[] = $values_2; + } + $object->setAccessibleTopology($values_1); + } + elseif (\array_key_exists('AccessibleTopology', $data) && $data['AccessibleTopology'] === null) { + $object->setAccessibleTopology(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('capacityBytes') && null !== $object->getCapacityBytes()) { + $data['CapacityBytes'] = $object->getCapacityBytes(); + } + if ($object->isInitialized('volumeContext') && null !== $object->getVolumeContext()) { + $values = []; + foreach ($object->getVolumeContext() as $key => $value) { + $values[$key] = $value; + } + $data['VolumeContext'] = $values; + } + if ($object->isInitialized('volumeID') && null !== $object->getVolumeID()) { + $data['VolumeID'] = $object->getVolumeID(); + } + if ($object->isInitialized('accessibleTopology') && null !== $object->getAccessibleTopology()) { + $values_1 = []; + foreach ($object->getAccessibleTopology() as $value_1) { + $values_2 = []; + foreach ($value_1 as $key_1 => $value_2) { + $values_2[$key_1] = $value_2; + } + $values_1[] = $values_2; + } + $data['AccessibleTopology'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterVolumeInfo::class => false]; + } + } +} else { + class ClusterVolumeInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterVolumeInfo::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolumeInfo::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterVolumeInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('CapacityBytes', $data) && $data['CapacityBytes'] !== null) { + $object->setCapacityBytes($data['CapacityBytes']); + } + elseif (\array_key_exists('CapacityBytes', $data) && $data['CapacityBytes'] === null) { + $object->setCapacityBytes(null); + } + if (\array_key_exists('VolumeContext', $data) && $data['VolumeContext'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['VolumeContext'] as $key => $value) { + $values[$key] = $value; + } + $object->setVolumeContext($values); + } + elseif (\array_key_exists('VolumeContext', $data) && $data['VolumeContext'] === null) { + $object->setVolumeContext(null); + } + if (\array_key_exists('VolumeID', $data) && $data['VolumeID'] !== null) { + $object->setVolumeID($data['VolumeID']); + } + elseif (\array_key_exists('VolumeID', $data) && $data['VolumeID'] === null) { + $object->setVolumeID(null); + } + if (\array_key_exists('AccessibleTopology', $data) && $data['AccessibleTopology'] !== null) { + $values_1 = []; + foreach ($data['AccessibleTopology'] as $value_1) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value_1 as $key_1 => $value_2) { + $values_2[$key_1] = $value_2; + } + $values_1[] = $values_2; + } + $object->setAccessibleTopology($values_1); + } + elseif (\array_key_exists('AccessibleTopology', $data) && $data['AccessibleTopology'] === null) { + $object->setAccessibleTopology(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('capacityBytes') && null !== $object->getCapacityBytes()) { + $data['CapacityBytes'] = $object->getCapacityBytes(); + } + if ($object->isInitialized('volumeContext') && null !== $object->getVolumeContext()) { + $values = []; + foreach ($object->getVolumeContext() as $key => $value) { + $values[$key] = $value; + } + $data['VolumeContext'] = $values; + } + if ($object->isInitialized('volumeID') && null !== $object->getVolumeID()) { + $data['VolumeID'] = $object->getVolumeID(); + } + if ($object->isInitialized('accessibleTopology') && null !== $object->getAccessibleTopology()) { + $values_1 = []; + foreach ($object->getAccessibleTopology() as $value_1) { + $values_2 = []; + foreach ($value_1 as $key_1 => $value_2) { + $values_2[$key_1] = $value_2; + } + $values_1[] = $values_2; + } + $data['AccessibleTopology'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterVolumeInfo::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmGetResponse200Normalizer.php b/generated/Normalizer/ClusterVolumeNormalizer.php similarity index 67% rename from generated/Normalizer/SwarmGetResponse200Normalizer.php rename to generated/Normalizer/ClusterVolumeNormalizer.php index c9856d57c..8d915afbf 100644 --- a/generated/Normalizer/SwarmGetResponse200Normalizer.php +++ b/generated/Normalizer/ClusterVolumeNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SwarmGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ClusterVolumeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class SwarmGetResponse200Normalizer implements DenormalizerInterface, Normalizer use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\SwarmGetResponse200::class; + return $type === \Docker\API\Model\ClusterVolume::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\SwarmGetResponse200::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolume::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\SwarmGetResponse200(); + $object = new \Docker\API\Model\ClusterVolume(); if (null === $data || false === \is_array($data)) { return $object; } @@ -47,7 +47,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setID(null); } if (\array_key_exists('Version', $data) && $data['Version'] !== null) { - $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ClusterInfoVersion::class, 'json', $context)); + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); } elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { $object->setVersion(null); @@ -65,16 +65,26 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setUpdatedAt(null); } if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { - $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\SwarmSpec::class, 'json', $context)); + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\ClusterVolumeSpec::class, 'json', $context)); } elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { $object->setSpec(null); } - if (\array_key_exists('JoinTokens', $data) && $data['JoinTokens'] !== null) { - $object->setJoinTokens($this->denormalizer->denormalize($data['JoinTokens'], \Docker\API\Model\SwarmGetResponse200JoinTokens::class, 'json', $context)); + if (\array_key_exists('Info', $data) && $data['Info'] !== null) { + $object->setInfo($this->denormalizer->denormalize($data['Info'], \Docker\API\Model\ClusterVolumeInfo::class, 'json', $context)); } - elseif (\array_key_exists('JoinTokens', $data) && $data['JoinTokens'] === null) { - $object->setJoinTokens(null); + elseif (\array_key_exists('Info', $data) && $data['Info'] === null) { + $object->setInfo(null); + } + if (\array_key_exists('PublishStatus', $data) && $data['PublishStatus'] !== null) { + $values = []; + foreach ($data['PublishStatus'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ClusterVolumePublishStatusItem::class, 'json', $context); + } + $object->setPublishStatus($values); + } + elseif (\array_key_exists('PublishStatus', $data) && $data['PublishStatus'] === null) { + $object->setPublishStatus(null); } return $object; } @@ -96,18 +106,25 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('spec') && null !== $object->getSpec()) { $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); } - if ($object->isInitialized('joinTokens') && null !== $object->getJoinTokens()) { - $data['JoinTokens'] = $this->normalizer->normalize($object->getJoinTokens(), 'json', $context); + if ($object->isInitialized('info') && null !== $object->getInfo()) { + $data['Info'] = $this->normalizer->normalize($object->getInfo(), 'json', $context); + } + if ($object->isInitialized('publishStatus') && null !== $object->getPublishStatus()) { + $values = []; + foreach ($object->getPublishStatus() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['PublishStatus'] = $values; } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\SwarmGetResponse200::class => false]; + return [\Docker\API\Model\ClusterVolume::class => false]; } } } else { - class SwarmGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ClusterVolumeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -115,11 +132,11 @@ class SwarmGetResponse200Normalizer implements DenormalizerInterface, Normalizer use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\SwarmGetResponse200::class; + return $type === \Docker\API\Model\ClusterVolume::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\SwarmGetResponse200::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolume::class; } /** * @return mixed @@ -132,7 +149,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\SwarmGetResponse200(); + $object = new \Docker\API\Model\ClusterVolume(); if (null === $data || false === \is_array($data)) { return $object; } @@ -143,7 +160,7 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setID(null); } if (\array_key_exists('Version', $data) && $data['Version'] !== null) { - $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ClusterInfoVersion::class, 'json', $context)); + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); } elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { $object->setVersion(null); @@ -161,16 +178,26 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setUpdatedAt(null); } if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { - $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\SwarmSpec::class, 'json', $context)); + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\ClusterVolumeSpec::class, 'json', $context)); } elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { $object->setSpec(null); } - if (\array_key_exists('JoinTokens', $data) && $data['JoinTokens'] !== null) { - $object->setJoinTokens($this->denormalizer->denormalize($data['JoinTokens'], \Docker\API\Model\SwarmGetResponse200JoinTokens::class, 'json', $context)); + if (\array_key_exists('Info', $data) && $data['Info'] !== null) { + $object->setInfo($this->denormalizer->denormalize($data['Info'], \Docker\API\Model\ClusterVolumeInfo::class, 'json', $context)); } - elseif (\array_key_exists('JoinTokens', $data) && $data['JoinTokens'] === null) { - $object->setJoinTokens(null); + elseif (\array_key_exists('Info', $data) && $data['Info'] === null) { + $object->setInfo(null); + } + if (\array_key_exists('PublishStatus', $data) && $data['PublishStatus'] !== null) { + $values = []; + foreach ($data['PublishStatus'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ClusterVolumePublishStatusItem::class, 'json', $context); + } + $object->setPublishStatus($values); + } + elseif (\array_key_exists('PublishStatus', $data) && $data['PublishStatus'] === null) { + $object->setPublishStatus(null); } return $object; } @@ -195,14 +222,21 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('spec') && null !== $object->getSpec()) { $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); } - if ($object->isInitialized('joinTokens') && null !== $object->getJoinTokens()) { - $data['JoinTokens'] = $this->normalizer->normalize($object->getJoinTokens(), 'json', $context); + if ($object->isInitialized('info') && null !== $object->getInfo()) { + $data['Info'] = $this->normalizer->normalize($object->getInfo(), 'json', $context); + } + if ($object->isInitialized('publishStatus') && null !== $object->getPublishStatus()) { + $values = []; + foreach ($object->getPublishStatus() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['PublishStatus'] = $values; } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\SwarmGetResponse200::class => false]; + return [\Docker\API\Model\ClusterVolume::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ClusterVolumePublishStatusItemNormalizer.php b/generated/Normalizer/ClusterVolumePublishStatusItemNormalizer.php new file mode 100644 index 000000000..9298bd160 --- /dev/null +++ b/generated/Normalizer/ClusterVolumePublishStatusItemNormalizer.php @@ -0,0 +1,170 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ClusterVolumePublishStatusItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterVolumePublishStatusItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolumePublishStatusItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterVolumePublishStatusItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NodeID', $data) && $data['NodeID'] !== null) { + $object->setNodeID($data['NodeID']); + } + elseif (\array_key_exists('NodeID', $data) && $data['NodeID'] === null) { + $object->setNodeID(null); + } + if (\array_key_exists('State', $data) && $data['State'] !== null) { + $object->setState($data['State']); + } + elseif (\array_key_exists('State', $data) && $data['State'] === null) { + $object->setState(null); + } + if (\array_key_exists('PublishContext', $data) && $data['PublishContext'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['PublishContext'] as $key => $value) { + $values[$key] = $value; + } + $object->setPublishContext($values); + } + elseif (\array_key_exists('PublishContext', $data) && $data['PublishContext'] === null) { + $object->setPublishContext(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('nodeID') && null !== $object->getNodeID()) { + $data['NodeID'] = $object->getNodeID(); + } + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['State'] = $object->getState(); + } + if ($object->isInitialized('publishContext') && null !== $object->getPublishContext()) { + $values = []; + foreach ($object->getPublishContext() as $key => $value) { + $values[$key] = $value; + } + $data['PublishContext'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterVolumePublishStatusItem::class => false]; + } + } +} else { + class ClusterVolumePublishStatusItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterVolumePublishStatusItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolumePublishStatusItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterVolumePublishStatusItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NodeID', $data) && $data['NodeID'] !== null) { + $object->setNodeID($data['NodeID']); + } + elseif (\array_key_exists('NodeID', $data) && $data['NodeID'] === null) { + $object->setNodeID(null); + } + if (\array_key_exists('State', $data) && $data['State'] !== null) { + $object->setState($data['State']); + } + elseif (\array_key_exists('State', $data) && $data['State'] === null) { + $object->setState(null); + } + if (\array_key_exists('PublishContext', $data) && $data['PublishContext'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['PublishContext'] as $key => $value) { + $values[$key] = $value; + } + $object->setPublishContext($values); + } + elseif (\array_key_exists('PublishContext', $data) && $data['PublishContext'] === null) { + $object->setPublishContext(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('nodeID') && null !== $object->getNodeID()) { + $data['NodeID'] = $object->getNodeID(); + } + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['State'] = $object->getState(); + } + if ($object->isInitialized('publishContext') && null !== $object->getPublishContext()) { + $values = []; + foreach ($object->getPublishContext() as $key => $value) { + $values[$key] = $value; + } + $data['PublishContext'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterVolumePublishStatusItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ClusterVolumeSpecAccessModeAccessibilityRequirementsNormalizer.php b/generated/Normalizer/ClusterVolumeSpecAccessModeAccessibilityRequirementsNormalizer.php new file mode 100644 index 000000000..c4eb86279 --- /dev/null +++ b/generated/Normalizer/ClusterVolumeSpecAccessModeAccessibilityRequirementsNormalizer.php @@ -0,0 +1,200 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ClusterVolumeSpecAccessModeAccessibilityRequirementsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Requisite', $data) && $data['Requisite'] !== null) { + $values = []; + foreach ($data['Requisite'] as $value) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value as $key => $value_1) { + $values_1[$key] = $value_1; + } + $values[] = $values_1; + } + $object->setRequisite($values); + } + elseif (\array_key_exists('Requisite', $data) && $data['Requisite'] === null) { + $object->setRequisite(null); + } + if (\array_key_exists('Preferred', $data) && $data['Preferred'] !== null) { + $values_2 = []; + foreach ($data['Preferred'] as $value_2) { + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value_2 as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $values_2[] = $values_3; + } + $object->setPreferred($values_2); + } + elseif (\array_key_exists('Preferred', $data) && $data['Preferred'] === null) { + $object->setPreferred(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('requisite') && null !== $object->getRequisite()) { + $values = []; + foreach ($object->getRequisite() as $value) { + $values_1 = []; + foreach ($value as $key => $value_1) { + $values_1[$key] = $value_1; + } + $values[] = $values_1; + } + $data['Requisite'] = $values; + } + if ($object->isInitialized('preferred') && null !== $object->getPreferred()) { + $values_2 = []; + foreach ($object->getPreferred() as $value_2) { + $values_3 = []; + foreach ($value_2 as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $values_2[] = $values_3; + } + $data['Preferred'] = $values_2; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements::class => false]; + } + } +} else { + class ClusterVolumeSpecAccessModeAccessibilityRequirementsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Requisite', $data) && $data['Requisite'] !== null) { + $values = []; + foreach ($data['Requisite'] as $value) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value as $key => $value_1) { + $values_1[$key] = $value_1; + } + $values[] = $values_1; + } + $object->setRequisite($values); + } + elseif (\array_key_exists('Requisite', $data) && $data['Requisite'] === null) { + $object->setRequisite(null); + } + if (\array_key_exists('Preferred', $data) && $data['Preferred'] !== null) { + $values_2 = []; + foreach ($data['Preferred'] as $value_2) { + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($value_2 as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $values_2[] = $values_3; + } + $object->setPreferred($values_2); + } + elseif (\array_key_exists('Preferred', $data) && $data['Preferred'] === null) { + $object->setPreferred(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('requisite') && null !== $object->getRequisite()) { + $values = []; + foreach ($object->getRequisite() as $value) { + $values_1 = []; + foreach ($value as $key => $value_1) { + $values_1[$key] = $value_1; + } + $values[] = $values_1; + } + $data['Requisite'] = $values; + } + if ($object->isInitialized('preferred') && null !== $object->getPreferred()) { + $values_2 = []; + foreach ($object->getPreferred() as $value_2) { + $values_3 = []; + foreach ($value_2 as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $values_2[] = $values_3; + } + $data['Preferred'] = $values_2; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ClusterVolumeSpecAccessModeCapacityRangeNormalizer.php b/generated/Normalizer/ClusterVolumeSpecAccessModeCapacityRangeNormalizer.php new file mode 100644 index 000000000..5446c459d --- /dev/null +++ b/generated/Normalizer/ClusterVolumeSpecAccessModeCapacityRangeNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ClusterVolumeSpecAccessModeCapacityRangeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterVolumeSpecAccessModeCapacityRange::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolumeSpecAccessModeCapacityRange::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterVolumeSpecAccessModeCapacityRange(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('RequiredBytes', $data) && $data['RequiredBytes'] !== null) { + $object->setRequiredBytes($data['RequiredBytes']); + } + elseif (\array_key_exists('RequiredBytes', $data) && $data['RequiredBytes'] === null) { + $object->setRequiredBytes(null); + } + if (\array_key_exists('LimitBytes', $data) && $data['LimitBytes'] !== null) { + $object->setLimitBytes($data['LimitBytes']); + } + elseif (\array_key_exists('LimitBytes', $data) && $data['LimitBytes'] === null) { + $object->setLimitBytes(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('requiredBytes') && null !== $object->getRequiredBytes()) { + $data['RequiredBytes'] = $object->getRequiredBytes(); + } + if ($object->isInitialized('limitBytes') && null !== $object->getLimitBytes()) { + $data['LimitBytes'] = $object->getLimitBytes(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterVolumeSpecAccessModeCapacityRange::class => false]; + } + } +} else { + class ClusterVolumeSpecAccessModeCapacityRangeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterVolumeSpecAccessModeCapacityRange::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolumeSpecAccessModeCapacityRange::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterVolumeSpecAccessModeCapacityRange(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('RequiredBytes', $data) && $data['RequiredBytes'] !== null) { + $object->setRequiredBytes($data['RequiredBytes']); + } + elseif (\array_key_exists('RequiredBytes', $data) && $data['RequiredBytes'] === null) { + $object->setRequiredBytes(null); + } + if (\array_key_exists('LimitBytes', $data) && $data['LimitBytes'] !== null) { + $object->setLimitBytes($data['LimitBytes']); + } + elseif (\array_key_exists('LimitBytes', $data) && $data['LimitBytes'] === null) { + $object->setLimitBytes(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('requiredBytes') && null !== $object->getRequiredBytes()) { + $data['RequiredBytes'] = $object->getRequiredBytes(); + } + if ($object->isInitialized('limitBytes') && null !== $object->getLimitBytes()) { + $data['LimitBytes'] = $object->getLimitBytes(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterVolumeSpecAccessModeCapacityRange::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ClusterVolumeSpecAccessModeNormalizer.php b/generated/Normalizer/ClusterVolumeSpecAccessModeNormalizer.php new file mode 100644 index 000000000..e246be60e --- /dev/null +++ b/generated/Normalizer/ClusterVolumeSpecAccessModeNormalizer.php @@ -0,0 +1,242 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ClusterVolumeSpecAccessModeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterVolumeSpecAccessMode::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolumeSpecAccessMode::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterVolumeSpecAccessMode(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Scope', $data) && $data['Scope'] !== null) { + $object->setScope($data['Scope']); + } + elseif (\array_key_exists('Scope', $data) && $data['Scope'] === null) { + $object->setScope(null); + } + if (\array_key_exists('Sharing', $data) && $data['Sharing'] !== null) { + $object->setSharing($data['Sharing']); + } + elseif (\array_key_exists('Sharing', $data) && $data['Sharing'] === null) { + $object->setSharing(null); + } + if (\array_key_exists('MountVolume', $data) && $data['MountVolume'] !== null) { + $object->setMountVolume($data['MountVolume']); + } + elseif (\array_key_exists('MountVolume', $data) && $data['MountVolume'] === null) { + $object->setMountVolume(null); + } + if (\array_key_exists('Secrets', $data) && $data['Secrets'] !== null) { + $values = []; + foreach ($data['Secrets'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ClusterVolumeSpecAccessModeSecretsItem::class, 'json', $context); + } + $object->setSecrets($values); + } + elseif (\array_key_exists('Secrets', $data) && $data['Secrets'] === null) { + $object->setSecrets(null); + } + if (\array_key_exists('AccessibilityRequirements', $data) && $data['AccessibilityRequirements'] !== null) { + $object->setAccessibilityRequirements($this->denormalizer->denormalize($data['AccessibilityRequirements'], \Docker\API\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements::class, 'json', $context)); + } + elseif (\array_key_exists('AccessibilityRequirements', $data) && $data['AccessibilityRequirements'] === null) { + $object->setAccessibilityRequirements(null); + } + if (\array_key_exists('CapacityRange', $data) && $data['CapacityRange'] !== null) { + $object->setCapacityRange($this->denormalizer->denormalize($data['CapacityRange'], \Docker\API\Model\ClusterVolumeSpecAccessModeCapacityRange::class, 'json', $context)); + } + elseif (\array_key_exists('CapacityRange', $data) && $data['CapacityRange'] === null) { + $object->setCapacityRange(null); + } + if (\array_key_exists('Availability', $data) && $data['Availability'] !== null) { + $object->setAvailability($data['Availability']); + } + elseif (\array_key_exists('Availability', $data) && $data['Availability'] === null) { + $object->setAvailability(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('scope') && null !== $object->getScope()) { + $data['Scope'] = $object->getScope(); + } + if ($object->isInitialized('sharing') && null !== $object->getSharing()) { + $data['Sharing'] = $object->getSharing(); + } + if ($object->isInitialized('mountVolume') && null !== $object->getMountVolume()) { + $data['MountVolume'] = $object->getMountVolume(); + } + if ($object->isInitialized('secrets') && null !== $object->getSecrets()) { + $values = []; + foreach ($object->getSecrets() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Secrets'] = $values; + } + if ($object->isInitialized('accessibilityRequirements') && null !== $object->getAccessibilityRequirements()) { + $data['AccessibilityRequirements'] = $this->normalizer->normalize($object->getAccessibilityRequirements(), 'json', $context); + } + if ($object->isInitialized('capacityRange') && null !== $object->getCapacityRange()) { + $data['CapacityRange'] = $this->normalizer->normalize($object->getCapacityRange(), 'json', $context); + } + if ($object->isInitialized('availability') && null !== $object->getAvailability()) { + $data['Availability'] = $object->getAvailability(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterVolumeSpecAccessMode::class => false]; + } + } +} else { + class ClusterVolumeSpecAccessModeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterVolumeSpecAccessMode::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolumeSpecAccessMode::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterVolumeSpecAccessMode(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Scope', $data) && $data['Scope'] !== null) { + $object->setScope($data['Scope']); + } + elseif (\array_key_exists('Scope', $data) && $data['Scope'] === null) { + $object->setScope(null); + } + if (\array_key_exists('Sharing', $data) && $data['Sharing'] !== null) { + $object->setSharing($data['Sharing']); + } + elseif (\array_key_exists('Sharing', $data) && $data['Sharing'] === null) { + $object->setSharing(null); + } + if (\array_key_exists('MountVolume', $data) && $data['MountVolume'] !== null) { + $object->setMountVolume($data['MountVolume']); + } + elseif (\array_key_exists('MountVolume', $data) && $data['MountVolume'] === null) { + $object->setMountVolume(null); + } + if (\array_key_exists('Secrets', $data) && $data['Secrets'] !== null) { + $values = []; + foreach ($data['Secrets'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ClusterVolumeSpecAccessModeSecretsItem::class, 'json', $context); + } + $object->setSecrets($values); + } + elseif (\array_key_exists('Secrets', $data) && $data['Secrets'] === null) { + $object->setSecrets(null); + } + if (\array_key_exists('AccessibilityRequirements', $data) && $data['AccessibilityRequirements'] !== null) { + $object->setAccessibilityRequirements($this->denormalizer->denormalize($data['AccessibilityRequirements'], \Docker\API\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements::class, 'json', $context)); + } + elseif (\array_key_exists('AccessibilityRequirements', $data) && $data['AccessibilityRequirements'] === null) { + $object->setAccessibilityRequirements(null); + } + if (\array_key_exists('CapacityRange', $data) && $data['CapacityRange'] !== null) { + $object->setCapacityRange($this->denormalizer->denormalize($data['CapacityRange'], \Docker\API\Model\ClusterVolumeSpecAccessModeCapacityRange::class, 'json', $context)); + } + elseif (\array_key_exists('CapacityRange', $data) && $data['CapacityRange'] === null) { + $object->setCapacityRange(null); + } + if (\array_key_exists('Availability', $data) && $data['Availability'] !== null) { + $object->setAvailability($data['Availability']); + } + elseif (\array_key_exists('Availability', $data) && $data['Availability'] === null) { + $object->setAvailability(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('scope') && null !== $object->getScope()) { + $data['Scope'] = $object->getScope(); + } + if ($object->isInitialized('sharing') && null !== $object->getSharing()) { + $data['Sharing'] = $object->getSharing(); + } + if ($object->isInitialized('mountVolume') && null !== $object->getMountVolume()) { + $data['MountVolume'] = $object->getMountVolume(); + } + if ($object->isInitialized('secrets') && null !== $object->getSecrets()) { + $values = []; + foreach ($object->getSecrets() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Secrets'] = $values; + } + if ($object->isInitialized('accessibilityRequirements') && null !== $object->getAccessibilityRequirements()) { + $data['AccessibilityRequirements'] = $this->normalizer->normalize($object->getAccessibilityRequirements(), 'json', $context); + } + if ($object->isInitialized('capacityRange') && null !== $object->getCapacityRange()) { + $data['CapacityRange'] = $this->normalizer->normalize($object->getCapacityRange(), 'json', $context); + } + if ($object->isInitialized('availability') && null !== $object->getAvailability()) { + $data['Availability'] = $object->getAvailability(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterVolumeSpecAccessMode::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ClusterVolumeSpecAccessModeSecretsItemNormalizer.php b/generated/Normalizer/ClusterVolumeSpecAccessModeSecretsItemNormalizer.php new file mode 100644 index 000000000..08f123afc --- /dev/null +++ b/generated/Normalizer/ClusterVolumeSpecAccessModeSecretsItemNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ClusterVolumeSpecAccessModeSecretsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterVolumeSpecAccessModeSecretsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolumeSpecAccessModeSecretsItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterVolumeSpecAccessModeSecretsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Key', $data) && $data['Key'] !== null) { + $object->setKey($data['Key']); + } + elseif (\array_key_exists('Key', $data) && $data['Key'] === null) { + $object->setKey(null); + } + if (\array_key_exists('Secret', $data) && $data['Secret'] !== null) { + $object->setSecret($data['Secret']); + } + elseif (\array_key_exists('Secret', $data) && $data['Secret'] === null) { + $object->setSecret(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('key') && null !== $object->getKey()) { + $data['Key'] = $object->getKey(); + } + if ($object->isInitialized('secret') && null !== $object->getSecret()) { + $data['Secret'] = $object->getSecret(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterVolumeSpecAccessModeSecretsItem::class => false]; + } + } +} else { + class ClusterVolumeSpecAccessModeSecretsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterVolumeSpecAccessModeSecretsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolumeSpecAccessModeSecretsItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterVolumeSpecAccessModeSecretsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Key', $data) && $data['Key'] !== null) { + $object->setKey($data['Key']); + } + elseif (\array_key_exists('Key', $data) && $data['Key'] === null) { + $object->setKey(null); + } + if (\array_key_exists('Secret', $data) && $data['Secret'] !== null) { + $object->setSecret($data['Secret']); + } + elseif (\array_key_exists('Secret', $data) && $data['Secret'] === null) { + $object->setSecret(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('key') && null !== $object->getKey()) { + $data['Key'] = $object->getKey(); + } + if ($object->isInitialized('secret') && null !== $object->getSecret()) { + $data['Secret'] = $object->getSecret(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterVolumeSpecAccessModeSecretsItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ClusterVolumeSpecNormalizer.php b/generated/Normalizer/ClusterVolumeSpecNormalizer.php new file mode 100644 index 000000000..fcee7d2c0 --- /dev/null +++ b/generated/Normalizer/ClusterVolumeSpecNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ClusterVolumeSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterVolumeSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolumeSpec::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterVolumeSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Group', $data) && $data['Group'] !== null) { + $object->setGroup($data['Group']); + } + elseif (\array_key_exists('Group', $data) && $data['Group'] === null) { + $object->setGroup(null); + } + if (\array_key_exists('AccessMode', $data) && $data['AccessMode'] !== null) { + $object->setAccessMode($this->denormalizer->denormalize($data['AccessMode'], \Docker\API\Model\ClusterVolumeSpecAccessMode::class, 'json', $context)); + } + elseif (\array_key_exists('AccessMode', $data) && $data['AccessMode'] === null) { + $object->setAccessMode(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('group') && null !== $object->getGroup()) { + $data['Group'] = $object->getGroup(); + } + if ($object->isInitialized('accessMode') && null !== $object->getAccessMode()) { + $data['AccessMode'] = $this->normalizer->normalize($object->getAccessMode(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterVolumeSpec::class => false]; + } + } +} else { + class ClusterVolumeSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ClusterVolumeSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ClusterVolumeSpec::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ClusterVolumeSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Group', $data) && $data['Group'] !== null) { + $object->setGroup($data['Group']); + } + elseif (\array_key_exists('Group', $data) && $data['Group'] === null) { + $object->setGroup(null); + } + if (\array_key_exists('AccessMode', $data) && $data['AccessMode'] !== null) { + $object->setAccessMode($this->denormalizer->denormalize($data['AccessMode'], \Docker\API\Model\ClusterVolumeSpecAccessMode::class, 'json', $context)); + } + elseif (\array_key_exists('AccessMode', $data) && $data['AccessMode'] === null) { + $object->setAccessMode(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('group') && null !== $object->getGroup()) { + $data['Group'] = $object->getGroup(); + } + if ($object->isInitialized('accessMode') && null !== $object->getAccessMode()) { + $data['AccessMode'] = $this->normalizer->normalize($object->getAccessMode(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ClusterVolumeSpec::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServicesCreatePostResponse201Normalizer.php b/generated/Normalizer/CommitNormalizer.php similarity index 71% rename from generated/Normalizer/ServicesCreatePostResponse201Normalizer.php rename to generated/Normalizer/CommitNormalizer.php index b29c7aa8f..21c7c3f55 100644 --- a/generated/Normalizer/ServicesCreatePostResponse201Normalizer.php +++ b/generated/Normalizer/CommitNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ServicesCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class CommitNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ServicesCreatePostResponse201Normalizer implements DenormalizerInterface, use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ServicesCreatePostResponse201::class; + return $type === \Docker\API\Model\Commit::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ServicesCreatePostResponse201::class; + return is_object($data) && get_class($data) === \Docker\API\Model\Commit::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ServicesCreatePostResponse201(); + $object = new \Docker\API\Model\Commit(); if (null === $data || false === \is_array($data)) { return $object; } @@ -46,11 +46,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { $object->setID(null); } - if (\array_key_exists('Warning', $data) && $data['Warning'] !== null) { - $object->setWarning($data['Warning']); + if (\array_key_exists('Expected', $data) && $data['Expected'] !== null) { + $object->setExpected($data['Expected']); } - elseif (\array_key_exists('Warning', $data) && $data['Warning'] === null) { - $object->setWarning(null); + elseif (\array_key_exists('Expected', $data) && $data['Expected'] === null) { + $object->setExpected(null); } return $object; } @@ -60,18 +60,18 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('iD') && null !== $object->getID()) { $data['ID'] = $object->getID(); } - if ($object->isInitialized('warning') && null !== $object->getWarning()) { - $data['Warning'] = $object->getWarning(); + if ($object->isInitialized('expected') && null !== $object->getExpected()) { + $data['Expected'] = $object->getExpected(); } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ServicesCreatePostResponse201::class => false]; + return [\Docker\API\Model\Commit::class => false]; } } } else { - class ServicesCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class CommitNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -79,11 +79,11 @@ class ServicesCreatePostResponse201Normalizer implements DenormalizerInterface, use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ServicesCreatePostResponse201::class; + return $type === \Docker\API\Model\Commit::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ServicesCreatePostResponse201::class; + return is_object($data) && get_class($data) === \Docker\API\Model\Commit::class; } /** * @return mixed @@ -96,7 +96,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ServicesCreatePostResponse201(); + $object = new \Docker\API\Model\Commit(); if (null === $data || false === \is_array($data)) { return $object; } @@ -106,11 +106,11 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { $object->setID(null); } - if (\array_key_exists('Warning', $data) && $data['Warning'] !== null) { - $object->setWarning($data['Warning']); + if (\array_key_exists('Expected', $data) && $data['Expected'] !== null) { + $object->setExpected($data['Expected']); } - elseif (\array_key_exists('Warning', $data) && $data['Warning'] === null) { - $object->setWarning(null); + elseif (\array_key_exists('Expected', $data) && $data['Expected'] === null) { + $object->setExpected(null); } return $object; } @@ -123,14 +123,14 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('iD') && null !== $object->getID()) { $data['ID'] = $object->getID(); } - if ($object->isInitialized('warning') && null !== $object->getWarning()) { - $data['Warning'] = $object->getWarning(); + if ($object->isInitialized('expected') && null !== $object->getExpected()) { + $data['Expected'] = $object->getExpected(); } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ServicesCreatePostResponse201::class => false]; + return [\Docker\API\Model\Commit::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ConfigNormalizer.php b/generated/Normalizer/ConfigNormalizer.php index 2cc8a6a45..4dca1cc19 100644 --- a/generated/Normalizer/ConfigNormalizer.php +++ b/generated/Normalizer/ConfigNormalizer.php @@ -40,315 +40,55 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Hostname', $data) && $data['Hostname'] !== null) { - $object->setHostname($data['Hostname']); + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); } - elseif (\array_key_exists('Hostname', $data) && $data['Hostname'] === null) { - $object->setHostname(null); + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); } - if (\array_key_exists('Domainname', $data) && $data['Domainname'] !== null) { - $object->setDomainname($data['Domainname']); + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); } - elseif (\array_key_exists('Domainname', $data) && $data['Domainname'] === null) { - $object->setDomainname(null); + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); } - if (\array_key_exists('User', $data) && $data['User'] !== null) { - $object->setUser($data['User']); + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); } - elseif (\array_key_exists('User', $data) && $data['User'] === null) { - $object->setUser(null); + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); } - if (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] !== null) { - $object->setAttachStdin($data['AttachStdin']); + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); } - elseif (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] === null) { - $object->setAttachStdin(null); + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); } - if (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] !== null) { - $object->setAttachStdout($data['AttachStdout']); + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\ConfigSpec::class, 'json', $context)); } - elseif (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] === null) { - $object->setAttachStdout(null); - } - if (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] !== null) { - $object->setAttachStderr($data['AttachStderr']); - } - elseif (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] === null) { - $object->setAttachStderr(null); - } - if (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] !== null) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['ExposedPorts'] as $key => $value) { - $values[$key] = $value; - } - $object->setExposedPorts($values); - } - elseif (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] === null) { - $object->setExposedPorts(null); - } - if (\array_key_exists('Tty', $data) && $data['Tty'] !== null) { - $object->setTty($data['Tty']); - } - elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { - $object->setTty(null); - } - if (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] !== null) { - $object->setOpenStdin($data['OpenStdin']); - } - elseif (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] === null) { - $object->setOpenStdin(null); - } - if (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] !== null) { - $object->setStdinOnce($data['StdinOnce']); - } - elseif (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] === null) { - $object->setStdinOnce(null); - } - if (\array_key_exists('Env', $data) && $data['Env'] !== null) { - $values_1 = []; - foreach ($data['Env'] as $value_1) { - $values_1[] = $value_1; - } - $object->setEnv($values_1); - } - elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { - $object->setEnv(null); - } - if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { - $value_2 = $data['Cmd']; - if (is_array($data['Cmd']) && $this->isOnlyNumericKeys($data['Cmd'])) { - $values_2 = []; - foreach ($data['Cmd'] as $value_3) { - $values_2[] = $value_3; - } - $value_2 = $values_2; - } elseif (is_string($data['Cmd'])) { - $value_2 = $data['Cmd']; - } - $object->setCmd($value_2); - } - elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { - $object->setCmd(null); - } - if (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] !== null) { - $object->setHealthcheck($this->denormalizer->denormalize($data['Healthcheck'], \Docker\API\Model\ConfigHealthcheck::class, 'json', $context)); - } - elseif (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] === null) { - $object->setHealthcheck(null); - } - if (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] !== null) { - $object->setArgsEscaped($data['ArgsEscaped']); - } - elseif (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] === null) { - $object->setArgsEscaped(null); - } - if (\array_key_exists('Image', $data) && $data['Image'] !== null) { - $object->setImage($data['Image']); - } - elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { - $object->setImage(null); - } - if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { - $object->setVolumes($this->denormalizer->denormalize($data['Volumes'], \Docker\API\Model\ConfigVolumes::class, 'json', $context)); - } - elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { - $object->setVolumes(null); - } - if (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] !== null) { - $object->setWorkingDir($data['WorkingDir']); - } - elseif (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] === null) { - $object->setWorkingDir(null); - } - if (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] !== null) { - $value_4 = $data['Entrypoint']; - if (is_array($data['Entrypoint']) && $this->isOnlyNumericKeys($data['Entrypoint'])) { - $values_3 = []; - foreach ($data['Entrypoint'] as $value_5) { - $values_3[] = $value_5; - } - $value_4 = $values_3; - } elseif (is_string($data['Entrypoint'])) { - $value_4 = $data['Entrypoint']; - } - $object->setEntrypoint($value_4); - } - elseif (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] === null) { - $object->setEntrypoint(null); - } - if (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] !== null) { - $object->setNetworkDisabled($data['NetworkDisabled']); - } - elseif (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] === null) { - $object->setNetworkDisabled(null); - } - if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { - $object->setMacAddress($data['MacAddress']); - } - elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { - $object->setMacAddress(null); - } - if (\array_key_exists('OnBuild', $data) && $data['OnBuild'] !== null) { - $values_4 = []; - foreach ($data['OnBuild'] as $value_6) { - $values_4[] = $value_6; - } - $object->setOnBuild($values_4); - } - elseif (\array_key_exists('OnBuild', $data) && $data['OnBuild'] === null) { - $object->setOnBuild(null); - } - if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { - $values_5 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Labels'] as $key_1 => $value_7) { - $values_5[$key_1] = $value_7; - } - $object->setLabels($values_5); - } - elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { - $object->setLabels(null); - } - if (\array_key_exists('StopSignal', $data) && $data['StopSignal'] !== null) { - $object->setStopSignal($data['StopSignal']); - } - elseif (\array_key_exists('StopSignal', $data) && $data['StopSignal'] === null) { - $object->setStopSignal(null); - } - if (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] !== null) { - $object->setStopTimeout($data['StopTimeout']); - } - elseif (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] === null) { - $object->setStopTimeout(null); - } - if (\array_key_exists('Shell', $data) && $data['Shell'] !== null) { - $values_6 = []; - foreach ($data['Shell'] as $value_8) { - $values_6[] = $value_8; - } - $object->setShell($values_6); - } - elseif (\array_key_exists('Shell', $data) && $data['Shell'] === null) { - $object->setShell(null); + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('hostname') && null !== $object->getHostname()) { - $data['Hostname'] = $object->getHostname(); - } - if ($object->isInitialized('domainname') && null !== $object->getDomainname()) { - $data['Domainname'] = $object->getDomainname(); - } - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['User'] = $object->getUser(); - } - if ($object->isInitialized('attachStdin') && null !== $object->getAttachStdin()) { - $data['AttachStdin'] = $object->getAttachStdin(); - } - if ($object->isInitialized('attachStdout') && null !== $object->getAttachStdout()) { - $data['AttachStdout'] = $object->getAttachStdout(); - } - if ($object->isInitialized('attachStderr') && null !== $object->getAttachStderr()) { - $data['AttachStderr'] = $object->getAttachStderr(); - } - if ($object->isInitialized('exposedPorts') && null !== $object->getExposedPorts()) { - $values = []; - foreach ($object->getExposedPorts() as $key => $value) { - $values[$key] = $value; - } - $data['ExposedPorts'] = $values; - } - if ($object->isInitialized('tty') && null !== $object->getTty()) { - $data['Tty'] = $object->getTty(); - } - if ($object->isInitialized('openStdin') && null !== $object->getOpenStdin()) { - $data['OpenStdin'] = $object->getOpenStdin(); - } - if ($object->isInitialized('stdinOnce') && null !== $object->getStdinOnce()) { - $data['StdinOnce'] = $object->getStdinOnce(); - } - if ($object->isInitialized('env') && null !== $object->getEnv()) { - $values_1 = []; - foreach ($object->getEnv() as $value_1) { - $values_1[] = $value_1; - } - $data['Env'] = $values_1; - } - if ($object->isInitialized('cmd') && null !== $object->getCmd()) { - $value_2 = $object->getCmd(); - if (is_array($object->getCmd())) { - $values_2 = []; - foreach ($object->getCmd() as $value_3) { - $values_2[] = $value_3; - } - $value_2 = $values_2; - } elseif (is_string($object->getCmd())) { - $value_2 = $object->getCmd(); - } - $data['Cmd'] = $value_2; - } - if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) { - $data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context); - } - if ($object->isInitialized('argsEscaped') && null !== $object->getArgsEscaped()) { - $data['ArgsEscaped'] = $object->getArgsEscaped(); - } - if ($object->isInitialized('image') && null !== $object->getImage()) { - $data['Image'] = $object->getImage(); - } - if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { - $data['Volumes'] = $this->normalizer->normalize($object->getVolumes(), 'json', $context); - } - if ($object->isInitialized('workingDir') && null !== $object->getWorkingDir()) { - $data['WorkingDir'] = $object->getWorkingDir(); - } - if ($object->isInitialized('entrypoint') && null !== $object->getEntrypoint()) { - $value_4 = $object->getEntrypoint(); - if (is_array($object->getEntrypoint())) { - $values_3 = []; - foreach ($object->getEntrypoint() as $value_5) { - $values_3[] = $value_5; - } - $value_4 = $values_3; - } elseif (is_string($object->getEntrypoint())) { - $value_4 = $object->getEntrypoint(); - } - $data['Entrypoint'] = $value_4; - } - if ($object->isInitialized('networkDisabled') && null !== $object->getNetworkDisabled()) { - $data['NetworkDisabled'] = $object->getNetworkDisabled(); - } - if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { - $data['MacAddress'] = $object->getMacAddress(); - } - if ($object->isInitialized('onBuild') && null !== $object->getOnBuild()) { - $values_4 = []; - foreach ($object->getOnBuild() as $value_6) { - $values_4[] = $value_6; - } - $data['OnBuild'] = $values_4; - } - if ($object->isInitialized('labels') && null !== $object->getLabels()) { - $values_5 = []; - foreach ($object->getLabels() as $key_1 => $value_7) { - $values_5[$key_1] = $value_7; - } - $data['Labels'] = $values_5; - } - if ($object->isInitialized('stopSignal') && null !== $object->getStopSignal()) { - $data['StopSignal'] = $object->getStopSignal(); - } - if ($object->isInitialized('stopTimeout') && null !== $object->getStopTimeout()) { - $data['StopTimeout'] = $object->getStopTimeout(); - } - if ($object->isInitialized('shell') && null !== $object->getShell()) { - $values_6 = []; - foreach ($object->getShell() as $value_8) { - $values_6[] = $value_8; - } - $data['Shell'] = $values_6; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); } return $data; } @@ -387,195 +127,35 @@ public function denormalize($data, $type, $format = null, array $context = []) if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Hostname', $data) && $data['Hostname'] !== null) { - $object->setHostname($data['Hostname']); + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); } - elseif (\array_key_exists('Hostname', $data) && $data['Hostname'] === null) { - $object->setHostname(null); + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); } - if (\array_key_exists('Domainname', $data) && $data['Domainname'] !== null) { - $object->setDomainname($data['Domainname']); + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); } - elseif (\array_key_exists('Domainname', $data) && $data['Domainname'] === null) { - $object->setDomainname(null); + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); } - if (\array_key_exists('User', $data) && $data['User'] !== null) { - $object->setUser($data['User']); + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); } - elseif (\array_key_exists('User', $data) && $data['User'] === null) { - $object->setUser(null); + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); } - if (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] !== null) { - $object->setAttachStdin($data['AttachStdin']); + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); } - elseif (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] === null) { - $object->setAttachStdin(null); + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); } - if (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] !== null) { - $object->setAttachStdout($data['AttachStdout']); + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\ConfigSpec::class, 'json', $context)); } - elseif (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] === null) { - $object->setAttachStdout(null); - } - if (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] !== null) { - $object->setAttachStderr($data['AttachStderr']); - } - elseif (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] === null) { - $object->setAttachStderr(null); - } - if (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] !== null) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['ExposedPorts'] as $key => $value) { - $values[$key] = $value; - } - $object->setExposedPorts($values); - } - elseif (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] === null) { - $object->setExposedPorts(null); - } - if (\array_key_exists('Tty', $data) && $data['Tty'] !== null) { - $object->setTty($data['Tty']); - } - elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { - $object->setTty(null); - } - if (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] !== null) { - $object->setOpenStdin($data['OpenStdin']); - } - elseif (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] === null) { - $object->setOpenStdin(null); - } - if (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] !== null) { - $object->setStdinOnce($data['StdinOnce']); - } - elseif (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] === null) { - $object->setStdinOnce(null); - } - if (\array_key_exists('Env', $data) && $data['Env'] !== null) { - $values_1 = []; - foreach ($data['Env'] as $value_1) { - $values_1[] = $value_1; - } - $object->setEnv($values_1); - } - elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { - $object->setEnv(null); - } - if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { - $value_2 = $data['Cmd']; - if (is_array($data['Cmd']) && $this->isOnlyNumericKeys($data['Cmd'])) { - $values_2 = []; - foreach ($data['Cmd'] as $value_3) { - $values_2[] = $value_3; - } - $value_2 = $values_2; - } elseif (is_string($data['Cmd'])) { - $value_2 = $data['Cmd']; - } - $object->setCmd($value_2); - } - elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { - $object->setCmd(null); - } - if (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] !== null) { - $object->setHealthcheck($this->denormalizer->denormalize($data['Healthcheck'], \Docker\API\Model\ConfigHealthcheck::class, 'json', $context)); - } - elseif (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] === null) { - $object->setHealthcheck(null); - } - if (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] !== null) { - $object->setArgsEscaped($data['ArgsEscaped']); - } - elseif (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] === null) { - $object->setArgsEscaped(null); - } - if (\array_key_exists('Image', $data) && $data['Image'] !== null) { - $object->setImage($data['Image']); - } - elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { - $object->setImage(null); - } - if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { - $object->setVolumes($this->denormalizer->denormalize($data['Volumes'], \Docker\API\Model\ConfigVolumes::class, 'json', $context)); - } - elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { - $object->setVolumes(null); - } - if (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] !== null) { - $object->setWorkingDir($data['WorkingDir']); - } - elseif (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] === null) { - $object->setWorkingDir(null); - } - if (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] !== null) { - $value_4 = $data['Entrypoint']; - if (is_array($data['Entrypoint']) && $this->isOnlyNumericKeys($data['Entrypoint'])) { - $values_3 = []; - foreach ($data['Entrypoint'] as $value_5) { - $values_3[] = $value_5; - } - $value_4 = $values_3; - } elseif (is_string($data['Entrypoint'])) { - $value_4 = $data['Entrypoint']; - } - $object->setEntrypoint($value_4); - } - elseif (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] === null) { - $object->setEntrypoint(null); - } - if (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] !== null) { - $object->setNetworkDisabled($data['NetworkDisabled']); - } - elseif (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] === null) { - $object->setNetworkDisabled(null); - } - if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { - $object->setMacAddress($data['MacAddress']); - } - elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { - $object->setMacAddress(null); - } - if (\array_key_exists('OnBuild', $data) && $data['OnBuild'] !== null) { - $values_4 = []; - foreach ($data['OnBuild'] as $value_6) { - $values_4[] = $value_6; - } - $object->setOnBuild($values_4); - } - elseif (\array_key_exists('OnBuild', $data) && $data['OnBuild'] === null) { - $object->setOnBuild(null); - } - if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { - $values_5 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Labels'] as $key_1 => $value_7) { - $values_5[$key_1] = $value_7; - } - $object->setLabels($values_5); - } - elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { - $object->setLabels(null); - } - if (\array_key_exists('StopSignal', $data) && $data['StopSignal'] !== null) { - $object->setStopSignal($data['StopSignal']); - } - elseif (\array_key_exists('StopSignal', $data) && $data['StopSignal'] === null) { - $object->setStopSignal(null); - } - if (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] !== null) { - $object->setStopTimeout($data['StopTimeout']); - } - elseif (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] === null) { - $object->setStopTimeout(null); - } - if (\array_key_exists('Shell', $data) && $data['Shell'] !== null) { - $values_6 = []; - foreach ($data['Shell'] as $value_8) { - $values_6[] = $value_8; - } - $object->setShell($values_6); - } - elseif (\array_key_exists('Shell', $data) && $data['Shell'] === null) { - $object->setShell(null); + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); } return $object; } @@ -585,120 +165,20 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('hostname') && null !== $object->getHostname()) { - $data['Hostname'] = $object->getHostname(); - } - if ($object->isInitialized('domainname') && null !== $object->getDomainname()) { - $data['Domainname'] = $object->getDomainname(); - } - if ($object->isInitialized('user') && null !== $object->getUser()) { - $data['User'] = $object->getUser(); - } - if ($object->isInitialized('attachStdin') && null !== $object->getAttachStdin()) { - $data['AttachStdin'] = $object->getAttachStdin(); - } - if ($object->isInitialized('attachStdout') && null !== $object->getAttachStdout()) { - $data['AttachStdout'] = $object->getAttachStdout(); - } - if ($object->isInitialized('attachStderr') && null !== $object->getAttachStderr()) { - $data['AttachStderr'] = $object->getAttachStderr(); - } - if ($object->isInitialized('exposedPorts') && null !== $object->getExposedPorts()) { - $values = []; - foreach ($object->getExposedPorts() as $key => $value) { - $values[$key] = $value; - } - $data['ExposedPorts'] = $values; - } - if ($object->isInitialized('tty') && null !== $object->getTty()) { - $data['Tty'] = $object->getTty(); - } - if ($object->isInitialized('openStdin') && null !== $object->getOpenStdin()) { - $data['OpenStdin'] = $object->getOpenStdin(); - } - if ($object->isInitialized('stdinOnce') && null !== $object->getStdinOnce()) { - $data['StdinOnce'] = $object->getStdinOnce(); - } - if ($object->isInitialized('env') && null !== $object->getEnv()) { - $values_1 = []; - foreach ($object->getEnv() as $value_1) { - $values_1[] = $value_1; - } - $data['Env'] = $values_1; - } - if ($object->isInitialized('cmd') && null !== $object->getCmd()) { - $value_2 = $object->getCmd(); - if (is_array($object->getCmd())) { - $values_2 = []; - foreach ($object->getCmd() as $value_3) { - $values_2[] = $value_3; - } - $value_2 = $values_2; - } elseif (is_string($object->getCmd())) { - $value_2 = $object->getCmd(); - } - $data['Cmd'] = $value_2; - } - if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) { - $data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context); - } - if ($object->isInitialized('argsEscaped') && null !== $object->getArgsEscaped()) { - $data['ArgsEscaped'] = $object->getArgsEscaped(); - } - if ($object->isInitialized('image') && null !== $object->getImage()) { - $data['Image'] = $object->getImage(); - } - if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { - $data['Volumes'] = $this->normalizer->normalize($object->getVolumes(), 'json', $context); - } - if ($object->isInitialized('workingDir') && null !== $object->getWorkingDir()) { - $data['WorkingDir'] = $object->getWorkingDir(); - } - if ($object->isInitialized('entrypoint') && null !== $object->getEntrypoint()) { - $value_4 = $object->getEntrypoint(); - if (is_array($object->getEntrypoint())) { - $values_3 = []; - foreach ($object->getEntrypoint() as $value_5) { - $values_3[] = $value_5; - } - $value_4 = $values_3; - } elseif (is_string($object->getEntrypoint())) { - $value_4 = $object->getEntrypoint(); - } - $data['Entrypoint'] = $value_4; - } - if ($object->isInitialized('networkDisabled') && null !== $object->getNetworkDisabled()) { - $data['NetworkDisabled'] = $object->getNetworkDisabled(); - } - if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { - $data['MacAddress'] = $object->getMacAddress(); - } - if ($object->isInitialized('onBuild') && null !== $object->getOnBuild()) { - $values_4 = []; - foreach ($object->getOnBuild() as $value_6) { - $values_4[] = $value_6; - } - $data['OnBuild'] = $values_4; - } - if ($object->isInitialized('labels') && null !== $object->getLabels()) { - $values_5 = []; - foreach ($object->getLabels() as $key_1 => $value_7) { - $values_5[$key_1] = $value_7; - } - $data['Labels'] = $values_5; - } - if ($object->isInitialized('stopSignal') && null !== $object->getStopSignal()) { - $data['StopSignal'] = $object->getStopSignal(); - } - if ($object->isInitialized('stopTimeout') && null !== $object->getStopTimeout()) { - $data['StopTimeout'] = $object->getStopTimeout(); - } - if ($object->isInitialized('shell') && null !== $object->getShell()) { - $values_6 = []; - foreach ($object->getShell() as $value_8) { - $values_6[] = $value_8; - } - $data['Shell'] = $values_6; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); } return $data; } diff --git a/generated/Normalizer/ServiceVersionNormalizer.php b/generated/Normalizer/ConfigReferenceNormalizer.php similarity index 69% rename from generated/Normalizer/ServiceVersionNormalizer.php rename to generated/Normalizer/ConfigReferenceNormalizer.php index f89b30419..176dd635d 100644 --- a/generated/Normalizer/ServiceVersionNormalizer.php +++ b/generated/Normalizer/ConfigReferenceNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ServiceVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ConfigReferenceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ServiceVersionNormalizer implements DenormalizerInterface, NormalizerInter use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ServiceVersion::class; + return $type === \Docker\API\Model\ConfigReference::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ServiceVersion::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ConfigReference::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,33 +36,33 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ServiceVersion(); + $object = new \Docker\API\Model\ConfigReference(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Index', $data) && $data['Index'] !== null) { - $object->setIndex($data['Index']); + if (\array_key_exists('Network', $data) && $data['Network'] !== null) { + $object->setNetwork($data['Network']); } - elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { - $object->setIndex(null); + elseif (\array_key_exists('Network', $data) && $data['Network'] === null) { + $object->setNetwork(null); } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('index') && null !== $object->getIndex()) { - $data['Index'] = $object->getIndex(); + if ($object->isInitialized('network') && null !== $object->getNetwork()) { + $data['Network'] = $object->getNetwork(); } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ServiceVersion::class => false]; + return [\Docker\API\Model\ConfigReference::class => false]; } } } else { - class ServiceVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ConfigReferenceNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -70,11 +70,11 @@ class ServiceVersionNormalizer implements DenormalizerInterface, NormalizerInter use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ServiceVersion::class; + return $type === \Docker\API\Model\ConfigReference::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ServiceVersion::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ConfigReference::class; } /** * @return mixed @@ -87,15 +87,15 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ServiceVersion(); + $object = new \Docker\API\Model\ConfigReference(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Index', $data) && $data['Index'] !== null) { - $object->setIndex($data['Index']); + if (\array_key_exists('Network', $data) && $data['Network'] !== null) { + $object->setNetwork($data['Network']); } - elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { - $object->setIndex(null); + elseif (\array_key_exists('Network', $data) && $data['Network'] === null) { + $object->setNetwork(null); } return $object; } @@ -105,14 +105,14 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('index') && null !== $object->getIndex()) { - $data['Index'] = $object->getIndex(); + if ($object->isInitialized('network') && null !== $object->getNetwork()) { + $data['Network'] = $object->getNetwork(); } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ServiceVersion::class => false]; + return [\Docker\API\Model\ConfigReference::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ConfigSpecNormalizer.php b/generated/Normalizer/ConfigSpecNormalizer.php new file mode 100644 index 000000000..5f0812a1c --- /dev/null +++ b/generated/Normalizer/ConfigSpecNormalizer.php @@ -0,0 +1,188 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ConfigSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ConfigSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ConfigSpec::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ConfigSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Data', $data) && $data['Data'] !== null) { + $object->setData($data['Data']); + } + elseif (\array_key_exists('Data', $data) && $data['Data'] === null) { + $object->setData(null); + } + if (\array_key_exists('Templating', $data) && $data['Templating'] !== null) { + $object->setTemplating($this->denormalizer->denormalize($data['Templating'], \Docker\API\Model\Driver::class, 'json', $context)); + } + elseif (\array_key_exists('Templating', $data) && $data['Templating'] === null) { + $object->setTemplating(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['Data'] = $object->getData(); + } + if ($object->isInitialized('templating') && null !== $object->getTemplating()) { + $data['Templating'] = $this->normalizer->normalize($object->getTemplating(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ConfigSpec::class => false]; + } + } +} else { + class ConfigSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ConfigSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ConfigSpec::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ConfigSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Data', $data) && $data['Data'] !== null) { + $object->setData($data['Data']); + } + elseif (\array_key_exists('Data', $data) && $data['Data'] === null) { + $object->setData(null); + } + if (\array_key_exists('Templating', $data) && $data['Templating'] !== null) { + $object->setTemplating($this->denormalizer->denormalize($data['Templating'], \Docker\API\Model\Driver::class, 'json', $context)); + } + elseif (\array_key_exists('Templating', $data) && $data['Templating'] === null) { + $object->setTemplating(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['Data'] = $object->getData(); + } + if ($object->isInitialized('templating') && null !== $object->getTemplating()) { + $data['Templating'] = $this->normalizer->normalize($object->getTemplating(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ConfigSpec::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ConfigsCreatePostBodyNormalizer.php b/generated/Normalizer/ConfigsCreatePostBodyNormalizer.php new file mode 100644 index 000000000..7b195787e --- /dev/null +++ b/generated/Normalizer/ConfigsCreatePostBodyNormalizer.php @@ -0,0 +1,188 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ConfigsCreatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ConfigsCreatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ConfigsCreatePostBody::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ConfigsCreatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Data', $data) && $data['Data'] !== null) { + $object->setData($data['Data']); + } + elseif (\array_key_exists('Data', $data) && $data['Data'] === null) { + $object->setData(null); + } + if (\array_key_exists('Templating', $data) && $data['Templating'] !== null) { + $object->setTemplating($this->denormalizer->denormalize($data['Templating'], \Docker\API\Model\Driver::class, 'json', $context)); + } + elseif (\array_key_exists('Templating', $data) && $data['Templating'] === null) { + $object->setTemplating(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['Data'] = $object->getData(); + } + if ($object->isInitialized('templating') && null !== $object->getTemplating()) { + $data['Templating'] = $this->normalizer->normalize($object->getTemplating(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ConfigsCreatePostBody::class => false]; + } + } +} else { + class ConfigsCreatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ConfigsCreatePostBody::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ConfigsCreatePostBody::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ConfigsCreatePostBody(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('Data', $data) && $data['Data'] !== null) { + $object->setData($data['Data']); + } + elseif (\array_key_exists('Data', $data) && $data['Data'] === null) { + $object->setData(null); + } + if (\array_key_exists('Templating', $data) && $data['Templating'] !== null) { + $object->setTemplating($this->denormalizer->denormalize($data['Templating'], \Docker\API\Model\Driver::class, 'json', $context)); + } + elseif (\array_key_exists('Templating', $data) && $data['Templating'] === null) { + $object->setTemplating(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values = []; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; + } + $data['Labels'] = $values; + } + if ($object->isInitialized('data') && null !== $object->getData()) { + $data['Data'] = $object->getData(); + } + if ($object->isInitialized('templating') && null !== $object->getTemplating()) { + $data['Templating'] = $this->normalizer->normalize($object->getTemplating(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ConfigsCreatePostBody::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainerConfigNormalizer.php b/generated/Normalizer/ContainerConfigNormalizer.php new file mode 100644 index 000000000..7c2be5838 --- /dev/null +++ b/generated/Normalizer/ContainerConfigNormalizer.php @@ -0,0 +1,678 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainerConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Hostname', $data) && $data['Hostname'] !== null) { + $object->setHostname($data['Hostname']); + } + elseif (\array_key_exists('Hostname', $data) && $data['Hostname'] === null) { + $object->setHostname(null); + } + if (\array_key_exists('Domainname', $data) && $data['Domainname'] !== null) { + $object->setDomainname($data['Domainname']); + } + elseif (\array_key_exists('Domainname', $data) && $data['Domainname'] === null) { + $object->setDomainname(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($data['User']); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + if (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] !== null) { + $object->setAttachStdin($data['AttachStdin']); + } + elseif (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] === null) { + $object->setAttachStdin(null); + } + if (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] !== null) { + $object->setAttachStdout($data['AttachStdout']); + } + elseif (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] === null) { + $object->setAttachStdout(null); + } + if (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] !== null) { + $object->setAttachStderr($data['AttachStderr']); + } + elseif (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] === null) { + $object->setAttachStderr(null); + } + if (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['ExposedPorts'] as $key => $value) { + $values[$key] = $value; + } + $object->setExposedPorts($values); + } + elseif (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] === null) { + $object->setExposedPorts(null); + } + if (\array_key_exists('Tty', $data) && $data['Tty'] !== null) { + $object->setTty($data['Tty']); + } + elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { + $object->setTty(null); + } + if (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] !== null) { + $object->setOpenStdin($data['OpenStdin']); + } + elseif (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] === null) { + $object->setOpenStdin(null); + } + if (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] !== null) { + $object->setStdinOnce($data['StdinOnce']); + } + elseif (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] === null) { + $object->setStdinOnce(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values_1 = []; + foreach ($data['Env'] as $value_1) { + $values_1[] = $value_1; + } + $object->setEnv($values_1); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { + $values_2 = []; + foreach ($data['Cmd'] as $value_2) { + $values_2[] = $value_2; + } + $object->setCmd($values_2); + } + elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { + $object->setCmd(null); + } + if (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] !== null) { + $object->setHealthcheck($this->denormalizer->denormalize($data['Healthcheck'], \Docker\API\Model\HealthConfig::class, 'json', $context)); + } + elseif (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] === null) { + $object->setHealthcheck(null); + } + if (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] !== null) { + $object->setArgsEscaped($data['ArgsEscaped']); + } + elseif (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] === null) { + $object->setArgsEscaped(null); + } + if (\array_key_exists('Image', $data) && $data['Image'] !== null) { + $object->setImage($data['Image']); + } + elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { + $object->setImage(null); + } + if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Volumes'] as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $object->setVolumes($values_3); + } + elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { + $object->setVolumes(null); + } + if (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] !== null) { + $object->setWorkingDir($data['WorkingDir']); + } + elseif (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] === null) { + $object->setWorkingDir(null); + } + if (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] !== null) { + $values_4 = []; + foreach ($data['Entrypoint'] as $value_4) { + $values_4[] = $value_4; + } + $object->setEntrypoint($values_4); + } + elseif (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] === null) { + $object->setEntrypoint(null); + } + if (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] !== null) { + $object->setNetworkDisabled($data['NetworkDisabled']); + } + elseif (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] === null) { + $object->setNetworkDisabled(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + if (\array_key_exists('OnBuild', $data) && $data['OnBuild'] !== null) { + $values_5 = []; + foreach ($data['OnBuild'] as $value_5) { + $values_5[] = $value_5; + } + $object->setOnBuild($values_5); + } + elseif (\array_key_exists('OnBuild', $data) && $data['OnBuild'] === null) { + $object->setOnBuild(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_6 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_2 => $value_6) { + $values_6[$key_2] = $value_6; + } + $object->setLabels($values_6); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('StopSignal', $data) && $data['StopSignal'] !== null) { + $object->setStopSignal($data['StopSignal']); + } + elseif (\array_key_exists('StopSignal', $data) && $data['StopSignal'] === null) { + $object->setStopSignal(null); + } + if (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] !== null) { + $object->setStopTimeout($data['StopTimeout']); + } + elseif (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] === null) { + $object->setStopTimeout(null); + } + if (\array_key_exists('Shell', $data) && $data['Shell'] !== null) { + $values_7 = []; + foreach ($data['Shell'] as $value_7) { + $values_7[] = $value_7; + } + $object->setShell($values_7); + } + elseif (\array_key_exists('Shell', $data) && $data['Shell'] === null) { + $object->setShell(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('hostname') && null !== $object->getHostname()) { + $data['Hostname'] = $object->getHostname(); + } + if ($object->isInitialized('domainname') && null !== $object->getDomainname()) { + $data['Domainname'] = $object->getDomainname(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $object->getUser(); + } + if ($object->isInitialized('attachStdin') && null !== $object->getAttachStdin()) { + $data['AttachStdin'] = $object->getAttachStdin(); + } + if ($object->isInitialized('attachStdout') && null !== $object->getAttachStdout()) { + $data['AttachStdout'] = $object->getAttachStdout(); + } + if ($object->isInitialized('attachStderr') && null !== $object->getAttachStderr()) { + $data['AttachStderr'] = $object->getAttachStderr(); + } + if ($object->isInitialized('exposedPorts') && null !== $object->getExposedPorts()) { + $values = []; + foreach ($object->getExposedPorts() as $key => $value) { + $values[$key] = $value; + } + $data['ExposedPorts'] = $values; + } + if ($object->isInitialized('tty') && null !== $object->getTty()) { + $data['Tty'] = $object->getTty(); + } + if ($object->isInitialized('openStdin') && null !== $object->getOpenStdin()) { + $data['OpenStdin'] = $object->getOpenStdin(); + } + if ($object->isInitialized('stdinOnce') && null !== $object->getStdinOnce()) { + $data['StdinOnce'] = $object->getStdinOnce(); + } + if ($object->isInitialized('env') && null !== $object->getEnv()) { + $values_1 = []; + foreach ($object->getEnv() as $value_1) { + $values_1[] = $value_1; + } + $data['Env'] = $values_1; + } + if ($object->isInitialized('cmd') && null !== $object->getCmd()) { + $values_2 = []; + foreach ($object->getCmd() as $value_2) { + $values_2[] = $value_2; + } + $data['Cmd'] = $values_2; + } + if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) { + $data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context); + } + if ($object->isInitialized('argsEscaped') && null !== $object->getArgsEscaped()) { + $data['ArgsEscaped'] = $object->getArgsEscaped(); + } + if ($object->isInitialized('image') && null !== $object->getImage()) { + $data['Image'] = $object->getImage(); + } + if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { + $values_3 = []; + foreach ($object->getVolumes() as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $data['Volumes'] = $values_3; + } + if ($object->isInitialized('workingDir') && null !== $object->getWorkingDir()) { + $data['WorkingDir'] = $object->getWorkingDir(); + } + if ($object->isInitialized('entrypoint') && null !== $object->getEntrypoint()) { + $values_4 = []; + foreach ($object->getEntrypoint() as $value_4) { + $values_4[] = $value_4; + } + $data['Entrypoint'] = $values_4; + } + if ($object->isInitialized('networkDisabled') && null !== $object->getNetworkDisabled()) { + $data['NetworkDisabled'] = $object->getNetworkDisabled(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + if ($object->isInitialized('onBuild') && null !== $object->getOnBuild()) { + $values_5 = []; + foreach ($object->getOnBuild() as $value_5) { + $values_5[] = $value_5; + } + $data['OnBuild'] = $values_5; + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_6 = []; + foreach ($object->getLabels() as $key_2 => $value_6) { + $values_6[$key_2] = $value_6; + } + $data['Labels'] = $values_6; + } + if ($object->isInitialized('stopSignal') && null !== $object->getStopSignal()) { + $data['StopSignal'] = $object->getStopSignal(); + } + if ($object->isInitialized('stopTimeout') && null !== $object->getStopTimeout()) { + $data['StopTimeout'] = $object->getStopTimeout(); + } + if ($object->isInitialized('shell') && null !== $object->getShell()) { + $values_7 = []; + foreach ($object->getShell() as $value_7) { + $values_7[] = $value_7; + } + $data['Shell'] = $values_7; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerConfig::class => false]; + } + } +} else { + class ContainerConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Hostname', $data) && $data['Hostname'] !== null) { + $object->setHostname($data['Hostname']); + } + elseif (\array_key_exists('Hostname', $data) && $data['Hostname'] === null) { + $object->setHostname(null); + } + if (\array_key_exists('Domainname', $data) && $data['Domainname'] !== null) { + $object->setDomainname($data['Domainname']); + } + elseif (\array_key_exists('Domainname', $data) && $data['Domainname'] === null) { + $object->setDomainname(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($data['User']); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + if (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] !== null) { + $object->setAttachStdin($data['AttachStdin']); + } + elseif (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] === null) { + $object->setAttachStdin(null); + } + if (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] !== null) { + $object->setAttachStdout($data['AttachStdout']); + } + elseif (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] === null) { + $object->setAttachStdout(null); + } + if (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] !== null) { + $object->setAttachStderr($data['AttachStderr']); + } + elseif (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] === null) { + $object->setAttachStderr(null); + } + if (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['ExposedPorts'] as $key => $value) { + $values[$key] = $value; + } + $object->setExposedPorts($values); + } + elseif (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] === null) { + $object->setExposedPorts(null); + } + if (\array_key_exists('Tty', $data) && $data['Tty'] !== null) { + $object->setTty($data['Tty']); + } + elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { + $object->setTty(null); + } + if (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] !== null) { + $object->setOpenStdin($data['OpenStdin']); + } + elseif (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] === null) { + $object->setOpenStdin(null); + } + if (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] !== null) { + $object->setStdinOnce($data['StdinOnce']); + } + elseif (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] === null) { + $object->setStdinOnce(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values_1 = []; + foreach ($data['Env'] as $value_1) { + $values_1[] = $value_1; + } + $object->setEnv($values_1); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { + $values_2 = []; + foreach ($data['Cmd'] as $value_2) { + $values_2[] = $value_2; + } + $object->setCmd($values_2); + } + elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { + $object->setCmd(null); + } + if (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] !== null) { + $object->setHealthcheck($this->denormalizer->denormalize($data['Healthcheck'], \Docker\API\Model\HealthConfig::class, 'json', $context)); + } + elseif (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] === null) { + $object->setHealthcheck(null); + } + if (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] !== null) { + $object->setArgsEscaped($data['ArgsEscaped']); + } + elseif (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] === null) { + $object->setArgsEscaped(null); + } + if (\array_key_exists('Image', $data) && $data['Image'] !== null) { + $object->setImage($data['Image']); + } + elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { + $object->setImage(null); + } + if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Volumes'] as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $object->setVolumes($values_3); + } + elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { + $object->setVolumes(null); + } + if (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] !== null) { + $object->setWorkingDir($data['WorkingDir']); + } + elseif (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] === null) { + $object->setWorkingDir(null); + } + if (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] !== null) { + $values_4 = []; + foreach ($data['Entrypoint'] as $value_4) { + $values_4[] = $value_4; + } + $object->setEntrypoint($values_4); + } + elseif (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] === null) { + $object->setEntrypoint(null); + } + if (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] !== null) { + $object->setNetworkDisabled($data['NetworkDisabled']); + } + elseif (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] === null) { + $object->setNetworkDisabled(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + if (\array_key_exists('OnBuild', $data) && $data['OnBuild'] !== null) { + $values_5 = []; + foreach ($data['OnBuild'] as $value_5) { + $values_5[] = $value_5; + } + $object->setOnBuild($values_5); + } + elseif (\array_key_exists('OnBuild', $data) && $data['OnBuild'] === null) { + $object->setOnBuild(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_6 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_2 => $value_6) { + $values_6[$key_2] = $value_6; + } + $object->setLabels($values_6); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('StopSignal', $data) && $data['StopSignal'] !== null) { + $object->setStopSignal($data['StopSignal']); + } + elseif (\array_key_exists('StopSignal', $data) && $data['StopSignal'] === null) { + $object->setStopSignal(null); + } + if (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] !== null) { + $object->setStopTimeout($data['StopTimeout']); + } + elseif (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] === null) { + $object->setStopTimeout(null); + } + if (\array_key_exists('Shell', $data) && $data['Shell'] !== null) { + $values_7 = []; + foreach ($data['Shell'] as $value_7) { + $values_7[] = $value_7; + } + $object->setShell($values_7); + } + elseif (\array_key_exists('Shell', $data) && $data['Shell'] === null) { + $object->setShell(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('hostname') && null !== $object->getHostname()) { + $data['Hostname'] = $object->getHostname(); + } + if ($object->isInitialized('domainname') && null !== $object->getDomainname()) { + $data['Domainname'] = $object->getDomainname(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $object->getUser(); + } + if ($object->isInitialized('attachStdin') && null !== $object->getAttachStdin()) { + $data['AttachStdin'] = $object->getAttachStdin(); + } + if ($object->isInitialized('attachStdout') && null !== $object->getAttachStdout()) { + $data['AttachStdout'] = $object->getAttachStdout(); + } + if ($object->isInitialized('attachStderr') && null !== $object->getAttachStderr()) { + $data['AttachStderr'] = $object->getAttachStderr(); + } + if ($object->isInitialized('exposedPorts') && null !== $object->getExposedPorts()) { + $values = []; + foreach ($object->getExposedPorts() as $key => $value) { + $values[$key] = $value; + } + $data['ExposedPorts'] = $values; + } + if ($object->isInitialized('tty') && null !== $object->getTty()) { + $data['Tty'] = $object->getTty(); + } + if ($object->isInitialized('openStdin') && null !== $object->getOpenStdin()) { + $data['OpenStdin'] = $object->getOpenStdin(); + } + if ($object->isInitialized('stdinOnce') && null !== $object->getStdinOnce()) { + $data['StdinOnce'] = $object->getStdinOnce(); + } + if ($object->isInitialized('env') && null !== $object->getEnv()) { + $values_1 = []; + foreach ($object->getEnv() as $value_1) { + $values_1[] = $value_1; + } + $data['Env'] = $values_1; + } + if ($object->isInitialized('cmd') && null !== $object->getCmd()) { + $values_2 = []; + foreach ($object->getCmd() as $value_2) { + $values_2[] = $value_2; + } + $data['Cmd'] = $values_2; + } + if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) { + $data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context); + } + if ($object->isInitialized('argsEscaped') && null !== $object->getArgsEscaped()) { + $data['ArgsEscaped'] = $object->getArgsEscaped(); + } + if ($object->isInitialized('image') && null !== $object->getImage()) { + $data['Image'] = $object->getImage(); + } + if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { + $values_3 = []; + foreach ($object->getVolumes() as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $data['Volumes'] = $values_3; + } + if ($object->isInitialized('workingDir') && null !== $object->getWorkingDir()) { + $data['WorkingDir'] = $object->getWorkingDir(); + } + if ($object->isInitialized('entrypoint') && null !== $object->getEntrypoint()) { + $values_4 = []; + foreach ($object->getEntrypoint() as $value_4) { + $values_4[] = $value_4; + } + $data['Entrypoint'] = $values_4; + } + if ($object->isInitialized('networkDisabled') && null !== $object->getNetworkDisabled()) { + $data['NetworkDisabled'] = $object->getNetworkDisabled(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + if ($object->isInitialized('onBuild') && null !== $object->getOnBuild()) { + $values_5 = []; + foreach ($object->getOnBuild() as $value_5) { + $values_5[] = $value_5; + } + $data['OnBuild'] = $values_5; + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_6 = []; + foreach ($object->getLabels() as $key_2 => $value_6) { + $values_6[$key_2] = $value_6; + } + $data['Labels'] = $values_6; + } + if ($object->isInitialized('stopSignal') && null !== $object->getStopSignal()) { + $data['StopSignal'] = $object->getStopSignal(); + } + if ($object->isInitialized('stopTimeout') && null !== $object->getStopTimeout()) { + $data['StopTimeout'] = $object->getStopTimeout(); + } + if ($object->isInitialized('shell') && null !== $object->getShell()) { + $values_7 = []; + foreach ($object->getShell() as $value_7) { + $values_7[] = $value_7; + } + $data['Shell'] = $values_7; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersCreatePostResponse201Normalizer.php b/generated/Normalizer/ContainerCreateResponseNormalizer.php similarity index 85% rename from generated/Normalizer/ContainersCreatePostResponse201Normalizer.php rename to generated/Normalizer/ContainerCreateResponseNormalizer.php index 8e32ec876..a1e9c1bdf 100644 --- a/generated/Normalizer/ContainersCreatePostResponse201Normalizer.php +++ b/generated/Normalizer/ContainerCreateResponseNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ContainersCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ContainerCreateResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ContainersCreatePostResponse201Normalizer implements DenormalizerInterface use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainersCreatePostResponse201::class; + return $type === \Docker\API\Model\ContainerCreateResponse::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainersCreatePostResponse201::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerCreateResponse::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainersCreatePostResponse201(); + $object = new \Docker\API\Model\ContainerCreateResponse(); if (null === $data || false === \is_array($data)) { return $object; } @@ -71,11 +71,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainersCreatePostResponse201::class => false]; + return [\Docker\API\Model\ContainerCreateResponse::class => false]; } } } else { - class ContainersCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ContainerCreateResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -83,11 +83,11 @@ class ContainersCreatePostResponse201Normalizer implements DenormalizerInterface use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainersCreatePostResponse201::class; + return $type === \Docker\API\Model\ContainerCreateResponse::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainersCreatePostResponse201::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerCreateResponse::class; } /** * @return mixed @@ -100,7 +100,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainersCreatePostResponse201(); + $object = new \Docker\API\Model\ContainerCreateResponse(); if (null === $data || false === \is_array($data)) { return $object; } @@ -138,7 +138,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainersCreatePostResponse201::class => false]; + return [\Docker\API\Model\ContainerCreateResponse::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ContainersIdJsonGetResponse200StateNormalizer.php b/generated/Normalizer/ContainerStateNormalizer.php similarity index 87% rename from generated/Normalizer/ContainersIdJsonGetResponse200StateNormalizer.php rename to generated/Normalizer/ContainerStateNormalizer.php index f7468099b..286ca0292 100644 --- a/generated/Normalizer/ContainersIdJsonGetResponse200StateNormalizer.php +++ b/generated/Normalizer/ContainerStateNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ContainersIdJsonGetResponse200StateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ContainerStateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ContainersIdJsonGetResponse200StateNormalizer implements DenormalizerInter use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainersIdJsonGetResponse200State::class; + return $type === \Docker\API\Model\ContainerState::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdJsonGetResponse200State::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerState::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainersIdJsonGetResponse200State(); + $object = new \Docker\API\Model\ContainerState(); if (null === $data || false === \is_array($data)) { return $object; } @@ -106,6 +106,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('FinishedAt', $data) && $data['FinishedAt'] === null) { $object->setFinishedAt(null); } + if (\array_key_exists('Health', $data) && $data['Health'] !== null) { + $object->setHealth($this->denormalizer->denormalize($data['Health'], \Docker\API\Model\Health::class, 'json', $context)); + } + elseif (\array_key_exists('Health', $data) && $data['Health'] === null) { + $object->setHealth(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -144,15 +150,18 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('finishedAt') && null !== $object->getFinishedAt()) { $data['FinishedAt'] = $object->getFinishedAt(); } + if ($object->isInitialized('health') && null !== $object->getHealth()) { + $data['Health'] = $this->normalizer->normalize($object->getHealth(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainersIdJsonGetResponse200State::class => false]; + return [\Docker\API\Model\ContainerState::class => false]; } } } else { - class ContainersIdJsonGetResponse200StateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ContainerStateNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -160,11 +169,11 @@ class ContainersIdJsonGetResponse200StateNormalizer implements DenormalizerInter use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainersIdJsonGetResponse200State::class; + return $type === \Docker\API\Model\ContainerState::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdJsonGetResponse200State::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerState::class; } /** * @return mixed @@ -177,7 +186,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainersIdJsonGetResponse200State(); + $object = new \Docker\API\Model\ContainerState(); if (null === $data || false === \is_array($data)) { return $object; } @@ -247,6 +256,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('FinishedAt', $data) && $data['FinishedAt'] === null) { $object->setFinishedAt(null); } + if (\array_key_exists('Health', $data) && $data['Health'] !== null) { + $object->setHealth($this->denormalizer->denormalize($data['Health'], \Docker\API\Model\Health::class, 'json', $context)); + } + elseif (\array_key_exists('Health', $data) && $data['Health'] === null) { + $object->setHealth(null); + } return $object; } /** @@ -288,11 +303,14 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('finishedAt') && null !== $object->getFinishedAt()) { $data['FinishedAt'] = $object->getFinishedAt(); } + if ($object->isInitialized('health') && null !== $object->getHealth()) { + $data['Health'] = $this->normalizer->normalize($object->getHealth(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainersIdJsonGetResponse200State::class => false]; + return [\Docker\API\Model\ContainerState::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/TaskStatusContainerStatusNormalizer.php b/generated/Normalizer/ContainerStatusNormalizer.php similarity index 87% rename from generated/Normalizer/TaskStatusContainerStatusNormalizer.php rename to generated/Normalizer/ContainerStatusNormalizer.php index 9251ca2a8..79c3be32e 100644 --- a/generated/Normalizer/TaskStatusContainerStatusNormalizer.php +++ b/generated/Normalizer/ContainerStatusNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TaskStatusContainerStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ContainerStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class TaskStatusContainerStatusNormalizer implements DenormalizerInterface, Norm use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\TaskStatusContainerStatus::class; + return $type === \Docker\API\Model\ContainerStatus::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\TaskStatusContainerStatus::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerStatus::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\TaskStatusContainerStatus(); + $object = new \Docker\API\Model\ContainerStatus(); if (null === $data || false === \is_array($data)) { return $object; } @@ -76,11 +76,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\TaskStatusContainerStatus::class => false]; + return [\Docker\API\Model\ContainerStatus::class => false]; } } } else { - class TaskStatusContainerStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ContainerStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -88,11 +88,11 @@ class TaskStatusContainerStatusNormalizer implements DenormalizerInterface, Norm use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\TaskStatusContainerStatus::class; + return $type === \Docker\API\Model\ContainerStatus::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\TaskStatusContainerStatus::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerStatus::class; } /** * @return mixed @@ -105,7 +105,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\TaskStatusContainerStatus(); + $object = new \Docker\API\Model\ContainerStatus(); if (null === $data || false === \is_array($data)) { return $object; } @@ -148,7 +148,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\TaskStatusContainerStatus::class => false]; + return [\Docker\API\Model\ContainerStatus::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ContainerSummaryHostConfigNormalizer.php b/generated/Normalizer/ContainerSummaryHostConfigNormalizer.php new file mode 100644 index 000000000..faf6d377e --- /dev/null +++ b/generated/Normalizer/ContainerSummaryHostConfigNormalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainerSummaryHostConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerSummaryHostConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryHostConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerSummaryHostConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] !== null) { + $object->setNetworkMode($data['NetworkMode']); + } + elseif (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] === null) { + $object->setNetworkMode(null); + } + if (\array_key_exists('Annotations', $data) && $data['Annotations'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Annotations'] as $key => $value) { + $values[$key] = $value; + } + $object->setAnnotations($values); + } + elseif (\array_key_exists('Annotations', $data) && $data['Annotations'] === null) { + $object->setAnnotations(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('networkMode') && null !== $object->getNetworkMode()) { + $data['NetworkMode'] = $object->getNetworkMode(); + } + if ($object->isInitialized('annotations') && null !== $object->getAnnotations()) { + $values = []; + foreach ($object->getAnnotations() as $key => $value) { + $values[$key] = $value; + } + $data['Annotations'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerSummaryHostConfig::class => false]; + } + } +} else { + class ContainerSummaryHostConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerSummaryHostConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryHostConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerSummaryHostConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] !== null) { + $object->setNetworkMode($data['NetworkMode']); + } + elseif (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] === null) { + $object->setNetworkMode(null); + } + if (\array_key_exists('Annotations', $data) && $data['Annotations'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Annotations'] as $key => $value) { + $values[$key] = $value; + } + $object->setAnnotations($values); + } + elseif (\array_key_exists('Annotations', $data) && $data['Annotations'] === null) { + $object->setAnnotations(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('networkMode') && null !== $object->getNetworkMode()) { + $data['NetworkMode'] = $object->getNetworkMode(); + } + if ($object->isInitialized('annotations') && null !== $object->getAnnotations()) { + $values = []; + foreach ($object->getAnnotations() as $key => $value) { + $values[$key] = $value; + } + $data['Annotations'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerSummaryHostConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainerSummaryItemNetworkSettingsNormalizer.php b/generated/Normalizer/ContainerSummaryNetworkSettingsNormalizer.php similarity index 84% rename from generated/Normalizer/ContainerSummaryItemNetworkSettingsNormalizer.php rename to generated/Normalizer/ContainerSummaryNetworkSettingsNormalizer.php index 2ab5af7a1..56f3cf0fa 100644 --- a/generated/Normalizer/ContainerSummaryItemNetworkSettingsNormalizer.php +++ b/generated/Normalizer/ContainerSummaryNetworkSettingsNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ContainerSummaryItemNetworkSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ContainerSummaryNetworkSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ContainerSummaryItemNetworkSettingsNormalizer implements DenormalizerInter use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainerSummaryItemNetworkSettings::class; + return $type === \Docker\API\Model\ContainerSummaryNetworkSettings::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryItemNetworkSettings::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryNetworkSettings::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainerSummaryItemNetworkSettings(); + $object = new \Docker\API\Model\ContainerSummaryNetworkSettings(); if (null === $data || false === \is_array($data)) { return $object; } @@ -66,11 +66,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainerSummaryItemNetworkSettings::class => false]; + return [\Docker\API\Model\ContainerSummaryNetworkSettings::class => false]; } } } else { - class ContainerSummaryItemNetworkSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ContainerSummaryNetworkSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -78,11 +78,11 @@ class ContainerSummaryItemNetworkSettingsNormalizer implements DenormalizerInter use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainerSummaryItemNetworkSettings::class; + return $type === \Docker\API\Model\ContainerSummaryNetworkSettings::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryItemNetworkSettings::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryNetworkSettings::class; } /** * @return mixed @@ -95,7 +95,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainerSummaryItemNetworkSettings(); + $object = new \Docker\API\Model\ContainerSummaryNetworkSettings(); if (null === $data || false === \is_array($data)) { return $object; } @@ -128,7 +128,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainerSummaryItemNetworkSettings::class => false]; + return [\Docker\API\Model\ContainerSummaryNetworkSettings::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ContainerSummaryItemNormalizer.php b/generated/Normalizer/ContainerSummaryNormalizer.php similarity index 94% rename from generated/Normalizer/ContainerSummaryItemNormalizer.php rename to generated/Normalizer/ContainerSummaryNormalizer.php index 2ce251bff..164359db1 100644 --- a/generated/Normalizer/ContainerSummaryItemNormalizer.php +++ b/generated/Normalizer/ContainerSummaryNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ContainerSummaryItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ContainerSummaryNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ContainerSummaryItemNormalizer implements DenormalizerInterface, Normalize use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainerSummaryItem::class; + return $type === \Docker\API\Model\ContainerSummary::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryItem::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummary::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainerSummaryItem(); + $object = new \Docker\API\Model\ContainerSummary(); if (null === $data || false === \is_array($data)) { return $object; } @@ -125,13 +125,13 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setStatus(null); } if (\array_key_exists('HostConfig', $data) && $data['HostConfig'] !== null) { - $object->setHostConfig($this->denormalizer->denormalize($data['HostConfig'], \Docker\API\Model\ContainerSummaryItemHostConfig::class, 'json', $context)); + $object->setHostConfig($this->denormalizer->denormalize($data['HostConfig'], \Docker\API\Model\ContainerSummaryHostConfig::class, 'json', $context)); } elseif (\array_key_exists('HostConfig', $data) && $data['HostConfig'] === null) { $object->setHostConfig(null); } if (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] !== null) { - $object->setNetworkSettings($this->denormalizer->denormalize($data['NetworkSettings'], \Docker\API\Model\ContainerSummaryItemNetworkSettings::class, 'json', $context)); + $object->setNetworkSettings($this->denormalizer->denormalize($data['NetworkSettings'], \Docker\API\Model\ContainerSummaryNetworkSettings::class, 'json', $context)); } elseif (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] === null) { $object->setNetworkSettings(null); @@ -216,11 +216,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainerSummaryItem::class => false]; + return [\Docker\API\Model\ContainerSummary::class => false]; } } } else { - class ContainerSummaryItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ContainerSummaryNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -228,11 +228,11 @@ class ContainerSummaryItemNormalizer implements DenormalizerInterface, Normalize use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainerSummaryItem::class; + return $type === \Docker\API\Model\ContainerSummary::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryItem::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummary::class; } /** * @return mixed @@ -245,7 +245,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainerSummaryItem(); + $object = new \Docker\API\Model\ContainerSummary(); if (null === $data || false === \is_array($data)) { return $object; } @@ -334,13 +334,13 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setStatus(null); } if (\array_key_exists('HostConfig', $data) && $data['HostConfig'] !== null) { - $object->setHostConfig($this->denormalizer->denormalize($data['HostConfig'], \Docker\API\Model\ContainerSummaryItemHostConfig::class, 'json', $context)); + $object->setHostConfig($this->denormalizer->denormalize($data['HostConfig'], \Docker\API\Model\ContainerSummaryHostConfig::class, 'json', $context)); } elseif (\array_key_exists('HostConfig', $data) && $data['HostConfig'] === null) { $object->setHostConfig(null); } if (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] !== null) { - $object->setNetworkSettings($this->denormalizer->denormalize($data['NetworkSettings'], \Docker\API\Model\ContainerSummaryItemNetworkSettings::class, 'json', $context)); + $object->setNetworkSettings($this->denormalizer->denormalize($data['NetworkSettings'], \Docker\API\Model\ContainerSummaryNetworkSettings::class, 'json', $context)); } elseif (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] === null) { $object->setNetworkSettings(null); @@ -428,7 +428,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainerSummaryItem::class => false]; + return [\Docker\API\Model\ContainerSummary::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ContainerWaitExitErrorNormalizer.php b/generated/Normalizer/ContainerWaitExitErrorNormalizer.php new file mode 100644 index 000000000..cfa5c54d4 --- /dev/null +++ b/generated/Normalizer/ContainerWaitExitErrorNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainerWaitExitErrorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerWaitExitError::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerWaitExitError::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerWaitExitError(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Message', $data) && $data['Message'] !== null) { + $object->setMessage($data['Message']); + } + elseif (\array_key_exists('Message', $data) && $data['Message'] === null) { + $object->setMessage(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('message') && null !== $object->getMessage()) { + $data['Message'] = $object->getMessage(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerWaitExitError::class => false]; + } + } +} else { + class ContainerWaitExitErrorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerWaitExitError::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerWaitExitError::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerWaitExitError(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Message', $data) && $data['Message'] !== null) { + $object->setMessage($data['Message']); + } + elseif (\array_key_exists('Message', $data) && $data['Message'] === null) { + $object->setMessage(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('message') && null !== $object->getMessage()) { + $data['Message'] = $object->getMessage(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerWaitExitError::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersIdWaitPostResponse200Normalizer.php b/generated/Normalizer/ContainerWaitResponseNormalizer.php similarity index 68% rename from generated/Normalizer/ContainersIdWaitPostResponse200Normalizer.php rename to generated/Normalizer/ContainerWaitResponseNormalizer.php index be9828c5d..1e1e178d3 100644 --- a/generated/Normalizer/ContainersIdWaitPostResponse200Normalizer.php +++ b/generated/Normalizer/ContainerWaitResponseNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ContainersIdWaitPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ContainerWaitResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ContainersIdWaitPostResponse200Normalizer implements DenormalizerInterface use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainersIdWaitPostResponse200::class; + return $type === \Docker\API\Model\ContainerWaitResponse::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdWaitPostResponse200::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerWaitResponse::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainersIdWaitPostResponse200(); + $object = new \Docker\API\Model\ContainerWaitResponse(); if (null === $data || false === \is_array($data)) { return $object; } @@ -46,21 +46,30 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('StatusCode', $data) && $data['StatusCode'] === null) { $object->setStatusCode(null); } + if (\array_key_exists('Error', $data) && $data['Error'] !== null) { + $object->setError($this->denormalizer->denormalize($data['Error'], \Docker\API\Model\ContainerWaitExitError::class, 'json', $context)); + } + elseif (\array_key_exists('Error', $data) && $data['Error'] === null) { + $object->setError(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; $data['StatusCode'] = $object->getStatusCode(); + if ($object->isInitialized('error') && null !== $object->getError()) { + $data['Error'] = $this->normalizer->normalize($object->getError(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainersIdWaitPostResponse200::class => false]; + return [\Docker\API\Model\ContainerWaitResponse::class => false]; } } } else { - class ContainersIdWaitPostResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ContainerWaitResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -68,11 +77,11 @@ class ContainersIdWaitPostResponse200Normalizer implements DenormalizerInterface use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainersIdWaitPostResponse200::class; + return $type === \Docker\API\Model\ContainerWaitResponse::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdWaitPostResponse200::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerWaitResponse::class; } /** * @return mixed @@ -85,7 +94,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainersIdWaitPostResponse200(); + $object = new \Docker\API\Model\ContainerWaitResponse(); if (null === $data || false === \is_array($data)) { return $object; } @@ -95,6 +104,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('StatusCode', $data) && $data['StatusCode'] === null) { $object->setStatusCode(null); } + if (\array_key_exists('Error', $data) && $data['Error'] !== null) { + $object->setError($this->denormalizer->denormalize($data['Error'], \Docker\API\Model\ContainerWaitExitError::class, 'json', $context)); + } + elseif (\array_key_exists('Error', $data) && $data['Error'] === null) { + $object->setError(null); + } return $object; } /** @@ -104,11 +119,14 @@ public function normalize($object, $format = null, array $context = []) { $data = []; $data['StatusCode'] = $object->getStatusCode(); + if ($object->isInitialized('error') && null !== $object->getError()) { + $data['Error'] = $this->normalizer->normalize($object->getError(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainersIdWaitPostResponse200::class => false]; + return [\Docker\API\Model\ContainerWaitResponse::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ContainerdInfoNamespacesNormalizer.php b/generated/Normalizer/ContainerdInfoNamespacesNormalizer.php new file mode 100644 index 000000000..8a4acf194 --- /dev/null +++ b/generated/Normalizer/ContainerdInfoNamespacesNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainerdInfoNamespacesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerdInfoNamespaces::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerdInfoNamespaces::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerdInfoNamespaces(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { + $object->setContainers($data['Containers']); + } + elseif (\array_key_exists('Containers', $data) && $data['Containers'] === null) { + $object->setContainers(null); + } + if (\array_key_exists('Plugins', $data) && $data['Plugins'] !== null) { + $object->setPlugins($data['Plugins']); + } + elseif (\array_key_exists('Plugins', $data) && $data['Plugins'] === null) { + $object->setPlugins(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('containers') && null !== $object->getContainers()) { + $data['Containers'] = $object->getContainers(); + } + if ($object->isInitialized('plugins') && null !== $object->getPlugins()) { + $data['Plugins'] = $object->getPlugins(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerdInfoNamespaces::class => false]; + } + } +} else { + class ContainerdInfoNamespacesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerdInfoNamespaces::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerdInfoNamespaces::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerdInfoNamespaces(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { + $object->setContainers($data['Containers']); + } + elseif (\array_key_exists('Containers', $data) && $data['Containers'] === null) { + $object->setContainers(null); + } + if (\array_key_exists('Plugins', $data) && $data['Plugins'] !== null) { + $object->setPlugins($data['Plugins']); + } + elseif (\array_key_exists('Plugins', $data) && $data['Plugins'] === null) { + $object->setPlugins(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('containers') && null !== $object->getContainers()) { + $data['Containers'] = $object->getContainers(); + } + if ($object->isInitialized('plugins') && null !== $object->getPlugins()) { + $data['Plugins'] = $object->getPlugins(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerdInfoNamespaces::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainerdInfoNormalizer.php b/generated/Normalizer/ContainerdInfoNormalizer.php new file mode 100644 index 000000000..d0e8ddac2 --- /dev/null +++ b/generated/Normalizer/ContainerdInfoNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ContainerdInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerdInfo::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerdInfo::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerdInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Address', $data) && $data['Address'] !== null) { + $object->setAddress($data['Address']); + } + elseif (\array_key_exists('Address', $data) && $data['Address'] === null) { + $object->setAddress(null); + } + if (\array_key_exists('Namespaces', $data) && $data['Namespaces'] !== null) { + $object->setNamespaces($this->denormalizer->denormalize($data['Namespaces'], \Docker\API\Model\ContainerdInfoNamespaces::class, 'json', $context)); + } + elseif (\array_key_exists('Namespaces', $data) && $data['Namespaces'] === null) { + $object->setNamespaces(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('address') && null !== $object->getAddress()) { + $data['Address'] = $object->getAddress(); + } + if ($object->isInitialized('namespaces') && null !== $object->getNamespaces()) { + $data['Namespaces'] = $this->normalizer->normalize($object->getNamespaces(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerdInfo::class => false]; + } + } +} else { + class ContainerdInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ContainerdInfo::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ContainerdInfo::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ContainerdInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Address', $data) && $data['Address'] !== null) { + $object->setAddress($data['Address']); + } + elseif (\array_key_exists('Address', $data) && $data['Address'] === null) { + $object->setAddress(null); + } + if (\array_key_exists('Namespaces', $data) && $data['Namespaces'] !== null) { + $object->setNamespaces($this->denormalizer->denormalize($data['Namespaces'], \Docker\API\Model\ContainerdInfoNamespaces::class, 'json', $context)); + } + elseif (\array_key_exists('Namespaces', $data) && $data['Namespaces'] === null) { + $object->setNamespaces(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('address') && null !== $object->getAddress()) { + $data['Address'] = $object->getAddress(); + } + if ($object->isInitialized('namespaces') && null !== $object->getNamespaces()) { + $data['Namespaces'] = $this->normalizer->normalize($object->getNamespaces(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ContainerdInfo::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersCreatePostBodyNormalizer.php b/generated/Normalizer/ContainersCreatePostBodyNormalizer.php index 174498b7f..3f17b90b6 100644 --- a/generated/Normalizer/ContainersCreatePostBodyNormalizer.php +++ b/generated/Normalizer/ContainersCreatePostBodyNormalizer.php @@ -115,23 +115,17 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setEnv(null); } if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { - $value_2 = $data['Cmd']; - if (is_array($data['Cmd']) && $this->isOnlyNumericKeys($data['Cmd'])) { - $values_2 = []; - foreach ($data['Cmd'] as $value_3) { - $values_2[] = $value_3; - } - $value_2 = $values_2; - } elseif (is_string($data['Cmd'])) { - $value_2 = $data['Cmd']; - } - $object->setCmd($value_2); + $values_2 = []; + foreach ($data['Cmd'] as $value_2) { + $values_2[] = $value_2; + } + $object->setCmd($values_2); } elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { $object->setCmd(null); } if (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] !== null) { - $object->setHealthcheck($this->denormalizer->denormalize($data['Healthcheck'], \Docker\API\Model\ConfigHealthcheck::class, 'json', $context)); + $object->setHealthcheck($this->denormalizer->denormalize($data['Healthcheck'], \Docker\API\Model\HealthConfig::class, 'json', $context)); } elseif (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] === null) { $object->setHealthcheck(null); @@ -149,7 +143,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setImage(null); } if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { - $object->setVolumes($this->denormalizer->denormalize($data['Volumes'], \Docker\API\Model\ConfigVolumes::class, 'json', $context)); + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Volumes'] as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $object->setVolumes($values_3); } elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { $object->setVolumes(null); @@ -161,17 +159,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setWorkingDir(null); } if (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] !== null) { - $value_4 = $data['Entrypoint']; - if (is_array($data['Entrypoint']) && $this->isOnlyNumericKeys($data['Entrypoint'])) { - $values_3 = []; - foreach ($data['Entrypoint'] as $value_5) { - $values_3[] = $value_5; - } - $value_4 = $values_3; - } elseif (is_string($data['Entrypoint'])) { - $value_4 = $data['Entrypoint']; - } - $object->setEntrypoint($value_4); + $values_4 = []; + foreach ($data['Entrypoint'] as $value_4) { + $values_4[] = $value_4; + } + $object->setEntrypoint($values_4); } elseif (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] === null) { $object->setEntrypoint(null); @@ -189,21 +181,21 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setMacAddress(null); } if (\array_key_exists('OnBuild', $data) && $data['OnBuild'] !== null) { - $values_4 = []; - foreach ($data['OnBuild'] as $value_6) { - $values_4[] = $value_6; + $values_5 = []; + foreach ($data['OnBuild'] as $value_5) { + $values_5[] = $value_5; } - $object->setOnBuild($values_4); + $object->setOnBuild($values_5); } elseif (\array_key_exists('OnBuild', $data) && $data['OnBuild'] === null) { $object->setOnBuild(null); } if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { - $values_5 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Labels'] as $key_1 => $value_7) { - $values_5[$key_1] = $value_7; + $values_6 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_2 => $value_6) { + $values_6[$key_2] = $value_6; } - $object->setLabels($values_5); + $object->setLabels($values_6); } elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { $object->setLabels(null); @@ -221,11 +213,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setStopTimeout(null); } if (\array_key_exists('Shell', $data) && $data['Shell'] !== null) { - $values_6 = []; - foreach ($data['Shell'] as $value_8) { - $values_6[] = $value_8; + $values_7 = []; + foreach ($data['Shell'] as $value_7) { + $values_7[] = $value_7; } - $object->setShell($values_6); + $object->setShell($values_7); } elseif (\array_key_exists('Shell', $data) && $data['Shell'] === null) { $object->setShell(null); @@ -237,7 +229,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setHostConfig(null); } if (\array_key_exists('NetworkingConfig', $data) && $data['NetworkingConfig'] !== null) { - $object->setNetworkingConfig($this->denormalizer->denormalize($data['NetworkingConfig'], \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class, 'json', $context)); + $object->setNetworkingConfig($this->denormalizer->denormalize($data['NetworkingConfig'], \Docker\API\Model\NetworkingConfig::class, 'json', $context)); } elseif (\array_key_exists('NetworkingConfig', $data) && $data['NetworkingConfig'] === null) { $object->setNetworkingConfig(null); @@ -289,17 +281,11 @@ public function normalize(mixed $object, string $format = null, array $context = $data['Env'] = $values_1; } if ($object->isInitialized('cmd') && null !== $object->getCmd()) { - $value_2 = $object->getCmd(); - if (is_array($object->getCmd())) { - $values_2 = []; - foreach ($object->getCmd() as $value_3) { - $values_2[] = $value_3; - } - $value_2 = $values_2; - } elseif (is_string($object->getCmd())) { - $value_2 = $object->getCmd(); - } - $data['Cmd'] = $value_2; + $values_2 = []; + foreach ($object->getCmd() as $value_2) { + $values_2[] = $value_2; + } + $data['Cmd'] = $values_2; } if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) { $data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context); @@ -311,23 +297,21 @@ public function normalize(mixed $object, string $format = null, array $context = $data['Image'] = $object->getImage(); } if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { - $data['Volumes'] = $this->normalizer->normalize($object->getVolumes(), 'json', $context); + $values_3 = []; + foreach ($object->getVolumes() as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $data['Volumes'] = $values_3; } if ($object->isInitialized('workingDir') && null !== $object->getWorkingDir()) { $data['WorkingDir'] = $object->getWorkingDir(); } if ($object->isInitialized('entrypoint') && null !== $object->getEntrypoint()) { - $value_4 = $object->getEntrypoint(); - if (is_array($object->getEntrypoint())) { - $values_3 = []; - foreach ($object->getEntrypoint() as $value_5) { - $values_3[] = $value_5; - } - $value_4 = $values_3; - } elseif (is_string($object->getEntrypoint())) { - $value_4 = $object->getEntrypoint(); - } - $data['Entrypoint'] = $value_4; + $values_4 = []; + foreach ($object->getEntrypoint() as $value_4) { + $values_4[] = $value_4; + } + $data['Entrypoint'] = $values_4; } if ($object->isInitialized('networkDisabled') && null !== $object->getNetworkDisabled()) { $data['NetworkDisabled'] = $object->getNetworkDisabled(); @@ -336,18 +320,18 @@ public function normalize(mixed $object, string $format = null, array $context = $data['MacAddress'] = $object->getMacAddress(); } if ($object->isInitialized('onBuild') && null !== $object->getOnBuild()) { - $values_4 = []; - foreach ($object->getOnBuild() as $value_6) { - $values_4[] = $value_6; + $values_5 = []; + foreach ($object->getOnBuild() as $value_5) { + $values_5[] = $value_5; } - $data['OnBuild'] = $values_4; + $data['OnBuild'] = $values_5; } if ($object->isInitialized('labels') && null !== $object->getLabels()) { - $values_5 = []; - foreach ($object->getLabels() as $key_1 => $value_7) { - $values_5[$key_1] = $value_7; + $values_6 = []; + foreach ($object->getLabels() as $key_2 => $value_6) { + $values_6[$key_2] = $value_6; } - $data['Labels'] = $values_5; + $data['Labels'] = $values_6; } if ($object->isInitialized('stopSignal') && null !== $object->getStopSignal()) { $data['StopSignal'] = $object->getStopSignal(); @@ -356,11 +340,11 @@ public function normalize(mixed $object, string $format = null, array $context = $data['StopTimeout'] = $object->getStopTimeout(); } if ($object->isInitialized('shell') && null !== $object->getShell()) { - $values_6 = []; - foreach ($object->getShell() as $value_8) { - $values_6[] = $value_8; + $values_7 = []; + foreach ($object->getShell() as $value_7) { + $values_7[] = $value_7; } - $data['Shell'] = $values_6; + $data['Shell'] = $values_7; } if ($object->isInitialized('hostConfig') && null !== $object->getHostConfig()) { $data['HostConfig'] = $this->normalizer->normalize($object->getHostConfig(), 'json', $context); @@ -480,23 +464,17 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setEnv(null); } if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { - $value_2 = $data['Cmd']; - if (is_array($data['Cmd']) && $this->isOnlyNumericKeys($data['Cmd'])) { - $values_2 = []; - foreach ($data['Cmd'] as $value_3) { - $values_2[] = $value_3; - } - $value_2 = $values_2; - } elseif (is_string($data['Cmd'])) { - $value_2 = $data['Cmd']; - } - $object->setCmd($value_2); + $values_2 = []; + foreach ($data['Cmd'] as $value_2) { + $values_2[] = $value_2; + } + $object->setCmd($values_2); } elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { $object->setCmd(null); } if (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] !== null) { - $object->setHealthcheck($this->denormalizer->denormalize($data['Healthcheck'], \Docker\API\Model\ConfigHealthcheck::class, 'json', $context)); + $object->setHealthcheck($this->denormalizer->denormalize($data['Healthcheck'], \Docker\API\Model\HealthConfig::class, 'json', $context)); } elseif (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] === null) { $object->setHealthcheck(null); @@ -514,7 +492,11 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setImage(null); } if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { - $object->setVolumes($this->denormalizer->denormalize($data['Volumes'], \Docker\API\Model\ConfigVolumes::class, 'json', $context)); + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Volumes'] as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $object->setVolumes($values_3); } elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { $object->setVolumes(null); @@ -526,17 +508,11 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setWorkingDir(null); } if (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] !== null) { - $value_4 = $data['Entrypoint']; - if (is_array($data['Entrypoint']) && $this->isOnlyNumericKeys($data['Entrypoint'])) { - $values_3 = []; - foreach ($data['Entrypoint'] as $value_5) { - $values_3[] = $value_5; - } - $value_4 = $values_3; - } elseif (is_string($data['Entrypoint'])) { - $value_4 = $data['Entrypoint']; - } - $object->setEntrypoint($value_4); + $values_4 = []; + foreach ($data['Entrypoint'] as $value_4) { + $values_4[] = $value_4; + } + $object->setEntrypoint($values_4); } elseif (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] === null) { $object->setEntrypoint(null); @@ -554,21 +530,21 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setMacAddress(null); } if (\array_key_exists('OnBuild', $data) && $data['OnBuild'] !== null) { - $values_4 = []; - foreach ($data['OnBuild'] as $value_6) { - $values_4[] = $value_6; + $values_5 = []; + foreach ($data['OnBuild'] as $value_5) { + $values_5[] = $value_5; } - $object->setOnBuild($values_4); + $object->setOnBuild($values_5); } elseif (\array_key_exists('OnBuild', $data) && $data['OnBuild'] === null) { $object->setOnBuild(null); } if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { - $values_5 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Labels'] as $key_1 => $value_7) { - $values_5[$key_1] = $value_7; + $values_6 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_2 => $value_6) { + $values_6[$key_2] = $value_6; } - $object->setLabels($values_5); + $object->setLabels($values_6); } elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { $object->setLabels(null); @@ -586,11 +562,11 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setStopTimeout(null); } if (\array_key_exists('Shell', $data) && $data['Shell'] !== null) { - $values_6 = []; - foreach ($data['Shell'] as $value_8) { - $values_6[] = $value_8; + $values_7 = []; + foreach ($data['Shell'] as $value_7) { + $values_7[] = $value_7; } - $object->setShell($values_6); + $object->setShell($values_7); } elseif (\array_key_exists('Shell', $data) && $data['Shell'] === null) { $object->setShell(null); @@ -602,7 +578,7 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setHostConfig(null); } if (\array_key_exists('NetworkingConfig', $data) && $data['NetworkingConfig'] !== null) { - $object->setNetworkingConfig($this->denormalizer->denormalize($data['NetworkingConfig'], \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class, 'json', $context)); + $object->setNetworkingConfig($this->denormalizer->denormalize($data['NetworkingConfig'], \Docker\API\Model\NetworkingConfig::class, 'json', $context)); } elseif (\array_key_exists('NetworkingConfig', $data) && $data['NetworkingConfig'] === null) { $object->setNetworkingConfig(null); @@ -657,17 +633,11 @@ public function normalize($object, $format = null, array $context = []) $data['Env'] = $values_1; } if ($object->isInitialized('cmd') && null !== $object->getCmd()) { - $value_2 = $object->getCmd(); - if (is_array($object->getCmd())) { - $values_2 = []; - foreach ($object->getCmd() as $value_3) { - $values_2[] = $value_3; - } - $value_2 = $values_2; - } elseif (is_string($object->getCmd())) { - $value_2 = $object->getCmd(); - } - $data['Cmd'] = $value_2; + $values_2 = []; + foreach ($object->getCmd() as $value_2) { + $values_2[] = $value_2; + } + $data['Cmd'] = $values_2; } if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) { $data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context); @@ -679,23 +649,21 @@ public function normalize($object, $format = null, array $context = []) $data['Image'] = $object->getImage(); } if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { - $data['Volumes'] = $this->normalizer->normalize($object->getVolumes(), 'json', $context); + $values_3 = []; + foreach ($object->getVolumes() as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $data['Volumes'] = $values_3; } if ($object->isInitialized('workingDir') && null !== $object->getWorkingDir()) { $data['WorkingDir'] = $object->getWorkingDir(); } if ($object->isInitialized('entrypoint') && null !== $object->getEntrypoint()) { - $value_4 = $object->getEntrypoint(); - if (is_array($object->getEntrypoint())) { - $values_3 = []; - foreach ($object->getEntrypoint() as $value_5) { - $values_3[] = $value_5; - } - $value_4 = $values_3; - } elseif (is_string($object->getEntrypoint())) { - $value_4 = $object->getEntrypoint(); - } - $data['Entrypoint'] = $value_4; + $values_4 = []; + foreach ($object->getEntrypoint() as $value_4) { + $values_4[] = $value_4; + } + $data['Entrypoint'] = $values_4; } if ($object->isInitialized('networkDisabled') && null !== $object->getNetworkDisabled()) { $data['NetworkDisabled'] = $object->getNetworkDisabled(); @@ -704,18 +672,18 @@ public function normalize($object, $format = null, array $context = []) $data['MacAddress'] = $object->getMacAddress(); } if ($object->isInitialized('onBuild') && null !== $object->getOnBuild()) { - $values_4 = []; - foreach ($object->getOnBuild() as $value_6) { - $values_4[] = $value_6; + $values_5 = []; + foreach ($object->getOnBuild() as $value_5) { + $values_5[] = $value_5; } - $data['OnBuild'] = $values_4; + $data['OnBuild'] = $values_5; } if ($object->isInitialized('labels') && null !== $object->getLabels()) { - $values_5 = []; - foreach ($object->getLabels() as $key_1 => $value_7) { - $values_5[$key_1] = $value_7; + $values_6 = []; + foreach ($object->getLabels() as $key_2 => $value_6) { + $values_6[$key_2] = $value_6; } - $data['Labels'] = $values_5; + $data['Labels'] = $values_6; } if ($object->isInitialized('stopSignal') && null !== $object->getStopSignal()) { $data['StopSignal'] = $object->getStopSignal(); @@ -724,11 +692,11 @@ public function normalize($object, $format = null, array $context = []) $data['StopTimeout'] = $object->getStopTimeout(); } if ($object->isInitialized('shell') && null !== $object->getShell()) { - $values_6 = []; - foreach ($object->getShell() as $value_8) { - $values_6[] = $value_8; + $values_7 = []; + foreach ($object->getShell() as $value_7) { + $values_7[] = $value_7; } - $data['Shell'] = $values_6; + $data['Shell'] = $values_7; } if ($object->isInitialized('hostConfig') && null !== $object->getHostConfig()) { $data['HostConfig'] = $this->normalizer->normalize($object->getHostConfig(), 'json', $context); diff --git a/generated/Normalizer/ContainersIdExecPostBodyNormalizer.php b/generated/Normalizer/ContainersIdExecPostBodyNormalizer.php index 50f078982..01bd8750b 100644 --- a/generated/Normalizer/ContainersIdExecPostBodyNormalizer.php +++ b/generated/Normalizer/ContainersIdExecPostBodyNormalizer.php @@ -58,6 +58,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] === null) { $object->setAttachStderr(null); } + if (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] !== null) { + $values = []; + foreach ($data['ConsoleSize'] as $value) { + $values[] = $value; + } + $object->setConsoleSize($values); + } + elseif (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] === null) { + $object->setConsoleSize(null); + } if (\array_key_exists('DetachKeys', $data) && $data['DetachKeys'] !== null) { $object->setDetachKeys($data['DetachKeys']); } @@ -71,21 +81,21 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setTty(null); } if (\array_key_exists('Env', $data) && $data['Env'] !== null) { - $values = []; - foreach ($data['Env'] as $value) { - $values[] = $value; + $values_1 = []; + foreach ($data['Env'] as $value_1) { + $values_1[] = $value_1; } - $object->setEnv($values); + $object->setEnv($values_1); } elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { $object->setEnv(null); } if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { - $values_1 = []; - foreach ($data['Cmd'] as $value_1) { - $values_1[] = $value_1; + $values_2 = []; + foreach ($data['Cmd'] as $value_2) { + $values_2[] = $value_2; } - $object->setCmd($values_1); + $object->setCmd($values_2); } elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { $object->setCmd(null); @@ -102,6 +112,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('User', $data) && $data['User'] === null) { $object->setUser(null); } + if (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] !== null) { + $object->setWorkingDir($data['WorkingDir']); + } + elseif (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] === null) { + $object->setWorkingDir(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -116,6 +132,13 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('attachStderr') && null !== $object->getAttachStderr()) { $data['AttachStderr'] = $object->getAttachStderr(); } + if ($object->isInitialized('consoleSize') && null !== $object->getConsoleSize()) { + $values = []; + foreach ($object->getConsoleSize() as $value) { + $values[] = $value; + } + $data['ConsoleSize'] = $values; + } if ($object->isInitialized('detachKeys') && null !== $object->getDetachKeys()) { $data['DetachKeys'] = $object->getDetachKeys(); } @@ -123,18 +146,18 @@ public function normalize(mixed $object, string $format = null, array $context = $data['Tty'] = $object->getTty(); } if ($object->isInitialized('env') && null !== $object->getEnv()) { - $values = []; - foreach ($object->getEnv() as $value) { - $values[] = $value; + $values_1 = []; + foreach ($object->getEnv() as $value_1) { + $values_1[] = $value_1; } - $data['Env'] = $values; + $data['Env'] = $values_1; } if ($object->isInitialized('cmd') && null !== $object->getCmd()) { - $values_1 = []; - foreach ($object->getCmd() as $value_1) { - $values_1[] = $value_1; + $values_2 = []; + foreach ($object->getCmd() as $value_2) { + $values_2[] = $value_2; } - $data['Cmd'] = $values_1; + $data['Cmd'] = $values_2; } if ($object->isInitialized('privileged') && null !== $object->getPrivileged()) { $data['Privileged'] = $object->getPrivileged(); @@ -142,6 +165,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('user') && null !== $object->getUser()) { $data['User'] = $object->getUser(); } + if ($object->isInitialized('workingDir') && null !== $object->getWorkingDir()) { + $data['WorkingDir'] = $object->getWorkingDir(); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -197,6 +223,16 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] === null) { $object->setAttachStderr(null); } + if (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] !== null) { + $values = []; + foreach ($data['ConsoleSize'] as $value) { + $values[] = $value; + } + $object->setConsoleSize($values); + } + elseif (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] === null) { + $object->setConsoleSize(null); + } if (\array_key_exists('DetachKeys', $data) && $data['DetachKeys'] !== null) { $object->setDetachKeys($data['DetachKeys']); } @@ -210,21 +246,21 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setTty(null); } if (\array_key_exists('Env', $data) && $data['Env'] !== null) { - $values = []; - foreach ($data['Env'] as $value) { - $values[] = $value; + $values_1 = []; + foreach ($data['Env'] as $value_1) { + $values_1[] = $value_1; } - $object->setEnv($values); + $object->setEnv($values_1); } elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { $object->setEnv(null); } if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { - $values_1 = []; - foreach ($data['Cmd'] as $value_1) { - $values_1[] = $value_1; + $values_2 = []; + foreach ($data['Cmd'] as $value_2) { + $values_2[] = $value_2; } - $object->setCmd($values_1); + $object->setCmd($values_2); } elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { $object->setCmd(null); @@ -241,6 +277,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('User', $data) && $data['User'] === null) { $object->setUser(null); } + if (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] !== null) { + $object->setWorkingDir($data['WorkingDir']); + } + elseif (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] === null) { + $object->setWorkingDir(null); + } return $object; } /** @@ -258,6 +300,13 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('attachStderr') && null !== $object->getAttachStderr()) { $data['AttachStderr'] = $object->getAttachStderr(); } + if ($object->isInitialized('consoleSize') && null !== $object->getConsoleSize()) { + $values = []; + foreach ($object->getConsoleSize() as $value) { + $values[] = $value; + } + $data['ConsoleSize'] = $values; + } if ($object->isInitialized('detachKeys') && null !== $object->getDetachKeys()) { $data['DetachKeys'] = $object->getDetachKeys(); } @@ -265,18 +314,18 @@ public function normalize($object, $format = null, array $context = []) $data['Tty'] = $object->getTty(); } if ($object->isInitialized('env') && null !== $object->getEnv()) { - $values = []; - foreach ($object->getEnv() as $value) { - $values[] = $value; + $values_1 = []; + foreach ($object->getEnv() as $value_1) { + $values_1[] = $value_1; } - $data['Env'] = $values; + $data['Env'] = $values_1; } if ($object->isInitialized('cmd') && null !== $object->getCmd()) { - $values_1 = []; - foreach ($object->getCmd() as $value_1) { - $values_1[] = $value_1; + $values_2 = []; + foreach ($object->getCmd() as $value_2) { + $values_2[] = $value_2; } - $data['Cmd'] = $values_1; + $data['Cmd'] = $values_2; } if ($object->isInitialized('privileged') && null !== $object->getPrivileged()) { $data['Privileged'] = $object->getPrivileged(); @@ -284,6 +333,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('user') && null !== $object->getUser()) { $data['User'] = $object->getUser(); } + if ($object->isInitialized('workingDir') && null !== $object->getWorkingDir()) { + $data['WorkingDir'] = $object->getWorkingDir(); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/ContainersIdJsonGetResponse200Normalizer.php b/generated/Normalizer/ContainersIdJsonGetResponse200Normalizer.php index c2728feda..22dfd7074 100644 --- a/generated/Normalizer/ContainersIdJsonGetResponse200Normalizer.php +++ b/generated/Normalizer/ContainersIdJsonGetResponse200Normalizer.php @@ -69,7 +69,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setArgs(null); } if (\array_key_exists('State', $data) && $data['State'] !== null) { - $object->setState($this->denormalizer->denormalize($data['State'], \Docker\API\Model\ContainersIdJsonGetResponse200State::class, 'json', $context)); + $object->setState($this->denormalizer->denormalize($data['State'], \Docker\API\Model\ContainerState::class, 'json', $context)); } elseif (\array_key_exists('State', $data) && $data['State'] === null) { $object->setState(null); @@ -104,12 +104,6 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('LogPath', $data) && $data['LogPath'] === null) { $object->setLogPath(null); } - if (\array_key_exists('Node', $data) && $data['Node'] !== null) { - $object->setNode($data['Node']); - } - elseif (\array_key_exists('Node', $data) && $data['Node'] === null) { - $object->setNode(null); - } if (\array_key_exists('Name', $data) && $data['Name'] !== null) { $object->setName($data['Name']); } @@ -128,6 +122,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { $object->setDriver(null); } + if (\array_key_exists('Platform', $data) && $data['Platform'] !== null) { + $object->setPlatform($data['Platform']); + } + elseif (\array_key_exists('Platform', $data) && $data['Platform'] === null) { + $object->setPlatform(null); + } if (\array_key_exists('MountLabel', $data) && $data['MountLabel'] !== null) { $object->setMountLabel($data['MountLabel']); } @@ -147,7 +147,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setAppArmorProfile(null); } if (\array_key_exists('ExecIDs', $data) && $data['ExecIDs'] !== null) { - $object->setExecIDs($data['ExecIDs']); + $values_1 = []; + foreach ($data['ExecIDs'] as $value_1) { + $values_1[] = $value_1; + } + $object->setExecIDs($values_1); } elseif (\array_key_exists('ExecIDs', $data) && $data['ExecIDs'] === null) { $object->setExecIDs(null); @@ -159,7 +163,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setHostConfig(null); } if (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] !== null) { - $object->setGraphDriver($this->denormalizer->denormalize($data['GraphDriver'], \Docker\API\Model\GraphDriver::class, 'json', $context)); + $object->setGraphDriver($this->denormalizer->denormalize($data['GraphDriver'], \Docker\API\Model\DriverData::class, 'json', $context)); } elseif (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] === null) { $object->setGraphDriver(null); @@ -177,23 +181,23 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setSizeRootFs(null); } if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { - $values_1 = []; - foreach ($data['Mounts'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\MountPoint::class, 'json', $context); + $values_2 = []; + foreach ($data['Mounts'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\MountPoint::class, 'json', $context); } - $object->setMounts($values_1); + $object->setMounts($values_2); } elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { $object->setMounts(null); } if (\array_key_exists('Config', $data) && $data['Config'] !== null) { - $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\Config::class, 'json', $context)); + $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\ContainerConfig::class, 'json', $context)); } elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { $object->setConfig(null); } if (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] !== null) { - $object->setNetworkSettings($this->denormalizer->denormalize($data['NetworkSettings'], \Docker\API\Model\NetworkConfig::class, 'json', $context)); + $object->setNetworkSettings($this->denormalizer->denormalize($data['NetworkSettings'], \Docker\API\Model\NetworkSettings::class, 'json', $context)); } elseif (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] === null) { $object->setNetworkSettings(null); @@ -237,9 +241,6 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('logPath') && null !== $object->getLogPath()) { $data['LogPath'] = $object->getLogPath(); } - if ($object->isInitialized('node') && null !== $object->getNode()) { - $data['Node'] = $object->getNode(); - } if ($object->isInitialized('name') && null !== $object->getName()) { $data['Name'] = $object->getName(); } @@ -249,6 +250,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('driver') && null !== $object->getDriver()) { $data['Driver'] = $object->getDriver(); } + if ($object->isInitialized('platform') && null !== $object->getPlatform()) { + $data['Platform'] = $object->getPlatform(); + } if ($object->isInitialized('mountLabel') && null !== $object->getMountLabel()) { $data['MountLabel'] = $object->getMountLabel(); } @@ -259,7 +263,11 @@ public function normalize(mixed $object, string $format = null, array $context = $data['AppArmorProfile'] = $object->getAppArmorProfile(); } if ($object->isInitialized('execIDs') && null !== $object->getExecIDs()) { - $data['ExecIDs'] = $object->getExecIDs(); + $values_1 = []; + foreach ($object->getExecIDs() as $value_1) { + $values_1[] = $value_1; + } + $data['ExecIDs'] = $values_1; } if ($object->isInitialized('hostConfig') && null !== $object->getHostConfig()) { $data['HostConfig'] = $this->normalizer->normalize($object->getHostConfig(), 'json', $context); @@ -274,11 +282,11 @@ public function normalize(mixed $object, string $format = null, array $context = $data['SizeRootFs'] = $object->getSizeRootFs(); } if ($object->isInitialized('mounts') && null !== $object->getMounts()) { - $values_1 = []; - foreach ($object->getMounts() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + $values_2 = []; + foreach ($object->getMounts() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } - $data['Mounts'] = $values_1; + $data['Mounts'] = $values_2; } if ($object->isInitialized('config') && null !== $object->getConfig()) { $data['Config'] = $this->normalizer->normalize($object->getConfig(), 'json', $context); @@ -352,7 +360,7 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setArgs(null); } if (\array_key_exists('State', $data) && $data['State'] !== null) { - $object->setState($this->denormalizer->denormalize($data['State'], \Docker\API\Model\ContainersIdJsonGetResponse200State::class, 'json', $context)); + $object->setState($this->denormalizer->denormalize($data['State'], \Docker\API\Model\ContainerState::class, 'json', $context)); } elseif (\array_key_exists('State', $data) && $data['State'] === null) { $object->setState(null); @@ -387,12 +395,6 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('LogPath', $data) && $data['LogPath'] === null) { $object->setLogPath(null); } - if (\array_key_exists('Node', $data) && $data['Node'] !== null) { - $object->setNode($data['Node']); - } - elseif (\array_key_exists('Node', $data) && $data['Node'] === null) { - $object->setNode(null); - } if (\array_key_exists('Name', $data) && $data['Name'] !== null) { $object->setName($data['Name']); } @@ -411,6 +413,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { $object->setDriver(null); } + if (\array_key_exists('Platform', $data) && $data['Platform'] !== null) { + $object->setPlatform($data['Platform']); + } + elseif (\array_key_exists('Platform', $data) && $data['Platform'] === null) { + $object->setPlatform(null); + } if (\array_key_exists('MountLabel', $data) && $data['MountLabel'] !== null) { $object->setMountLabel($data['MountLabel']); } @@ -430,7 +438,11 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setAppArmorProfile(null); } if (\array_key_exists('ExecIDs', $data) && $data['ExecIDs'] !== null) { - $object->setExecIDs($data['ExecIDs']); + $values_1 = []; + foreach ($data['ExecIDs'] as $value_1) { + $values_1[] = $value_1; + } + $object->setExecIDs($values_1); } elseif (\array_key_exists('ExecIDs', $data) && $data['ExecIDs'] === null) { $object->setExecIDs(null); @@ -442,7 +454,7 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setHostConfig(null); } if (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] !== null) { - $object->setGraphDriver($this->denormalizer->denormalize($data['GraphDriver'], \Docker\API\Model\GraphDriver::class, 'json', $context)); + $object->setGraphDriver($this->denormalizer->denormalize($data['GraphDriver'], \Docker\API\Model\DriverData::class, 'json', $context)); } elseif (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] === null) { $object->setGraphDriver(null); @@ -460,23 +472,23 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setSizeRootFs(null); } if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { - $values_1 = []; - foreach ($data['Mounts'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\MountPoint::class, 'json', $context); + $values_2 = []; + foreach ($data['Mounts'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\MountPoint::class, 'json', $context); } - $object->setMounts($values_1); + $object->setMounts($values_2); } elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { $object->setMounts(null); } if (\array_key_exists('Config', $data) && $data['Config'] !== null) { - $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\Config::class, 'json', $context)); + $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\ContainerConfig::class, 'json', $context)); } elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { $object->setConfig(null); } if (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] !== null) { - $object->setNetworkSettings($this->denormalizer->denormalize($data['NetworkSettings'], \Docker\API\Model\NetworkConfig::class, 'json', $context)); + $object->setNetworkSettings($this->denormalizer->denormalize($data['NetworkSettings'], \Docker\API\Model\NetworkSettings::class, 'json', $context)); } elseif (\array_key_exists('NetworkSettings', $data) && $data['NetworkSettings'] === null) { $object->setNetworkSettings(null); @@ -523,9 +535,6 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('logPath') && null !== $object->getLogPath()) { $data['LogPath'] = $object->getLogPath(); } - if ($object->isInitialized('node') && null !== $object->getNode()) { - $data['Node'] = $object->getNode(); - } if ($object->isInitialized('name') && null !== $object->getName()) { $data['Name'] = $object->getName(); } @@ -535,6 +544,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('driver') && null !== $object->getDriver()) { $data['Driver'] = $object->getDriver(); } + if ($object->isInitialized('platform') && null !== $object->getPlatform()) { + $data['Platform'] = $object->getPlatform(); + } if ($object->isInitialized('mountLabel') && null !== $object->getMountLabel()) { $data['MountLabel'] = $object->getMountLabel(); } @@ -545,7 +557,11 @@ public function normalize($object, $format = null, array $context = []) $data['AppArmorProfile'] = $object->getAppArmorProfile(); } if ($object->isInitialized('execIDs') && null !== $object->getExecIDs()) { - $data['ExecIDs'] = $object->getExecIDs(); + $values_1 = []; + foreach ($object->getExecIDs() as $value_1) { + $values_1[] = $value_1; + } + $data['ExecIDs'] = $values_1; } if ($object->isInitialized('hostConfig') && null !== $object->getHostConfig()) { $data['HostConfig'] = $this->normalizer->normalize($object->getHostConfig(), 'json', $context); @@ -560,11 +576,11 @@ public function normalize($object, $format = null, array $context = []) $data['SizeRootFs'] = $object->getSizeRootFs(); } if ($object->isInitialized('mounts') && null !== $object->getMounts()) { - $values_1 = []; - foreach ($object->getMounts() as $value_1) { - $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + $values_2 = []; + foreach ($object->getMounts() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); } - $data['Mounts'] = $values_1; + $data['Mounts'] = $values_2; } if ($object->isInitialized('config') && null !== $object->getConfig()) { $data['Config'] = $this->normalizer->normalize($object->getConfig(), 'json', $context); diff --git a/generated/Normalizer/ContainersIdUpdatePostBodyNormalizer.php b/generated/Normalizer/ContainersIdUpdatePostBodyNormalizer.php index 853d962fd..e1ac073b4 100644 --- a/generated/Normalizer/ContainersIdUpdatePostBodyNormalizer.php +++ b/generated/Normalizer/ContainersIdUpdatePostBodyNormalizer.php @@ -160,17 +160,31 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { $object->setDevices(null); } - if (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] !== null) { - $object->setDiskQuota($data['DiskQuota']); + if (\array_key_exists('DeviceCgroupRules', $data) && $data['DeviceCgroupRules'] !== null) { + $values_6 = []; + foreach ($data['DeviceCgroupRules'] as $value_6) { + $values_6[] = $value_6; + } + $object->setDeviceCgroupRules($values_6); } - elseif (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] === null) { - $object->setDiskQuota(null); + elseif (\array_key_exists('DeviceCgroupRules', $data) && $data['DeviceCgroupRules'] === null) { + $object->setDeviceCgroupRules(null); + } + if (\array_key_exists('DeviceRequests', $data) && $data['DeviceRequests'] !== null) { + $values_7 = []; + foreach ($data['DeviceRequests'] as $value_7) { + $values_7[] = $this->denormalizer->denormalize($value_7, \Docker\API\Model\DeviceRequest::class, 'json', $context); + } + $object->setDeviceRequests($values_7); } - if (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] !== null) { - $object->setKernelMemory($data['KernelMemory']); + elseif (\array_key_exists('DeviceRequests', $data) && $data['DeviceRequests'] === null) { + $object->setDeviceRequests(null); } - elseif (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] === null) { - $object->setKernelMemory(null); + if (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] !== null) { + $object->setKernelMemoryTCP($data['KernelMemoryTCP']); + } + elseif (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] === null) { + $object->setKernelMemoryTCP(null); } if (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] !== null) { $object->setMemoryReservation($data['MemoryReservation']); @@ -202,6 +216,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { $object->setOomKillDisable(null); } + if (\array_key_exists('Init', $data) && $data['Init'] !== null) { + $object->setInit($data['Init']); + } + elseif (\array_key_exists('Init', $data) && $data['Init'] === null) { + $object->setInit(null); + } if (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] !== null) { $object->setPidsLimit($data['PidsLimit']); } @@ -209,11 +229,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setPidsLimit(null); } if (\array_key_exists('Ulimits', $data) && $data['Ulimits'] !== null) { - $values_6 = []; - foreach ($data['Ulimits'] as $value_6) { - $values_6[] = $this->denormalizer->denormalize($value_6, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); + $values_8 = []; + foreach ($data['Ulimits'] as $value_8) { + $values_8[] = $this->denormalizer->denormalize($value_8, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); } - $object->setUlimits($values_6); + $object->setUlimits($values_8); } elseif (\array_key_exists('Ulimits', $data) && $data['Ulimits'] === null) { $object->setUlimits(null); @@ -325,11 +345,22 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['Devices'] = $values_5; } - if ($object->isInitialized('diskQuota') && null !== $object->getDiskQuota()) { - $data['DiskQuota'] = $object->getDiskQuota(); + if ($object->isInitialized('deviceCgroupRules') && null !== $object->getDeviceCgroupRules()) { + $values_6 = []; + foreach ($object->getDeviceCgroupRules() as $value_6) { + $values_6[] = $value_6; + } + $data['DeviceCgroupRules'] = $values_6; } - if ($object->isInitialized('kernelMemory') && null !== $object->getKernelMemory()) { - $data['KernelMemory'] = $object->getKernelMemory(); + if ($object->isInitialized('deviceRequests') && null !== $object->getDeviceRequests()) { + $values_7 = []; + foreach ($object->getDeviceRequests() as $value_7) { + $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); + } + $data['DeviceRequests'] = $values_7; + } + if ($object->isInitialized('kernelMemoryTCP') && null !== $object->getKernelMemoryTCP()) { + $data['KernelMemoryTCP'] = $object->getKernelMemoryTCP(); } if ($object->isInitialized('memoryReservation') && null !== $object->getMemoryReservation()) { $data['MemoryReservation'] = $object->getMemoryReservation(); @@ -346,15 +377,18 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { $data['OomKillDisable'] = $object->getOomKillDisable(); } + if ($object->isInitialized('init') && null !== $object->getInit()) { + $data['Init'] = $object->getInit(); + } if ($object->isInitialized('pidsLimit') && null !== $object->getPidsLimit()) { $data['PidsLimit'] = $object->getPidsLimit(); } if ($object->isInitialized('ulimits') && null !== $object->getUlimits()) { - $values_6 = []; - foreach ($object->getUlimits() as $value_6) { - $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + $values_8 = []; + foreach ($object->getUlimits() as $value_8) { + $values_8[] = $this->normalizer->normalize($value_8, 'json', $context); } - $data['Ulimits'] = $values_6; + $data['Ulimits'] = $values_8; } if ($object->isInitialized('cpuCount') && null !== $object->getCpuCount()) { $data['CpuCount'] = $object->getCpuCount(); @@ -528,17 +562,31 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { $object->setDevices(null); } - if (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] !== null) { - $object->setDiskQuota($data['DiskQuota']); + if (\array_key_exists('DeviceCgroupRules', $data) && $data['DeviceCgroupRules'] !== null) { + $values_6 = []; + foreach ($data['DeviceCgroupRules'] as $value_6) { + $values_6[] = $value_6; + } + $object->setDeviceCgroupRules($values_6); } - elseif (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] === null) { - $object->setDiskQuota(null); + elseif (\array_key_exists('DeviceCgroupRules', $data) && $data['DeviceCgroupRules'] === null) { + $object->setDeviceCgroupRules(null); + } + if (\array_key_exists('DeviceRequests', $data) && $data['DeviceRequests'] !== null) { + $values_7 = []; + foreach ($data['DeviceRequests'] as $value_7) { + $values_7[] = $this->denormalizer->denormalize($value_7, \Docker\API\Model\DeviceRequest::class, 'json', $context); + } + $object->setDeviceRequests($values_7); } - if (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] !== null) { - $object->setKernelMemory($data['KernelMemory']); + elseif (\array_key_exists('DeviceRequests', $data) && $data['DeviceRequests'] === null) { + $object->setDeviceRequests(null); } - elseif (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] === null) { - $object->setKernelMemory(null); + if (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] !== null) { + $object->setKernelMemoryTCP($data['KernelMemoryTCP']); + } + elseif (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] === null) { + $object->setKernelMemoryTCP(null); } if (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] !== null) { $object->setMemoryReservation($data['MemoryReservation']); @@ -570,6 +618,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { $object->setOomKillDisable(null); } + if (\array_key_exists('Init', $data) && $data['Init'] !== null) { + $object->setInit($data['Init']); + } + elseif (\array_key_exists('Init', $data) && $data['Init'] === null) { + $object->setInit(null); + } if (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] !== null) { $object->setPidsLimit($data['PidsLimit']); } @@ -577,11 +631,11 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setPidsLimit(null); } if (\array_key_exists('Ulimits', $data) && $data['Ulimits'] !== null) { - $values_6 = []; - foreach ($data['Ulimits'] as $value_6) { - $values_6[] = $this->denormalizer->denormalize($value_6, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); + $values_8 = []; + foreach ($data['Ulimits'] as $value_8) { + $values_8[] = $this->denormalizer->denormalize($value_8, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); } - $object->setUlimits($values_6); + $object->setUlimits($values_8); } elseif (\array_key_exists('Ulimits', $data) && $data['Ulimits'] === null) { $object->setUlimits(null); @@ -696,11 +750,22 @@ public function normalize($object, $format = null, array $context = []) } $data['Devices'] = $values_5; } - if ($object->isInitialized('diskQuota') && null !== $object->getDiskQuota()) { - $data['DiskQuota'] = $object->getDiskQuota(); + if ($object->isInitialized('deviceCgroupRules') && null !== $object->getDeviceCgroupRules()) { + $values_6 = []; + foreach ($object->getDeviceCgroupRules() as $value_6) { + $values_6[] = $value_6; + } + $data['DeviceCgroupRules'] = $values_6; } - if ($object->isInitialized('kernelMemory') && null !== $object->getKernelMemory()) { - $data['KernelMemory'] = $object->getKernelMemory(); + if ($object->isInitialized('deviceRequests') && null !== $object->getDeviceRequests()) { + $values_7 = []; + foreach ($object->getDeviceRequests() as $value_7) { + $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); + } + $data['DeviceRequests'] = $values_7; + } + if ($object->isInitialized('kernelMemoryTCP') && null !== $object->getKernelMemoryTCP()) { + $data['KernelMemoryTCP'] = $object->getKernelMemoryTCP(); } if ($object->isInitialized('memoryReservation') && null !== $object->getMemoryReservation()) { $data['MemoryReservation'] = $object->getMemoryReservation(); @@ -717,15 +782,18 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { $data['OomKillDisable'] = $object->getOomKillDisable(); } + if ($object->isInitialized('init') && null !== $object->getInit()) { + $data['Init'] = $object->getInit(); + } if ($object->isInitialized('pidsLimit') && null !== $object->getPidsLimit()) { $data['PidsLimit'] = $object->getPidsLimit(); } if ($object->isInitialized('ulimits') && null !== $object->getUlimits()) { - $values_6 = []; - foreach ($object->getUlimits() as $value_6) { - $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + $values_8 = []; + foreach ($object->getUlimits() as $value_8) { + $values_8[] = $this->normalizer->normalize($value_8, 'json', $context); } - $data['Ulimits'] = $values_6; + $data['Ulimits'] = $values_8; } if ($object->isInitialized('cpuCount') && null !== $object->getCpuCount()) { $data['CpuCount'] = $object->getCpuCount(); diff --git a/generated/Normalizer/CreateImageInfoNormalizer.php b/generated/Normalizer/CreateImageInfoNormalizer.php index ff81d1fe8..02243a57b 100644 --- a/generated/Normalizer/CreateImageInfoNormalizer.php +++ b/generated/Normalizer/CreateImageInfoNormalizer.php @@ -40,12 +40,24 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (null === $data || false === \is_array($data)) { return $object; } + if (\array_key_exists('id', $data) && $data['id'] !== null) { + $object->setId($data['id']); + } + elseif (\array_key_exists('id', $data) && $data['id'] === null) { + $object->setId(null); + } if (\array_key_exists('error', $data) && $data['error'] !== null) { $object->setError($data['error']); } elseif (\array_key_exists('error', $data) && $data['error'] === null) { $object->setError(null); } + if (\array_key_exists('errorDetail', $data) && $data['errorDetail'] !== null) { + $object->setErrorDetail($this->denormalizer->denormalize($data['errorDetail'], \Docker\API\Model\ErrorDetail::class, 'json', $context)); + } + elseif (\array_key_exists('errorDetail', $data) && $data['errorDetail'] === null) { + $object->setErrorDetail(null); + } if (\array_key_exists('status', $data) && $data['status'] !== null) { $object->setStatus($data['status']); } @@ -69,9 +81,15 @@ public function denormalize(mixed $data, string $type, string $format = null, ar public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['id'] = $object->getId(); + } if ($object->isInitialized('error') && null !== $object->getError()) { $data['error'] = $object->getError(); } + if ($object->isInitialized('errorDetail') && null !== $object->getErrorDetail()) { + $data['errorDetail'] = $this->normalizer->normalize($object->getErrorDetail(), 'json', $context); + } if ($object->isInitialized('status') && null !== $object->getStatus()) { $data['status'] = $object->getStatus(); } @@ -118,12 +136,24 @@ public function denormalize($data, $type, $format = null, array $context = []) if (null === $data || false === \is_array($data)) { return $object; } + if (\array_key_exists('id', $data) && $data['id'] !== null) { + $object->setId($data['id']); + } + elseif (\array_key_exists('id', $data) && $data['id'] === null) { + $object->setId(null); + } if (\array_key_exists('error', $data) && $data['error'] !== null) { $object->setError($data['error']); } elseif (\array_key_exists('error', $data) && $data['error'] === null) { $object->setError(null); } + if (\array_key_exists('errorDetail', $data) && $data['errorDetail'] !== null) { + $object->setErrorDetail($this->denormalizer->denormalize($data['errorDetail'], \Docker\API\Model\ErrorDetail::class, 'json', $context)); + } + elseif (\array_key_exists('errorDetail', $data) && $data['errorDetail'] === null) { + $object->setErrorDetail(null); + } if (\array_key_exists('status', $data) && $data['status'] !== null) { $object->setStatus($data['status']); } @@ -150,9 +180,15 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; + if ($object->isInitialized('id') && null !== $object->getId()) { + $data['id'] = $object->getId(); + } if ($object->isInitialized('error') && null !== $object->getError()) { $data['error'] = $object->getError(); } + if ($object->isInitialized('errorDetail') && null !== $object->getErrorDetail()) { + $data['errorDetail'] = $this->normalizer->normalize($object->getErrorDetail(), 'json', $context); + } if ($object->isInitialized('status') && null !== $object->getStatus()) { $data['status'] = $object->getStatus(); } diff --git a/generated/Normalizer/DeviceRequestNormalizer.php b/generated/Normalizer/DeviceRequestNormalizer.php new file mode 100644 index 000000000..58362d9f3 --- /dev/null +++ b/generated/Normalizer/DeviceRequestNormalizer.php @@ -0,0 +1,254 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class DeviceRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\DeviceRequest::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\DeviceRequest::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\DeviceRequest(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('Count', $data) && $data['Count'] !== null) { + $object->setCount($data['Count']); + } + elseif (\array_key_exists('Count', $data) && $data['Count'] === null) { + $object->setCount(null); + } + if (\array_key_exists('DeviceIDs', $data) && $data['DeviceIDs'] !== null) { + $values = []; + foreach ($data['DeviceIDs'] as $value) { + $values[] = $value; + } + $object->setDeviceIDs($values); + } + elseif (\array_key_exists('DeviceIDs', $data) && $data['DeviceIDs'] === null) { + $object->setDeviceIDs(null); + } + if (\array_key_exists('Capabilities', $data) && $data['Capabilities'] !== null) { + $values_1 = []; + foreach ($data['Capabilities'] as $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $value_2; + } + $values_1[] = $values_2; + } + $object->setCapabilities($values_1); + } + elseif (\array_key_exists('Capabilities', $data) && $data['Capabilities'] === null) { + $object->setCapabilities(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value_3) { + $values_3[$key] = $value_3; + } + $object->setOptions($values_3); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('count') && null !== $object->getCount()) { + $data['Count'] = $object->getCount(); + } + if ($object->isInitialized('deviceIDs') && null !== $object->getDeviceIDs()) { + $values = []; + foreach ($object->getDeviceIDs() as $value) { + $values[] = $value; + } + $data['DeviceIDs'] = $values; + } + if ($object->isInitialized('capabilities') && null !== $object->getCapabilities()) { + $values_1 = []; + foreach ($object->getCapabilities() as $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $value_2; + } + $values_1[] = $values_2; + } + $data['Capabilities'] = $values_1; + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values_3 = []; + foreach ($object->getOptions() as $key => $value_3) { + $values_3[$key] = $value_3; + } + $data['Options'] = $values_3; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\DeviceRequest::class => false]; + } + } +} else { + class DeviceRequestNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\DeviceRequest::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\DeviceRequest::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\DeviceRequest(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($data['Driver']); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('Count', $data) && $data['Count'] !== null) { + $object->setCount($data['Count']); + } + elseif (\array_key_exists('Count', $data) && $data['Count'] === null) { + $object->setCount(null); + } + if (\array_key_exists('DeviceIDs', $data) && $data['DeviceIDs'] !== null) { + $values = []; + foreach ($data['DeviceIDs'] as $value) { + $values[] = $value; + } + $object->setDeviceIDs($values); + } + elseif (\array_key_exists('DeviceIDs', $data) && $data['DeviceIDs'] === null) { + $object->setDeviceIDs(null); + } + if (\array_key_exists('Capabilities', $data) && $data['Capabilities'] !== null) { + $values_1 = []; + foreach ($data['Capabilities'] as $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $value_2; + } + $values_1[] = $values_2; + } + $object->setCapabilities($values_1); + } + elseif (\array_key_exists('Capabilities', $data) && $data['Capabilities'] === null) { + $object->setCapabilities(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value_3) { + $values_3[$key] = $value_3; + } + $object->setOptions($values_3); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); + } + if ($object->isInitialized('count') && null !== $object->getCount()) { + $data['Count'] = $object->getCount(); + } + if ($object->isInitialized('deviceIDs') && null !== $object->getDeviceIDs()) { + $values = []; + foreach ($object->getDeviceIDs() as $value) { + $values[] = $value; + } + $data['DeviceIDs'] = $values; + } + if ($object->isInitialized('capabilities') && null !== $object->getCapabilities()) { + $values_1 = []; + foreach ($object->getCapabilities() as $value_1) { + $values_2 = []; + foreach ($value_1 as $value_2) { + $values_2[] = $value_2; + } + $values_1[] = $values_2; + } + $data['Capabilities'] = $values_1; + } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values_3 = []; + foreach ($object->getOptions() as $key => $value_3) { + $values_3[$key] = $value_3; + } + $data['Options'] = $values_3; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\DeviceRequest::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/DistributionInspectNormalizer.php b/generated/Normalizer/DistributionInspectNormalizer.php new file mode 100644 index 000000000..a61f15d52 --- /dev/null +++ b/generated/Normalizer/DistributionInspectNormalizer.php @@ -0,0 +1,144 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class DistributionInspectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\DistributionInspect::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\DistributionInspect::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\DistributionInspect(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Descriptor', $data) && $data['Descriptor'] !== null) { + $object->setDescriptor($this->denormalizer->denormalize($data['Descriptor'], \Docker\API\Model\OCIDescriptor::class, 'json', $context)); + } + elseif (\array_key_exists('Descriptor', $data) && $data['Descriptor'] === null) { + $object->setDescriptor(null); + } + if (\array_key_exists('Platforms', $data) && $data['Platforms'] !== null) { + $values = []; + foreach ($data['Platforms'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\OCIPlatform::class, 'json', $context); + } + $object->setPlatforms($values); + } + elseif (\array_key_exists('Platforms', $data) && $data['Platforms'] === null) { + $object->setPlatforms(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Descriptor'] = $this->normalizer->normalize($object->getDescriptor(), 'json', $context); + $values = []; + foreach ($object->getPlatforms() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Platforms'] = $values; + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\DistributionInspect::class => false]; + } + } +} else { + class DistributionInspectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\DistributionInspect::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\DistributionInspect::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\DistributionInspect(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Descriptor', $data) && $data['Descriptor'] !== null) { + $object->setDescriptor($this->denormalizer->denormalize($data['Descriptor'], \Docker\API\Model\OCIDescriptor::class, 'json', $context)); + } + elseif (\array_key_exists('Descriptor', $data) && $data['Descriptor'] === null) { + $object->setDescriptor(null); + } + if (\array_key_exists('Platforms', $data) && $data['Platforms'] !== null) { + $values = []; + foreach ($data['Platforms'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\OCIPlatform::class, 'json', $context); + } + $object->setPlatforms($values); + } + elseif (\array_key_exists('Platforms', $data) && $data['Platforms'] === null) { + $object->setPlatforms(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Descriptor'] = $this->normalizer->normalize($object->getDescriptor(), 'json', $context); + $values = []; + foreach ($object->getPlatforms() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Platforms'] = $values; + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\DistributionInspect::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/GraphDriverNormalizer.php b/generated/Normalizer/DriverDataNormalizer.php similarity index 76% rename from generated/Normalizer/GraphDriverNormalizer.php rename to generated/Normalizer/DriverDataNormalizer.php index b8537305a..52e143989 100644 --- a/generated/Normalizer/GraphDriverNormalizer.php +++ b/generated/Normalizer/DriverDataNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class GraphDriverNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class DriverDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class GraphDriverNormalizer implements DenormalizerInterface, NormalizerInterfac use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\GraphDriver::class; + return $type === \Docker\API\Model\DriverData::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\GraphDriver::class; + return is_object($data) && get_class($data) === \Docker\API\Model\DriverData::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\GraphDriver(); + $object = new \Docker\API\Model\DriverData(); if (null === $data || false === \is_array($data)) { return $object; } @@ -61,25 +61,21 @@ public function denormalize(mixed $data, string $type, string $format = null, ar public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['Name'] = $object->getName(); - } - if ($object->isInitialized('data') && null !== $object->getData()) { - $values = []; - foreach ($object->getData() as $key => $value) { - $values[$key] = $value; - } - $data['Data'] = $values; + $data['Name'] = $object->getName(); + $values = []; + foreach ($object->getData() as $key => $value) { + $values[$key] = $value; } + $data['Data'] = $values; return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\GraphDriver::class => false]; + return [\Docker\API\Model\DriverData::class => false]; } } } else { - class GraphDriverNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class DriverDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -87,11 +83,11 @@ class GraphDriverNormalizer implements DenormalizerInterface, NormalizerInterfac use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\GraphDriver::class; + return $type === \Docker\API\Model\DriverData::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\GraphDriver::class; + return is_object($data) && get_class($data) === \Docker\API\Model\DriverData::class; } /** * @return mixed @@ -104,7 +100,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\GraphDriver(); + $object = new \Docker\API\Model\DriverData(); if (null === $data || false === \is_array($data)) { return $object; } @@ -132,21 +128,17 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['Name'] = $object->getName(); - } - if ($object->isInitialized('data') && null !== $object->getData()) { - $values = []; - foreach ($object->getData() as $key => $value) { - $values[$key] = $value; - } - $data['Data'] = $values; + $data['Name'] = $object->getName(); + $values = []; + foreach ($object->getData() as $key => $value) { + $values[$key] = $value; } + $data['Data'] = $values; return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\GraphDriver::class => false]; + return [\Docker\API\Model\DriverData::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/DriverNormalizer.php b/generated/Normalizer/DriverNormalizer.php new file mode 100644 index 000000000..e5381c465 --- /dev/null +++ b/generated/Normalizer/DriverNormalizer.php @@ -0,0 +1,148 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class DriverNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Driver::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Driver::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Driver(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value) { + $values[$key] = $value; + } + $object->setOptions($values); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Name'] = $object->getName(); + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values = []; + foreach ($object->getOptions() as $key => $value) { + $values[$key] = $value; + } + $data['Options'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Driver::class => false]; + } + } +} else { + class DriverNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Driver::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Driver::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Driver(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value) { + $values[$key] = $value; + } + $object->setOptions($values); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Name'] = $object->getName(); + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values = []; + foreach ($object->getOptions() as $key => $value) { + $values[$key] = $value; + } + $data['Options'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Driver::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/EndpointSettingsIPAMConfigNormalizer.php b/generated/Normalizer/EndpointIPAMConfigNormalizer.php similarity index 88% rename from generated/Normalizer/EndpointSettingsIPAMConfigNormalizer.php rename to generated/Normalizer/EndpointIPAMConfigNormalizer.php index 74f55f9a5..6dcb724f3 100644 --- a/generated/Normalizer/EndpointSettingsIPAMConfigNormalizer.php +++ b/generated/Normalizer/EndpointIPAMConfigNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class EndpointSettingsIPAMConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class EndpointIPAMConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class EndpointSettingsIPAMConfigNormalizer implements DenormalizerInterface, Nor use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\EndpointSettingsIPAMConfig::class; + return $type === \Docker\API\Model\EndpointIPAMConfig::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\EndpointSettingsIPAMConfig::class; + return is_object($data) && get_class($data) === \Docker\API\Model\EndpointIPAMConfig::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\EndpointSettingsIPAMConfig(); + $object = new \Docker\API\Model\EndpointIPAMConfig(); if (null === $data || false === \is_array($data)) { return $object; } @@ -84,11 +84,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\EndpointSettingsIPAMConfig::class => false]; + return [\Docker\API\Model\EndpointIPAMConfig::class => false]; } } } else { - class EndpointSettingsIPAMConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class EndpointIPAMConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -96,11 +96,11 @@ class EndpointSettingsIPAMConfigNormalizer implements DenormalizerInterface, Nor use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\EndpointSettingsIPAMConfig::class; + return $type === \Docker\API\Model\EndpointIPAMConfig::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\EndpointSettingsIPAMConfig::class; + return is_object($data) && get_class($data) === \Docker\API\Model\EndpointIPAMConfig::class; } /** * @return mixed @@ -113,7 +113,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\EndpointSettingsIPAMConfig(); + $object = new \Docker\API\Model\EndpointIPAMConfig(); if (null === $data || false === \is_array($data)) { return $object; } @@ -164,7 +164,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\EndpointSettingsIPAMConfig::class => false]; + return [\Docker\API\Model\EndpointIPAMConfig::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/EndpointPortConfigNormalizer.php b/generated/Normalizer/EndpointPortConfigNormalizer.php index 0a800c0ce..af612f71e 100644 --- a/generated/Normalizer/EndpointPortConfigNormalizer.php +++ b/generated/Normalizer/EndpointPortConfigNormalizer.php @@ -64,6 +64,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('PublishedPort', $data) && $data['PublishedPort'] === null) { $object->setPublishedPort(null); } + if (\array_key_exists('PublishMode', $data) && $data['PublishMode'] !== null) { + $object->setPublishMode($data['PublishMode']); + } + elseif (\array_key_exists('PublishMode', $data) && $data['PublishMode'] === null) { + $object->setPublishMode(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -81,6 +87,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('publishedPort') && null !== $object->getPublishedPort()) { $data['PublishedPort'] = $object->getPublishedPort(); } + if ($object->isInitialized('publishMode') && null !== $object->getPublishMode()) { + $data['PublishMode'] = $object->getPublishMode(); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -142,6 +151,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('PublishedPort', $data) && $data['PublishedPort'] === null) { $object->setPublishedPort(null); } + if (\array_key_exists('PublishMode', $data) && $data['PublishMode'] !== null) { + $object->setPublishMode($data['PublishMode']); + } + elseif (\array_key_exists('PublishMode', $data) && $data['PublishMode'] === null) { + $object->setPublishMode(null); + } return $object; } /** @@ -162,6 +177,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('publishedPort') && null !== $object->getPublishedPort()) { $data['PublishedPort'] = $object->getPublishedPort(); } + if ($object->isInitialized('publishMode') && null !== $object->getPublishMode()) { + $data['PublishMode'] = $object->getPublishMode(); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/EndpointSettingsNormalizer.php b/generated/Normalizer/EndpointSettingsNormalizer.php index 2082d85c6..4c4ae3b9a 100644 --- a/generated/Normalizer/EndpointSettingsNormalizer.php +++ b/generated/Normalizer/EndpointSettingsNormalizer.php @@ -41,7 +41,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar return $object; } if (\array_key_exists('IPAMConfig', $data) && $data['IPAMConfig'] !== null) { - $object->setIPAMConfig($this->denormalizer->denormalize($data['IPAMConfig'], \Docker\API\Model\EndpointSettingsIPAMConfig::class, 'json', $context)); + $object->setIPAMConfig($this->denormalizer->denormalize($data['IPAMConfig'], \Docker\API\Model\EndpointIPAMConfig::class, 'json', $context)); } elseif (\array_key_exists('IPAMConfig', $data) && $data['IPAMConfig'] === null) { $object->setIPAMConfig(null); @@ -56,6 +56,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Links', $data) && $data['Links'] === null) { $object->setLinks(null); } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } if (\array_key_exists('Aliases', $data) && $data['Aliases'] !== null) { $values_1 = []; foreach ($data['Aliases'] as $value_1) { @@ -66,6 +72,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Aliases', $data) && $data['Aliases'] === null) { $object->setAliases(null); } + if (\array_key_exists('DriverOpts', $data) && $data['DriverOpts'] !== null) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['DriverOpts'] as $key => $value_2) { + $values_2[$key] = $value_2; + } + $object->setDriverOpts($values_2); + } + elseif (\array_key_exists('DriverOpts', $data) && $data['DriverOpts'] === null) { + $object->setDriverOpts(null); + } if (\array_key_exists('NetworkID', $data) && $data['NetworkID'] !== null) { $object->setNetworkID($data['NetworkID']); } @@ -114,11 +130,15 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('GlobalIPv6PrefixLen', $data) && $data['GlobalIPv6PrefixLen'] === null) { $object->setGlobalIPv6PrefixLen(null); } - if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { - $object->setMacAddress($data['MacAddress']); + if (\array_key_exists('DNSNames', $data) && $data['DNSNames'] !== null) { + $values_3 = []; + foreach ($data['DNSNames'] as $value_3) { + $values_3[] = $value_3; + } + $object->setDNSNames($values_3); } - elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { - $object->setMacAddress(null); + elseif (\array_key_exists('DNSNames', $data) && $data['DNSNames'] === null) { + $object->setDNSNames(null); } return $object; } @@ -135,6 +155,9 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['Links'] = $values; } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } if ($object->isInitialized('aliases') && null !== $object->getAliases()) { $values_1 = []; foreach ($object->getAliases() as $value_1) { @@ -142,6 +165,13 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['Aliases'] = $values_1; } + if ($object->isInitialized('driverOpts') && null !== $object->getDriverOpts()) { + $values_2 = []; + foreach ($object->getDriverOpts() as $key => $value_2) { + $values_2[$key] = $value_2; + } + $data['DriverOpts'] = $values_2; + } if ($object->isInitialized('networkID') && null !== $object->getNetworkID()) { $data['NetworkID'] = $object->getNetworkID(); } @@ -166,8 +196,12 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('globalIPv6PrefixLen') && null !== $object->getGlobalIPv6PrefixLen()) { $data['GlobalIPv6PrefixLen'] = $object->getGlobalIPv6PrefixLen(); } - if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { - $data['MacAddress'] = $object->getMacAddress(); + if ($object->isInitialized('dNSNames') && null !== $object->getDNSNames()) { + $values_3 = []; + foreach ($object->getDNSNames() as $value_3) { + $values_3[] = $value_3; + } + $data['DNSNames'] = $values_3; } return $data; } @@ -207,7 +241,7 @@ public function denormalize($data, $type, $format = null, array $context = []) return $object; } if (\array_key_exists('IPAMConfig', $data) && $data['IPAMConfig'] !== null) { - $object->setIPAMConfig($this->denormalizer->denormalize($data['IPAMConfig'], \Docker\API\Model\EndpointSettingsIPAMConfig::class, 'json', $context)); + $object->setIPAMConfig($this->denormalizer->denormalize($data['IPAMConfig'], \Docker\API\Model\EndpointIPAMConfig::class, 'json', $context)); } elseif (\array_key_exists('IPAMConfig', $data) && $data['IPAMConfig'] === null) { $object->setIPAMConfig(null); @@ -222,6 +256,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Links', $data) && $data['Links'] === null) { $object->setLinks(null); } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } if (\array_key_exists('Aliases', $data) && $data['Aliases'] !== null) { $values_1 = []; foreach ($data['Aliases'] as $value_1) { @@ -232,6 +272,16 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Aliases', $data) && $data['Aliases'] === null) { $object->setAliases(null); } + if (\array_key_exists('DriverOpts', $data) && $data['DriverOpts'] !== null) { + $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['DriverOpts'] as $key => $value_2) { + $values_2[$key] = $value_2; + } + $object->setDriverOpts($values_2); + } + elseif (\array_key_exists('DriverOpts', $data) && $data['DriverOpts'] === null) { + $object->setDriverOpts(null); + } if (\array_key_exists('NetworkID', $data) && $data['NetworkID'] !== null) { $object->setNetworkID($data['NetworkID']); } @@ -280,11 +330,15 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('GlobalIPv6PrefixLen', $data) && $data['GlobalIPv6PrefixLen'] === null) { $object->setGlobalIPv6PrefixLen(null); } - if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { - $object->setMacAddress($data['MacAddress']); + if (\array_key_exists('DNSNames', $data) && $data['DNSNames'] !== null) { + $values_3 = []; + foreach ($data['DNSNames'] as $value_3) { + $values_3[] = $value_3; + } + $object->setDNSNames($values_3); } - elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { - $object->setMacAddress(null); + elseif (\array_key_exists('DNSNames', $data) && $data['DNSNames'] === null) { + $object->setDNSNames(null); } return $object; } @@ -304,6 +358,9 @@ public function normalize($object, $format = null, array $context = []) } $data['Links'] = $values; } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } if ($object->isInitialized('aliases') && null !== $object->getAliases()) { $values_1 = []; foreach ($object->getAliases() as $value_1) { @@ -311,6 +368,13 @@ public function normalize($object, $format = null, array $context = []) } $data['Aliases'] = $values_1; } + if ($object->isInitialized('driverOpts') && null !== $object->getDriverOpts()) { + $values_2 = []; + foreach ($object->getDriverOpts() as $key => $value_2) { + $values_2[$key] = $value_2; + } + $data['DriverOpts'] = $values_2; + } if ($object->isInitialized('networkID') && null !== $object->getNetworkID()) { $data['NetworkID'] = $object->getNetworkID(); } @@ -335,8 +399,12 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('globalIPv6PrefixLen') && null !== $object->getGlobalIPv6PrefixLen()) { $data['GlobalIPv6PrefixLen'] = $object->getGlobalIPv6PrefixLen(); } - if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { - $data['MacAddress'] = $object->getMacAddress(); + if ($object->isInitialized('dNSNames') && null !== $object->getDNSNames()) { + $values_3 = []; + foreach ($object->getDNSNames() as $value_3) { + $values_3[] = $value_3; + } + $data['DNSNames'] = $values_3; } return $data; } diff --git a/generated/Normalizer/NodeDescriptionEngineNormalizer.php b/generated/Normalizer/EngineDescriptionNormalizer.php similarity index 88% rename from generated/Normalizer/NodeDescriptionEngineNormalizer.php rename to generated/Normalizer/EngineDescriptionNormalizer.php index fcbe49fdc..ef1a90d8c 100644 --- a/generated/Normalizer/NodeDescriptionEngineNormalizer.php +++ b/generated/Normalizer/EngineDescriptionNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NodeDescriptionEngineNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class EngineDescriptionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class NodeDescriptionEngineNormalizer implements DenormalizerInterface, Normaliz use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\NodeDescriptionEngine::class; + return $type === \Docker\API\Model\EngineDescription::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionEngine::class; + return is_object($data) && get_class($data) === \Docker\API\Model\EngineDescription::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\NodeDescriptionEngine(); + $object = new \Docker\API\Model\EngineDescription(); if (null === $data || false === \is_array($data)) { return $object; } @@ -59,7 +59,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (\array_key_exists('Plugins', $data) && $data['Plugins'] !== null) { $values_1 = []; foreach ($data['Plugins'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\NodeDescriptionEnginePluginsItem::class, 'json', $context); + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\EngineDescriptionPluginsItem::class, 'json', $context); } $object->setPlugins($values_1); } @@ -92,11 +92,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\NodeDescriptionEngine::class => false]; + return [\Docker\API\Model\EngineDescription::class => false]; } } } else { - class NodeDescriptionEngineNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class EngineDescriptionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -104,11 +104,11 @@ class NodeDescriptionEngineNormalizer implements DenormalizerInterface, Normaliz use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\NodeDescriptionEngine::class; + return $type === \Docker\API\Model\EngineDescription::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionEngine::class; + return is_object($data) && get_class($data) === \Docker\API\Model\EngineDescription::class; } /** * @return mixed @@ -121,7 +121,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\NodeDescriptionEngine(); + $object = new \Docker\API\Model\EngineDescription(); if (null === $data || false === \is_array($data)) { return $object; } @@ -144,7 +144,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (\array_key_exists('Plugins', $data) && $data['Plugins'] !== null) { $values_1 = []; foreach ($data['Plugins'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\NodeDescriptionEnginePluginsItem::class, 'json', $context); + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\EngineDescriptionPluginsItem::class, 'json', $context); } $object->setPlugins($values_1); } @@ -180,7 +180,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\NodeDescriptionEngine::class => false]; + return [\Docker\API\Model\EngineDescription::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/NodeDescriptionEnginePluginsItemNormalizer.php b/generated/Normalizer/EngineDescriptionPluginsItemNormalizer.php similarity index 84% rename from generated/Normalizer/NodeDescriptionEnginePluginsItemNormalizer.php rename to generated/Normalizer/EngineDescriptionPluginsItemNormalizer.php index b719f58bd..182a6ee1b 100644 --- a/generated/Normalizer/NodeDescriptionEnginePluginsItemNormalizer.php +++ b/generated/Normalizer/EngineDescriptionPluginsItemNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NodeDescriptionEnginePluginsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class EngineDescriptionPluginsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class NodeDescriptionEnginePluginsItemNormalizer implements DenormalizerInterfac use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\NodeDescriptionEnginePluginsItem::class; + return $type === \Docker\API\Model\EngineDescriptionPluginsItem::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionEnginePluginsItem::class; + return is_object($data) && get_class($data) === \Docker\API\Model\EngineDescriptionPluginsItem::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\NodeDescriptionEnginePluginsItem(); + $object = new \Docker\API\Model\EngineDescriptionPluginsItem(); if (null === $data || false === \is_array($data)) { return $object; } @@ -67,11 +67,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\NodeDescriptionEnginePluginsItem::class => false]; + return [\Docker\API\Model\EngineDescriptionPluginsItem::class => false]; } } } else { - class NodeDescriptionEnginePluginsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class EngineDescriptionPluginsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -79,11 +79,11 @@ class NodeDescriptionEnginePluginsItemNormalizer implements DenormalizerInterfac use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\NodeDescriptionEnginePluginsItem::class; + return $type === \Docker\API\Model\EngineDescriptionPluginsItem::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionEnginePluginsItem::class; + return is_object($data) && get_class($data) === \Docker\API\Model\EngineDescriptionPluginsItem::class; } /** * @return mixed @@ -96,7 +96,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\NodeDescriptionEnginePluginsItem(); + $object = new \Docker\API\Model\EngineDescriptionPluginsItem(); if (null === $data || false === \is_array($data)) { return $object; } @@ -130,7 +130,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\NodeDescriptionEnginePluginsItem::class => false]; + return [\Docker\API\Model\EngineDescriptionPluginsItem::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/EventsGetResponse200ActorNormalizer.php b/generated/Normalizer/EventActorNormalizer.php similarity index 87% rename from generated/Normalizer/EventsGetResponse200ActorNormalizer.php rename to generated/Normalizer/EventActorNormalizer.php index 1db7f19f2..5bc6380d6 100644 --- a/generated/Normalizer/EventsGetResponse200ActorNormalizer.php +++ b/generated/Normalizer/EventActorNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class EventsGetResponse200ActorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class EventActorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class EventsGetResponse200ActorNormalizer implements DenormalizerInterface, Norm use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\EventsGetResponse200Actor::class; + return $type === \Docker\API\Model\EventActor::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\EventsGetResponse200Actor::class; + return is_object($data) && get_class($data) === \Docker\API\Model\EventActor::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\EventsGetResponse200Actor(); + $object = new \Docker\API\Model\EventActor(); if (null === $data || false === \is_array($data)) { return $object; } @@ -75,11 +75,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\EventsGetResponse200Actor::class => false]; + return [\Docker\API\Model\EventActor::class => false]; } } } else { - class EventsGetResponse200ActorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class EventActorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -87,11 +87,11 @@ class EventsGetResponse200ActorNormalizer implements DenormalizerInterface, Norm use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\EventsGetResponse200Actor::class; + return $type === \Docker\API\Model\EventActor::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\EventsGetResponse200Actor::class; + return is_object($data) && get_class($data) === \Docker\API\Model\EventActor::class; } /** * @return mixed @@ -104,7 +104,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\EventsGetResponse200Actor(); + $object = new \Docker\API\Model\EventActor(); if (null === $data || false === \is_array($data)) { return $object; } @@ -146,7 +146,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\EventsGetResponse200Actor::class => false]; + return [\Docker\API\Model\EventActor::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/EventsGetResponse200Normalizer.php b/generated/Normalizer/EventMessageNormalizer.php similarity index 82% rename from generated/Normalizer/EventsGetResponse200Normalizer.php rename to generated/Normalizer/EventMessageNormalizer.php index a1ef6f723..ed66f8265 100644 --- a/generated/Normalizer/EventsGetResponse200Normalizer.php +++ b/generated/Normalizer/EventMessageNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class EventsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class EventMessageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class EventsGetResponse200Normalizer implements DenormalizerInterface, Normalize use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\EventsGetResponse200::class; + return $type === \Docker\API\Model\EventMessage::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\EventsGetResponse200::class; + return is_object($data) && get_class($data) === \Docker\API\Model\EventMessage::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\EventsGetResponse200(); + $object = new \Docker\API\Model\EventMessage(); if (null === $data || false === \is_array($data)) { return $object; } @@ -53,11 +53,17 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setAction(null); } if (\array_key_exists('Actor', $data) && $data['Actor'] !== null) { - $object->setActor($this->denormalizer->denormalize($data['Actor'], \Docker\API\Model\EventsGetResponse200Actor::class, 'json', $context)); + $object->setActor($this->denormalizer->denormalize($data['Actor'], \Docker\API\Model\EventActor::class, 'json', $context)); } elseif (\array_key_exists('Actor', $data) && $data['Actor'] === null) { $object->setActor(null); } + if (\array_key_exists('scope', $data) && $data['scope'] !== null) { + $object->setScope($data['scope']); + } + elseif (\array_key_exists('scope', $data) && $data['scope'] === null) { + $object->setScope(null); + } if (\array_key_exists('time', $data) && $data['time'] !== null) { $object->setTime($data['time']); } @@ -84,6 +90,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('actor') && null !== $object->getActor()) { $data['Actor'] = $this->normalizer->normalize($object->getActor(), 'json', $context); } + if ($object->isInitialized('scope') && null !== $object->getScope()) { + $data['scope'] = $object->getScope(); + } if ($object->isInitialized('time') && null !== $object->getTime()) { $data['time'] = $object->getTime(); } @@ -94,11 +103,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\EventsGetResponse200::class => false]; + return [\Docker\API\Model\EventMessage::class => false]; } } } else { - class EventsGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class EventMessageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -106,11 +115,11 @@ class EventsGetResponse200Normalizer implements DenormalizerInterface, Normalize use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\EventsGetResponse200::class; + return $type === \Docker\API\Model\EventMessage::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\EventsGetResponse200::class; + return is_object($data) && get_class($data) === \Docker\API\Model\EventMessage::class; } /** * @return mixed @@ -123,7 +132,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\EventsGetResponse200(); + $object = new \Docker\API\Model\EventMessage(); if (null === $data || false === \is_array($data)) { return $object; } @@ -140,11 +149,17 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setAction(null); } if (\array_key_exists('Actor', $data) && $data['Actor'] !== null) { - $object->setActor($this->denormalizer->denormalize($data['Actor'], \Docker\API\Model\EventsGetResponse200Actor::class, 'json', $context)); + $object->setActor($this->denormalizer->denormalize($data['Actor'], \Docker\API\Model\EventActor::class, 'json', $context)); } elseif (\array_key_exists('Actor', $data) && $data['Actor'] === null) { $object->setActor(null); } + if (\array_key_exists('scope', $data) && $data['scope'] !== null) { + $object->setScope($data['scope']); + } + elseif (\array_key_exists('scope', $data) && $data['scope'] === null) { + $object->setScope(null); + } if (\array_key_exists('time', $data) && $data['time'] !== null) { $object->setTime($data['time']); } @@ -174,6 +189,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('actor') && null !== $object->getActor()) { $data['Actor'] = $this->normalizer->normalize($object->getActor(), 'json', $context); } + if ($object->isInitialized('scope') && null !== $object->getScope()) { + $data['scope'] = $object->getScope(); + } if ($object->isInitialized('time') && null !== $object->getTime()) { $data['time'] = $object->getTime(); } @@ -184,7 +202,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\EventsGetResponse200::class => false]; + return [\Docker\API\Model\EventMessage::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ExecIdJsonGetResponse200Normalizer.php b/generated/Normalizer/ExecIdJsonGetResponse200Normalizer.php index 63298a926..95d97a0f2 100644 --- a/generated/Normalizer/ExecIdJsonGetResponse200Normalizer.php +++ b/generated/Normalizer/ExecIdJsonGetResponse200Normalizer.php @@ -40,6 +40,18 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (null === $data || false === \is_array($data)) { return $object; } + if (\array_key_exists('CanRemove', $data) && $data['CanRemove'] !== null) { + $object->setCanRemove($data['CanRemove']); + } + elseif (\array_key_exists('CanRemove', $data) && $data['CanRemove'] === null) { + $object->setCanRemove(null); + } + if (\array_key_exists('DetachKeys', $data) && $data['DetachKeys'] !== null) { + $object->setDetachKeys($data['DetachKeys']); + } + elseif (\array_key_exists('DetachKeys', $data) && $data['DetachKeys'] === null) { + $object->setDetachKeys(null); + } if (\array_key_exists('ID', $data) && $data['ID'] !== null) { $object->setID($data['ID']); } @@ -99,6 +111,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; + if ($object->isInitialized('canRemove') && null !== $object->getCanRemove()) { + $data['CanRemove'] = $object->getCanRemove(); + } + if ($object->isInitialized('detachKeys') && null !== $object->getDetachKeys()) { + $data['DetachKeys'] = $object->getDetachKeys(); + } if ($object->isInitialized('iD') && null !== $object->getID()) { $data['ID'] = $object->getID(); } @@ -163,6 +181,18 @@ public function denormalize($data, $type, $format = null, array $context = []) if (null === $data || false === \is_array($data)) { return $object; } + if (\array_key_exists('CanRemove', $data) && $data['CanRemove'] !== null) { + $object->setCanRemove($data['CanRemove']); + } + elseif (\array_key_exists('CanRemove', $data) && $data['CanRemove'] === null) { + $object->setCanRemove(null); + } + if (\array_key_exists('DetachKeys', $data) && $data['DetachKeys'] !== null) { + $object->setDetachKeys($data['DetachKeys']); + } + elseif (\array_key_exists('DetachKeys', $data) && $data['DetachKeys'] === null) { + $object->setDetachKeys(null); + } if (\array_key_exists('ID', $data) && $data['ID'] !== null) { $object->setID($data['ID']); } @@ -225,6 +255,12 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; + if ($object->isInitialized('canRemove') && null !== $object->getCanRemove()) { + $data['CanRemove'] = $object->getCanRemove(); + } + if ($object->isInitialized('detachKeys') && null !== $object->getDetachKeys()) { + $data['DetachKeys'] = $object->getDetachKeys(); + } if ($object->isInitialized('iD') && null !== $object->getID()) { $data['ID'] = $object->getID(); } diff --git a/generated/Normalizer/ExecIdStartPostBodyNormalizer.php b/generated/Normalizer/ExecIdStartPostBodyNormalizer.php index 8bc510dd1..8c330da84 100644 --- a/generated/Normalizer/ExecIdStartPostBodyNormalizer.php +++ b/generated/Normalizer/ExecIdStartPostBodyNormalizer.php @@ -52,6 +52,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { $object->setTty(null); } + if (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] !== null) { + $values = []; + foreach ($data['ConsoleSize'] as $value) { + $values[] = $value; + } + $object->setConsoleSize($values); + } + elseif (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] === null) { + $object->setConsoleSize(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -63,6 +73,13 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('tty') && null !== $object->getTty()) { $data['Tty'] = $object->getTty(); } + if ($object->isInitialized('consoleSize') && null !== $object->getConsoleSize()) { + $values = []; + foreach ($object->getConsoleSize() as $value) { + $values[] = $value; + } + $data['ConsoleSize'] = $values; + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -112,6 +129,16 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { $object->setTty(null); } + if (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] !== null) { + $values = []; + foreach ($data['ConsoleSize'] as $value) { + $values[] = $value; + } + $object->setConsoleSize($values); + } + elseif (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] === null) { + $object->setConsoleSize(null); + } return $object; } /** @@ -126,6 +153,13 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('tty') && null !== $object->getTty()) { $data['Tty'] = $object->getTty(); } + if ($object->isInitialized('consoleSize') && null !== $object->getConsoleSize()) { + $values = []; + foreach ($object->getConsoleSize() as $value) { + $values[] = $value; + } + $data['ConsoleSize'] = $values; + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/ConfigVolumesNormalizer.php b/generated/Normalizer/FilesystemChangeNormalizer.php similarity index 64% rename from generated/Normalizer/ConfigVolumesNormalizer.php rename to generated/Normalizer/FilesystemChangeNormalizer.php index 0daad1615..cc092399f 100644 --- a/generated/Normalizer/ConfigVolumesNormalizer.php +++ b/generated/Normalizer/FilesystemChangeNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ConfigVolumesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class FilesystemChangeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ConfigVolumesNormalizer implements DenormalizerInterface, NormalizerInterf use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ConfigVolumes::class; + return $type === \Docker\API\Model\FilesystemChange::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ConfigVolumes::class; + return is_object($data) && get_class($data) === \Docker\API\Model\FilesystemChange::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,33 +36,38 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ConfigVolumes(); + $object = new \Docker\API\Model\FilesystemChange(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('additionalProperties', $data) && $data['additionalProperties'] !== null) { - $object->setAdditionalProperties($data['additionalProperties']); + if (\array_key_exists('Path', $data) && $data['Path'] !== null) { + $object->setPath($data['Path']); } - elseif (\array_key_exists('additionalProperties', $data) && $data['additionalProperties'] === null) { - $object->setAdditionalProperties(null); + elseif (\array_key_exists('Path', $data) && $data['Path'] === null) { + $object->setPath(null); + } + if (\array_key_exists('Kind', $data) && $data['Kind'] !== null) { + $object->setKind($data['Kind']); + } + elseif (\array_key_exists('Kind', $data) && $data['Kind'] === null) { + $object->setKind(null); } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('additionalProperties') && null !== $object->getAdditionalProperties()) { - $data['additionalProperties'] = $object->getAdditionalProperties(); - } + $data['Path'] = $object->getPath(); + $data['Kind'] = $object->getKind(); return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ConfigVolumes::class => false]; + return [\Docker\API\Model\FilesystemChange::class => false]; } } } else { - class ConfigVolumesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class FilesystemChangeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -70,11 +75,11 @@ class ConfigVolumesNormalizer implements DenormalizerInterface, NormalizerInterf use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ConfigVolumes::class; + return $type === \Docker\API\Model\FilesystemChange::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ConfigVolumes::class; + return is_object($data) && get_class($data) === \Docker\API\Model\FilesystemChange::class; } /** * @return mixed @@ -87,15 +92,21 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ConfigVolumes(); + $object = new \Docker\API\Model\FilesystemChange(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('additionalProperties', $data) && $data['additionalProperties'] !== null) { - $object->setAdditionalProperties($data['additionalProperties']); + if (\array_key_exists('Path', $data) && $data['Path'] !== null) { + $object->setPath($data['Path']); } - elseif (\array_key_exists('additionalProperties', $data) && $data['additionalProperties'] === null) { - $object->setAdditionalProperties(null); + elseif (\array_key_exists('Path', $data) && $data['Path'] === null) { + $object->setPath(null); + } + if (\array_key_exists('Kind', $data) && $data['Kind'] !== null) { + $object->setKind($data['Kind']); + } + elseif (\array_key_exists('Kind', $data) && $data['Kind'] === null) { + $object->setKind(null); } return $object; } @@ -105,14 +116,13 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('additionalProperties') && null !== $object->getAdditionalProperties()) { - $data['additionalProperties'] = $object->getAdditionalProperties(); - } + $data['Path'] = $object->getPath(); + $data['Kind'] = $object->getKind(); return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ConfigVolumes::class => false]; + return [\Docker\API\Model\FilesystemChange::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/GenericResourcesItemDiscreteResourceSpecNormalizer.php b/generated/Normalizer/GenericResourcesItemDiscreteResourceSpecNormalizer.php new file mode 100644 index 000000000..79245b611 --- /dev/null +++ b/generated/Normalizer/GenericResourcesItemDiscreteResourceSpecNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class GenericResourcesItemDiscreteResourceSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\GenericResourcesItemDiscreteResourceSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\GenericResourcesItemDiscreteResourceSpec::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\GenericResourcesItemDiscreteResourceSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Kind', $data) && $data['Kind'] !== null) { + $object->setKind($data['Kind']); + } + elseif (\array_key_exists('Kind', $data) && $data['Kind'] === null) { + $object->setKind(null); + } + if (\array_key_exists('Value', $data) && $data['Value'] !== null) { + $object->setValue($data['Value']); + } + elseif (\array_key_exists('Value', $data) && $data['Value'] === null) { + $object->setValue(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('kind') && null !== $object->getKind()) { + $data['Kind'] = $object->getKind(); + } + if ($object->isInitialized('value') && null !== $object->getValue()) { + $data['Value'] = $object->getValue(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\GenericResourcesItemDiscreteResourceSpec::class => false]; + } + } +} else { + class GenericResourcesItemDiscreteResourceSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\GenericResourcesItemDiscreteResourceSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\GenericResourcesItemDiscreteResourceSpec::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\GenericResourcesItemDiscreteResourceSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Kind', $data) && $data['Kind'] !== null) { + $object->setKind($data['Kind']); + } + elseif (\array_key_exists('Kind', $data) && $data['Kind'] === null) { + $object->setKind(null); + } + if (\array_key_exists('Value', $data) && $data['Value'] !== null) { + $object->setValue($data['Value']); + } + elseif (\array_key_exists('Value', $data) && $data['Value'] === null) { + $object->setValue(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('kind') && null !== $object->getKind()) { + $data['Kind'] = $object->getKind(); + } + if ($object->isInitialized('value') && null !== $object->getValue()) { + $data['Value'] = $object->getValue(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\GenericResourcesItemDiscreteResourceSpec::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersIdChangesGetResponse200ItemNormalizer.php b/generated/Normalizer/GenericResourcesItemNamedResourceSpecNormalizer.php similarity index 74% rename from generated/Normalizer/ContainersIdChangesGetResponse200ItemNormalizer.php rename to generated/Normalizer/GenericResourcesItemNamedResourceSpecNormalizer.php index 0ea30e3a6..4315bfc5d 100644 --- a/generated/Normalizer/ContainersIdChangesGetResponse200ItemNormalizer.php +++ b/generated/Normalizer/GenericResourcesItemNamedResourceSpecNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ContainersIdChangesGetResponse200ItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class GenericResourcesItemNamedResourceSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ContainersIdChangesGetResponse200ItemNormalizer implements DenormalizerInt use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainersIdChangesGetResponse200Item::class; + return $type === \Docker\API\Model\GenericResourcesItemNamedResourceSpec::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdChangesGetResponse200Item::class; + return is_object($data) && get_class($data) === \Docker\API\Model\GenericResourcesItemNamedResourceSpec::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,42 +36,42 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainersIdChangesGetResponse200Item(); + $object = new \Docker\API\Model\GenericResourcesItemNamedResourceSpec(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Path', $data) && $data['Path'] !== null) { - $object->setPath($data['Path']); - } - elseif (\array_key_exists('Path', $data) && $data['Path'] === null) { - $object->setPath(null); - } if (\array_key_exists('Kind', $data) && $data['Kind'] !== null) { $object->setKind($data['Kind']); } elseif (\array_key_exists('Kind', $data) && $data['Kind'] === null) { $object->setKind(null); } + if (\array_key_exists('Value', $data) && $data['Value'] !== null) { + $object->setValue($data['Value']); + } + elseif (\array_key_exists('Value', $data) && $data['Value'] === null) { + $object->setValue(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('path') && null !== $object->getPath()) { - $data['Path'] = $object->getPath(); - } if ($object->isInitialized('kind') && null !== $object->getKind()) { $data['Kind'] = $object->getKind(); } + if ($object->isInitialized('value') && null !== $object->getValue()) { + $data['Value'] = $object->getValue(); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainersIdChangesGetResponse200Item::class => false]; + return [\Docker\API\Model\GenericResourcesItemNamedResourceSpec::class => false]; } } } else { - class ContainersIdChangesGetResponse200ItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class GenericResourcesItemNamedResourceSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -79,11 +79,11 @@ class ContainersIdChangesGetResponse200ItemNormalizer implements DenormalizerInt use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainersIdChangesGetResponse200Item::class; + return $type === \Docker\API\Model\GenericResourcesItemNamedResourceSpec::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainersIdChangesGetResponse200Item::class; + return is_object($data) && get_class($data) === \Docker\API\Model\GenericResourcesItemNamedResourceSpec::class; } /** * @return mixed @@ -96,22 +96,22 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainersIdChangesGetResponse200Item(); + $object = new \Docker\API\Model\GenericResourcesItemNamedResourceSpec(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Path', $data) && $data['Path'] !== null) { - $object->setPath($data['Path']); - } - elseif (\array_key_exists('Path', $data) && $data['Path'] === null) { - $object->setPath(null); - } if (\array_key_exists('Kind', $data) && $data['Kind'] !== null) { $object->setKind($data['Kind']); } elseif (\array_key_exists('Kind', $data) && $data['Kind'] === null) { $object->setKind(null); } + if (\array_key_exists('Value', $data) && $data['Value'] !== null) { + $object->setValue($data['Value']); + } + elseif (\array_key_exists('Value', $data) && $data['Value'] === null) { + $object->setValue(null); + } return $object; } /** @@ -120,17 +120,17 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('path') && null !== $object->getPath()) { - $data['Path'] = $object->getPath(); - } if ($object->isInitialized('kind') && null !== $object->getKind()) { $data['Kind'] = $object->getKind(); } + if ($object->isInitialized('value') && null !== $object->getValue()) { + $data['Value'] = $object->getValue(); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainersIdChangesGetResponse200Item::class => false]; + return [\Docker\API\Model\GenericResourcesItemNamedResourceSpec::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecNetworksItemNormalizer.php b/generated/Normalizer/GenericResourcesItemNormalizer.php similarity index 53% rename from generated/Normalizer/TaskSpecNetworksItemNormalizer.php rename to generated/Normalizer/GenericResourcesItemNormalizer.php index 82eb4835d..2fbac34ad 100644 --- a/generated/Normalizer/TaskSpecNetworksItemNormalizer.php +++ b/generated/Normalizer/GenericResourcesItemNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TaskSpecNetworksItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class GenericResourcesItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class TaskSpecNetworksItemNormalizer implements DenormalizerInterface, Normalize use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\TaskSpecNetworksItem::class; + return $type === \Docker\API\Model\GenericResourcesItem::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecNetworksItem::class; + return is_object($data) && get_class($data) === \Docker\API\Model\GenericResourcesItem::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,50 +36,42 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\TaskSpecNetworksItem(); + $object = new \Docker\API\Model\GenericResourcesItem(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Target', $data) && $data['Target'] !== null) { - $object->setTarget($data['Target']); + if (\array_key_exists('NamedResourceSpec', $data) && $data['NamedResourceSpec'] !== null) { + $object->setNamedResourceSpec($this->denormalizer->denormalize($data['NamedResourceSpec'], \Docker\API\Model\GenericResourcesItemNamedResourceSpec::class, 'json', $context)); } - elseif (\array_key_exists('Target', $data) && $data['Target'] === null) { - $object->setTarget(null); + elseif (\array_key_exists('NamedResourceSpec', $data) && $data['NamedResourceSpec'] === null) { + $object->setNamedResourceSpec(null); } - if (\array_key_exists('Aliases', $data) && $data['Aliases'] !== null) { - $values = []; - foreach ($data['Aliases'] as $value) { - $values[] = $value; - } - $object->setAliases($values); + if (\array_key_exists('DiscreteResourceSpec', $data) && $data['DiscreteResourceSpec'] !== null) { + $object->setDiscreteResourceSpec($this->denormalizer->denormalize($data['DiscreteResourceSpec'], \Docker\API\Model\GenericResourcesItemDiscreteResourceSpec::class, 'json', $context)); } - elseif (\array_key_exists('Aliases', $data) && $data['Aliases'] === null) { - $object->setAliases(null); + elseif (\array_key_exists('DiscreteResourceSpec', $data) && $data['DiscreteResourceSpec'] === null) { + $object->setDiscreteResourceSpec(null); } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['Target'] = $object->getTarget(); + if ($object->isInitialized('namedResourceSpec') && null !== $object->getNamedResourceSpec()) { + $data['NamedResourceSpec'] = $this->normalizer->normalize($object->getNamedResourceSpec(), 'json', $context); } - if ($object->isInitialized('aliases') && null !== $object->getAliases()) { - $values = []; - foreach ($object->getAliases() as $value) { - $values[] = $value; - } - $data['Aliases'] = $values; + if ($object->isInitialized('discreteResourceSpec') && null !== $object->getDiscreteResourceSpec()) { + $data['DiscreteResourceSpec'] = $this->normalizer->normalize($object->getDiscreteResourceSpec(), 'json', $context); } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\TaskSpecNetworksItem::class => false]; + return [\Docker\API\Model\GenericResourcesItem::class => false]; } } } else { - class TaskSpecNetworksItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class GenericResourcesItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -87,11 +79,11 @@ class TaskSpecNetworksItemNormalizer implements DenormalizerInterface, Normalize use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\TaskSpecNetworksItem::class; + return $type === \Docker\API\Model\GenericResourcesItem::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecNetworksItem::class; + return is_object($data) && get_class($data) === \Docker\API\Model\GenericResourcesItem::class; } /** * @return mixed @@ -104,25 +96,21 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\TaskSpecNetworksItem(); + $object = new \Docker\API\Model\GenericResourcesItem(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Target', $data) && $data['Target'] !== null) { - $object->setTarget($data['Target']); + if (\array_key_exists('NamedResourceSpec', $data) && $data['NamedResourceSpec'] !== null) { + $object->setNamedResourceSpec($this->denormalizer->denormalize($data['NamedResourceSpec'], \Docker\API\Model\GenericResourcesItemNamedResourceSpec::class, 'json', $context)); } - elseif (\array_key_exists('Target', $data) && $data['Target'] === null) { - $object->setTarget(null); + elseif (\array_key_exists('NamedResourceSpec', $data) && $data['NamedResourceSpec'] === null) { + $object->setNamedResourceSpec(null); } - if (\array_key_exists('Aliases', $data) && $data['Aliases'] !== null) { - $values = []; - foreach ($data['Aliases'] as $value) { - $values[] = $value; - } - $object->setAliases($values); + if (\array_key_exists('DiscreteResourceSpec', $data) && $data['DiscreteResourceSpec'] !== null) { + $object->setDiscreteResourceSpec($this->denormalizer->denormalize($data['DiscreteResourceSpec'], \Docker\API\Model\GenericResourcesItemDiscreteResourceSpec::class, 'json', $context)); } - elseif (\array_key_exists('Aliases', $data) && $data['Aliases'] === null) { - $object->setAliases(null); + elseif (\array_key_exists('DiscreteResourceSpec', $data) && $data['DiscreteResourceSpec'] === null) { + $object->setDiscreteResourceSpec(null); } return $object; } @@ -132,21 +120,17 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('target') && null !== $object->getTarget()) { - $data['Target'] = $object->getTarget(); + if ($object->isInitialized('namedResourceSpec') && null !== $object->getNamedResourceSpec()) { + $data['NamedResourceSpec'] = $this->normalizer->normalize($object->getNamedResourceSpec(), 'json', $context); } - if ($object->isInitialized('aliases') && null !== $object->getAliases()) { - $values = []; - foreach ($object->getAliases() as $value) { - $values[] = $value; - } - $data['Aliases'] = $values; + if ($object->isInitialized('discreteResourceSpec') && null !== $object->getDiscreteResourceSpec()) { + $data['DiscreteResourceSpec'] = $this->normalizer->normalize($object->getDiscreteResourceSpec(), 'json', $context); } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\TaskSpecNetworksItem::class => false]; + return [\Docker\API\Model\GenericResourcesItem::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ConfigHealthcheckNormalizer.php b/generated/Normalizer/HealthConfigNormalizer.php similarity index 73% rename from generated/Normalizer/ConfigHealthcheckNormalizer.php rename to generated/Normalizer/HealthConfigNormalizer.php index bf9d3eadc..97a02b906 100644 --- a/generated/Normalizer/ConfigHealthcheckNormalizer.php +++ b/generated/Normalizer/HealthConfigNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ConfigHealthcheckNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class HealthConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ConfigHealthcheckNormalizer implements DenormalizerInterface, NormalizerIn use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ConfigHealthcheck::class; + return $type === \Docker\API\Model\HealthConfig::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ConfigHealthcheck::class; + return is_object($data) && get_class($data) === \Docker\API\Model\HealthConfig::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ConfigHealthcheck(); + $object = new \Docker\API\Model\HealthConfig(); if (null === $data || false === \is_array($data)) { return $object; } @@ -68,6 +68,18 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Retries', $data) && $data['Retries'] === null) { $object->setRetries(null); } + if (\array_key_exists('StartPeriod', $data) && $data['StartPeriod'] !== null) { + $object->setStartPeriod($data['StartPeriod']); + } + elseif (\array_key_exists('StartPeriod', $data) && $data['StartPeriod'] === null) { + $object->setStartPeriod(null); + } + if (\array_key_exists('StartInterval', $data) && $data['StartInterval'] !== null) { + $object->setStartInterval($data['StartInterval']); + } + elseif (\array_key_exists('StartInterval', $data) && $data['StartInterval'] === null) { + $object->setStartInterval(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -89,15 +101,21 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('retries') && null !== $object->getRetries()) { $data['Retries'] = $object->getRetries(); } + if ($object->isInitialized('startPeriod') && null !== $object->getStartPeriod()) { + $data['StartPeriod'] = $object->getStartPeriod(); + } + if ($object->isInitialized('startInterval') && null !== $object->getStartInterval()) { + $data['StartInterval'] = $object->getStartInterval(); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ConfigHealthcheck::class => false]; + return [\Docker\API\Model\HealthConfig::class => false]; } } } else { - class ConfigHealthcheckNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class HealthConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -105,11 +123,11 @@ class ConfigHealthcheckNormalizer implements DenormalizerInterface, NormalizerIn use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ConfigHealthcheck::class; + return $type === \Docker\API\Model\HealthConfig::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ConfigHealthcheck::class; + return is_object($data) && get_class($data) === \Docker\API\Model\HealthConfig::class; } /** * @return mixed @@ -122,7 +140,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ConfigHealthcheck(); + $object = new \Docker\API\Model\HealthConfig(); if (null === $data || false === \is_array($data)) { return $object; } @@ -154,6 +172,18 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Retries', $data) && $data['Retries'] === null) { $object->setRetries(null); } + if (\array_key_exists('StartPeriod', $data) && $data['StartPeriod'] !== null) { + $object->setStartPeriod($data['StartPeriod']); + } + elseif (\array_key_exists('StartPeriod', $data) && $data['StartPeriod'] === null) { + $object->setStartPeriod(null); + } + if (\array_key_exists('StartInterval', $data) && $data['StartInterval'] !== null) { + $object->setStartInterval($data['StartInterval']); + } + elseif (\array_key_exists('StartInterval', $data) && $data['StartInterval'] === null) { + $object->setStartInterval(null); + } return $object; } /** @@ -178,11 +208,17 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('retries') && null !== $object->getRetries()) { $data['Retries'] = $object->getRetries(); } + if ($object->isInitialized('startPeriod') && null !== $object->getStartPeriod()) { + $data['StartPeriod'] = $object->getStartPeriod(); + } + if ($object->isInitialized('startInterval') && null !== $object->getStartInterval()) { + $data['StartInterval'] = $object->getStartInterval(); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ConfigHealthcheck::class => false]; + return [\Docker\API\Model\HealthConfig::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/HealthNormalizer.php b/generated/Normalizer/HealthNormalizer.php new file mode 100644 index 000000000..bba4cdad8 --- /dev/null +++ b/generated/Normalizer/HealthNormalizer.php @@ -0,0 +1,170 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class HealthNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Health::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Health::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Health(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Status', $data) && $data['Status'] !== null) { + $object->setStatus($data['Status']); + } + elseif (\array_key_exists('Status', $data) && $data['Status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('FailingStreak', $data) && $data['FailingStreak'] !== null) { + $object->setFailingStreak($data['FailingStreak']); + } + elseif (\array_key_exists('FailingStreak', $data) && $data['FailingStreak'] === null) { + $object->setFailingStreak(null); + } + if (\array_key_exists('Log', $data) && $data['Log'] !== null) { + $values = []; + foreach ($data['Log'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\HealthcheckResult::class, 'json', $context); + } + $object->setLog($values); + } + elseif (\array_key_exists('Log', $data) && $data['Log'] === null) { + $object->setLog(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['Status'] = $object->getStatus(); + } + if ($object->isInitialized('failingStreak') && null !== $object->getFailingStreak()) { + $data['FailingStreak'] = $object->getFailingStreak(); + } + if ($object->isInitialized('log') && null !== $object->getLog()) { + $values = []; + foreach ($object->getLog() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Log'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Health::class => false]; + } + } +} else { + class HealthNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Health::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Health::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Health(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Status', $data) && $data['Status'] !== null) { + $object->setStatus($data['Status']); + } + elseif (\array_key_exists('Status', $data) && $data['Status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('FailingStreak', $data) && $data['FailingStreak'] !== null) { + $object->setFailingStreak($data['FailingStreak']); + } + elseif (\array_key_exists('FailingStreak', $data) && $data['FailingStreak'] === null) { + $object->setFailingStreak(null); + } + if (\array_key_exists('Log', $data) && $data['Log'] !== null) { + $values = []; + foreach ($data['Log'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\HealthcheckResult::class, 'json', $context); + } + $object->setLog($values); + } + elseif (\array_key_exists('Log', $data) && $data['Log'] === null) { + $object->setLog(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['Status'] = $object->getStatus(); + } + if ($object->isInitialized('failingStreak') && null !== $object->getFailingStreak()) { + $data['FailingStreak'] = $object->getFailingStreak(); + } + if ($object->isInitialized('log') && null !== $object->getLog()) { + $values = []; + foreach ($object->getLog() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Log'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Health::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/HealthcheckResultNormalizer.php b/generated/Normalizer/HealthcheckResultNormalizer.php new file mode 100644 index 000000000..544f75f19 --- /dev/null +++ b/generated/Normalizer/HealthcheckResultNormalizer.php @@ -0,0 +1,172 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class HealthcheckResultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\HealthcheckResult::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\HealthcheckResult::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\HealthcheckResult(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Start', $data) && $data['Start'] !== null) { + $object->setStart(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['Start'])); + } + elseif (\array_key_exists('Start', $data) && $data['Start'] === null) { + $object->setStart(null); + } + if (\array_key_exists('End', $data) && $data['End'] !== null) { + $object->setEnd($data['End']); + } + elseif (\array_key_exists('End', $data) && $data['End'] === null) { + $object->setEnd(null); + } + if (\array_key_exists('ExitCode', $data) && $data['ExitCode'] !== null) { + $object->setExitCode($data['ExitCode']); + } + elseif (\array_key_exists('ExitCode', $data) && $data['ExitCode'] === null) { + $object->setExitCode(null); + } + if (\array_key_exists('Output', $data) && $data['Output'] !== null) { + $object->setOutput($data['Output']); + } + elseif (\array_key_exists('Output', $data) && $data['Output'] === null) { + $object->setOutput(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('start') && null !== $object->getStart()) { + $data['Start'] = $object->getStart()->format('Y-m-d\TH:i:sP'); + } + if ($object->isInitialized('end') && null !== $object->getEnd()) { + $data['End'] = $object->getEnd(); + } + if ($object->isInitialized('exitCode') && null !== $object->getExitCode()) { + $data['ExitCode'] = $object->getExitCode(); + } + if ($object->isInitialized('output') && null !== $object->getOutput()) { + $data['Output'] = $object->getOutput(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\HealthcheckResult::class => false]; + } + } +} else { + class HealthcheckResultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\HealthcheckResult::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\HealthcheckResult::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\HealthcheckResult(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Start', $data) && $data['Start'] !== null) { + $object->setStart(\DateTime::createFromFormat('Y-m-d\TH:i:sP', $data['Start'])); + } + elseif (\array_key_exists('Start', $data) && $data['Start'] === null) { + $object->setStart(null); + } + if (\array_key_exists('End', $data) && $data['End'] !== null) { + $object->setEnd($data['End']); + } + elseif (\array_key_exists('End', $data) && $data['End'] === null) { + $object->setEnd(null); + } + if (\array_key_exists('ExitCode', $data) && $data['ExitCode'] !== null) { + $object->setExitCode($data['ExitCode']); + } + elseif (\array_key_exists('ExitCode', $data) && $data['ExitCode'] === null) { + $object->setExitCode(null); + } + if (\array_key_exists('Output', $data) && $data['Output'] !== null) { + $object->setOutput($data['Output']); + } + elseif (\array_key_exists('Output', $data) && $data['Output'] === null) { + $object->setOutput(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('start') && null !== $object->getStart()) { + $data['Start'] = $object->getStart()->format('Y-m-d\TH:i:sP'); + } + if ($object->isInitialized('end') && null !== $object->getEnd()) { + $data['End'] = $object->getEnd(); + } + if ($object->isInitialized('exitCode') && null !== $object->getExitCode()) { + $data['ExitCode'] = $object->getExitCode(); + } + if ($object->isInitialized('output') && null !== $object->getOutput()) { + $data['Output'] = $object->getOutput(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\HealthcheckResult::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/HostConfigNormalizer.php b/generated/Normalizer/HostConfigNormalizer.php index c971fbd2b..209680f7e 100644 --- a/generated/Normalizer/HostConfigNormalizer.php +++ b/generated/Normalizer/HostConfigNormalizer.php @@ -160,17 +160,31 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { $object->setDevices(null); } - if (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] !== null) { - $object->setDiskQuota($data['DiskQuota']); + if (\array_key_exists('DeviceCgroupRules', $data) && $data['DeviceCgroupRules'] !== null) { + $values_6 = []; + foreach ($data['DeviceCgroupRules'] as $value_6) { + $values_6[] = $value_6; + } + $object->setDeviceCgroupRules($values_6); + } + elseif (\array_key_exists('DeviceCgroupRules', $data) && $data['DeviceCgroupRules'] === null) { + $object->setDeviceCgroupRules(null); } - elseif (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] === null) { - $object->setDiskQuota(null); + if (\array_key_exists('DeviceRequests', $data) && $data['DeviceRequests'] !== null) { + $values_7 = []; + foreach ($data['DeviceRequests'] as $value_7) { + $values_7[] = $this->denormalizer->denormalize($value_7, \Docker\API\Model\DeviceRequest::class, 'json', $context); + } + $object->setDeviceRequests($values_7); } - if (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] !== null) { - $object->setKernelMemory($data['KernelMemory']); + elseif (\array_key_exists('DeviceRequests', $data) && $data['DeviceRequests'] === null) { + $object->setDeviceRequests(null); } - elseif (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] === null) { - $object->setKernelMemory(null); + if (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] !== null) { + $object->setKernelMemoryTCP($data['KernelMemoryTCP']); + } + elseif (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] === null) { + $object->setKernelMemoryTCP(null); } if (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] !== null) { $object->setMemoryReservation($data['MemoryReservation']); @@ -202,6 +216,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { $object->setOomKillDisable(null); } + if (\array_key_exists('Init', $data) && $data['Init'] !== null) { + $object->setInit($data['Init']); + } + elseif (\array_key_exists('Init', $data) && $data['Init'] === null) { + $object->setInit(null); + } if (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] !== null) { $object->setPidsLimit($data['PidsLimit']); } @@ -209,11 +229,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setPidsLimit(null); } if (\array_key_exists('Ulimits', $data) && $data['Ulimits'] !== null) { - $values_6 = []; - foreach ($data['Ulimits'] as $value_6) { - $values_6[] = $this->denormalizer->denormalize($value_6, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); + $values_8 = []; + foreach ($data['Ulimits'] as $value_8) { + $values_8[] = $this->denormalizer->denormalize($value_8, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); } - $object->setUlimits($values_6); + $object->setUlimits($values_8); } elseif (\array_key_exists('Ulimits', $data) && $data['Ulimits'] === null) { $object->setUlimits(null); @@ -243,11 +263,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setIOMaximumBandwidth(null); } if (\array_key_exists('Binds', $data) && $data['Binds'] !== null) { - $values_7 = []; - foreach ($data['Binds'] as $value_7) { - $values_7[] = $value_7; + $values_9 = []; + foreach ($data['Binds'] as $value_9) { + $values_9[] = $value_9; } - $object->setBinds($values_7); + $object->setBinds($values_9); } elseif (\array_key_exists('Binds', $data) && $data['Binds'] === null) { $object->setBinds(null); @@ -271,11 +291,15 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setNetworkMode(null); } if (\array_key_exists('PortBindings', $data) && $data['PortBindings'] !== null) { - $values_8 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['PortBindings'] as $key => $value_8) { - $values_8[$key] = $this->denormalizer->denormalize($value_8, \Docker\API\Model\HostConfigPortBindingsItem::class, 'json', $context); + $values_10 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['PortBindings'] as $key => $value_10) { + $values_11 = []; + foreach ($value_10 as $value_11) { + $values_11[] = $this->denormalizer->denormalize($value_11, \Docker\API\Model\PortBinding::class, 'json', $context); + } + $values_10[$key] = $values_11; } - $object->setPortBindings($values_8); + $object->setPortBindings($values_10); } elseif (\array_key_exists('PortBindings', $data) && $data['PortBindings'] === null) { $object->setPortBindings(null); @@ -299,91 +323,117 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setVolumeDriver(null); } if (\array_key_exists('VolumesFrom', $data) && $data['VolumesFrom'] !== null) { - $values_9 = []; - foreach ($data['VolumesFrom'] as $value_9) { - $values_9[] = $value_9; + $values_12 = []; + foreach ($data['VolumesFrom'] as $value_12) { + $values_12[] = $value_12; } - $object->setVolumesFrom($values_9); + $object->setVolumesFrom($values_12); } elseif (\array_key_exists('VolumesFrom', $data) && $data['VolumesFrom'] === null) { $object->setVolumesFrom(null); } if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { - $values_10 = []; - foreach ($data['Mounts'] as $value_10) { - $values_10[] = $this->denormalizer->denormalize($value_10, \Docker\API\Model\Mount::class, 'json', $context); + $values_13 = []; + foreach ($data['Mounts'] as $value_13) { + $values_13[] = $this->denormalizer->denormalize($value_13, \Docker\API\Model\Mount::class, 'json', $context); } - $object->setMounts($values_10); + $object->setMounts($values_13); } elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { $object->setMounts(null); } + if (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] !== null) { + $values_14 = []; + foreach ($data['ConsoleSize'] as $value_14) { + $values_14[] = $value_14; + } + $object->setConsoleSize($values_14); + } + elseif (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] === null) { + $object->setConsoleSize(null); + } + if (\array_key_exists('Annotations', $data) && $data['Annotations'] !== null) { + $values_15 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Annotations'] as $key_1 => $value_15) { + $values_15[$key_1] = $value_15; + } + $object->setAnnotations($values_15); + } + elseif (\array_key_exists('Annotations', $data) && $data['Annotations'] === null) { + $object->setAnnotations(null); + } if (\array_key_exists('CapAdd', $data) && $data['CapAdd'] !== null) { - $values_11 = []; - foreach ($data['CapAdd'] as $value_11) { - $values_11[] = $value_11; + $values_16 = []; + foreach ($data['CapAdd'] as $value_16) { + $values_16[] = $value_16; } - $object->setCapAdd($values_11); + $object->setCapAdd($values_16); } elseif (\array_key_exists('CapAdd', $data) && $data['CapAdd'] === null) { $object->setCapAdd(null); } if (\array_key_exists('CapDrop', $data) && $data['CapDrop'] !== null) { - $values_12 = []; - foreach ($data['CapDrop'] as $value_12) { - $values_12[] = $value_12; + $values_17 = []; + foreach ($data['CapDrop'] as $value_17) { + $values_17[] = $value_17; } - $object->setCapDrop($values_12); + $object->setCapDrop($values_17); } elseif (\array_key_exists('CapDrop', $data) && $data['CapDrop'] === null) { $object->setCapDrop(null); } + if (\array_key_exists('CgroupnsMode', $data) && $data['CgroupnsMode'] !== null) { + $object->setCgroupnsMode($data['CgroupnsMode']); + } + elseif (\array_key_exists('CgroupnsMode', $data) && $data['CgroupnsMode'] === null) { + $object->setCgroupnsMode(null); + } if (\array_key_exists('Dns', $data) && $data['Dns'] !== null) { - $values_13 = []; - foreach ($data['Dns'] as $value_13) { - $values_13[] = $value_13; + $values_18 = []; + foreach ($data['Dns'] as $value_18) { + $values_18[] = $value_18; } - $object->setDns($values_13); + $object->setDns($values_18); } elseif (\array_key_exists('Dns', $data) && $data['Dns'] === null) { $object->setDns(null); } if (\array_key_exists('DnsOptions', $data) && $data['DnsOptions'] !== null) { - $values_14 = []; - foreach ($data['DnsOptions'] as $value_14) { - $values_14[] = $value_14; + $values_19 = []; + foreach ($data['DnsOptions'] as $value_19) { + $values_19[] = $value_19; } - $object->setDnsOptions($values_14); + $object->setDnsOptions($values_19); } elseif (\array_key_exists('DnsOptions', $data) && $data['DnsOptions'] === null) { $object->setDnsOptions(null); } if (\array_key_exists('DnsSearch', $data) && $data['DnsSearch'] !== null) { - $values_15 = []; - foreach ($data['DnsSearch'] as $value_15) { - $values_15[] = $value_15; + $values_20 = []; + foreach ($data['DnsSearch'] as $value_20) { + $values_20[] = $value_20; } - $object->setDnsSearch($values_15); + $object->setDnsSearch($values_20); } elseif (\array_key_exists('DnsSearch', $data) && $data['DnsSearch'] === null) { $object->setDnsSearch(null); } if (\array_key_exists('ExtraHosts', $data) && $data['ExtraHosts'] !== null) { - $values_16 = []; - foreach ($data['ExtraHosts'] as $value_16) { - $values_16[] = $value_16; + $values_21 = []; + foreach ($data['ExtraHosts'] as $value_21) { + $values_21[] = $value_21; } - $object->setExtraHosts($values_16); + $object->setExtraHosts($values_21); } elseif (\array_key_exists('ExtraHosts', $data) && $data['ExtraHosts'] === null) { $object->setExtraHosts(null); } if (\array_key_exists('GroupAdd', $data) && $data['GroupAdd'] !== null) { - $values_17 = []; - foreach ($data['GroupAdd'] as $value_17) { - $values_17[] = $value_17; + $values_22 = []; + foreach ($data['GroupAdd'] as $value_22) { + $values_22[] = $value_22; } - $object->setGroupAdd($values_17); + $object->setGroupAdd($values_22); } elseif (\array_key_exists('GroupAdd', $data) && $data['GroupAdd'] === null) { $object->setGroupAdd(null); @@ -401,11 +451,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setCgroup(null); } if (\array_key_exists('Links', $data) && $data['Links'] !== null) { - $values_18 = []; - foreach ($data['Links'] as $value_18) { - $values_18[] = $value_18; + $values_23 = []; + foreach ($data['Links'] as $value_23) { + $values_23[] = $value_23; } - $object->setLinks($values_18); + $object->setLinks($values_23); } elseif (\array_key_exists('Links', $data) && $data['Links'] === null) { $object->setLinks(null); @@ -441,31 +491,31 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setReadonlyRootfs(null); } if (\array_key_exists('SecurityOpt', $data) && $data['SecurityOpt'] !== null) { - $values_19 = []; - foreach ($data['SecurityOpt'] as $value_19) { - $values_19[] = $value_19; + $values_24 = []; + foreach ($data['SecurityOpt'] as $value_24) { + $values_24[] = $value_24; } - $object->setSecurityOpt($values_19); + $object->setSecurityOpt($values_24); } elseif (\array_key_exists('SecurityOpt', $data) && $data['SecurityOpt'] === null) { $object->setSecurityOpt(null); } if (\array_key_exists('StorageOpt', $data) && $data['StorageOpt'] !== null) { - $values_20 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['StorageOpt'] as $key_1 => $value_20) { - $values_20[$key_1] = $value_20; + $values_25 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['StorageOpt'] as $key_2 => $value_25) { + $values_25[$key_2] = $value_25; } - $object->setStorageOpt($values_20); + $object->setStorageOpt($values_25); } elseif (\array_key_exists('StorageOpt', $data) && $data['StorageOpt'] === null) { $object->setStorageOpt(null); } if (\array_key_exists('Tmpfs', $data) && $data['Tmpfs'] !== null) { - $values_21 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Tmpfs'] as $key_2 => $value_21) { - $values_21[$key_2] = $value_21; + $values_26 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Tmpfs'] as $key_3 => $value_26) { + $values_26[$key_3] = $value_26; } - $object->setTmpfs($values_21); + $object->setTmpfs($values_26); } elseif (\array_key_exists('Tmpfs', $data) && $data['Tmpfs'] === null) { $object->setTmpfs(null); @@ -489,11 +539,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setShmSize(null); } if (\array_key_exists('Sysctls', $data) && $data['Sysctls'] !== null) { - $values_22 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Sysctls'] as $key_3 => $value_22) { - $values_22[$key_3] = $value_22; + $values_27 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Sysctls'] as $key_4 => $value_27) { + $values_27[$key_4] = $value_27; } - $object->setSysctls($values_22); + $object->setSysctls($values_27); } elseif (\array_key_exists('Sysctls', $data) && $data['Sysctls'] === null) { $object->setSysctls(null); @@ -504,22 +554,32 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Runtime', $data) && $data['Runtime'] === null) { $object->setRuntime(null); } - if (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] !== null) { - $values_23 = []; - foreach ($data['ConsoleSize'] as $value_23) { - $values_23[] = $value_23; - } - $object->setConsoleSize($values_23); - } - elseif (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] === null) { - $object->setConsoleSize(null); - } if (\array_key_exists('Isolation', $data) && $data['Isolation'] !== null) { $object->setIsolation($data['Isolation']); } elseif (\array_key_exists('Isolation', $data) && $data['Isolation'] === null) { $object->setIsolation(null); } + if (\array_key_exists('MaskedPaths', $data) && $data['MaskedPaths'] !== null) { + $values_28 = []; + foreach ($data['MaskedPaths'] as $value_28) { + $values_28[] = $value_28; + } + $object->setMaskedPaths($values_28); + } + elseif (\array_key_exists('MaskedPaths', $data) && $data['MaskedPaths'] === null) { + $object->setMaskedPaths(null); + } + if (\array_key_exists('ReadonlyPaths', $data) && $data['ReadonlyPaths'] !== null) { + $values_29 = []; + foreach ($data['ReadonlyPaths'] as $value_29) { + $values_29[] = $value_29; + } + $object->setReadonlyPaths($values_29); + } + elseif (\array_key_exists('ReadonlyPaths', $data) && $data['ReadonlyPaths'] === null) { + $object->setReadonlyPaths(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -597,11 +657,22 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['Devices'] = $values_5; } - if ($object->isInitialized('diskQuota') && null !== $object->getDiskQuota()) { - $data['DiskQuota'] = $object->getDiskQuota(); + if ($object->isInitialized('deviceCgroupRules') && null !== $object->getDeviceCgroupRules()) { + $values_6 = []; + foreach ($object->getDeviceCgroupRules() as $value_6) { + $values_6[] = $value_6; + } + $data['DeviceCgroupRules'] = $values_6; } - if ($object->isInitialized('kernelMemory') && null !== $object->getKernelMemory()) { - $data['KernelMemory'] = $object->getKernelMemory(); + if ($object->isInitialized('deviceRequests') && null !== $object->getDeviceRequests()) { + $values_7 = []; + foreach ($object->getDeviceRequests() as $value_7) { + $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); + } + $data['DeviceRequests'] = $values_7; + } + if ($object->isInitialized('kernelMemoryTCP') && null !== $object->getKernelMemoryTCP()) { + $data['KernelMemoryTCP'] = $object->getKernelMemoryTCP(); } if ($object->isInitialized('memoryReservation') && null !== $object->getMemoryReservation()) { $data['MemoryReservation'] = $object->getMemoryReservation(); @@ -618,15 +689,18 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { $data['OomKillDisable'] = $object->getOomKillDisable(); } + if ($object->isInitialized('init') && null !== $object->getInit()) { + $data['Init'] = $object->getInit(); + } if ($object->isInitialized('pidsLimit') && null !== $object->getPidsLimit()) { $data['PidsLimit'] = $object->getPidsLimit(); } if ($object->isInitialized('ulimits') && null !== $object->getUlimits()) { - $values_6 = []; - foreach ($object->getUlimits() as $value_6) { - $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + $values_8 = []; + foreach ($object->getUlimits() as $value_8) { + $values_8[] = $this->normalizer->normalize($value_8, 'json', $context); } - $data['Ulimits'] = $values_6; + $data['Ulimits'] = $values_8; } if ($object->isInitialized('cpuCount') && null !== $object->getCpuCount()) { $data['CpuCount'] = $object->getCpuCount(); @@ -641,11 +715,11 @@ public function normalize(mixed $object, string $format = null, array $context = $data['IOMaximumBandwidth'] = $object->getIOMaximumBandwidth(); } if ($object->isInitialized('binds') && null !== $object->getBinds()) { - $values_7 = []; - foreach ($object->getBinds() as $value_7) { - $values_7[] = $value_7; + $values_9 = []; + foreach ($object->getBinds() as $value_9) { + $values_9[] = $value_9; } - $data['Binds'] = $values_7; + $data['Binds'] = $values_9; } if ($object->isInitialized('containerIDFile') && null !== $object->getContainerIDFile()) { $data['ContainerIDFile'] = $object->getContainerIDFile(); @@ -657,11 +731,15 @@ public function normalize(mixed $object, string $format = null, array $context = $data['NetworkMode'] = $object->getNetworkMode(); } if ($object->isInitialized('portBindings') && null !== $object->getPortBindings()) { - $values_8 = []; - foreach ($object->getPortBindings() as $key => $value_8) { - $values_8[$key] = $this->normalizer->normalize($value_8, 'json', $context); + $values_10 = []; + foreach ($object->getPortBindings() as $key => $value_10) { + $values_11 = []; + foreach ($value_10 as $value_11) { + $values_11[] = $this->normalizer->normalize($value_11, 'json', $context); + } + $values_10[$key] = $values_11; } - $data['PortBindings'] = $values_8; + $data['PortBindings'] = $values_10; } if ($object->isInitialized('restartPolicy') && null !== $object->getRestartPolicy()) { $data['RestartPolicy'] = $this->normalizer->normalize($object->getRestartPolicy(), 'json', $context); @@ -673,67 +751,84 @@ public function normalize(mixed $object, string $format = null, array $context = $data['VolumeDriver'] = $object->getVolumeDriver(); } if ($object->isInitialized('volumesFrom') && null !== $object->getVolumesFrom()) { - $values_9 = []; - foreach ($object->getVolumesFrom() as $value_9) { - $values_9[] = $value_9; + $values_12 = []; + foreach ($object->getVolumesFrom() as $value_12) { + $values_12[] = $value_12; } - $data['VolumesFrom'] = $values_9; + $data['VolumesFrom'] = $values_12; } if ($object->isInitialized('mounts') && null !== $object->getMounts()) { - $values_10 = []; - foreach ($object->getMounts() as $value_10) { - $values_10[] = $this->normalizer->normalize($value_10, 'json', $context); + $values_13 = []; + foreach ($object->getMounts() as $value_13) { + $values_13[] = $this->normalizer->normalize($value_13, 'json', $context); + } + $data['Mounts'] = $values_13; + } + if ($object->isInitialized('consoleSize') && null !== $object->getConsoleSize()) { + $values_14 = []; + foreach ($object->getConsoleSize() as $value_14) { + $values_14[] = $value_14; } - $data['Mounts'] = $values_10; + $data['ConsoleSize'] = $values_14; + } + if ($object->isInitialized('annotations') && null !== $object->getAnnotations()) { + $values_15 = []; + foreach ($object->getAnnotations() as $key_1 => $value_15) { + $values_15[$key_1] = $value_15; + } + $data['Annotations'] = $values_15; } if ($object->isInitialized('capAdd') && null !== $object->getCapAdd()) { - $values_11 = []; - foreach ($object->getCapAdd() as $value_11) { - $values_11[] = $value_11; + $values_16 = []; + foreach ($object->getCapAdd() as $value_16) { + $values_16[] = $value_16; } - $data['CapAdd'] = $values_11; + $data['CapAdd'] = $values_16; } if ($object->isInitialized('capDrop') && null !== $object->getCapDrop()) { - $values_12 = []; - foreach ($object->getCapDrop() as $value_12) { - $values_12[] = $value_12; + $values_17 = []; + foreach ($object->getCapDrop() as $value_17) { + $values_17[] = $value_17; } - $data['CapDrop'] = $values_12; + $data['CapDrop'] = $values_17; + } + if ($object->isInitialized('cgroupnsMode') && null !== $object->getCgroupnsMode()) { + $data['CgroupnsMode'] = $object->getCgroupnsMode(); } if ($object->isInitialized('dns') && null !== $object->getDns()) { - $values_13 = []; - foreach ($object->getDns() as $value_13) { - $values_13[] = $value_13; + $values_18 = []; + foreach ($object->getDns() as $value_18) { + $values_18[] = $value_18; } - $data['Dns'] = $values_13; + $data['Dns'] = $values_18; } if ($object->isInitialized('dnsOptions') && null !== $object->getDnsOptions()) { - $values_14 = []; - foreach ($object->getDnsOptions() as $value_14) { - $values_14[] = $value_14; + $values_19 = []; + foreach ($object->getDnsOptions() as $value_19) { + $values_19[] = $value_19; } - $data['DnsOptions'] = $values_14; + $data['DnsOptions'] = $values_19; } if ($object->isInitialized('dnsSearch') && null !== $object->getDnsSearch()) { - $values_15 = []; - foreach ($object->getDnsSearch() as $value_15) { - $values_15[] = $value_15; + $values_20 = []; + foreach ($object->getDnsSearch() as $value_20) { + $values_20[] = $value_20; } - $data['DnsSearch'] = $values_15; + $data['DnsSearch'] = $values_20; } if ($object->isInitialized('extraHosts') && null !== $object->getExtraHosts()) { - $values_16 = []; - foreach ($object->getExtraHosts() as $value_16) { - $values_16[] = $value_16; + $values_21 = []; + foreach ($object->getExtraHosts() as $value_21) { + $values_21[] = $value_21; } - $data['ExtraHosts'] = $values_16; + $data['ExtraHosts'] = $values_21; } if ($object->isInitialized('groupAdd') && null !== $object->getGroupAdd()) { - $values_17 = []; - foreach ($object->getGroupAdd() as $value_17) { - $values_17[] = $value_17; + $values_22 = []; + foreach ($object->getGroupAdd() as $value_22) { + $values_22[] = $value_22; } - $data['GroupAdd'] = $values_17; + $data['GroupAdd'] = $values_22; } if ($object->isInitialized('ipcMode') && null !== $object->getIpcMode()) { $data['IpcMode'] = $object->getIpcMode(); @@ -742,11 +837,11 @@ public function normalize(mixed $object, string $format = null, array $context = $data['Cgroup'] = $object->getCgroup(); } if ($object->isInitialized('links') && null !== $object->getLinks()) { - $values_18 = []; - foreach ($object->getLinks() as $value_18) { - $values_18[] = $value_18; + $values_23 = []; + foreach ($object->getLinks() as $value_23) { + $values_23[] = $value_23; } - $data['Links'] = $values_18; + $data['Links'] = $values_23; } if ($object->isInitialized('oomScoreAdj') && null !== $object->getOomScoreAdj()) { $data['OomScoreAdj'] = $object->getOomScoreAdj(); @@ -764,25 +859,25 @@ public function normalize(mixed $object, string $format = null, array $context = $data['ReadonlyRootfs'] = $object->getReadonlyRootfs(); } if ($object->isInitialized('securityOpt') && null !== $object->getSecurityOpt()) { - $values_19 = []; - foreach ($object->getSecurityOpt() as $value_19) { - $values_19[] = $value_19; + $values_24 = []; + foreach ($object->getSecurityOpt() as $value_24) { + $values_24[] = $value_24; } - $data['SecurityOpt'] = $values_19; + $data['SecurityOpt'] = $values_24; } if ($object->isInitialized('storageOpt') && null !== $object->getStorageOpt()) { - $values_20 = []; - foreach ($object->getStorageOpt() as $key_1 => $value_20) { - $values_20[$key_1] = $value_20; + $values_25 = []; + foreach ($object->getStorageOpt() as $key_2 => $value_25) { + $values_25[$key_2] = $value_25; } - $data['StorageOpt'] = $values_20; + $data['StorageOpt'] = $values_25; } if ($object->isInitialized('tmpfs') && null !== $object->getTmpfs()) { - $values_21 = []; - foreach ($object->getTmpfs() as $key_2 => $value_21) { - $values_21[$key_2] = $value_21; + $values_26 = []; + foreach ($object->getTmpfs() as $key_3 => $value_26) { + $values_26[$key_3] = $value_26; } - $data['Tmpfs'] = $values_21; + $data['Tmpfs'] = $values_26; } if ($object->isInitialized('uTSMode') && null !== $object->getUTSMode()) { $data['UTSMode'] = $object->getUTSMode(); @@ -794,25 +889,32 @@ public function normalize(mixed $object, string $format = null, array $context = $data['ShmSize'] = $object->getShmSize(); } if ($object->isInitialized('sysctls') && null !== $object->getSysctls()) { - $values_22 = []; - foreach ($object->getSysctls() as $key_3 => $value_22) { - $values_22[$key_3] = $value_22; + $values_27 = []; + foreach ($object->getSysctls() as $key_4 => $value_27) { + $values_27[$key_4] = $value_27; } - $data['Sysctls'] = $values_22; + $data['Sysctls'] = $values_27; } if ($object->isInitialized('runtime') && null !== $object->getRuntime()) { $data['Runtime'] = $object->getRuntime(); } - if ($object->isInitialized('consoleSize') && null !== $object->getConsoleSize()) { - $values_23 = []; - foreach ($object->getConsoleSize() as $value_23) { - $values_23[] = $value_23; - } - $data['ConsoleSize'] = $values_23; - } if ($object->isInitialized('isolation') && null !== $object->getIsolation()) { $data['Isolation'] = $object->getIsolation(); } + if ($object->isInitialized('maskedPaths') && null !== $object->getMaskedPaths()) { + $values_28 = []; + foreach ($object->getMaskedPaths() as $value_28) { + $values_28[] = $value_28; + } + $data['MaskedPaths'] = $values_28; + } + if ($object->isInitialized('readonlyPaths') && null !== $object->getReadonlyPaths()) { + $values_29 = []; + foreach ($object->getReadonlyPaths() as $value_29) { + $values_29[] = $value_29; + } + $data['ReadonlyPaths'] = $values_29; + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -970,17 +1072,31 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { $object->setDevices(null); } - if (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] !== null) { - $object->setDiskQuota($data['DiskQuota']); + if (\array_key_exists('DeviceCgroupRules', $data) && $data['DeviceCgroupRules'] !== null) { + $values_6 = []; + foreach ($data['DeviceCgroupRules'] as $value_6) { + $values_6[] = $value_6; + } + $object->setDeviceCgroupRules($values_6); + } + elseif (\array_key_exists('DeviceCgroupRules', $data) && $data['DeviceCgroupRules'] === null) { + $object->setDeviceCgroupRules(null); } - elseif (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] === null) { - $object->setDiskQuota(null); + if (\array_key_exists('DeviceRequests', $data) && $data['DeviceRequests'] !== null) { + $values_7 = []; + foreach ($data['DeviceRequests'] as $value_7) { + $values_7[] = $this->denormalizer->denormalize($value_7, \Docker\API\Model\DeviceRequest::class, 'json', $context); + } + $object->setDeviceRequests($values_7); } - if (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] !== null) { - $object->setKernelMemory($data['KernelMemory']); + elseif (\array_key_exists('DeviceRequests', $data) && $data['DeviceRequests'] === null) { + $object->setDeviceRequests(null); } - elseif (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] === null) { - $object->setKernelMemory(null); + if (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] !== null) { + $object->setKernelMemoryTCP($data['KernelMemoryTCP']); + } + elseif (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] === null) { + $object->setKernelMemoryTCP(null); } if (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] !== null) { $object->setMemoryReservation($data['MemoryReservation']); @@ -1012,6 +1128,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { $object->setOomKillDisable(null); } + if (\array_key_exists('Init', $data) && $data['Init'] !== null) { + $object->setInit($data['Init']); + } + elseif (\array_key_exists('Init', $data) && $data['Init'] === null) { + $object->setInit(null); + } if (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] !== null) { $object->setPidsLimit($data['PidsLimit']); } @@ -1019,11 +1141,11 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setPidsLimit(null); } if (\array_key_exists('Ulimits', $data) && $data['Ulimits'] !== null) { - $values_6 = []; - foreach ($data['Ulimits'] as $value_6) { - $values_6[] = $this->denormalizer->denormalize($value_6, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); + $values_8 = []; + foreach ($data['Ulimits'] as $value_8) { + $values_8[] = $this->denormalizer->denormalize($value_8, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); } - $object->setUlimits($values_6); + $object->setUlimits($values_8); } elseif (\array_key_exists('Ulimits', $data) && $data['Ulimits'] === null) { $object->setUlimits(null); @@ -1053,11 +1175,11 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setIOMaximumBandwidth(null); } if (\array_key_exists('Binds', $data) && $data['Binds'] !== null) { - $values_7 = []; - foreach ($data['Binds'] as $value_7) { - $values_7[] = $value_7; + $values_9 = []; + foreach ($data['Binds'] as $value_9) { + $values_9[] = $value_9; } - $object->setBinds($values_7); + $object->setBinds($values_9); } elseif (\array_key_exists('Binds', $data) && $data['Binds'] === null) { $object->setBinds(null); @@ -1081,11 +1203,15 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setNetworkMode(null); } if (\array_key_exists('PortBindings', $data) && $data['PortBindings'] !== null) { - $values_8 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['PortBindings'] as $key => $value_8) { - $values_8[$key] = $this->denormalizer->denormalize($value_8, \Docker\API\Model\HostConfigPortBindingsItem::class, 'json', $context); + $values_10 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['PortBindings'] as $key => $value_10) { + $values_11 = []; + foreach ($value_10 as $value_11) { + $values_11[] = $this->denormalizer->denormalize($value_11, \Docker\API\Model\PortBinding::class, 'json', $context); + } + $values_10[$key] = $values_11; } - $object->setPortBindings($values_8); + $object->setPortBindings($values_10); } elseif (\array_key_exists('PortBindings', $data) && $data['PortBindings'] === null) { $object->setPortBindings(null); @@ -1109,91 +1235,117 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setVolumeDriver(null); } if (\array_key_exists('VolumesFrom', $data) && $data['VolumesFrom'] !== null) { - $values_9 = []; - foreach ($data['VolumesFrom'] as $value_9) { - $values_9[] = $value_9; + $values_12 = []; + foreach ($data['VolumesFrom'] as $value_12) { + $values_12[] = $value_12; } - $object->setVolumesFrom($values_9); + $object->setVolumesFrom($values_12); } elseif (\array_key_exists('VolumesFrom', $data) && $data['VolumesFrom'] === null) { $object->setVolumesFrom(null); } if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { - $values_10 = []; - foreach ($data['Mounts'] as $value_10) { - $values_10[] = $this->denormalizer->denormalize($value_10, \Docker\API\Model\Mount::class, 'json', $context); + $values_13 = []; + foreach ($data['Mounts'] as $value_13) { + $values_13[] = $this->denormalizer->denormalize($value_13, \Docker\API\Model\Mount::class, 'json', $context); } - $object->setMounts($values_10); + $object->setMounts($values_13); } elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { $object->setMounts(null); } + if (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] !== null) { + $values_14 = []; + foreach ($data['ConsoleSize'] as $value_14) { + $values_14[] = $value_14; + } + $object->setConsoleSize($values_14); + } + elseif (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] === null) { + $object->setConsoleSize(null); + } + if (\array_key_exists('Annotations', $data) && $data['Annotations'] !== null) { + $values_15 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Annotations'] as $key_1 => $value_15) { + $values_15[$key_1] = $value_15; + } + $object->setAnnotations($values_15); + } + elseif (\array_key_exists('Annotations', $data) && $data['Annotations'] === null) { + $object->setAnnotations(null); + } if (\array_key_exists('CapAdd', $data) && $data['CapAdd'] !== null) { - $values_11 = []; - foreach ($data['CapAdd'] as $value_11) { - $values_11[] = $value_11; + $values_16 = []; + foreach ($data['CapAdd'] as $value_16) { + $values_16[] = $value_16; } - $object->setCapAdd($values_11); + $object->setCapAdd($values_16); } elseif (\array_key_exists('CapAdd', $data) && $data['CapAdd'] === null) { $object->setCapAdd(null); } if (\array_key_exists('CapDrop', $data) && $data['CapDrop'] !== null) { - $values_12 = []; - foreach ($data['CapDrop'] as $value_12) { - $values_12[] = $value_12; + $values_17 = []; + foreach ($data['CapDrop'] as $value_17) { + $values_17[] = $value_17; } - $object->setCapDrop($values_12); + $object->setCapDrop($values_17); } elseif (\array_key_exists('CapDrop', $data) && $data['CapDrop'] === null) { $object->setCapDrop(null); } + if (\array_key_exists('CgroupnsMode', $data) && $data['CgroupnsMode'] !== null) { + $object->setCgroupnsMode($data['CgroupnsMode']); + } + elseif (\array_key_exists('CgroupnsMode', $data) && $data['CgroupnsMode'] === null) { + $object->setCgroupnsMode(null); + } if (\array_key_exists('Dns', $data) && $data['Dns'] !== null) { - $values_13 = []; - foreach ($data['Dns'] as $value_13) { - $values_13[] = $value_13; + $values_18 = []; + foreach ($data['Dns'] as $value_18) { + $values_18[] = $value_18; } - $object->setDns($values_13); + $object->setDns($values_18); } elseif (\array_key_exists('Dns', $data) && $data['Dns'] === null) { $object->setDns(null); } if (\array_key_exists('DnsOptions', $data) && $data['DnsOptions'] !== null) { - $values_14 = []; - foreach ($data['DnsOptions'] as $value_14) { - $values_14[] = $value_14; + $values_19 = []; + foreach ($data['DnsOptions'] as $value_19) { + $values_19[] = $value_19; } - $object->setDnsOptions($values_14); + $object->setDnsOptions($values_19); } elseif (\array_key_exists('DnsOptions', $data) && $data['DnsOptions'] === null) { $object->setDnsOptions(null); } if (\array_key_exists('DnsSearch', $data) && $data['DnsSearch'] !== null) { - $values_15 = []; - foreach ($data['DnsSearch'] as $value_15) { - $values_15[] = $value_15; + $values_20 = []; + foreach ($data['DnsSearch'] as $value_20) { + $values_20[] = $value_20; } - $object->setDnsSearch($values_15); + $object->setDnsSearch($values_20); } elseif (\array_key_exists('DnsSearch', $data) && $data['DnsSearch'] === null) { $object->setDnsSearch(null); } if (\array_key_exists('ExtraHosts', $data) && $data['ExtraHosts'] !== null) { - $values_16 = []; - foreach ($data['ExtraHosts'] as $value_16) { - $values_16[] = $value_16; + $values_21 = []; + foreach ($data['ExtraHosts'] as $value_21) { + $values_21[] = $value_21; } - $object->setExtraHosts($values_16); + $object->setExtraHosts($values_21); } elseif (\array_key_exists('ExtraHosts', $data) && $data['ExtraHosts'] === null) { $object->setExtraHosts(null); } if (\array_key_exists('GroupAdd', $data) && $data['GroupAdd'] !== null) { - $values_17 = []; - foreach ($data['GroupAdd'] as $value_17) { - $values_17[] = $value_17; + $values_22 = []; + foreach ($data['GroupAdd'] as $value_22) { + $values_22[] = $value_22; } - $object->setGroupAdd($values_17); + $object->setGroupAdd($values_22); } elseif (\array_key_exists('GroupAdd', $data) && $data['GroupAdd'] === null) { $object->setGroupAdd(null); @@ -1211,11 +1363,11 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setCgroup(null); } if (\array_key_exists('Links', $data) && $data['Links'] !== null) { - $values_18 = []; - foreach ($data['Links'] as $value_18) { - $values_18[] = $value_18; + $values_23 = []; + foreach ($data['Links'] as $value_23) { + $values_23[] = $value_23; } - $object->setLinks($values_18); + $object->setLinks($values_23); } elseif (\array_key_exists('Links', $data) && $data['Links'] === null) { $object->setLinks(null); @@ -1251,31 +1403,31 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setReadonlyRootfs(null); } if (\array_key_exists('SecurityOpt', $data) && $data['SecurityOpt'] !== null) { - $values_19 = []; - foreach ($data['SecurityOpt'] as $value_19) { - $values_19[] = $value_19; + $values_24 = []; + foreach ($data['SecurityOpt'] as $value_24) { + $values_24[] = $value_24; } - $object->setSecurityOpt($values_19); + $object->setSecurityOpt($values_24); } elseif (\array_key_exists('SecurityOpt', $data) && $data['SecurityOpt'] === null) { $object->setSecurityOpt(null); } if (\array_key_exists('StorageOpt', $data) && $data['StorageOpt'] !== null) { - $values_20 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['StorageOpt'] as $key_1 => $value_20) { - $values_20[$key_1] = $value_20; + $values_25 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['StorageOpt'] as $key_2 => $value_25) { + $values_25[$key_2] = $value_25; } - $object->setStorageOpt($values_20); + $object->setStorageOpt($values_25); } elseif (\array_key_exists('StorageOpt', $data) && $data['StorageOpt'] === null) { $object->setStorageOpt(null); } if (\array_key_exists('Tmpfs', $data) && $data['Tmpfs'] !== null) { - $values_21 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Tmpfs'] as $key_2 => $value_21) { - $values_21[$key_2] = $value_21; + $values_26 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Tmpfs'] as $key_3 => $value_26) { + $values_26[$key_3] = $value_26; } - $object->setTmpfs($values_21); + $object->setTmpfs($values_26); } elseif (\array_key_exists('Tmpfs', $data) && $data['Tmpfs'] === null) { $object->setTmpfs(null); @@ -1299,11 +1451,11 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setShmSize(null); } if (\array_key_exists('Sysctls', $data) && $data['Sysctls'] !== null) { - $values_22 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Sysctls'] as $key_3 => $value_22) { - $values_22[$key_3] = $value_22; + $values_27 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Sysctls'] as $key_4 => $value_27) { + $values_27[$key_4] = $value_27; } - $object->setSysctls($values_22); + $object->setSysctls($values_27); } elseif (\array_key_exists('Sysctls', $data) && $data['Sysctls'] === null) { $object->setSysctls(null); @@ -1314,22 +1466,32 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Runtime', $data) && $data['Runtime'] === null) { $object->setRuntime(null); } - if (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] !== null) { - $values_23 = []; - foreach ($data['ConsoleSize'] as $value_23) { - $values_23[] = $value_23; - } - $object->setConsoleSize($values_23); - } - elseif (\array_key_exists('ConsoleSize', $data) && $data['ConsoleSize'] === null) { - $object->setConsoleSize(null); - } if (\array_key_exists('Isolation', $data) && $data['Isolation'] !== null) { $object->setIsolation($data['Isolation']); } elseif (\array_key_exists('Isolation', $data) && $data['Isolation'] === null) { $object->setIsolation(null); } + if (\array_key_exists('MaskedPaths', $data) && $data['MaskedPaths'] !== null) { + $values_28 = []; + foreach ($data['MaskedPaths'] as $value_28) { + $values_28[] = $value_28; + } + $object->setMaskedPaths($values_28); + } + elseif (\array_key_exists('MaskedPaths', $data) && $data['MaskedPaths'] === null) { + $object->setMaskedPaths(null); + } + if (\array_key_exists('ReadonlyPaths', $data) && $data['ReadonlyPaths'] !== null) { + $values_29 = []; + foreach ($data['ReadonlyPaths'] as $value_29) { + $values_29[] = $value_29; + } + $object->setReadonlyPaths($values_29); + } + elseif (\array_key_exists('ReadonlyPaths', $data) && $data['ReadonlyPaths'] === null) { + $object->setReadonlyPaths(null); + } return $object; } /** @@ -1410,11 +1572,22 @@ public function normalize($object, $format = null, array $context = []) } $data['Devices'] = $values_5; } - if ($object->isInitialized('diskQuota') && null !== $object->getDiskQuota()) { - $data['DiskQuota'] = $object->getDiskQuota(); + if ($object->isInitialized('deviceCgroupRules') && null !== $object->getDeviceCgroupRules()) { + $values_6 = []; + foreach ($object->getDeviceCgroupRules() as $value_6) { + $values_6[] = $value_6; + } + $data['DeviceCgroupRules'] = $values_6; } - if ($object->isInitialized('kernelMemory') && null !== $object->getKernelMemory()) { - $data['KernelMemory'] = $object->getKernelMemory(); + if ($object->isInitialized('deviceRequests') && null !== $object->getDeviceRequests()) { + $values_7 = []; + foreach ($object->getDeviceRequests() as $value_7) { + $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); + } + $data['DeviceRequests'] = $values_7; + } + if ($object->isInitialized('kernelMemoryTCP') && null !== $object->getKernelMemoryTCP()) { + $data['KernelMemoryTCP'] = $object->getKernelMemoryTCP(); } if ($object->isInitialized('memoryReservation') && null !== $object->getMemoryReservation()) { $data['MemoryReservation'] = $object->getMemoryReservation(); @@ -1431,15 +1604,18 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { $data['OomKillDisable'] = $object->getOomKillDisable(); } + if ($object->isInitialized('init') && null !== $object->getInit()) { + $data['Init'] = $object->getInit(); + } if ($object->isInitialized('pidsLimit') && null !== $object->getPidsLimit()) { $data['PidsLimit'] = $object->getPidsLimit(); } if ($object->isInitialized('ulimits') && null !== $object->getUlimits()) { - $values_6 = []; - foreach ($object->getUlimits() as $value_6) { - $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + $values_8 = []; + foreach ($object->getUlimits() as $value_8) { + $values_8[] = $this->normalizer->normalize($value_8, 'json', $context); } - $data['Ulimits'] = $values_6; + $data['Ulimits'] = $values_8; } if ($object->isInitialized('cpuCount') && null !== $object->getCpuCount()) { $data['CpuCount'] = $object->getCpuCount(); @@ -1454,11 +1630,11 @@ public function normalize($object, $format = null, array $context = []) $data['IOMaximumBandwidth'] = $object->getIOMaximumBandwidth(); } if ($object->isInitialized('binds') && null !== $object->getBinds()) { - $values_7 = []; - foreach ($object->getBinds() as $value_7) { - $values_7[] = $value_7; + $values_9 = []; + foreach ($object->getBinds() as $value_9) { + $values_9[] = $value_9; } - $data['Binds'] = $values_7; + $data['Binds'] = $values_9; } if ($object->isInitialized('containerIDFile') && null !== $object->getContainerIDFile()) { $data['ContainerIDFile'] = $object->getContainerIDFile(); @@ -1470,11 +1646,15 @@ public function normalize($object, $format = null, array $context = []) $data['NetworkMode'] = $object->getNetworkMode(); } if ($object->isInitialized('portBindings') && null !== $object->getPortBindings()) { - $values_8 = []; - foreach ($object->getPortBindings() as $key => $value_8) { - $values_8[$key] = $this->normalizer->normalize($value_8, 'json', $context); + $values_10 = []; + foreach ($object->getPortBindings() as $key => $value_10) { + $values_11 = []; + foreach ($value_10 as $value_11) { + $values_11[] = $this->normalizer->normalize($value_11, 'json', $context); + } + $values_10[$key] = $values_11; } - $data['PortBindings'] = $values_8; + $data['PortBindings'] = $values_10; } if ($object->isInitialized('restartPolicy') && null !== $object->getRestartPolicy()) { $data['RestartPolicy'] = $this->normalizer->normalize($object->getRestartPolicy(), 'json', $context); @@ -1486,67 +1666,84 @@ public function normalize($object, $format = null, array $context = []) $data['VolumeDriver'] = $object->getVolumeDriver(); } if ($object->isInitialized('volumesFrom') && null !== $object->getVolumesFrom()) { - $values_9 = []; - foreach ($object->getVolumesFrom() as $value_9) { - $values_9[] = $value_9; + $values_12 = []; + foreach ($object->getVolumesFrom() as $value_12) { + $values_12[] = $value_12; } - $data['VolumesFrom'] = $values_9; + $data['VolumesFrom'] = $values_12; } if ($object->isInitialized('mounts') && null !== $object->getMounts()) { - $values_10 = []; - foreach ($object->getMounts() as $value_10) { - $values_10[] = $this->normalizer->normalize($value_10, 'json', $context); + $values_13 = []; + foreach ($object->getMounts() as $value_13) { + $values_13[] = $this->normalizer->normalize($value_13, 'json', $context); + } + $data['Mounts'] = $values_13; + } + if ($object->isInitialized('consoleSize') && null !== $object->getConsoleSize()) { + $values_14 = []; + foreach ($object->getConsoleSize() as $value_14) { + $values_14[] = $value_14; } - $data['Mounts'] = $values_10; + $data['ConsoleSize'] = $values_14; + } + if ($object->isInitialized('annotations') && null !== $object->getAnnotations()) { + $values_15 = []; + foreach ($object->getAnnotations() as $key_1 => $value_15) { + $values_15[$key_1] = $value_15; + } + $data['Annotations'] = $values_15; } if ($object->isInitialized('capAdd') && null !== $object->getCapAdd()) { - $values_11 = []; - foreach ($object->getCapAdd() as $value_11) { - $values_11[] = $value_11; + $values_16 = []; + foreach ($object->getCapAdd() as $value_16) { + $values_16[] = $value_16; } - $data['CapAdd'] = $values_11; + $data['CapAdd'] = $values_16; } if ($object->isInitialized('capDrop') && null !== $object->getCapDrop()) { - $values_12 = []; - foreach ($object->getCapDrop() as $value_12) { - $values_12[] = $value_12; + $values_17 = []; + foreach ($object->getCapDrop() as $value_17) { + $values_17[] = $value_17; } - $data['CapDrop'] = $values_12; + $data['CapDrop'] = $values_17; + } + if ($object->isInitialized('cgroupnsMode') && null !== $object->getCgroupnsMode()) { + $data['CgroupnsMode'] = $object->getCgroupnsMode(); } if ($object->isInitialized('dns') && null !== $object->getDns()) { - $values_13 = []; - foreach ($object->getDns() as $value_13) { - $values_13[] = $value_13; + $values_18 = []; + foreach ($object->getDns() as $value_18) { + $values_18[] = $value_18; } - $data['Dns'] = $values_13; + $data['Dns'] = $values_18; } if ($object->isInitialized('dnsOptions') && null !== $object->getDnsOptions()) { - $values_14 = []; - foreach ($object->getDnsOptions() as $value_14) { - $values_14[] = $value_14; + $values_19 = []; + foreach ($object->getDnsOptions() as $value_19) { + $values_19[] = $value_19; } - $data['DnsOptions'] = $values_14; + $data['DnsOptions'] = $values_19; } if ($object->isInitialized('dnsSearch') && null !== $object->getDnsSearch()) { - $values_15 = []; - foreach ($object->getDnsSearch() as $value_15) { - $values_15[] = $value_15; + $values_20 = []; + foreach ($object->getDnsSearch() as $value_20) { + $values_20[] = $value_20; } - $data['DnsSearch'] = $values_15; + $data['DnsSearch'] = $values_20; } if ($object->isInitialized('extraHosts') && null !== $object->getExtraHosts()) { - $values_16 = []; - foreach ($object->getExtraHosts() as $value_16) { - $values_16[] = $value_16; + $values_21 = []; + foreach ($object->getExtraHosts() as $value_21) { + $values_21[] = $value_21; } - $data['ExtraHosts'] = $values_16; + $data['ExtraHosts'] = $values_21; } if ($object->isInitialized('groupAdd') && null !== $object->getGroupAdd()) { - $values_17 = []; - foreach ($object->getGroupAdd() as $value_17) { - $values_17[] = $value_17; + $values_22 = []; + foreach ($object->getGroupAdd() as $value_22) { + $values_22[] = $value_22; } - $data['GroupAdd'] = $values_17; + $data['GroupAdd'] = $values_22; } if ($object->isInitialized('ipcMode') && null !== $object->getIpcMode()) { $data['IpcMode'] = $object->getIpcMode(); @@ -1555,11 +1752,11 @@ public function normalize($object, $format = null, array $context = []) $data['Cgroup'] = $object->getCgroup(); } if ($object->isInitialized('links') && null !== $object->getLinks()) { - $values_18 = []; - foreach ($object->getLinks() as $value_18) { - $values_18[] = $value_18; + $values_23 = []; + foreach ($object->getLinks() as $value_23) { + $values_23[] = $value_23; } - $data['Links'] = $values_18; + $data['Links'] = $values_23; } if ($object->isInitialized('oomScoreAdj') && null !== $object->getOomScoreAdj()) { $data['OomScoreAdj'] = $object->getOomScoreAdj(); @@ -1577,25 +1774,25 @@ public function normalize($object, $format = null, array $context = []) $data['ReadonlyRootfs'] = $object->getReadonlyRootfs(); } if ($object->isInitialized('securityOpt') && null !== $object->getSecurityOpt()) { - $values_19 = []; - foreach ($object->getSecurityOpt() as $value_19) { - $values_19[] = $value_19; + $values_24 = []; + foreach ($object->getSecurityOpt() as $value_24) { + $values_24[] = $value_24; } - $data['SecurityOpt'] = $values_19; + $data['SecurityOpt'] = $values_24; } if ($object->isInitialized('storageOpt') && null !== $object->getStorageOpt()) { - $values_20 = []; - foreach ($object->getStorageOpt() as $key_1 => $value_20) { - $values_20[$key_1] = $value_20; + $values_25 = []; + foreach ($object->getStorageOpt() as $key_2 => $value_25) { + $values_25[$key_2] = $value_25; } - $data['StorageOpt'] = $values_20; + $data['StorageOpt'] = $values_25; } if ($object->isInitialized('tmpfs') && null !== $object->getTmpfs()) { - $values_21 = []; - foreach ($object->getTmpfs() as $key_2 => $value_21) { - $values_21[$key_2] = $value_21; + $values_26 = []; + foreach ($object->getTmpfs() as $key_3 => $value_26) { + $values_26[$key_3] = $value_26; } - $data['Tmpfs'] = $values_21; + $data['Tmpfs'] = $values_26; } if ($object->isInitialized('uTSMode') && null !== $object->getUTSMode()) { $data['UTSMode'] = $object->getUTSMode(); @@ -1607,25 +1804,32 @@ public function normalize($object, $format = null, array $context = []) $data['ShmSize'] = $object->getShmSize(); } if ($object->isInitialized('sysctls') && null !== $object->getSysctls()) { - $values_22 = []; - foreach ($object->getSysctls() as $key_3 => $value_22) { - $values_22[$key_3] = $value_22; + $values_27 = []; + foreach ($object->getSysctls() as $key_4 => $value_27) { + $values_27[$key_4] = $value_27; } - $data['Sysctls'] = $values_22; + $data['Sysctls'] = $values_27; } if ($object->isInitialized('runtime') && null !== $object->getRuntime()) { $data['Runtime'] = $object->getRuntime(); } - if ($object->isInitialized('consoleSize') && null !== $object->getConsoleSize()) { - $values_23 = []; - foreach ($object->getConsoleSize() as $value_23) { - $values_23[] = $value_23; - } - $data['ConsoleSize'] = $values_23; - } if ($object->isInitialized('isolation') && null !== $object->getIsolation()) { $data['Isolation'] = $object->getIsolation(); } + if ($object->isInitialized('maskedPaths') && null !== $object->getMaskedPaths()) { + $values_28 = []; + foreach ($object->getMaskedPaths() as $value_28) { + $values_28[] = $value_28; + } + $data['MaskedPaths'] = $values_28; + } + if ($object->isInitialized('readonlyPaths') && null !== $object->getReadonlyPaths()) { + $values_29 = []; + foreach ($object->getReadonlyPaths() as $value_29) { + $values_29[] = $value_29; + } + $data['ReadonlyPaths'] = $values_29; + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/IPAMConfigNormalizer.php b/generated/Normalizer/IPAMConfigNormalizer.php new file mode 100644 index 000000000..ba73d5e69 --- /dev/null +++ b/generated/Normalizer/IPAMConfigNormalizer.php @@ -0,0 +1,188 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class IPAMConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\IPAMConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\IPAMConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\IPAMConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Subnet', $data) && $data['Subnet'] !== null) { + $object->setSubnet($data['Subnet']); + } + elseif (\array_key_exists('Subnet', $data) && $data['Subnet'] === null) { + $object->setSubnet(null); + } + if (\array_key_exists('IPRange', $data) && $data['IPRange'] !== null) { + $object->setIPRange($data['IPRange']); + } + elseif (\array_key_exists('IPRange', $data) && $data['IPRange'] === null) { + $object->setIPRange(null); + } + if (\array_key_exists('Gateway', $data) && $data['Gateway'] !== null) { + $object->setGateway($data['Gateway']); + } + elseif (\array_key_exists('Gateway', $data) && $data['Gateway'] === null) { + $object->setGateway(null); + } + if (\array_key_exists('AuxiliaryAddresses', $data) && $data['AuxiliaryAddresses'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['AuxiliaryAddresses'] as $key => $value) { + $values[$key] = $value; + } + $object->setAuxiliaryAddresses($values); + } + elseif (\array_key_exists('AuxiliaryAddresses', $data) && $data['AuxiliaryAddresses'] === null) { + $object->setAuxiliaryAddresses(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('subnet') && null !== $object->getSubnet()) { + $data['Subnet'] = $object->getSubnet(); + } + if ($object->isInitialized('iPRange') && null !== $object->getIPRange()) { + $data['IPRange'] = $object->getIPRange(); + } + if ($object->isInitialized('gateway') && null !== $object->getGateway()) { + $data['Gateway'] = $object->getGateway(); + } + if ($object->isInitialized('auxiliaryAddresses') && null !== $object->getAuxiliaryAddresses()) { + $values = []; + foreach ($object->getAuxiliaryAddresses() as $key => $value) { + $values[$key] = $value; + } + $data['AuxiliaryAddresses'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\IPAMConfig::class => false]; + } + } +} else { + class IPAMConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\IPAMConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\IPAMConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\IPAMConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Subnet', $data) && $data['Subnet'] !== null) { + $object->setSubnet($data['Subnet']); + } + elseif (\array_key_exists('Subnet', $data) && $data['Subnet'] === null) { + $object->setSubnet(null); + } + if (\array_key_exists('IPRange', $data) && $data['IPRange'] !== null) { + $object->setIPRange($data['IPRange']); + } + elseif (\array_key_exists('IPRange', $data) && $data['IPRange'] === null) { + $object->setIPRange(null); + } + if (\array_key_exists('Gateway', $data) && $data['Gateway'] !== null) { + $object->setGateway($data['Gateway']); + } + elseif (\array_key_exists('Gateway', $data) && $data['Gateway'] === null) { + $object->setGateway(null); + } + if (\array_key_exists('AuxiliaryAddresses', $data) && $data['AuxiliaryAddresses'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['AuxiliaryAddresses'] as $key => $value) { + $values[$key] = $value; + } + $object->setAuxiliaryAddresses($values); + } + elseif (\array_key_exists('AuxiliaryAddresses', $data) && $data['AuxiliaryAddresses'] === null) { + $object->setAuxiliaryAddresses(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('subnet') && null !== $object->getSubnet()) { + $data['Subnet'] = $object->getSubnet(); + } + if ($object->isInitialized('iPRange') && null !== $object->getIPRange()) { + $data['IPRange'] = $object->getIPRange(); + } + if ($object->isInitialized('gateway') && null !== $object->getGateway()) { + $data['Gateway'] = $object->getGateway(); + } + if ($object->isInitialized('auxiliaryAddresses') && null !== $object->getAuxiliaryAddresses()) { + $values = []; + foreach ($object->getAuxiliaryAddresses() as $key => $value) { + $values[$key] = $value; + } + $data['AuxiliaryAddresses'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\IPAMConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/IPAMNormalizer.php b/generated/Normalizer/IPAMNormalizer.php index 58c6c7c3d..758fb275a 100644 --- a/generated/Normalizer/IPAMNormalizer.php +++ b/generated/Normalizer/IPAMNormalizer.php @@ -49,11 +49,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (\array_key_exists('Config', $data) && $data['Config'] !== null) { $values = []; foreach ($data['Config'] as $value) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($value as $key => $value_1) { - $values_1[$key] = $value_1; - } - $values[] = $values_1; + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\IPAMConfig::class, 'json', $context); } $object->setConfig($values); } @@ -61,15 +57,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setConfig(null); } if (\array_key_exists('Options', $data) && $data['Options'] !== null) { - $values_2 = []; - foreach ($data['Options'] as $value_2) { - $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($value_2 as $key_1 => $value_3) { - $values_3[$key_1] = $value_3; - } - $values_2[] = $values_3; + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value_1) { + $values_1[$key] = $value_1; } - $object->setOptions($values_2); + $object->setOptions($values_1); } elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { $object->setOptions(null); @@ -85,24 +77,16 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('config') && null !== $object->getConfig()) { $values = []; foreach ($object->getConfig() as $value) { - $values_1 = []; - foreach ($value as $key => $value_1) { - $values_1[$key] = $value_1; - } - $values[] = $values_1; + $values[] = $this->normalizer->normalize($value, 'json', $context); } $data['Config'] = $values; } if ($object->isInitialized('options') && null !== $object->getOptions()) { - $values_2 = []; - foreach ($object->getOptions() as $value_2) { - $values_3 = []; - foreach ($value_2 as $key_1 => $value_3) { - $values_3[$key_1] = $value_3; - } - $values_2[] = $values_3; + $values_1 = []; + foreach ($object->getOptions() as $key => $value_1) { + $values_1[$key] = $value_1; } - $data['Options'] = $values_2; + $data['Options'] = $values_1; } return $data; } @@ -150,11 +134,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (\array_key_exists('Config', $data) && $data['Config'] !== null) { $values = []; foreach ($data['Config'] as $value) { - $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($value as $key => $value_1) { - $values_1[$key] = $value_1; - } - $values[] = $values_1; + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\IPAMConfig::class, 'json', $context); } $object->setConfig($values); } @@ -162,15 +142,11 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setConfig(null); } if (\array_key_exists('Options', $data) && $data['Options'] !== null) { - $values_2 = []; - foreach ($data['Options'] as $value_2) { - $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($value_2 as $key_1 => $value_3) { - $values_3[$key_1] = $value_3; - } - $values_2[] = $values_3; + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Options'] as $key => $value_1) { + $values_1[$key] = $value_1; } - $object->setOptions($values_2); + $object->setOptions($values_1); } elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { $object->setOptions(null); @@ -189,24 +165,16 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('config') && null !== $object->getConfig()) { $values = []; foreach ($object->getConfig() as $value) { - $values_1 = []; - foreach ($value as $key => $value_1) { - $values_1[$key] = $value_1; - } - $values[] = $values_1; + $values[] = $this->normalizer->normalize($value, 'json', $context); } $data['Config'] = $values; } if ($object->isInitialized('options') && null !== $object->getOptions()) { - $values_2 = []; - foreach ($object->getOptions() as $value_2) { - $values_3 = []; - foreach ($value_2 as $key_1 => $value_3) { - $values_3[$key_1] = $value_3; - } - $values_2[] = $values_3; + $values_1 = []; + foreach ($object->getOptions() as $key => $value_1) { + $values_1[$key] = $value_1; } - $data['Options'] = $values_2; + $data['Options'] = $values_1; } return $data; } diff --git a/generated/Normalizer/ImageConfigNormalizer.php b/generated/Normalizer/ImageConfigNormalizer.php new file mode 100644 index 000000000..2f933e9ae --- /dev/null +++ b/generated/Normalizer/ImageConfigNormalizer.php @@ -0,0 +1,678 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ImageConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Hostname', $data) && $data['Hostname'] !== null) { + $object->setHostname($data['Hostname']); + } + elseif (\array_key_exists('Hostname', $data) && $data['Hostname'] === null) { + $object->setHostname(null); + } + if (\array_key_exists('Domainname', $data) && $data['Domainname'] !== null) { + $object->setDomainname($data['Domainname']); + } + elseif (\array_key_exists('Domainname', $data) && $data['Domainname'] === null) { + $object->setDomainname(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($data['User']); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + if (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] !== null) { + $object->setAttachStdin($data['AttachStdin']); + } + elseif (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] === null) { + $object->setAttachStdin(null); + } + if (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] !== null) { + $object->setAttachStdout($data['AttachStdout']); + } + elseif (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] === null) { + $object->setAttachStdout(null); + } + if (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] !== null) { + $object->setAttachStderr($data['AttachStderr']); + } + elseif (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] === null) { + $object->setAttachStderr(null); + } + if (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['ExposedPorts'] as $key => $value) { + $values[$key] = $value; + } + $object->setExposedPorts($values); + } + elseif (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] === null) { + $object->setExposedPorts(null); + } + if (\array_key_exists('Tty', $data) && $data['Tty'] !== null) { + $object->setTty($data['Tty']); + } + elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { + $object->setTty(null); + } + if (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] !== null) { + $object->setOpenStdin($data['OpenStdin']); + } + elseif (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] === null) { + $object->setOpenStdin(null); + } + if (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] !== null) { + $object->setStdinOnce($data['StdinOnce']); + } + elseif (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] === null) { + $object->setStdinOnce(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values_1 = []; + foreach ($data['Env'] as $value_1) { + $values_1[] = $value_1; + } + $object->setEnv($values_1); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { + $values_2 = []; + foreach ($data['Cmd'] as $value_2) { + $values_2[] = $value_2; + } + $object->setCmd($values_2); + } + elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { + $object->setCmd(null); + } + if (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] !== null) { + $object->setHealthcheck($this->denormalizer->denormalize($data['Healthcheck'], \Docker\API\Model\HealthConfig::class, 'json', $context)); + } + elseif (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] === null) { + $object->setHealthcheck(null); + } + if (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] !== null) { + $object->setArgsEscaped($data['ArgsEscaped']); + } + elseif (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] === null) { + $object->setArgsEscaped(null); + } + if (\array_key_exists('Image', $data) && $data['Image'] !== null) { + $object->setImage($data['Image']); + } + elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { + $object->setImage(null); + } + if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Volumes'] as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $object->setVolumes($values_3); + } + elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { + $object->setVolumes(null); + } + if (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] !== null) { + $object->setWorkingDir($data['WorkingDir']); + } + elseif (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] === null) { + $object->setWorkingDir(null); + } + if (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] !== null) { + $values_4 = []; + foreach ($data['Entrypoint'] as $value_4) { + $values_4[] = $value_4; + } + $object->setEntrypoint($values_4); + } + elseif (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] === null) { + $object->setEntrypoint(null); + } + if (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] !== null) { + $object->setNetworkDisabled($data['NetworkDisabled']); + } + elseif (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] === null) { + $object->setNetworkDisabled(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + if (\array_key_exists('OnBuild', $data) && $data['OnBuild'] !== null) { + $values_5 = []; + foreach ($data['OnBuild'] as $value_5) { + $values_5[] = $value_5; + } + $object->setOnBuild($values_5); + } + elseif (\array_key_exists('OnBuild', $data) && $data['OnBuild'] === null) { + $object->setOnBuild(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_6 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_2 => $value_6) { + $values_6[$key_2] = $value_6; + } + $object->setLabels($values_6); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('StopSignal', $data) && $data['StopSignal'] !== null) { + $object->setStopSignal($data['StopSignal']); + } + elseif (\array_key_exists('StopSignal', $data) && $data['StopSignal'] === null) { + $object->setStopSignal(null); + } + if (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] !== null) { + $object->setStopTimeout($data['StopTimeout']); + } + elseif (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] === null) { + $object->setStopTimeout(null); + } + if (\array_key_exists('Shell', $data) && $data['Shell'] !== null) { + $values_7 = []; + foreach ($data['Shell'] as $value_7) { + $values_7[] = $value_7; + } + $object->setShell($values_7); + } + elseif (\array_key_exists('Shell', $data) && $data['Shell'] === null) { + $object->setShell(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('hostname') && null !== $object->getHostname()) { + $data['Hostname'] = $object->getHostname(); + } + if ($object->isInitialized('domainname') && null !== $object->getDomainname()) { + $data['Domainname'] = $object->getDomainname(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $object->getUser(); + } + if ($object->isInitialized('attachStdin') && null !== $object->getAttachStdin()) { + $data['AttachStdin'] = $object->getAttachStdin(); + } + if ($object->isInitialized('attachStdout') && null !== $object->getAttachStdout()) { + $data['AttachStdout'] = $object->getAttachStdout(); + } + if ($object->isInitialized('attachStderr') && null !== $object->getAttachStderr()) { + $data['AttachStderr'] = $object->getAttachStderr(); + } + if ($object->isInitialized('exposedPorts') && null !== $object->getExposedPorts()) { + $values = []; + foreach ($object->getExposedPorts() as $key => $value) { + $values[$key] = $value; + } + $data['ExposedPorts'] = $values; + } + if ($object->isInitialized('tty') && null !== $object->getTty()) { + $data['Tty'] = $object->getTty(); + } + if ($object->isInitialized('openStdin') && null !== $object->getOpenStdin()) { + $data['OpenStdin'] = $object->getOpenStdin(); + } + if ($object->isInitialized('stdinOnce') && null !== $object->getStdinOnce()) { + $data['StdinOnce'] = $object->getStdinOnce(); + } + if ($object->isInitialized('env') && null !== $object->getEnv()) { + $values_1 = []; + foreach ($object->getEnv() as $value_1) { + $values_1[] = $value_1; + } + $data['Env'] = $values_1; + } + if ($object->isInitialized('cmd') && null !== $object->getCmd()) { + $values_2 = []; + foreach ($object->getCmd() as $value_2) { + $values_2[] = $value_2; + } + $data['Cmd'] = $values_2; + } + if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) { + $data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context); + } + if ($object->isInitialized('argsEscaped') && null !== $object->getArgsEscaped()) { + $data['ArgsEscaped'] = $object->getArgsEscaped(); + } + if ($object->isInitialized('image') && null !== $object->getImage()) { + $data['Image'] = $object->getImage(); + } + if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { + $values_3 = []; + foreach ($object->getVolumes() as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $data['Volumes'] = $values_3; + } + if ($object->isInitialized('workingDir') && null !== $object->getWorkingDir()) { + $data['WorkingDir'] = $object->getWorkingDir(); + } + if ($object->isInitialized('entrypoint') && null !== $object->getEntrypoint()) { + $values_4 = []; + foreach ($object->getEntrypoint() as $value_4) { + $values_4[] = $value_4; + } + $data['Entrypoint'] = $values_4; + } + if ($object->isInitialized('networkDisabled') && null !== $object->getNetworkDisabled()) { + $data['NetworkDisabled'] = $object->getNetworkDisabled(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + if ($object->isInitialized('onBuild') && null !== $object->getOnBuild()) { + $values_5 = []; + foreach ($object->getOnBuild() as $value_5) { + $values_5[] = $value_5; + } + $data['OnBuild'] = $values_5; + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_6 = []; + foreach ($object->getLabels() as $key_2 => $value_6) { + $values_6[$key_2] = $value_6; + } + $data['Labels'] = $values_6; + } + if ($object->isInitialized('stopSignal') && null !== $object->getStopSignal()) { + $data['StopSignal'] = $object->getStopSignal(); + } + if ($object->isInitialized('stopTimeout') && null !== $object->getStopTimeout()) { + $data['StopTimeout'] = $object->getStopTimeout(); + } + if ($object->isInitialized('shell') && null !== $object->getShell()) { + $values_7 = []; + foreach ($object->getShell() as $value_7) { + $values_7[] = $value_7; + } + $data['Shell'] = $values_7; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageConfig::class => false]; + } + } +} else { + class ImageConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Hostname', $data) && $data['Hostname'] !== null) { + $object->setHostname($data['Hostname']); + } + elseif (\array_key_exists('Hostname', $data) && $data['Hostname'] === null) { + $object->setHostname(null); + } + if (\array_key_exists('Domainname', $data) && $data['Domainname'] !== null) { + $object->setDomainname($data['Domainname']); + } + elseif (\array_key_exists('Domainname', $data) && $data['Domainname'] === null) { + $object->setDomainname(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($data['User']); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + if (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] !== null) { + $object->setAttachStdin($data['AttachStdin']); + } + elseif (\array_key_exists('AttachStdin', $data) && $data['AttachStdin'] === null) { + $object->setAttachStdin(null); + } + if (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] !== null) { + $object->setAttachStdout($data['AttachStdout']); + } + elseif (\array_key_exists('AttachStdout', $data) && $data['AttachStdout'] === null) { + $object->setAttachStdout(null); + } + if (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] !== null) { + $object->setAttachStderr($data['AttachStderr']); + } + elseif (\array_key_exists('AttachStderr', $data) && $data['AttachStderr'] === null) { + $object->setAttachStderr(null); + } + if (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['ExposedPorts'] as $key => $value) { + $values[$key] = $value; + } + $object->setExposedPorts($values); + } + elseif (\array_key_exists('ExposedPorts', $data) && $data['ExposedPorts'] === null) { + $object->setExposedPorts(null); + } + if (\array_key_exists('Tty', $data) && $data['Tty'] !== null) { + $object->setTty($data['Tty']); + } + elseif (\array_key_exists('Tty', $data) && $data['Tty'] === null) { + $object->setTty(null); + } + if (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] !== null) { + $object->setOpenStdin($data['OpenStdin']); + } + elseif (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] === null) { + $object->setOpenStdin(null); + } + if (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] !== null) { + $object->setStdinOnce($data['StdinOnce']); + } + elseif (\array_key_exists('StdinOnce', $data) && $data['StdinOnce'] === null) { + $object->setStdinOnce(null); + } + if (\array_key_exists('Env', $data) && $data['Env'] !== null) { + $values_1 = []; + foreach ($data['Env'] as $value_1) { + $values_1[] = $value_1; + } + $object->setEnv($values_1); + } + elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { + $object->setEnv(null); + } + if (\array_key_exists('Cmd', $data) && $data['Cmd'] !== null) { + $values_2 = []; + foreach ($data['Cmd'] as $value_2) { + $values_2[] = $value_2; + } + $object->setCmd($values_2); + } + elseif (\array_key_exists('Cmd', $data) && $data['Cmd'] === null) { + $object->setCmd(null); + } + if (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] !== null) { + $object->setHealthcheck($this->denormalizer->denormalize($data['Healthcheck'], \Docker\API\Model\HealthConfig::class, 'json', $context)); + } + elseif (\array_key_exists('Healthcheck', $data) && $data['Healthcheck'] === null) { + $object->setHealthcheck(null); + } + if (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] !== null) { + $object->setArgsEscaped($data['ArgsEscaped']); + } + elseif (\array_key_exists('ArgsEscaped', $data) && $data['ArgsEscaped'] === null) { + $object->setArgsEscaped(null); + } + if (\array_key_exists('Image', $data) && $data['Image'] !== null) { + $object->setImage($data['Image']); + } + elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { + $object->setImage(null); + } + if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Volumes'] as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $object->setVolumes($values_3); + } + elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { + $object->setVolumes(null); + } + if (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] !== null) { + $object->setWorkingDir($data['WorkingDir']); + } + elseif (\array_key_exists('WorkingDir', $data) && $data['WorkingDir'] === null) { + $object->setWorkingDir(null); + } + if (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] !== null) { + $values_4 = []; + foreach ($data['Entrypoint'] as $value_4) { + $values_4[] = $value_4; + } + $object->setEntrypoint($values_4); + } + elseif (\array_key_exists('Entrypoint', $data) && $data['Entrypoint'] === null) { + $object->setEntrypoint(null); + } + if (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] !== null) { + $object->setNetworkDisabled($data['NetworkDisabled']); + } + elseif (\array_key_exists('NetworkDisabled', $data) && $data['NetworkDisabled'] === null) { + $object->setNetworkDisabled(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + if (\array_key_exists('OnBuild', $data) && $data['OnBuild'] !== null) { + $values_5 = []; + foreach ($data['OnBuild'] as $value_5) { + $values_5[] = $value_5; + } + $object->setOnBuild($values_5); + } + elseif (\array_key_exists('OnBuild', $data) && $data['OnBuild'] === null) { + $object->setOnBuild(null); + } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_6 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key_2 => $value_6) { + $values_6[$key_2] = $value_6; + } + $object->setLabels($values_6); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('StopSignal', $data) && $data['StopSignal'] !== null) { + $object->setStopSignal($data['StopSignal']); + } + elseif (\array_key_exists('StopSignal', $data) && $data['StopSignal'] === null) { + $object->setStopSignal(null); + } + if (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] !== null) { + $object->setStopTimeout($data['StopTimeout']); + } + elseif (\array_key_exists('StopTimeout', $data) && $data['StopTimeout'] === null) { + $object->setStopTimeout(null); + } + if (\array_key_exists('Shell', $data) && $data['Shell'] !== null) { + $values_7 = []; + foreach ($data['Shell'] as $value_7) { + $values_7[] = $value_7; + } + $object->setShell($values_7); + } + elseif (\array_key_exists('Shell', $data) && $data['Shell'] === null) { + $object->setShell(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('hostname') && null !== $object->getHostname()) { + $data['Hostname'] = $object->getHostname(); + } + if ($object->isInitialized('domainname') && null !== $object->getDomainname()) { + $data['Domainname'] = $object->getDomainname(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $object->getUser(); + } + if ($object->isInitialized('attachStdin') && null !== $object->getAttachStdin()) { + $data['AttachStdin'] = $object->getAttachStdin(); + } + if ($object->isInitialized('attachStdout') && null !== $object->getAttachStdout()) { + $data['AttachStdout'] = $object->getAttachStdout(); + } + if ($object->isInitialized('attachStderr') && null !== $object->getAttachStderr()) { + $data['AttachStderr'] = $object->getAttachStderr(); + } + if ($object->isInitialized('exposedPorts') && null !== $object->getExposedPorts()) { + $values = []; + foreach ($object->getExposedPorts() as $key => $value) { + $values[$key] = $value; + } + $data['ExposedPorts'] = $values; + } + if ($object->isInitialized('tty') && null !== $object->getTty()) { + $data['Tty'] = $object->getTty(); + } + if ($object->isInitialized('openStdin') && null !== $object->getOpenStdin()) { + $data['OpenStdin'] = $object->getOpenStdin(); + } + if ($object->isInitialized('stdinOnce') && null !== $object->getStdinOnce()) { + $data['StdinOnce'] = $object->getStdinOnce(); + } + if ($object->isInitialized('env') && null !== $object->getEnv()) { + $values_1 = []; + foreach ($object->getEnv() as $value_1) { + $values_1[] = $value_1; + } + $data['Env'] = $values_1; + } + if ($object->isInitialized('cmd') && null !== $object->getCmd()) { + $values_2 = []; + foreach ($object->getCmd() as $value_2) { + $values_2[] = $value_2; + } + $data['Cmd'] = $values_2; + } + if ($object->isInitialized('healthcheck') && null !== $object->getHealthcheck()) { + $data['Healthcheck'] = $this->normalizer->normalize($object->getHealthcheck(), 'json', $context); + } + if ($object->isInitialized('argsEscaped') && null !== $object->getArgsEscaped()) { + $data['ArgsEscaped'] = $object->getArgsEscaped(); + } + if ($object->isInitialized('image') && null !== $object->getImage()) { + $data['Image'] = $object->getImage(); + } + if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { + $values_3 = []; + foreach ($object->getVolumes() as $key_1 => $value_3) { + $values_3[$key_1] = $value_3; + } + $data['Volumes'] = $values_3; + } + if ($object->isInitialized('workingDir') && null !== $object->getWorkingDir()) { + $data['WorkingDir'] = $object->getWorkingDir(); + } + if ($object->isInitialized('entrypoint') && null !== $object->getEntrypoint()) { + $values_4 = []; + foreach ($object->getEntrypoint() as $value_4) { + $values_4[] = $value_4; + } + $data['Entrypoint'] = $values_4; + } + if ($object->isInitialized('networkDisabled') && null !== $object->getNetworkDisabled()) { + $data['NetworkDisabled'] = $object->getNetworkDisabled(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + if ($object->isInitialized('onBuild') && null !== $object->getOnBuild()) { + $values_5 = []; + foreach ($object->getOnBuild() as $value_5) { + $values_5[] = $value_5; + } + $data['OnBuild'] = $values_5; + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_6 = []; + foreach ($object->getLabels() as $key_2 => $value_6) { + $values_6[$key_2] = $value_6; + } + $data['Labels'] = $values_6; + } + if ($object->isInitialized('stopSignal') && null !== $object->getStopSignal()) { + $data['StopSignal'] = $object->getStopSignal(); + } + if ($object->isInitialized('stopTimeout') && null !== $object->getStopTimeout()) { + $data['StopTimeout'] = $object->getStopTimeout(); + } + if ($object->isInitialized('shell') && null !== $object->getShell()) { + $values_7 = []; + foreach ($object->getShell() as $value_7) { + $values_7[] = $value_7; + } + $data['Shell'] = $values_7; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ImageDeleteResponseNormalizer.php b/generated/Normalizer/ImageDeleteResponseItemNormalizer.php similarity index 88% rename from generated/Normalizer/ImageDeleteResponseNormalizer.php rename to generated/Normalizer/ImageDeleteResponseItemNormalizer.php index 606a518da..b42fc4eef 100644 --- a/generated/Normalizer/ImageDeleteResponseNormalizer.php +++ b/generated/Normalizer/ImageDeleteResponseItemNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageDeleteResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ImageDeleteResponseItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ImageDeleteResponseNormalizer implements DenormalizerInterface, Normalizer use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ImageDeleteResponse::class; + return $type === \Docker\API\Model\ImageDeleteResponseItem::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ImageDeleteResponse::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ImageDeleteResponseItem::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ImageDeleteResponse(); + $object = new \Docker\API\Model\ImageDeleteResponseItem(); if (null === $data || false === \is_array($data)) { return $object; } @@ -67,11 +67,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ImageDeleteResponse::class => false]; + return [\Docker\API\Model\ImageDeleteResponseItem::class => false]; } } } else { - class ImageDeleteResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ImageDeleteResponseItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -79,11 +79,11 @@ class ImageDeleteResponseNormalizer implements DenormalizerInterface, Normalizer use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ImageDeleteResponse::class; + return $type === \Docker\API\Model\ImageDeleteResponseItem::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ImageDeleteResponse::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ImageDeleteResponseItem::class; } /** * @return mixed @@ -96,7 +96,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ImageDeleteResponse(); + $object = new \Docker\API\Model\ImageDeleteResponseItem(); if (null === $data || false === \is_array($data)) { return $object; } @@ -130,7 +130,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ImageDeleteResponse::class => false]; + return [\Docker\API\Model\ImageDeleteResponseItem::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/SecretsCreatePostResponse201Normalizer.php b/generated/Normalizer/ImageIDNormalizer.php similarity index 82% rename from generated/Normalizer/SecretsCreatePostResponse201Normalizer.php rename to generated/Normalizer/ImageIDNormalizer.php index 16cc40f41..3f2a2d211 100644 --- a/generated/Normalizer/SecretsCreatePostResponse201Normalizer.php +++ b/generated/Normalizer/ImageIDNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SecretsCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ImageIDNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class SecretsCreatePostResponse201Normalizer implements DenormalizerInterface, N use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\SecretsCreatePostResponse201::class; + return $type === \Docker\API\Model\ImageID::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\SecretsCreatePostResponse201::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ImageID::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\SecretsCreatePostResponse201(); + $object = new \Docker\API\Model\ImageID(); if (null === $data || false === \is_array($data)) { return $object; } @@ -58,11 +58,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\SecretsCreatePostResponse201::class => false]; + return [\Docker\API\Model\ImageID::class => false]; } } } else { - class SecretsCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ImageIDNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -70,11 +70,11 @@ class SecretsCreatePostResponse201Normalizer implements DenormalizerInterface, N use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\SecretsCreatePostResponse201::class; + return $type === \Docker\API\Model\ImageID::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\SecretsCreatePostResponse201::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ImageID::class; } /** * @return mixed @@ -87,7 +87,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\SecretsCreatePostResponse201(); + $object = new \Docker\API\Model\ImageID(); if (null === $data || false === \is_array($data)) { return $object; } @@ -112,7 +112,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\SecretsCreatePostResponse201::class => false]; + return [\Docker\API\Model\ImageID::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ImageInspectMetadataNormalizer.php b/generated/Normalizer/ImageInspectMetadataNormalizer.php new file mode 100644 index 000000000..0b94d3426 --- /dev/null +++ b/generated/Normalizer/ImageInspectMetadataNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ImageInspectMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageInspectMetadata::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageInspectMetadata::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageInspectMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('LastTagTime', $data) && $data['LastTagTime'] !== null) { + $object->setLastTagTime($data['LastTagTime']); + } + elseif (\array_key_exists('LastTagTime', $data) && $data['LastTagTime'] === null) { + $object->setLastTagTime(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('lastTagTime') && null !== $object->getLastTagTime()) { + $data['LastTagTime'] = $object->getLastTagTime(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageInspectMetadata::class => false]; + } + } +} else { + class ImageInspectMetadataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageInspectMetadata::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageInspectMetadata::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageInspectMetadata(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('LastTagTime', $data) && $data['LastTagTime'] !== null) { + $object->setLastTagTime($data['LastTagTime']); + } + elseif (\array_key_exists('LastTagTime', $data) && $data['LastTagTime'] === null) { + $object->setLastTagTime(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('lastTagTime') && null !== $object->getLastTagTime()) { + $data['LastTagTime'] = $object->getLastTagTime(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageInspectMetadata::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ImageNormalizer.php b/generated/Normalizer/ImageInspectNormalizer.php similarity index 82% rename from generated/Normalizer/ImageNormalizer.php rename to generated/Normalizer/ImageInspectNormalizer.php index 59705261b..ca549de7a 100644 --- a/generated/Normalizer/ImageNormalizer.php +++ b/generated/Normalizer/ImageInspectNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ImageInspectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ImageNormalizer implements DenormalizerInterface, NormalizerInterface, Den use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\Image::class; + return $type === \Docker\API\Model\ImageInspect::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\Image::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ImageInspect::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\Image(); + $object = new \Docker\API\Model\ImageInspect(); if (null === $data || false === \is_array($data)) { return $object; } @@ -84,18 +84,6 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Created', $data) && $data['Created'] === null) { $object->setCreated(null); } - if (\array_key_exists('Container', $data) && $data['Container'] !== null) { - $object->setContainer($data['Container']); - } - elseif (\array_key_exists('Container', $data) && $data['Container'] === null) { - $object->setContainer(null); - } - if (\array_key_exists('ContainerConfig', $data) && $data['ContainerConfig'] !== null) { - $object->setContainerConfig($this->denormalizer->denormalize($data['ContainerConfig'], \Docker\API\Model\Config::class, 'json', $context)); - } - elseif (\array_key_exists('ContainerConfig', $data) && $data['ContainerConfig'] === null) { - $object->setContainerConfig(null); - } if (\array_key_exists('DockerVersion', $data) && $data['DockerVersion'] !== null) { $object->setDockerVersion($data['DockerVersion']); } @@ -109,7 +97,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setAuthor(null); } if (\array_key_exists('Config', $data) && $data['Config'] !== null) { - $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\Config::class, 'json', $context)); + $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\ImageConfig::class, 'json', $context)); } elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { $object->setConfig(null); @@ -120,12 +108,24 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Architecture', $data) && $data['Architecture'] === null) { $object->setArchitecture(null); } + if (\array_key_exists('Variant', $data) && $data['Variant'] !== null) { + $object->setVariant($data['Variant']); + } + elseif (\array_key_exists('Variant', $data) && $data['Variant'] === null) { + $object->setVariant(null); + } if (\array_key_exists('Os', $data) && $data['Os'] !== null) { $object->setOs($data['Os']); } elseif (\array_key_exists('Os', $data) && $data['Os'] === null) { $object->setOs(null); } + if (\array_key_exists('OsVersion', $data) && $data['OsVersion'] !== null) { + $object->setOsVersion($data['OsVersion']); + } + elseif (\array_key_exists('OsVersion', $data) && $data['OsVersion'] === null) { + $object->setOsVersion(null); + } if (\array_key_exists('Size', $data) && $data['Size'] !== null) { $object->setSize($data['Size']); } @@ -139,17 +139,23 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setVirtualSize(null); } if (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] !== null) { - $object->setGraphDriver($this->denormalizer->denormalize($data['GraphDriver'], \Docker\API\Model\GraphDriver::class, 'json', $context)); + $object->setGraphDriver($this->denormalizer->denormalize($data['GraphDriver'], \Docker\API\Model\DriverData::class, 'json', $context)); } elseif (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] === null) { $object->setGraphDriver(null); } if (\array_key_exists('RootFS', $data) && $data['RootFS'] !== null) { - $object->setRootFS($this->denormalizer->denormalize($data['RootFS'], \Docker\API\Model\ImageRootFS::class, 'json', $context)); + $object->setRootFS($this->denormalizer->denormalize($data['RootFS'], \Docker\API\Model\ImageInspectRootFS::class, 'json', $context)); } elseif (\array_key_exists('RootFS', $data) && $data['RootFS'] === null) { $object->setRootFS(null); } + if (\array_key_exists('Metadata', $data) && $data['Metadata'] !== null) { + $object->setMetadata($this->denormalizer->denormalize($data['Metadata'], \Docker\API\Model\ImageInspectMetadata::class, 'json', $context)); + } + elseif (\array_key_exists('Metadata', $data) && $data['Metadata'] === null) { + $object->setMetadata(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -181,12 +187,6 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('created') && null !== $object->getCreated()) { $data['Created'] = $object->getCreated(); } - if ($object->isInitialized('container') && null !== $object->getContainer()) { - $data['Container'] = $object->getContainer(); - } - if ($object->isInitialized('containerConfig') && null !== $object->getContainerConfig()) { - $data['ContainerConfig'] = $this->normalizer->normalize($object->getContainerConfig(), 'json', $context); - } if ($object->isInitialized('dockerVersion') && null !== $object->getDockerVersion()) { $data['DockerVersion'] = $object->getDockerVersion(); } @@ -199,9 +199,15 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('architecture') && null !== $object->getArchitecture()) { $data['Architecture'] = $object->getArchitecture(); } + if ($object->isInitialized('variant') && null !== $object->getVariant()) { + $data['Variant'] = $object->getVariant(); + } if ($object->isInitialized('os') && null !== $object->getOs()) { $data['Os'] = $object->getOs(); } + if ($object->isInitialized('osVersion') && null !== $object->getOsVersion()) { + $data['OsVersion'] = $object->getOsVersion(); + } if ($object->isInitialized('size') && null !== $object->getSize()) { $data['Size'] = $object->getSize(); } @@ -214,15 +220,18 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('rootFS') && null !== $object->getRootFS()) { $data['RootFS'] = $this->normalizer->normalize($object->getRootFS(), 'json', $context); } + if ($object->isInitialized('metadata') && null !== $object->getMetadata()) { + $data['Metadata'] = $this->normalizer->normalize($object->getMetadata(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\Image::class => false]; + return [\Docker\API\Model\ImageInspect::class => false]; } } } else { - class ImageNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ImageInspectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -230,11 +239,11 @@ class ImageNormalizer implements DenormalizerInterface, NormalizerInterface, Den use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\Image::class; + return $type === \Docker\API\Model\ImageInspect::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\Image::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ImageInspect::class; } /** * @return mixed @@ -247,7 +256,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\Image(); + $object = new \Docker\API\Model\ImageInspect(); if (null === $data || false === \is_array($data)) { return $object; } @@ -295,18 +304,6 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Created', $data) && $data['Created'] === null) { $object->setCreated(null); } - if (\array_key_exists('Container', $data) && $data['Container'] !== null) { - $object->setContainer($data['Container']); - } - elseif (\array_key_exists('Container', $data) && $data['Container'] === null) { - $object->setContainer(null); - } - if (\array_key_exists('ContainerConfig', $data) && $data['ContainerConfig'] !== null) { - $object->setContainerConfig($this->denormalizer->denormalize($data['ContainerConfig'], \Docker\API\Model\Config::class, 'json', $context)); - } - elseif (\array_key_exists('ContainerConfig', $data) && $data['ContainerConfig'] === null) { - $object->setContainerConfig(null); - } if (\array_key_exists('DockerVersion', $data) && $data['DockerVersion'] !== null) { $object->setDockerVersion($data['DockerVersion']); } @@ -320,7 +317,7 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setAuthor(null); } if (\array_key_exists('Config', $data) && $data['Config'] !== null) { - $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\Config::class, 'json', $context)); + $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\ImageConfig::class, 'json', $context)); } elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { $object->setConfig(null); @@ -331,12 +328,24 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Architecture', $data) && $data['Architecture'] === null) { $object->setArchitecture(null); } + if (\array_key_exists('Variant', $data) && $data['Variant'] !== null) { + $object->setVariant($data['Variant']); + } + elseif (\array_key_exists('Variant', $data) && $data['Variant'] === null) { + $object->setVariant(null); + } if (\array_key_exists('Os', $data) && $data['Os'] !== null) { $object->setOs($data['Os']); } elseif (\array_key_exists('Os', $data) && $data['Os'] === null) { $object->setOs(null); } + if (\array_key_exists('OsVersion', $data) && $data['OsVersion'] !== null) { + $object->setOsVersion($data['OsVersion']); + } + elseif (\array_key_exists('OsVersion', $data) && $data['OsVersion'] === null) { + $object->setOsVersion(null); + } if (\array_key_exists('Size', $data) && $data['Size'] !== null) { $object->setSize($data['Size']); } @@ -350,17 +359,23 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setVirtualSize(null); } if (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] !== null) { - $object->setGraphDriver($this->denormalizer->denormalize($data['GraphDriver'], \Docker\API\Model\GraphDriver::class, 'json', $context)); + $object->setGraphDriver($this->denormalizer->denormalize($data['GraphDriver'], \Docker\API\Model\DriverData::class, 'json', $context)); } elseif (\array_key_exists('GraphDriver', $data) && $data['GraphDriver'] === null) { $object->setGraphDriver(null); } if (\array_key_exists('RootFS', $data) && $data['RootFS'] !== null) { - $object->setRootFS($this->denormalizer->denormalize($data['RootFS'], \Docker\API\Model\ImageRootFS::class, 'json', $context)); + $object->setRootFS($this->denormalizer->denormalize($data['RootFS'], \Docker\API\Model\ImageInspectRootFS::class, 'json', $context)); } elseif (\array_key_exists('RootFS', $data) && $data['RootFS'] === null) { $object->setRootFS(null); } + if (\array_key_exists('Metadata', $data) && $data['Metadata'] !== null) { + $object->setMetadata($this->denormalizer->denormalize($data['Metadata'], \Docker\API\Model\ImageInspectMetadata::class, 'json', $context)); + } + elseif (\array_key_exists('Metadata', $data) && $data['Metadata'] === null) { + $object->setMetadata(null); + } return $object; } /** @@ -395,12 +410,6 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('created') && null !== $object->getCreated()) { $data['Created'] = $object->getCreated(); } - if ($object->isInitialized('container') && null !== $object->getContainer()) { - $data['Container'] = $object->getContainer(); - } - if ($object->isInitialized('containerConfig') && null !== $object->getContainerConfig()) { - $data['ContainerConfig'] = $this->normalizer->normalize($object->getContainerConfig(), 'json', $context); - } if ($object->isInitialized('dockerVersion') && null !== $object->getDockerVersion()) { $data['DockerVersion'] = $object->getDockerVersion(); } @@ -413,9 +422,15 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('architecture') && null !== $object->getArchitecture()) { $data['Architecture'] = $object->getArchitecture(); } + if ($object->isInitialized('variant') && null !== $object->getVariant()) { + $data['Variant'] = $object->getVariant(); + } if ($object->isInitialized('os') && null !== $object->getOs()) { $data['Os'] = $object->getOs(); } + if ($object->isInitialized('osVersion') && null !== $object->getOsVersion()) { + $data['OsVersion'] = $object->getOsVersion(); + } if ($object->isInitialized('size') && null !== $object->getSize()) { $data['Size'] = $object->getSize(); } @@ -428,11 +443,14 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('rootFS') && null !== $object->getRootFS()) { $data['RootFS'] = $this->normalizer->normalize($object->getRootFS(), 'json', $context); } + if ($object->isInitialized('metadata') && null !== $object->getMetadata()) { + $data['Metadata'] = $this->normalizer->normalize($object->getMetadata(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\Image::class => false]; + return [\Docker\API\Model\ImageInspect::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ImageRootFSNormalizer.php b/generated/Normalizer/ImageInspectRootFSNormalizer.php similarity index 84% rename from generated/Normalizer/ImageRootFSNormalizer.php rename to generated/Normalizer/ImageInspectRootFSNormalizer.php index 646c54d0a..323893db8 100644 --- a/generated/Normalizer/ImageRootFSNormalizer.php +++ b/generated/Normalizer/ImageInspectRootFSNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ImageRootFSNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ImageInspectRootFSNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ImageRootFSNormalizer implements DenormalizerInterface, NormalizerInterfac use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ImageRootFS::class; + return $type === \Docker\API\Model\ImageInspectRootFS::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ImageRootFS::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ImageInspectRootFS::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ImageRootFS(); + $object = new \Docker\API\Model\ImageInspectRootFS(); if (null === $data || false === \is_array($data)) { return $object; } @@ -61,9 +61,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['Type'] = $object->getType(); - } + $data['Type'] = $object->getType(); if ($object->isInitialized('layers') && null !== $object->getLayers()) { $values = []; foreach ($object->getLayers() as $value) { @@ -75,11 +73,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ImageRootFS::class => false]; + return [\Docker\API\Model\ImageInspectRootFS::class => false]; } } } else { - class ImageRootFSNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ImageInspectRootFSNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -87,11 +85,11 @@ class ImageRootFSNormalizer implements DenormalizerInterface, NormalizerInterfac use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ImageRootFS::class; + return $type === \Docker\API\Model\ImageInspectRootFS::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ImageRootFS::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ImageInspectRootFS::class; } /** * @return mixed @@ -104,7 +102,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ImageRootFS(); + $object = new \Docker\API\Model\ImageInspectRootFS(); if (null === $data || false === \is_array($data)) { return $object; } @@ -132,9 +130,7 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('type') && null !== $object->getType()) { - $data['Type'] = $object->getType(); - } + $data['Type'] = $object->getType(); if ($object->isInitialized('layers') && null !== $object->getLayers()) { $values = []; foreach ($object->getLayers() as $value) { @@ -146,7 +142,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ImageRootFS::class => false]; + return [\Docker\API\Model\ImageInspectRootFS::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/TaskVersionNormalizer.php b/generated/Normalizer/ImageManifestSummaryAttestationDataNormalizer.php similarity index 69% rename from generated/Normalizer/TaskVersionNormalizer.php rename to generated/Normalizer/ImageManifestSummaryAttestationDataNormalizer.php index 93a871475..3b8b1bba0 100644 --- a/generated/Normalizer/TaskVersionNormalizer.php +++ b/generated/Normalizer/ImageManifestSummaryAttestationDataNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TaskVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ImageManifestSummaryAttestationDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class TaskVersionNormalizer implements DenormalizerInterface, NormalizerInterfac use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\TaskVersion::class; + return $type === \Docker\API\Model\ImageManifestSummaryAttestationData::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\TaskVersion::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ImageManifestSummaryAttestationData::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,33 +36,31 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\TaskVersion(); + $object = new \Docker\API\Model\ImageManifestSummaryAttestationData(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Index', $data) && $data['Index'] !== null) { - $object->setIndex($data['Index']); + if (\array_key_exists('For', $data) && $data['For'] !== null) { + $object->setFor($data['For']); } - elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { - $object->setIndex(null); + elseif (\array_key_exists('For', $data) && $data['For'] === null) { + $object->setFor(null); } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('index') && null !== $object->getIndex()) { - $data['Index'] = $object->getIndex(); - } + $data['For'] = $object->getFor(); return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\TaskVersion::class => false]; + return [\Docker\API\Model\ImageManifestSummaryAttestationData::class => false]; } } } else { - class TaskVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ImageManifestSummaryAttestationDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -70,11 +68,11 @@ class TaskVersionNormalizer implements DenormalizerInterface, NormalizerInterfac use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\TaskVersion::class; + return $type === \Docker\API\Model\ImageManifestSummaryAttestationData::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\TaskVersion::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ImageManifestSummaryAttestationData::class; } /** * @return mixed @@ -87,15 +85,15 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\TaskVersion(); + $object = new \Docker\API\Model\ImageManifestSummaryAttestationData(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Index', $data) && $data['Index'] !== null) { - $object->setIndex($data['Index']); + if (\array_key_exists('For', $data) && $data['For'] !== null) { + $object->setFor($data['For']); } - elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { - $object->setIndex(null); + elseif (\array_key_exists('For', $data) && $data['For'] === null) { + $object->setFor(null); } return $object; } @@ -105,14 +103,12 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('index') && null !== $object->getIndex()) { - $data['Index'] = $object->getIndex(); - } + $data['For'] = $object->getFor(); return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\TaskVersion::class => false]; + return [\Docker\API\Model\ImageManifestSummaryAttestationData::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ImageManifestSummaryImageDataNormalizer.php b/generated/Normalizer/ImageManifestSummaryImageDataNormalizer.php new file mode 100644 index 000000000..002eb73f0 --- /dev/null +++ b/generated/Normalizer/ImageManifestSummaryImageDataNormalizer.php @@ -0,0 +1,158 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ImageManifestSummaryImageDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageManifestSummaryImageData::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageManifestSummaryImageData::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageManifestSummaryImageData(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Platform', $data) && $data['Platform'] !== null) { + $object->setPlatform($this->denormalizer->denormalize($data['Platform'], \Docker\API\Model\OCIPlatform::class, 'json', $context)); + } + elseif (\array_key_exists('Platform', $data) && $data['Platform'] === null) { + $object->setPlatform(null); + } + if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { + $values = []; + foreach ($data['Containers'] as $value) { + $values[] = $value; + } + $object->setContainers($values); + } + elseif (\array_key_exists('Containers', $data) && $data['Containers'] === null) { + $object->setContainers(null); + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($this->denormalizer->denormalize($data['Size'], \Docker\API\Model\ImageManifestSummaryImageDataSize::class, 'json', $context)); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Platform'] = $this->normalizer->normalize($object->getPlatform(), 'json', $context); + $values = []; + foreach ($object->getContainers() as $value) { + $values[] = $value; + } + $data['Containers'] = $values; + $data['Size'] = $this->normalizer->normalize($object->getSize(), 'json', $context); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageManifestSummaryImageData::class => false]; + } + } +} else { + class ImageManifestSummaryImageDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageManifestSummaryImageData::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageManifestSummaryImageData::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageManifestSummaryImageData(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Platform', $data) && $data['Platform'] !== null) { + $object->setPlatform($this->denormalizer->denormalize($data['Platform'], \Docker\API\Model\OCIPlatform::class, 'json', $context)); + } + elseif (\array_key_exists('Platform', $data) && $data['Platform'] === null) { + $object->setPlatform(null); + } + if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { + $values = []; + foreach ($data['Containers'] as $value) { + $values[] = $value; + } + $object->setContainers($values); + } + elseif (\array_key_exists('Containers', $data) && $data['Containers'] === null) { + $object->setContainers(null); + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($this->denormalizer->denormalize($data['Size'], \Docker\API\Model\ImageManifestSummaryImageDataSize::class, 'json', $context)); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Platform'] = $this->normalizer->normalize($object->getPlatform(), 'json', $context); + $values = []; + foreach ($object->getContainers() as $value) { + $values[] = $value; + } + $data['Containers'] = $values; + $data['Size'] = $this->normalizer->normalize($object->getSize(), 'json', $context); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageManifestSummaryImageData::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ImageManifestSummaryImageDataSizeNormalizer.php b/generated/Normalizer/ImageManifestSummaryImageDataSizeNormalizer.php new file mode 100644 index 000000000..3167d37a4 --- /dev/null +++ b/generated/Normalizer/ImageManifestSummaryImageDataSizeNormalizer.php @@ -0,0 +1,114 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ImageManifestSummaryImageDataSizeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageManifestSummaryImageDataSize::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageManifestSummaryImageDataSize::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageManifestSummaryImageDataSize(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Unpacked', $data) && $data['Unpacked'] !== null) { + $object->setUnpacked($data['Unpacked']); + } + elseif (\array_key_exists('Unpacked', $data) && $data['Unpacked'] === null) { + $object->setUnpacked(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Unpacked'] = $object->getUnpacked(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageManifestSummaryImageDataSize::class => false]; + } + } +} else { + class ImageManifestSummaryImageDataSizeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageManifestSummaryImageDataSize::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageManifestSummaryImageDataSize::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageManifestSummaryImageDataSize(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Unpacked', $data) && $data['Unpacked'] !== null) { + $object->setUnpacked($data['Unpacked']); + } + elseif (\array_key_exists('Unpacked', $data) && $data['Unpacked'] === null) { + $object->setUnpacked(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Unpacked'] = $object->getUnpacked(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageManifestSummaryImageDataSize::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ImageManifestSummaryNormalizer.php b/generated/Normalizer/ImageManifestSummaryNormalizer.php new file mode 100644 index 000000000..dac1e2fd6 --- /dev/null +++ b/generated/Normalizer/ImageManifestSummaryNormalizer.php @@ -0,0 +1,206 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ImageManifestSummaryNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageManifestSummary::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageManifestSummary::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageManifestSummary(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Descriptor', $data) && $data['Descriptor'] !== null) { + $object->setDescriptor($this->denormalizer->denormalize($data['Descriptor'], \Docker\API\Model\OCIDescriptor::class, 'json', $context)); + } + elseif (\array_key_exists('Descriptor', $data) && $data['Descriptor'] === null) { + $object->setDescriptor(null); + } + if (\array_key_exists('Available', $data) && $data['Available'] !== null) { + $object->setAvailable($data['Available']); + } + elseif (\array_key_exists('Available', $data) && $data['Available'] === null) { + $object->setAvailable(null); + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($this->denormalizer->denormalize($data['Size'], \Docker\API\Model\ImageManifestSummarySize::class, 'json', $context)); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + if (\array_key_exists('Kind', $data) && $data['Kind'] !== null) { + $object->setKind($data['Kind']); + } + elseif (\array_key_exists('Kind', $data) && $data['Kind'] === null) { + $object->setKind(null); + } + if (\array_key_exists('ImageData', $data) && $data['ImageData'] !== null) { + $object->setImageData($this->denormalizer->denormalize($data['ImageData'], \Docker\API\Model\ImageManifestSummaryImageData::class, 'json', $context)); + } + elseif (\array_key_exists('ImageData', $data) && $data['ImageData'] === null) { + $object->setImageData(null); + } + if (\array_key_exists('AttestationData', $data) && $data['AttestationData'] !== null) { + $object->setAttestationData($this->denormalizer->denormalize($data['AttestationData'], \Docker\API\Model\ImageManifestSummaryAttestationData::class, 'json', $context)); + } + elseif (\array_key_exists('AttestationData', $data) && $data['AttestationData'] === null) { + $object->setAttestationData(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['ID'] = $object->getID(); + $data['Descriptor'] = $this->normalizer->normalize($object->getDescriptor(), 'json', $context); + $data['Available'] = $object->getAvailable(); + $data['Size'] = $this->normalizer->normalize($object->getSize(), 'json', $context); + $data['Kind'] = $object->getKind(); + if ($object->isInitialized('imageData') && null !== $object->getImageData()) { + $data['ImageData'] = $this->normalizer->normalize($object->getImageData(), 'json', $context); + } + if ($object->isInitialized('attestationData') && null !== $object->getAttestationData()) { + $data['AttestationData'] = $this->normalizer->normalize($object->getAttestationData(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageManifestSummary::class => false]; + } + } +} else { + class ImageManifestSummaryNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageManifestSummary::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageManifestSummary::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageManifestSummary(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Descriptor', $data) && $data['Descriptor'] !== null) { + $object->setDescriptor($this->denormalizer->denormalize($data['Descriptor'], \Docker\API\Model\OCIDescriptor::class, 'json', $context)); + } + elseif (\array_key_exists('Descriptor', $data) && $data['Descriptor'] === null) { + $object->setDescriptor(null); + } + if (\array_key_exists('Available', $data) && $data['Available'] !== null) { + $object->setAvailable($data['Available']); + } + elseif (\array_key_exists('Available', $data) && $data['Available'] === null) { + $object->setAvailable(null); + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($this->denormalizer->denormalize($data['Size'], \Docker\API\Model\ImageManifestSummarySize::class, 'json', $context)); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + if (\array_key_exists('Kind', $data) && $data['Kind'] !== null) { + $object->setKind($data['Kind']); + } + elseif (\array_key_exists('Kind', $data) && $data['Kind'] === null) { + $object->setKind(null); + } + if (\array_key_exists('ImageData', $data) && $data['ImageData'] !== null) { + $object->setImageData($this->denormalizer->denormalize($data['ImageData'], \Docker\API\Model\ImageManifestSummaryImageData::class, 'json', $context)); + } + elseif (\array_key_exists('ImageData', $data) && $data['ImageData'] === null) { + $object->setImageData(null); + } + if (\array_key_exists('AttestationData', $data) && $data['AttestationData'] !== null) { + $object->setAttestationData($this->denormalizer->denormalize($data['AttestationData'], \Docker\API\Model\ImageManifestSummaryAttestationData::class, 'json', $context)); + } + elseif (\array_key_exists('AttestationData', $data) && $data['AttestationData'] === null) { + $object->setAttestationData(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['ID'] = $object->getID(); + $data['Descriptor'] = $this->normalizer->normalize($object->getDescriptor(), 'json', $context); + $data['Available'] = $object->getAvailable(); + $data['Size'] = $this->normalizer->normalize($object->getSize(), 'json', $context); + $data['Kind'] = $object->getKind(); + if ($object->isInitialized('imageData') && null !== $object->getImageData()) { + $data['ImageData'] = $this->normalizer->normalize($object->getImageData(), 'json', $context); + } + if ($object->isInitialized('attestationData') && null !== $object->getAttestationData()) { + $data['AttestationData'] = $this->normalizer->normalize($object->getAttestationData(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageManifestSummary::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ImageManifestSummarySizeNormalizer.php b/generated/Normalizer/ImageManifestSummarySizeNormalizer.php new file mode 100644 index 000000000..3a532ad37 --- /dev/null +++ b/generated/Normalizer/ImageManifestSummarySizeNormalizer.php @@ -0,0 +1,128 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ImageManifestSummarySizeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageManifestSummarySize::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageManifestSummarySize::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageManifestSummarySize(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Total', $data) && $data['Total'] !== null) { + $object->setTotal($data['Total']); + } + elseif (\array_key_exists('Total', $data) && $data['Total'] === null) { + $object->setTotal(null); + } + if (\array_key_exists('Content', $data) && $data['Content'] !== null) { + $object->setContent($data['Content']); + } + elseif (\array_key_exists('Content', $data) && $data['Content'] === null) { + $object->setContent(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Total'] = $object->getTotal(); + $data['Content'] = $object->getContent(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageManifestSummarySize::class => false]; + } + } +} else { + class ImageManifestSummarySizeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ImageManifestSummarySize::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ImageManifestSummarySize::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ImageManifestSummarySize(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Total', $data) && $data['Total'] !== null) { + $object->setTotal($data['Total']); + } + elseif (\array_key_exists('Total', $data) && $data['Total'] === null) { + $object->setTotal(null); + } + if (\array_key_exists('Content', $data) && $data['Content'] !== null) { + $object->setContent($data['Content']); + } + elseif (\array_key_exists('Content', $data) && $data['Content'] === null) { + $object->setContent(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Total'] = $object->getTotal(); + $data['Content'] = $object->getContent(); + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ImageManifestSummarySize::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ImageSummaryNormalizer.php b/generated/Normalizer/ImageSummaryNormalizer.php index 5d5cb2e8d..e9c5e8121 100644 --- a/generated/Normalizer/ImageSummaryNormalizer.php +++ b/generated/Normalizer/ImageSummaryNormalizer.php @@ -112,6 +112,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Containers', $data) && $data['Containers'] === null) { $object->setContainers(null); } + if (\array_key_exists('Manifests', $data) && $data['Manifests'] !== null) { + $values_3 = []; + foreach ($data['Manifests'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\ImageManifestSummary::class, 'json', $context); + } + $object->setManifests($values_3); + } + elseif (\array_key_exists('Manifests', $data) && $data['Manifests'] === null) { + $object->setManifests(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -132,13 +142,22 @@ public function normalize(mixed $object, string $format = null, array $context = $data['Created'] = $object->getCreated(); $data['Size'] = $object->getSize(); $data['SharedSize'] = $object->getSharedSize(); - $data['VirtualSize'] = $object->getVirtualSize(); + if ($object->isInitialized('virtualSize') && null !== $object->getVirtualSize()) { + $data['VirtualSize'] = $object->getVirtualSize(); + } $values_2 = []; foreach ($object->getLabels() as $key => $value_2) { $values_2[$key] = $value_2; } $data['Labels'] = $values_2; $data['Containers'] = $object->getContainers(); + if ($object->isInitialized('manifests') && null !== $object->getManifests()) { + $values_3 = []; + foreach ($object->getManifests() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['Manifests'] = $values_3; + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -248,6 +267,16 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Containers', $data) && $data['Containers'] === null) { $object->setContainers(null); } + if (\array_key_exists('Manifests', $data) && $data['Manifests'] !== null) { + $values_3 = []; + foreach ($data['Manifests'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\ImageManifestSummary::class, 'json', $context); + } + $object->setManifests($values_3); + } + elseif (\array_key_exists('Manifests', $data) && $data['Manifests'] === null) { + $object->setManifests(null); + } return $object; } /** @@ -271,13 +300,22 @@ public function normalize($object, $format = null, array $context = []) $data['Created'] = $object->getCreated(); $data['Size'] = $object->getSize(); $data['SharedSize'] = $object->getSharedSize(); - $data['VirtualSize'] = $object->getVirtualSize(); + if ($object->isInitialized('virtualSize') && null !== $object->getVirtualSize()) { + $data['VirtualSize'] = $object->getVirtualSize(); + } $values_2 = []; foreach ($object->getLabels() as $key => $value_2) { $values_2[$key] = $value_2; } $data['Labels'] = $values_2; $data['Containers'] = $object->getContainers(); + if ($object->isInitialized('manifests') && null !== $object->getManifests()) { + $values_3 = []; + foreach ($object->getManifests() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['Manifests'] = $values_3; + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/ImagesNameHistoryGetResponse200ItemNormalizer.php b/generated/Normalizer/ImagesNameHistoryGetResponse200ItemNormalizer.php index 4351b8ecd..f15086f38 100644 --- a/generated/Normalizer/ImagesNameHistoryGetResponse200ItemNormalizer.php +++ b/generated/Normalizer/ImagesNameHistoryGetResponse200ItemNormalizer.php @@ -85,28 +85,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('id') && null !== $object->getId()) { - $data['Id'] = $object->getId(); - } - if ($object->isInitialized('created') && null !== $object->getCreated()) { - $data['Created'] = $object->getCreated(); - } - if ($object->isInitialized('createdBy') && null !== $object->getCreatedBy()) { - $data['CreatedBy'] = $object->getCreatedBy(); - } - if ($object->isInitialized('tags') && null !== $object->getTags()) { - $values = []; - foreach ($object->getTags() as $value) { - $values[] = $value; - } - $data['Tags'] = $values; - } - if ($object->isInitialized('size') && null !== $object->getSize()) { - $data['Size'] = $object->getSize(); - } - if ($object->isInitialized('comment') && null !== $object->getComment()) { - $data['Comment'] = $object->getComment(); - } + $data['Id'] = $object->getId(); + $data['Created'] = $object->getCreated(); + $data['CreatedBy'] = $object->getCreatedBy(); + $values = []; + foreach ($object->getTags() as $value) { + $values[] = $value; + } + $data['Tags'] = $values; + $data['Size'] = $object->getSize(); + $data['Comment'] = $object->getComment(); return $data; } public function getSupportedTypes(?string $format = null): array @@ -192,28 +180,16 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('id') && null !== $object->getId()) { - $data['Id'] = $object->getId(); - } - if ($object->isInitialized('created') && null !== $object->getCreated()) { - $data['Created'] = $object->getCreated(); - } - if ($object->isInitialized('createdBy') && null !== $object->getCreatedBy()) { - $data['CreatedBy'] = $object->getCreatedBy(); - } - if ($object->isInitialized('tags') && null !== $object->getTags()) { - $values = []; - foreach ($object->getTags() as $value) { - $values[] = $value; - } - $data['Tags'] = $values; - } - if ($object->isInitialized('size') && null !== $object->getSize()) { - $data['Size'] = $object->getSize(); - } - if ($object->isInitialized('comment') && null !== $object->getComment()) { - $data['Comment'] = $object->getComment(); - } + $data['Id'] = $object->getId(); + $data['Created'] = $object->getCreated(); + $data['CreatedBy'] = $object->getCreatedBy(); + $values = []; + foreach ($object->getTags() as $value) { + $values[] = $value; + } + $data['Tags'] = $values; + $data['Size'] = $object->getSize(); + $data['Comment'] = $object->getComment(); return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/ImagesPrunePostResponse200Normalizer.php b/generated/Normalizer/ImagesPrunePostResponse200Normalizer.php index 16486053e..c17efb0a1 100644 --- a/generated/Normalizer/ImagesPrunePostResponse200Normalizer.php +++ b/generated/Normalizer/ImagesPrunePostResponse200Normalizer.php @@ -43,7 +43,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (\array_key_exists('ImagesDeleted', $data) && $data['ImagesDeleted'] !== null) { $values = []; foreach ($data['ImagesDeleted'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ImageDeleteResponse::class, 'json', $context); + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ImageDeleteResponseItem::class, 'json', $context); } $object->setImagesDeleted($values); } @@ -111,7 +111,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (\array_key_exists('ImagesDeleted', $data) && $data['ImagesDeleted'] !== null) { $values = []; foreach ($data['ImagesDeleted'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ImageDeleteResponse::class, 'json', $context); + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\ImageDeleteResponseItem::class, 'json', $context); } $object->setImagesDeleted($values); } diff --git a/generated/Normalizer/InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer.php b/generated/Normalizer/IndexInfoNormalizer.php similarity index 87% rename from generated/Normalizer/InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer.php rename to generated/Normalizer/IndexInfoNormalizer.php index 3f9d3d324..3d6492dd1 100644 --- a/generated/Normalizer/InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer.php +++ b/generated/Normalizer/IndexInfoNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class IndexInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer implements Deno use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class; + return $type === \Docker\API\Model\IndexInfo::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class; + return is_object($data) && get_class($data) === \Docker\API\Model\IndexInfo::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,10 +36,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem(); + $object = new \Docker\API\Model\IndexInfo(); if (null === $data || false === \is_array($data)) { return $object; } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } if (\array_key_exists('Mirrors', $data) && $data['Mirrors'] !== null) { $values = []; foreach ($data['Mirrors'] as $value) { @@ -50,11 +56,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Mirrors', $data) && $data['Mirrors'] === null) { $object->setMirrors(null); } - if (\array_key_exists('Name', $data) && $data['Name'] !== null) { - $object->setName($data['Name']); + if (\array_key_exists('Secure', $data) && $data['Secure'] !== null) { + $object->setSecure($data['Secure']); } - elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { - $object->setName(null); + elseif (\array_key_exists('Secure', $data) && $data['Secure'] === null) { + $object->setSecure(null); } if (\array_key_exists('Official', $data) && $data['Official'] !== null) { $object->setOfficial($data['Official']); @@ -62,17 +68,14 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Official', $data) && $data['Official'] === null) { $object->setOfficial(null); } - if (\array_key_exists('Secure', $data) && $data['Secure'] !== null) { - $object->setSecure($data['Secure']); - } - elseif (\array_key_exists('Secure', $data) && $data['Secure'] === null) { - $object->setSecure(null); - } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } if ($object->isInitialized('mirrors') && null !== $object->getMirrors()) { $values = []; foreach ($object->getMirrors() as $value) { @@ -80,24 +83,21 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['Mirrors'] = $values; } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['Name'] = $object->getName(); + if ($object->isInitialized('secure') && null !== $object->getSecure()) { + $data['Secure'] = $object->getSecure(); } if ($object->isInitialized('official') && null !== $object->getOfficial()) { $data['Official'] = $object->getOfficial(); } - if ($object->isInitialized('secure') && null !== $object->getSecure()) { - $data['Secure'] = $object->getSecure(); - } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class => false]; + return [\Docker\API\Model\IndexInfo::class => false]; } } } else { - class InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class IndexInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -105,11 +105,11 @@ class InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer implements Deno use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class; + return $type === \Docker\API\Model\IndexInfo::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class; + return is_object($data) && get_class($data) === \Docker\API\Model\IndexInfo::class; } /** * @return mixed @@ -122,10 +122,16 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem(); + $object = new \Docker\API\Model\IndexInfo(); if (null === $data || false === \is_array($data)) { return $object; } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } if (\array_key_exists('Mirrors', $data) && $data['Mirrors'] !== null) { $values = []; foreach ($data['Mirrors'] as $value) { @@ -136,11 +142,11 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Mirrors', $data) && $data['Mirrors'] === null) { $object->setMirrors(null); } - if (\array_key_exists('Name', $data) && $data['Name'] !== null) { - $object->setName($data['Name']); + if (\array_key_exists('Secure', $data) && $data['Secure'] !== null) { + $object->setSecure($data['Secure']); } - elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { - $object->setName(null); + elseif (\array_key_exists('Secure', $data) && $data['Secure'] === null) { + $object->setSecure(null); } if (\array_key_exists('Official', $data) && $data['Official'] !== null) { $object->setOfficial($data['Official']); @@ -148,12 +154,6 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Official', $data) && $data['Official'] === null) { $object->setOfficial(null); } - if (\array_key_exists('Secure', $data) && $data['Secure'] !== null) { - $object->setSecure($data['Secure']); - } - elseif (\array_key_exists('Secure', $data) && $data['Secure'] === null) { - $object->setSecure(null); - } return $object; } /** @@ -162,6 +162,9 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } if ($object->isInitialized('mirrors') && null !== $object->getMirrors()) { $values = []; foreach ($object->getMirrors() as $value) { @@ -169,20 +172,17 @@ public function normalize($object, $format = null, array $context = []) } $data['Mirrors'] = $values; } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['Name'] = $object->getName(); + if ($object->isInitialized('secure') && null !== $object->getSecure()) { + $data['Secure'] = $object->getSecure(); } if ($object->isInitialized('official') && null !== $object->getOfficial()) { $data['Official'] = $object->getOfficial(); } - if ($object->isInitialized('secure') && null !== $object->getSecure()) { - $data['Secure'] = $object->getSecure(); - } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class => false]; + return [\Docker\API\Model\IndexInfo::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/InfoGetResponse200RegistryConfigNormalizer.php b/generated/Normalizer/InfoGetResponse200RegistryConfigNormalizer.php deleted file mode 100644 index cad98f2fa..000000000 --- a/generated/Normalizer/InfoGetResponse200RegistryConfigNormalizer.php +++ /dev/null @@ -1,168 +0,0 @@ -= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InfoGetResponse200RegistryConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool - { - return $type === \Docker\API\Model\InfoGetResponse200RegistryConfig::class; - } - public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool - { - return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200RegistryConfig::class; - } - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \Docker\API\Model\InfoGetResponse200RegistryConfig(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('IndexConfigs', $data) && $data['IndexConfigs'] !== null) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['IndexConfigs'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class, 'json', $context); - } - $object->setIndexConfigs($values); - } - elseif (\array_key_exists('IndexConfigs', $data) && $data['IndexConfigs'] === null) { - $object->setIndexConfigs(null); - } - if (\array_key_exists('InsecureRegistryCIDRs', $data) && $data['InsecureRegistryCIDRs'] !== null) { - $values_1 = []; - foreach ($data['InsecureRegistryCIDRs'] as $value_1) { - $values_1[] = $value_1; - } - $object->setInsecureRegistryCIDRs($values_1); - } - elseif (\array_key_exists('InsecureRegistryCIDRs', $data) && $data['InsecureRegistryCIDRs'] === null) { - $object->setInsecureRegistryCIDRs(null); - } - return $object; - } - public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('indexConfigs') && null !== $object->getIndexConfigs()) { - $values = []; - foreach ($object->getIndexConfigs() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['IndexConfigs'] = $values; - } - if ($object->isInitialized('insecureRegistryCIDRs') && null !== $object->getInsecureRegistryCIDRs()) { - $values_1 = []; - foreach ($object->getInsecureRegistryCIDRs() as $value_1) { - $values_1[] = $value_1; - } - $data['InsecureRegistryCIDRs'] = $values_1; - } - return $data; - } - public function getSupportedTypes(?string $format = null): array - { - return [\Docker\API\Model\InfoGetResponse200RegistryConfig::class => false]; - } - } -} else { - class InfoGetResponse200RegistryConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool - { - return $type === \Docker\API\Model\InfoGetResponse200RegistryConfig::class; - } - public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool - { - return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200RegistryConfig::class; - } - /** - * @return mixed - */ - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \Docker\API\Model\InfoGetResponse200RegistryConfig(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('IndexConfigs', $data) && $data['IndexConfigs'] !== null) { - $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['IndexConfigs'] as $key => $value) { - $values[$key] = $this->denormalizer->denormalize($value, \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class, 'json', $context); - } - $object->setIndexConfigs($values); - } - elseif (\array_key_exists('IndexConfigs', $data) && $data['IndexConfigs'] === null) { - $object->setIndexConfigs(null); - } - if (\array_key_exists('InsecureRegistryCIDRs', $data) && $data['InsecureRegistryCIDRs'] !== null) { - $values_1 = []; - foreach ($data['InsecureRegistryCIDRs'] as $value_1) { - $values_1[] = $value_1; - } - $object->setInsecureRegistryCIDRs($values_1); - } - elseif (\array_key_exists('InsecureRegistryCIDRs', $data) && $data['InsecureRegistryCIDRs'] === null) { - $object->setInsecureRegistryCIDRs(null); - } - return $object; - } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('indexConfigs') && null !== $object->getIndexConfigs()) { - $values = []; - foreach ($object->getIndexConfigs() as $key => $value) { - $values[$key] = $this->normalizer->normalize($value, 'json', $context); - } - $data['IndexConfigs'] = $values; - } - if ($object->isInitialized('insecureRegistryCIDRs') && null !== $object->getInsecureRegistryCIDRs()) { - $values_1 = []; - foreach ($object->getInsecureRegistryCIDRs() as $value_1) { - $values_1[] = $value_1; - } - $data['InsecureRegistryCIDRs'] = $values_1; - } - return $data; - } - public function getSupportedTypes(?string $format = null): array - { - return [\Docker\API\Model\InfoGetResponse200RegistryConfig::class => false]; - } - } -} \ No newline at end of file diff --git a/generated/Normalizer/JaneObjectNormalizer.php b/generated/Normalizer/JaneObjectNormalizer.php index 8a390e5aa..9fef19913 100644 --- a/generated/Normalizer/JaneObjectNormalizer.php +++ b/generated/Normalizer/JaneObjectNormalizer.php @@ -26,6 +26,8 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\DeviceMapping::class => \Docker\API\Normalizer\DeviceMappingNormalizer::class, + \Docker\API\Model\DeviceRequest::class => \Docker\API\Normalizer\DeviceRequestNormalizer::class, + \Docker\API\Model\ThrottleDevice::class => \Docker\API\Normalizer\ThrottleDeviceNormalizer::class, \Docker\API\Model\Mount::class => \Docker\API\Normalizer\MountNormalizer::class, @@ -46,25 +48,47 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\ResourcesUlimitsItem::class => \Docker\API\Normalizer\ResourcesUlimitsItemNormalizer::class, + \Docker\API\Model\Limit::class => \Docker\API\Normalizer\LimitNormalizer::class, + + \Docker\API\Model\ResourceObject::class => \Docker\API\Normalizer\ResourceObjectNormalizer::class, + + \Docker\API\Model\GenericResourcesItem::class => \Docker\API\Normalizer\GenericResourcesItemNormalizer::class, + + \Docker\API\Model\GenericResourcesItemNamedResourceSpec::class => \Docker\API\Normalizer\GenericResourcesItemNamedResourceSpecNormalizer::class, + + \Docker\API\Model\GenericResourcesItemDiscreteResourceSpec::class => \Docker\API\Normalizer\GenericResourcesItemDiscreteResourceSpecNormalizer::class, + + \Docker\API\Model\HealthConfig::class => \Docker\API\Normalizer\HealthConfigNormalizer::class, + + \Docker\API\Model\Health::class => \Docker\API\Normalizer\HealthNormalizer::class, + + \Docker\API\Model\HealthcheckResult::class => \Docker\API\Normalizer\HealthcheckResultNormalizer::class, + \Docker\API\Model\HostConfig::class => \Docker\API\Normalizer\HostConfigNormalizer::class, \Docker\API\Model\HostConfigLogConfig::class => \Docker\API\Normalizer\HostConfigLogConfigNormalizer::class, - \Docker\API\Model\HostConfigPortBindingsItem::class => \Docker\API\Normalizer\HostConfigPortBindingsItemNormalizer::class, + \Docker\API\Model\ContainerConfig::class => \Docker\API\Normalizer\ContainerConfigNormalizer::class, - \Docker\API\Model\Config::class => \Docker\API\Normalizer\ConfigNormalizer::class, + \Docker\API\Model\ImageConfig::class => \Docker\API\Normalizer\ImageConfigNormalizer::class, + + \Docker\API\Model\NetworkingConfig::class => \Docker\API\Normalizer\NetworkingConfigNormalizer::class, - \Docker\API\Model\ConfigHealthcheck::class => \Docker\API\Normalizer\ConfigHealthcheckNormalizer::class, + \Docker\API\Model\NetworkSettings::class => \Docker\API\Normalizer\NetworkSettingsNormalizer::class, - \Docker\API\Model\ConfigVolumes::class => \Docker\API\Normalizer\ConfigVolumesNormalizer::class, + \Docker\API\Model\Address::class => \Docker\API\Normalizer\AddressNormalizer::class, - \Docker\API\Model\NetworkConfig::class => \Docker\API\Normalizer\NetworkConfigNormalizer::class, + \Docker\API\Model\PortBinding::class => \Docker\API\Normalizer\PortBindingNormalizer::class, - \Docker\API\Model\GraphDriver::class => \Docker\API\Normalizer\GraphDriverNormalizer::class, + \Docker\API\Model\DriverData::class => \Docker\API\Normalizer\DriverDataNormalizer::class, - \Docker\API\Model\Image::class => \Docker\API\Normalizer\ImageNormalizer::class, + \Docker\API\Model\FilesystemChange::class => \Docker\API\Normalizer\FilesystemChangeNormalizer::class, - \Docker\API\Model\ImageRootFS::class => \Docker\API\Normalizer\ImageRootFSNormalizer::class, + \Docker\API\Model\ImageInspect::class => \Docker\API\Normalizer\ImageInspectNormalizer::class, + + \Docker\API\Model\ImageInspectRootFS::class => \Docker\API\Normalizer\ImageInspectRootFSNormalizer::class, + + \Docker\API\Model\ImageInspectMetadata::class => \Docker\API\Normalizer\ImageInspectMetadataNormalizer::class, \Docker\API\Model\ImageSummary::class => \Docker\API\Normalizer\ImageSummaryNormalizer::class, @@ -76,14 +100,30 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\VolumeUsageData::class => \Docker\API\Normalizer\VolumeUsageDataNormalizer::class, + \Docker\API\Model\VolumeCreateOptions::class => \Docker\API\Normalizer\VolumeCreateOptionsNormalizer::class, + + \Docker\API\Model\VolumeListResponse::class => \Docker\API\Normalizer\VolumeListResponseNormalizer::class, + \Docker\API\Model\Network::class => \Docker\API\Normalizer\NetworkNormalizer::class, + \Docker\API\Model\ConfigReference::class => \Docker\API\Normalizer\ConfigReferenceNormalizer::class, + \Docker\API\Model\IPAM::class => \Docker\API\Normalizer\IPAMNormalizer::class, + \Docker\API\Model\IPAMConfig::class => \Docker\API\Normalizer\IPAMConfigNormalizer::class, + \Docker\API\Model\NetworkContainer::class => \Docker\API\Normalizer\NetworkContainerNormalizer::class, + \Docker\API\Model\PeerInfo::class => \Docker\API\Normalizer\PeerInfoNormalizer::class, + + \Docker\API\Model\NetworkCreateResponse::class => \Docker\API\Normalizer\NetworkCreateResponseNormalizer::class, + \Docker\API\Model\BuildInfo::class => \Docker\API\Normalizer\BuildInfoNormalizer::class, + \Docker\API\Model\BuildCache::class => \Docker\API\Normalizer\BuildCacheNormalizer::class, + + \Docker\API\Model\ImageID::class => \Docker\API\Normalizer\ImageIDNormalizer::class, + \Docker\API\Model\CreateImageInfo::class => \Docker\API\Normalizer\CreateImageInfoNormalizer::class, \Docker\API\Model\PushImageInfo::class => \Docker\API\Normalizer\PushImageInfoNormalizer::class, @@ -98,7 +138,7 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\EndpointSettings::class => \Docker\API\Normalizer\EndpointSettingsNormalizer::class, - \Docker\API\Model\EndpointSettingsIPAMConfig::class => \Docker\API\Normalizer\EndpointSettingsIPAMConfigNormalizer::class, + \Docker\API\Model\EndpointIPAMConfig::class => \Docker\API\Normalizer\EndpointIPAMConfigNormalizer::class, \Docker\API\Model\PluginMount::class => \Docker\API\Normalizer\PluginMountNormalizer::class, @@ -108,6 +148,8 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\PluginInterfaceType::class => \Docker\API\Normalizer\PluginInterfaceTypeNormalizer::class, + \Docker\API\Model\PluginPrivilege::class => \Docker\API\Normalizer\PluginPrivilegeNormalizer::class, + \Docker\API\Model\Plugin::class => \Docker\API\Normalizer\PluginNormalizer::class, \Docker\API\Model\PluginSettings::class => \Docker\API\Normalizer\PluginSettingsNormalizer::class, @@ -126,21 +168,25 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\PluginConfigRootfs::class => \Docker\API\Normalizer\PluginConfigRootfsNormalizer::class, + \Docker\API\Model\ObjectVersion::class => \Docker\API\Normalizer\ObjectVersionNormalizer::class, + \Docker\API\Model\NodeSpec::class => \Docker\API\Normalizer\NodeSpecNormalizer::class, \Docker\API\Model\Node::class => \Docker\API\Normalizer\NodeNormalizer::class, - \Docker\API\Model\NodeVersion::class => \Docker\API\Normalizer\NodeVersionNormalizer::class, - \Docker\API\Model\NodeDescription::class => \Docker\API\Normalizer\NodeDescriptionNormalizer::class, - \Docker\API\Model\NodeDescriptionPlatform::class => \Docker\API\Normalizer\NodeDescriptionPlatformNormalizer::class, + \Docker\API\Model\Platform::class => \Docker\API\Normalizer\PlatformNormalizer::class, - \Docker\API\Model\NodeDescriptionResources::class => \Docker\API\Normalizer\NodeDescriptionResourcesNormalizer::class, + \Docker\API\Model\EngineDescription::class => \Docker\API\Normalizer\EngineDescriptionNormalizer::class, - \Docker\API\Model\NodeDescriptionEngine::class => \Docker\API\Normalizer\NodeDescriptionEngineNormalizer::class, + \Docker\API\Model\EngineDescriptionPluginsItem::class => \Docker\API\Normalizer\EngineDescriptionPluginsItemNormalizer::class, - \Docker\API\Model\NodeDescriptionEnginePluginsItem::class => \Docker\API\Normalizer\NodeDescriptionEnginePluginsItemNormalizer::class, + \Docker\API\Model\TLSInfo::class => \Docker\API\Normalizer\TLSInfoNormalizer::class, + + \Docker\API\Model\NodeStatus::class => \Docker\API\Normalizer\NodeStatusNormalizer::class, + + \Docker\API\Model\ManagerStatus::class => \Docker\API\Normalizer\ManagerStatusNormalizer::class, \Docker\API\Model\SwarmSpec::class => \Docker\API\Normalizer\SwarmSpecNormalizer::class, @@ -162,35 +208,59 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\ClusterInfo::class => \Docker\API\Normalizer\ClusterInfoNormalizer::class, - \Docker\API\Model\ClusterInfoVersion::class => \Docker\API\Normalizer\ClusterInfoVersionNormalizer::class, + \Docker\API\Model\JoinTokens::class => \Docker\API\Normalizer\JoinTokensNormalizer::class, + + \Docker\API\Model\Swarm::class => \Docker\API\Normalizer\SwarmNormalizer::class, \Docker\API\Model\TaskSpec::class => \Docker\API\Normalizer\TaskSpecNormalizer::class, + \Docker\API\Model\TaskSpecPluginSpec::class => \Docker\API\Normalizer\TaskSpecPluginSpecNormalizer::class, + \Docker\API\Model\TaskSpecContainerSpec::class => \Docker\API\Normalizer\TaskSpecContainerSpecNormalizer::class, + \Docker\API\Model\TaskSpecContainerSpecPrivileges::class => \Docker\API\Normalizer\TaskSpecContainerSpecPrivilegesNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpecPrivilegesCredentialSpec::class => \Docker\API\Normalizer\TaskSpecContainerSpecPrivilegesCredentialSpecNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpecPrivilegesSELinuxContext::class => \Docker\API\Normalizer\TaskSpecContainerSpecPrivilegesSELinuxContextNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpecPrivilegesSeccomp::class => \Docker\API\Normalizer\TaskSpecContainerSpecPrivilegesSeccompNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpecPrivilegesAppArmor::class => \Docker\API\Normalizer\TaskSpecContainerSpecPrivilegesAppArmorNormalizer::class, + \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class => \Docker\API\Normalizer\TaskSpecContainerSpecDNSConfigNormalizer::class, - \Docker\API\Model\TaskSpecResources::class => \Docker\API\Normalizer\TaskSpecResourcesNormalizer::class, + \Docker\API\Model\TaskSpecContainerSpecSecretsItem::class => \Docker\API\Normalizer\TaskSpecContainerSpecSecretsItemNormalizer::class, - \Docker\API\Model\TaskSpecResourcesLimits::class => \Docker\API\Normalizer\TaskSpecResourcesLimitsNormalizer::class, + \Docker\API\Model\TaskSpecContainerSpecSecretsItemFile::class => \Docker\API\Normalizer\TaskSpecContainerSpecSecretsItemFileNormalizer::class, - \Docker\API\Model\TaskSpecResourcesReservations::class => \Docker\API\Normalizer\TaskSpecResourcesReservationsNormalizer::class, + \Docker\API\Model\TaskSpecContainerSpecConfigsItem::class => \Docker\API\Normalizer\TaskSpecContainerSpecConfigsItemNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpecConfigsItemFile::class => \Docker\API\Normalizer\TaskSpecContainerSpecConfigsItemFileNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpecUlimitsItem::class => \Docker\API\Normalizer\TaskSpecContainerSpecUlimitsItemNormalizer::class, + + \Docker\API\Model\TaskSpecNetworkAttachmentSpec::class => \Docker\API\Normalizer\TaskSpecNetworkAttachmentSpecNormalizer::class, + + \Docker\API\Model\TaskSpecResources::class => \Docker\API\Normalizer\TaskSpecResourcesNormalizer::class, \Docker\API\Model\TaskSpecRestartPolicy::class => \Docker\API\Normalizer\TaskSpecRestartPolicyNormalizer::class, \Docker\API\Model\TaskSpecPlacement::class => \Docker\API\Normalizer\TaskSpecPlacementNormalizer::class, - \Docker\API\Model\TaskSpecNetworksItem::class => \Docker\API\Normalizer\TaskSpecNetworksItemNormalizer::class, + \Docker\API\Model\TaskSpecPlacementPreferencesItem::class => \Docker\API\Normalizer\TaskSpecPlacementPreferencesItemNormalizer::class, + + \Docker\API\Model\TaskSpecPlacementPreferencesItemSpread::class => \Docker\API\Normalizer\TaskSpecPlacementPreferencesItemSpreadNormalizer::class, \Docker\API\Model\TaskSpecLogDriver::class => \Docker\API\Normalizer\TaskSpecLogDriverNormalizer::class, - \Docker\API\Model\Task::class => \Docker\API\Normalizer\TaskNormalizer::class, + \Docker\API\Model\ContainerStatus::class => \Docker\API\Normalizer\ContainerStatusNormalizer::class, - \Docker\API\Model\TaskVersion::class => \Docker\API\Normalizer\TaskVersionNormalizer::class, + \Docker\API\Model\PortStatus::class => \Docker\API\Normalizer\PortStatusNormalizer::class, \Docker\API\Model\TaskStatus::class => \Docker\API\Normalizer\TaskStatusNormalizer::class, - \Docker\API\Model\TaskStatusContainerStatus::class => \Docker\API\Normalizer\TaskStatusContainerStatusNormalizer::class, + \Docker\API\Model\Task::class => \Docker\API\Normalizer\TaskNormalizer::class, \Docker\API\Model\ServiceSpec::class => \Docker\API\Normalizer\ServiceSpecNormalizer::class, @@ -198,9 +268,11 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\ServiceSpecModeReplicated::class => \Docker\API\Normalizer\ServiceSpecModeReplicatedNormalizer::class, + \Docker\API\Model\ServiceSpecModeReplicatedJob::class => \Docker\API\Normalizer\ServiceSpecModeReplicatedJobNormalizer::class, + \Docker\API\Model\ServiceSpecUpdateConfig::class => \Docker\API\Normalizer\ServiceSpecUpdateConfigNormalizer::class, - \Docker\API\Model\ServiceSpecNetworksItem::class => \Docker\API\Normalizer\ServiceSpecNetworksItemNormalizer::class, + \Docker\API\Model\ServiceSpecRollbackConfig::class => \Docker\API\Normalizer\ServiceSpecRollbackConfigNormalizer::class, \Docker\API\Model\EndpointPortConfig::class => \Docker\API\Normalizer\EndpointPortConfigNormalizer::class, @@ -208,73 +280,133 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\Service::class => \Docker\API\Normalizer\ServiceNormalizer::class, - \Docker\API\Model\ServiceVersion::class => \Docker\API\Normalizer\ServiceVersionNormalizer::class, - \Docker\API\Model\ServiceEndpoint::class => \Docker\API\Normalizer\ServiceEndpointNormalizer::class, \Docker\API\Model\ServiceEndpointVirtualIPsItem::class => \Docker\API\Normalizer\ServiceEndpointVirtualIPsItemNormalizer::class, \Docker\API\Model\ServiceUpdateStatus::class => \Docker\API\Normalizer\ServiceUpdateStatusNormalizer::class, - \Docker\API\Model\ImageDeleteResponse::class => \Docker\API\Normalizer\ImageDeleteResponseNormalizer::class, + \Docker\API\Model\ServiceServiceStatus::class => \Docker\API\Normalizer\ServiceServiceStatusNormalizer::class, + + \Docker\API\Model\ServiceJobStatus::class => \Docker\API\Normalizer\ServiceJobStatusNormalizer::class, + + \Docker\API\Model\ImageDeleteResponseItem::class => \Docker\API\Normalizer\ImageDeleteResponseItemNormalizer::class, + + \Docker\API\Model\ServiceCreateResponse::class => \Docker\API\Normalizer\ServiceCreateResponseNormalizer::class, \Docker\API\Model\ServiceUpdateResponse::class => \Docker\API\Normalizer\ServiceUpdateResponseNormalizer::class, - \Docker\API\Model\ContainerSummaryItem::class => \Docker\API\Normalizer\ContainerSummaryItemNormalizer::class, + \Docker\API\Model\ContainerSummary::class => \Docker\API\Normalizer\ContainerSummaryNormalizer::class, + + \Docker\API\Model\ContainerSummaryHostConfig::class => \Docker\API\Normalizer\ContainerSummaryHostConfigNormalizer::class, - \Docker\API\Model\ContainerSummaryItemHostConfig::class => \Docker\API\Normalizer\ContainerSummaryItemHostConfigNormalizer::class, + \Docker\API\Model\ContainerSummaryNetworkSettings::class => \Docker\API\Normalizer\ContainerSummaryNetworkSettingsNormalizer::class, - \Docker\API\Model\ContainerSummaryItemNetworkSettings::class => \Docker\API\Normalizer\ContainerSummaryItemNetworkSettingsNormalizer::class, + \Docker\API\Model\Driver::class => \Docker\API\Normalizer\DriverNormalizer::class, \Docker\API\Model\SecretSpec::class => \Docker\API\Normalizer\SecretSpecNormalizer::class, \Docker\API\Model\Secret::class => \Docker\API\Normalizer\SecretNormalizer::class, - \Docker\API\Model\SecretVersion::class => \Docker\API\Normalizer\SecretVersionNormalizer::class, + \Docker\API\Model\ConfigSpec::class => \Docker\API\Normalizer\ConfigSpecNormalizer::class, - \Docker\API\Model\ContainersCreatePostBody::class => \Docker\API\Normalizer\ContainersCreatePostBodyNormalizer::class, + \Docker\API\Model\Config::class => \Docker\API\Normalizer\ConfigNormalizer::class, - \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class => \Docker\API\Normalizer\ContainersCreatePostBodyNetworkingConfigNormalizer::class, + \Docker\API\Model\ContainerState::class => \Docker\API\Normalizer\ContainerStateNormalizer::class, - \Docker\API\Model\ContainersCreatePostResponse201::class => \Docker\API\Normalizer\ContainersCreatePostResponse201Normalizer::class, + \Docker\API\Model\ContainerCreateResponse::class => \Docker\API\Normalizer\ContainerCreateResponseNormalizer::class, - \Docker\API\Model\ContainersIdJsonGetResponse200::class => \Docker\API\Normalizer\ContainersIdJsonGetResponse200Normalizer::class, + \Docker\API\Model\ContainerWaitResponse::class => \Docker\API\Normalizer\ContainerWaitResponseNormalizer::class, - \Docker\API\Model\ContainersIdJsonGetResponse200State::class => \Docker\API\Normalizer\ContainersIdJsonGetResponse200StateNormalizer::class, + \Docker\API\Model\ContainerWaitExitError::class => \Docker\API\Normalizer\ContainerWaitExitErrorNormalizer::class, - \Docker\API\Model\ContainersIdTopGetResponse200::class => \Docker\API\Normalizer\ContainersIdTopGetResponse200Normalizer::class, + \Docker\API\Model\SystemVersion::class => \Docker\API\Normalizer\SystemVersionNormalizer::class, - \Docker\API\Model\ContainersIdChangesGetResponse200Item::class => \Docker\API\Normalizer\ContainersIdChangesGetResponse200ItemNormalizer::class, + \Docker\API\Model\SystemVersionPlatform::class => \Docker\API\Normalizer\SystemVersionPlatformNormalizer::class, - \Docker\API\Model\ContainersIdUpdatePostBody::class => \Docker\API\Normalizer\ContainersIdUpdatePostBodyNormalizer::class, + \Docker\API\Model\SystemVersionComponentsItem::class => \Docker\API\Normalizer\SystemVersionComponentsItemNormalizer::class, - \Docker\API\Model\ContainersIdUpdatePostResponse200::class => \Docker\API\Normalizer\ContainersIdUpdatePostResponse200Normalizer::class, + \Docker\API\Model\SystemInfo::class => \Docker\API\Normalizer\SystemInfoNormalizer::class, - \Docker\API\Model\ContainersIdWaitPostResponse200::class => \Docker\API\Normalizer\ContainersIdWaitPostResponse200Normalizer::class, + \Docker\API\Model\SystemInfoDefaultAddressPoolsItem::class => \Docker\API\Normalizer\SystemInfoDefaultAddressPoolsItemNormalizer::class, - \Docker\API\Model\ContainersPrunePostResponse200::class => \Docker\API\Normalizer\ContainersPrunePostResponse200Normalizer::class, + \Docker\API\Model\ContainerdInfo::class => \Docker\API\Normalizer\ContainerdInfoNormalizer::class, - \Docker\API\Model\ImagesNameHistoryGetResponse200Item::class => \Docker\API\Normalizer\ImagesNameHistoryGetResponse200ItemNormalizer::class, + \Docker\API\Model\ContainerdInfoNamespaces::class => \Docker\API\Normalizer\ContainerdInfoNamespacesNormalizer::class, - \Docker\API\Model\ImagesSearchGetResponse200Item::class => \Docker\API\Normalizer\ImagesSearchGetResponse200ItemNormalizer::class, + \Docker\API\Model\PluginsInfo::class => \Docker\API\Normalizer\PluginsInfoNormalizer::class, - \Docker\API\Model\ImagesPrunePostResponse200::class => \Docker\API\Normalizer\ImagesPrunePostResponse200Normalizer::class, + \Docker\API\Model\RegistryServiceConfig::class => \Docker\API\Normalizer\RegistryServiceConfigNormalizer::class, - \Docker\API\Model\AuthPostResponse200::class => \Docker\API\Normalizer\AuthPostResponse200Normalizer::class, + \Docker\API\Model\IndexInfo::class => \Docker\API\Normalizer\IndexInfoNormalizer::class, + + \Docker\API\Model\Runtime::class => \Docker\API\Normalizer\RuntimeNormalizer::class, + + \Docker\API\Model\Commit::class => \Docker\API\Normalizer\CommitNormalizer::class, + + \Docker\API\Model\SwarmInfo::class => \Docker\API\Normalizer\SwarmInfoNormalizer::class, + + \Docker\API\Model\PeerNode::class => \Docker\API\Normalizer\PeerNodeNormalizer::class, + + \Docker\API\Model\NetworkAttachmentConfig::class => \Docker\API\Normalizer\NetworkAttachmentConfigNormalizer::class, + + \Docker\API\Model\EventActor::class => \Docker\API\Normalizer\EventActorNormalizer::class, + + \Docker\API\Model\EventMessage::class => \Docker\API\Normalizer\EventMessageNormalizer::class, + + \Docker\API\Model\OCIDescriptor::class => \Docker\API\Normalizer\OCIDescriptorNormalizer::class, + + \Docker\API\Model\OCIPlatform::class => \Docker\API\Normalizer\OCIPlatformNormalizer::class, - \Docker\API\Model\InfoGetResponse200::class => \Docker\API\Normalizer\InfoGetResponse200Normalizer::class, + \Docker\API\Model\DistributionInspect::class => \Docker\API\Normalizer\DistributionInspectNormalizer::class, - \Docker\API\Model\InfoGetResponse200Plugins::class => \Docker\API\Normalizer\InfoGetResponse200PluginsNormalizer::class, + \Docker\API\Model\ClusterVolume::class => \Docker\API\Normalizer\ClusterVolumeNormalizer::class, - \Docker\API\Model\InfoGetResponse200RegistryConfig::class => \Docker\API\Normalizer\InfoGetResponse200RegistryConfigNormalizer::class, + \Docker\API\Model\ClusterVolumeInfo::class => \Docker\API\Normalizer\ClusterVolumeInfoNormalizer::class, - \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class => \Docker\API\Normalizer\InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer::class, + \Docker\API\Model\ClusterVolumePublishStatusItem::class => \Docker\API\Normalizer\ClusterVolumePublishStatusItemNormalizer::class, - \Docker\API\Model\VersionGetResponse200::class => \Docker\API\Normalizer\VersionGetResponse200Normalizer::class, + \Docker\API\Model\ClusterVolumeSpec::class => \Docker\API\Normalizer\ClusterVolumeSpecNormalizer::class, - \Docker\API\Model\EventsGetResponse200::class => \Docker\API\Normalizer\EventsGetResponse200Normalizer::class, + \Docker\API\Model\ClusterVolumeSpecAccessMode::class => \Docker\API\Normalizer\ClusterVolumeSpecAccessModeNormalizer::class, - \Docker\API\Model\EventsGetResponse200Actor::class => \Docker\API\Normalizer\EventsGetResponse200ActorNormalizer::class, + \Docker\API\Model\ClusterVolumeSpecAccessModeSecretsItem::class => \Docker\API\Normalizer\ClusterVolumeSpecAccessModeSecretsItemNormalizer::class, + + \Docker\API\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements::class => \Docker\API\Normalizer\ClusterVolumeSpecAccessModeAccessibilityRequirementsNormalizer::class, + + \Docker\API\Model\ClusterVolumeSpecAccessModeCapacityRange::class => \Docker\API\Normalizer\ClusterVolumeSpecAccessModeCapacityRangeNormalizer::class, + + \Docker\API\Model\ImageManifestSummary::class => \Docker\API\Normalizer\ImageManifestSummaryNormalizer::class, + + \Docker\API\Model\ImageManifestSummarySize::class => \Docker\API\Normalizer\ImageManifestSummarySizeNormalizer::class, + + \Docker\API\Model\ImageManifestSummaryImageData::class => \Docker\API\Normalizer\ImageManifestSummaryImageDataNormalizer::class, + + \Docker\API\Model\ImageManifestSummaryImageDataSize::class => \Docker\API\Normalizer\ImageManifestSummaryImageDataSizeNormalizer::class, + + \Docker\API\Model\ImageManifestSummaryAttestationData::class => \Docker\API\Normalizer\ImageManifestSummaryAttestationDataNormalizer::class, + + \Docker\API\Model\ContainersCreatePostBody::class => \Docker\API\Normalizer\ContainersCreatePostBodyNormalizer::class, + + \Docker\API\Model\ContainersIdJsonGetResponse200::class => \Docker\API\Normalizer\ContainersIdJsonGetResponse200Normalizer::class, + + \Docker\API\Model\ContainersIdTopGetResponse200::class => \Docker\API\Normalizer\ContainersIdTopGetResponse200Normalizer::class, + + \Docker\API\Model\ContainersIdUpdatePostBody::class => \Docker\API\Normalizer\ContainersIdUpdatePostBodyNormalizer::class, + + \Docker\API\Model\ContainersIdUpdatePostResponse200::class => \Docker\API\Normalizer\ContainersIdUpdatePostResponse200Normalizer::class, + + \Docker\API\Model\ContainersPrunePostResponse200::class => \Docker\API\Normalizer\ContainersPrunePostResponse200Normalizer::class, + + \Docker\API\Model\BuildPrunePostResponse200::class => \Docker\API\Normalizer\BuildPrunePostResponse200Normalizer::class, + + \Docker\API\Model\ImagesNameHistoryGetResponse200Item::class => \Docker\API\Normalizer\ImagesNameHistoryGetResponse200ItemNormalizer::class, + + \Docker\API\Model\ImagesSearchGetResponse200Item::class => \Docker\API\Normalizer\ImagesSearchGetResponse200ItemNormalizer::class, + + \Docker\API\Model\ImagesPrunePostResponse200::class => \Docker\API\Normalizer\ImagesPrunePostResponse200Normalizer::class, + + \Docker\API\Model\AuthPostResponse200::class => \Docker\API\Normalizer\AuthPostResponse200Normalizer::class, \Docker\API\Model\SystemDfGetResponse200::class => \Docker\API\Normalizer\SystemDfGetResponse200Normalizer::class, @@ -284,30 +416,18 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\ExecIdJsonGetResponse200::class => \Docker\API\Normalizer\ExecIdJsonGetResponse200Normalizer::class, - \Docker\API\Model\VolumesGetResponse200::class => \Docker\API\Normalizer\VolumesGetResponse200Normalizer::class, - - \Docker\API\Model\VolumesCreatePostBody::class => \Docker\API\Normalizer\VolumesCreatePostBodyNormalizer::class, + \Docker\API\Model\VolumesNamePutBody::class => \Docker\API\Normalizer\VolumesNamePutBodyNormalizer::class, \Docker\API\Model\VolumesPrunePostResponse200::class => \Docker\API\Normalizer\VolumesPrunePostResponse200Normalizer::class, \Docker\API\Model\NetworksCreatePostBody::class => \Docker\API\Normalizer\NetworksCreatePostBodyNormalizer::class, - \Docker\API\Model\NetworksCreatePostResponse201::class => \Docker\API\Normalizer\NetworksCreatePostResponse201Normalizer::class, - \Docker\API\Model\NetworksIdConnectPostBody::class => \Docker\API\Normalizer\NetworksIdConnectPostBodyNormalizer::class, \Docker\API\Model\NetworksIdDisconnectPostBody::class => \Docker\API\Normalizer\NetworksIdDisconnectPostBodyNormalizer::class, \Docker\API\Model\NetworksPrunePostResponse200::class => \Docker\API\Normalizer\NetworksPrunePostResponse200Normalizer::class, - \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class => \Docker\API\Normalizer\PluginsPrivilegesGetResponse200ItemNormalizer::class, - - \Docker\API\Model\PluginsPullPostBodyItem::class => \Docker\API\Normalizer\PluginsPullPostBodyItemNormalizer::class, - - \Docker\API\Model\SwarmGetResponse200::class => \Docker\API\Normalizer\SwarmGetResponse200Normalizer::class, - - \Docker\API\Model\SwarmGetResponse200JoinTokens::class => \Docker\API\Normalizer\SwarmGetResponse200JoinTokensNormalizer::class, - \Docker\API\Model\SwarmInitPostBody::class => \Docker\API\Normalizer\SwarmInitPostBodyNormalizer::class, \Docker\API\Model\SwarmJoinPostBody::class => \Docker\API\Normalizer\SwarmJoinPostBodyNormalizer::class, @@ -318,13 +438,11 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\ServicesCreatePostBody::class => \Docker\API\Normalizer\ServicesCreatePostBodyNormalizer::class, - \Docker\API\Model\ServicesCreatePostResponse201::class => \Docker\API\Normalizer\ServicesCreatePostResponse201Normalizer::class, - \Docker\API\Model\ServicesIdUpdatePostBody::class => \Docker\API\Normalizer\ServicesIdUpdatePostBodyNormalizer::class, \Docker\API\Model\SecretsCreatePostBody::class => \Docker\API\Normalizer\SecretsCreatePostBodyNormalizer::class, - \Docker\API\Model\SecretsCreatePostResponse201::class => \Docker\API\Normalizer\SecretsCreatePostResponse201Normalizer::class, + \Docker\API\Model\ConfigsCreatePostBody::class => \Docker\API\Normalizer\ConfigsCreatePostBodyNormalizer::class, \Jane\Component\JsonSchemaRuntime\Reference::class => \Docker\API\Runtime\Normalizer\ReferenceNormalizer::class, ], $normalizersCache = []; @@ -367,6 +485,7 @@ public function getSupportedTypes(?string $format = null): array \Docker\API\Model\Port::class => false, \Docker\API\Model\MountPoint::class => false, \Docker\API\Model\DeviceMapping::class => false, + \Docker\API\Model\DeviceRequest::class => false, \Docker\API\Model\ThrottleDevice::class => false, \Docker\API\Model\Mount::class => false, \Docker\API\Model\MountBindOptions::class => false, @@ -377,25 +496,44 @@ public function getSupportedTypes(?string $format = null): array \Docker\API\Model\Resources::class => false, \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class => false, \Docker\API\Model\ResourcesUlimitsItem::class => false, + \Docker\API\Model\Limit::class => false, + \Docker\API\Model\ResourceObject::class => false, + \Docker\API\Model\GenericResourcesItem::class => false, + \Docker\API\Model\GenericResourcesItemNamedResourceSpec::class => false, + \Docker\API\Model\GenericResourcesItemDiscreteResourceSpec::class => false, + \Docker\API\Model\HealthConfig::class => false, + \Docker\API\Model\Health::class => false, + \Docker\API\Model\HealthcheckResult::class => false, \Docker\API\Model\HostConfig::class => false, \Docker\API\Model\HostConfigLogConfig::class => false, - \Docker\API\Model\HostConfigPortBindingsItem::class => false, - \Docker\API\Model\Config::class => false, - \Docker\API\Model\ConfigHealthcheck::class => false, - \Docker\API\Model\ConfigVolumes::class => false, - \Docker\API\Model\NetworkConfig::class => false, - \Docker\API\Model\GraphDriver::class => false, - \Docker\API\Model\Image::class => false, - \Docker\API\Model\ImageRootFS::class => false, + \Docker\API\Model\ContainerConfig::class => false, + \Docker\API\Model\ImageConfig::class => false, + \Docker\API\Model\NetworkingConfig::class => false, + \Docker\API\Model\NetworkSettings::class => false, + \Docker\API\Model\Address::class => false, + \Docker\API\Model\PortBinding::class => false, + \Docker\API\Model\DriverData::class => false, + \Docker\API\Model\FilesystemChange::class => false, + \Docker\API\Model\ImageInspect::class => false, + \Docker\API\Model\ImageInspectRootFS::class => false, + \Docker\API\Model\ImageInspectMetadata::class => false, \Docker\API\Model\ImageSummary::class => false, \Docker\API\Model\AuthConfig::class => false, \Docker\API\Model\ProcessConfig::class => false, \Docker\API\Model\Volume::class => false, \Docker\API\Model\VolumeUsageData::class => false, + \Docker\API\Model\VolumeCreateOptions::class => false, + \Docker\API\Model\VolumeListResponse::class => false, \Docker\API\Model\Network::class => false, + \Docker\API\Model\ConfigReference::class => false, \Docker\API\Model\IPAM::class => false, + \Docker\API\Model\IPAMConfig::class => false, \Docker\API\Model\NetworkContainer::class => false, + \Docker\API\Model\PeerInfo::class => false, + \Docker\API\Model\NetworkCreateResponse::class => false, \Docker\API\Model\BuildInfo::class => false, + \Docker\API\Model\BuildCache::class => false, + \Docker\API\Model\ImageID::class => false, \Docker\API\Model\CreateImageInfo::class => false, \Docker\API\Model\PushImageInfo::class => false, \Docker\API\Model\ErrorDetail::class => false, @@ -403,11 +541,12 @@ public function getSupportedTypes(?string $format = null): array \Docker\API\Model\ErrorResponse::class => false, \Docker\API\Model\IdResponse::class => false, \Docker\API\Model\EndpointSettings::class => false, - \Docker\API\Model\EndpointSettingsIPAMConfig::class => false, + \Docker\API\Model\EndpointIPAMConfig::class => false, \Docker\API\Model\PluginMount::class => false, \Docker\API\Model\PluginDevice::class => false, \Docker\API\Model\PluginEnv::class => false, \Docker\API\Model\PluginInterfaceType::class => false, + \Docker\API\Model\PluginPrivilege::class => false, \Docker\API\Model\Plugin::class => false, \Docker\API\Model\PluginSettings::class => false, \Docker\API\Model\PluginConfig::class => false, @@ -417,14 +556,16 @@ public function getSupportedTypes(?string $format = null): array \Docker\API\Model\PluginConfigLinux::class => false, \Docker\API\Model\PluginConfigArgs::class => false, \Docker\API\Model\PluginConfigRootfs::class => false, + \Docker\API\Model\ObjectVersion::class => false, \Docker\API\Model\NodeSpec::class => false, \Docker\API\Model\Node::class => false, - \Docker\API\Model\NodeVersion::class => false, \Docker\API\Model\NodeDescription::class => false, - \Docker\API\Model\NodeDescriptionPlatform::class => false, - \Docker\API\Model\NodeDescriptionResources::class => false, - \Docker\API\Model\NodeDescriptionEngine::class => false, - \Docker\API\Model\NodeDescriptionEnginePluginsItem::class => false, + \Docker\API\Model\Platform::class => false, + \Docker\API\Model\EngineDescription::class => false, + \Docker\API\Model\EngineDescriptionPluginsItem::class => false, + \Docker\API\Model\TLSInfo::class => false, + \Docker\API\Model\NodeStatus::class => false, + \Docker\API\Model\ManagerStatus::class => false, \Docker\API\Model\SwarmSpec::class => false, \Docker\API\Model\SwarmSpecOrchestration::class => false, \Docker\API\Model\SwarmSpecRaft::class => false, @@ -435,88 +576,124 @@ public function getSupportedTypes(?string $format = null): array \Docker\API\Model\SwarmSpecTaskDefaults::class => false, \Docker\API\Model\SwarmSpecTaskDefaultsLogDriver::class => false, \Docker\API\Model\ClusterInfo::class => false, - \Docker\API\Model\ClusterInfoVersion::class => false, + \Docker\API\Model\JoinTokens::class => false, + \Docker\API\Model\Swarm::class => false, \Docker\API\Model\TaskSpec::class => false, + \Docker\API\Model\TaskSpecPluginSpec::class => false, \Docker\API\Model\TaskSpecContainerSpec::class => false, + \Docker\API\Model\TaskSpecContainerSpecPrivileges::class => false, + \Docker\API\Model\TaskSpecContainerSpecPrivilegesCredentialSpec::class => false, + \Docker\API\Model\TaskSpecContainerSpecPrivilegesSELinuxContext::class => false, + \Docker\API\Model\TaskSpecContainerSpecPrivilegesSeccomp::class => false, + \Docker\API\Model\TaskSpecContainerSpecPrivilegesAppArmor::class => false, \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class => false, + \Docker\API\Model\TaskSpecContainerSpecSecretsItem::class => false, + \Docker\API\Model\TaskSpecContainerSpecSecretsItemFile::class => false, + \Docker\API\Model\TaskSpecContainerSpecConfigsItem::class => false, + \Docker\API\Model\TaskSpecContainerSpecConfigsItemFile::class => false, + \Docker\API\Model\TaskSpecContainerSpecUlimitsItem::class => false, + \Docker\API\Model\TaskSpecNetworkAttachmentSpec::class => false, \Docker\API\Model\TaskSpecResources::class => false, - \Docker\API\Model\TaskSpecResourcesLimits::class => false, - \Docker\API\Model\TaskSpecResourcesReservations::class => false, \Docker\API\Model\TaskSpecRestartPolicy::class => false, \Docker\API\Model\TaskSpecPlacement::class => false, - \Docker\API\Model\TaskSpecNetworksItem::class => false, + \Docker\API\Model\TaskSpecPlacementPreferencesItem::class => false, + \Docker\API\Model\TaskSpecPlacementPreferencesItemSpread::class => false, \Docker\API\Model\TaskSpecLogDriver::class => false, - \Docker\API\Model\Task::class => false, - \Docker\API\Model\TaskVersion::class => false, + \Docker\API\Model\ContainerStatus::class => false, + \Docker\API\Model\PortStatus::class => false, \Docker\API\Model\TaskStatus::class => false, - \Docker\API\Model\TaskStatusContainerStatus::class => false, + \Docker\API\Model\Task::class => false, \Docker\API\Model\ServiceSpec::class => false, \Docker\API\Model\ServiceSpecMode::class => false, \Docker\API\Model\ServiceSpecModeReplicated::class => false, + \Docker\API\Model\ServiceSpecModeReplicatedJob::class => false, \Docker\API\Model\ServiceSpecUpdateConfig::class => false, - \Docker\API\Model\ServiceSpecNetworksItem::class => false, + \Docker\API\Model\ServiceSpecRollbackConfig::class => false, \Docker\API\Model\EndpointPortConfig::class => false, \Docker\API\Model\EndpointSpec::class => false, \Docker\API\Model\Service::class => false, - \Docker\API\Model\ServiceVersion::class => false, \Docker\API\Model\ServiceEndpoint::class => false, \Docker\API\Model\ServiceEndpointVirtualIPsItem::class => false, \Docker\API\Model\ServiceUpdateStatus::class => false, - \Docker\API\Model\ImageDeleteResponse::class => false, + \Docker\API\Model\ServiceServiceStatus::class => false, + \Docker\API\Model\ServiceJobStatus::class => false, + \Docker\API\Model\ImageDeleteResponseItem::class => false, + \Docker\API\Model\ServiceCreateResponse::class => false, \Docker\API\Model\ServiceUpdateResponse::class => false, - \Docker\API\Model\ContainerSummaryItem::class => false, - \Docker\API\Model\ContainerSummaryItemHostConfig::class => false, - \Docker\API\Model\ContainerSummaryItemNetworkSettings::class => false, + \Docker\API\Model\ContainerSummary::class => false, + \Docker\API\Model\ContainerSummaryHostConfig::class => false, + \Docker\API\Model\ContainerSummaryNetworkSettings::class => false, + \Docker\API\Model\Driver::class => false, \Docker\API\Model\SecretSpec::class => false, \Docker\API\Model\Secret::class => false, - \Docker\API\Model\SecretVersion::class => false, + \Docker\API\Model\ConfigSpec::class => false, + \Docker\API\Model\Config::class => false, + \Docker\API\Model\ContainerState::class => false, + \Docker\API\Model\ContainerCreateResponse::class => false, + \Docker\API\Model\ContainerWaitResponse::class => false, + \Docker\API\Model\ContainerWaitExitError::class => false, + \Docker\API\Model\SystemVersion::class => false, + \Docker\API\Model\SystemVersionPlatform::class => false, + \Docker\API\Model\SystemVersionComponentsItem::class => false, + \Docker\API\Model\SystemInfo::class => false, + \Docker\API\Model\SystemInfoDefaultAddressPoolsItem::class => false, + \Docker\API\Model\ContainerdInfo::class => false, + \Docker\API\Model\ContainerdInfoNamespaces::class => false, + \Docker\API\Model\PluginsInfo::class => false, + \Docker\API\Model\RegistryServiceConfig::class => false, + \Docker\API\Model\IndexInfo::class => false, + \Docker\API\Model\Runtime::class => false, + \Docker\API\Model\Commit::class => false, + \Docker\API\Model\SwarmInfo::class => false, + \Docker\API\Model\PeerNode::class => false, + \Docker\API\Model\NetworkAttachmentConfig::class => false, + \Docker\API\Model\EventActor::class => false, + \Docker\API\Model\EventMessage::class => false, + \Docker\API\Model\OCIDescriptor::class => false, + \Docker\API\Model\OCIPlatform::class => false, + \Docker\API\Model\DistributionInspect::class => false, + \Docker\API\Model\ClusterVolume::class => false, + \Docker\API\Model\ClusterVolumeInfo::class => false, + \Docker\API\Model\ClusterVolumePublishStatusItem::class => false, + \Docker\API\Model\ClusterVolumeSpec::class => false, + \Docker\API\Model\ClusterVolumeSpecAccessMode::class => false, + \Docker\API\Model\ClusterVolumeSpecAccessModeSecretsItem::class => false, + \Docker\API\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements::class => false, + \Docker\API\Model\ClusterVolumeSpecAccessModeCapacityRange::class => false, + \Docker\API\Model\ImageManifestSummary::class => false, + \Docker\API\Model\ImageManifestSummarySize::class => false, + \Docker\API\Model\ImageManifestSummaryImageData::class => false, + \Docker\API\Model\ImageManifestSummaryImageDataSize::class => false, + \Docker\API\Model\ImageManifestSummaryAttestationData::class => false, \Docker\API\Model\ContainersCreatePostBody::class => false, - \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class => false, - \Docker\API\Model\ContainersCreatePostResponse201::class => false, \Docker\API\Model\ContainersIdJsonGetResponse200::class => false, - \Docker\API\Model\ContainersIdJsonGetResponse200State::class => false, \Docker\API\Model\ContainersIdTopGetResponse200::class => false, - \Docker\API\Model\ContainersIdChangesGetResponse200Item::class => false, \Docker\API\Model\ContainersIdUpdatePostBody::class => false, \Docker\API\Model\ContainersIdUpdatePostResponse200::class => false, - \Docker\API\Model\ContainersIdWaitPostResponse200::class => false, \Docker\API\Model\ContainersPrunePostResponse200::class => false, + \Docker\API\Model\BuildPrunePostResponse200::class => false, \Docker\API\Model\ImagesNameHistoryGetResponse200Item::class => false, \Docker\API\Model\ImagesSearchGetResponse200Item::class => false, \Docker\API\Model\ImagesPrunePostResponse200::class => false, \Docker\API\Model\AuthPostResponse200::class => false, - \Docker\API\Model\InfoGetResponse200::class => false, - \Docker\API\Model\InfoGetResponse200Plugins::class => false, - \Docker\API\Model\InfoGetResponse200RegistryConfig::class => false, - \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class => false, - \Docker\API\Model\VersionGetResponse200::class => false, - \Docker\API\Model\EventsGetResponse200::class => false, - \Docker\API\Model\EventsGetResponse200Actor::class => false, \Docker\API\Model\SystemDfGetResponse200::class => false, \Docker\API\Model\ContainersIdExecPostBody::class => false, \Docker\API\Model\ExecIdStartPostBody::class => false, \Docker\API\Model\ExecIdJsonGetResponse200::class => false, - \Docker\API\Model\VolumesGetResponse200::class => false, - \Docker\API\Model\VolumesCreatePostBody::class => false, + \Docker\API\Model\VolumesNamePutBody::class => false, \Docker\API\Model\VolumesPrunePostResponse200::class => false, \Docker\API\Model\NetworksCreatePostBody::class => false, - \Docker\API\Model\NetworksCreatePostResponse201::class => false, \Docker\API\Model\NetworksIdConnectPostBody::class => false, \Docker\API\Model\NetworksIdDisconnectPostBody::class => false, \Docker\API\Model\NetworksPrunePostResponse200::class => false, - \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class => false, - \Docker\API\Model\PluginsPullPostBodyItem::class => false, - \Docker\API\Model\SwarmGetResponse200::class => false, - \Docker\API\Model\SwarmGetResponse200JoinTokens::class => false, \Docker\API\Model\SwarmInitPostBody::class => false, \Docker\API\Model\SwarmJoinPostBody::class => false, \Docker\API\Model\SwarmUnlockkeyGetResponse200::class => false, \Docker\API\Model\SwarmUnlockPostBody::class => false, \Docker\API\Model\ServicesCreatePostBody::class => false, - \Docker\API\Model\ServicesCreatePostResponse201::class => false, \Docker\API\Model\ServicesIdUpdatePostBody::class => false, \Docker\API\Model\SecretsCreatePostBody::class => false, - \Docker\API\Model\SecretsCreatePostResponse201::class => false, + \Docker\API\Model\ConfigsCreatePostBody::class => false, \Jane\Component\JsonSchemaRuntime\Reference::class => false, ]; } @@ -536,6 +713,8 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\DeviceMapping::class => \Docker\API\Normalizer\DeviceMappingNormalizer::class, + \Docker\API\Model\DeviceRequest::class => \Docker\API\Normalizer\DeviceRequestNormalizer::class, + \Docker\API\Model\ThrottleDevice::class => \Docker\API\Normalizer\ThrottleDeviceNormalizer::class, \Docker\API\Model\Mount::class => \Docker\API\Normalizer\MountNormalizer::class, @@ -556,25 +735,47 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\ResourcesUlimitsItem::class => \Docker\API\Normalizer\ResourcesUlimitsItemNormalizer::class, + \Docker\API\Model\Limit::class => \Docker\API\Normalizer\LimitNormalizer::class, + + \Docker\API\Model\ResourceObject::class => \Docker\API\Normalizer\ResourceObjectNormalizer::class, + + \Docker\API\Model\GenericResourcesItem::class => \Docker\API\Normalizer\GenericResourcesItemNormalizer::class, + + \Docker\API\Model\GenericResourcesItemNamedResourceSpec::class => \Docker\API\Normalizer\GenericResourcesItemNamedResourceSpecNormalizer::class, + + \Docker\API\Model\GenericResourcesItemDiscreteResourceSpec::class => \Docker\API\Normalizer\GenericResourcesItemDiscreteResourceSpecNormalizer::class, + + \Docker\API\Model\HealthConfig::class => \Docker\API\Normalizer\HealthConfigNormalizer::class, + + \Docker\API\Model\Health::class => \Docker\API\Normalizer\HealthNormalizer::class, + + \Docker\API\Model\HealthcheckResult::class => \Docker\API\Normalizer\HealthcheckResultNormalizer::class, + \Docker\API\Model\HostConfig::class => \Docker\API\Normalizer\HostConfigNormalizer::class, \Docker\API\Model\HostConfigLogConfig::class => \Docker\API\Normalizer\HostConfigLogConfigNormalizer::class, - \Docker\API\Model\HostConfigPortBindingsItem::class => \Docker\API\Normalizer\HostConfigPortBindingsItemNormalizer::class, + \Docker\API\Model\ContainerConfig::class => \Docker\API\Normalizer\ContainerConfigNormalizer::class, - \Docker\API\Model\Config::class => \Docker\API\Normalizer\ConfigNormalizer::class, + \Docker\API\Model\ImageConfig::class => \Docker\API\Normalizer\ImageConfigNormalizer::class, + + \Docker\API\Model\NetworkingConfig::class => \Docker\API\Normalizer\NetworkingConfigNormalizer::class, - \Docker\API\Model\ConfigHealthcheck::class => \Docker\API\Normalizer\ConfigHealthcheckNormalizer::class, + \Docker\API\Model\NetworkSettings::class => \Docker\API\Normalizer\NetworkSettingsNormalizer::class, - \Docker\API\Model\ConfigVolumes::class => \Docker\API\Normalizer\ConfigVolumesNormalizer::class, + \Docker\API\Model\Address::class => \Docker\API\Normalizer\AddressNormalizer::class, - \Docker\API\Model\NetworkConfig::class => \Docker\API\Normalizer\NetworkConfigNormalizer::class, + \Docker\API\Model\PortBinding::class => \Docker\API\Normalizer\PortBindingNormalizer::class, - \Docker\API\Model\GraphDriver::class => \Docker\API\Normalizer\GraphDriverNormalizer::class, + \Docker\API\Model\DriverData::class => \Docker\API\Normalizer\DriverDataNormalizer::class, - \Docker\API\Model\Image::class => \Docker\API\Normalizer\ImageNormalizer::class, + \Docker\API\Model\FilesystemChange::class => \Docker\API\Normalizer\FilesystemChangeNormalizer::class, - \Docker\API\Model\ImageRootFS::class => \Docker\API\Normalizer\ImageRootFSNormalizer::class, + \Docker\API\Model\ImageInspect::class => \Docker\API\Normalizer\ImageInspectNormalizer::class, + + \Docker\API\Model\ImageInspectRootFS::class => \Docker\API\Normalizer\ImageInspectRootFSNormalizer::class, + + \Docker\API\Model\ImageInspectMetadata::class => \Docker\API\Normalizer\ImageInspectMetadataNormalizer::class, \Docker\API\Model\ImageSummary::class => \Docker\API\Normalizer\ImageSummaryNormalizer::class, @@ -586,14 +787,30 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\VolumeUsageData::class => \Docker\API\Normalizer\VolumeUsageDataNormalizer::class, + \Docker\API\Model\VolumeCreateOptions::class => \Docker\API\Normalizer\VolumeCreateOptionsNormalizer::class, + + \Docker\API\Model\VolumeListResponse::class => \Docker\API\Normalizer\VolumeListResponseNormalizer::class, + \Docker\API\Model\Network::class => \Docker\API\Normalizer\NetworkNormalizer::class, + \Docker\API\Model\ConfigReference::class => \Docker\API\Normalizer\ConfigReferenceNormalizer::class, + \Docker\API\Model\IPAM::class => \Docker\API\Normalizer\IPAMNormalizer::class, + \Docker\API\Model\IPAMConfig::class => \Docker\API\Normalizer\IPAMConfigNormalizer::class, + \Docker\API\Model\NetworkContainer::class => \Docker\API\Normalizer\NetworkContainerNormalizer::class, + \Docker\API\Model\PeerInfo::class => \Docker\API\Normalizer\PeerInfoNormalizer::class, + + \Docker\API\Model\NetworkCreateResponse::class => \Docker\API\Normalizer\NetworkCreateResponseNormalizer::class, + \Docker\API\Model\BuildInfo::class => \Docker\API\Normalizer\BuildInfoNormalizer::class, + \Docker\API\Model\BuildCache::class => \Docker\API\Normalizer\BuildCacheNormalizer::class, + + \Docker\API\Model\ImageID::class => \Docker\API\Normalizer\ImageIDNormalizer::class, + \Docker\API\Model\CreateImageInfo::class => \Docker\API\Normalizer\CreateImageInfoNormalizer::class, \Docker\API\Model\PushImageInfo::class => \Docker\API\Normalizer\PushImageInfoNormalizer::class, @@ -608,7 +825,7 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\EndpointSettings::class => \Docker\API\Normalizer\EndpointSettingsNormalizer::class, - \Docker\API\Model\EndpointSettingsIPAMConfig::class => \Docker\API\Normalizer\EndpointSettingsIPAMConfigNormalizer::class, + \Docker\API\Model\EndpointIPAMConfig::class => \Docker\API\Normalizer\EndpointIPAMConfigNormalizer::class, \Docker\API\Model\PluginMount::class => \Docker\API\Normalizer\PluginMountNormalizer::class, @@ -618,6 +835,8 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\PluginInterfaceType::class => \Docker\API\Normalizer\PluginInterfaceTypeNormalizer::class, + \Docker\API\Model\PluginPrivilege::class => \Docker\API\Normalizer\PluginPrivilegeNormalizer::class, + \Docker\API\Model\Plugin::class => \Docker\API\Normalizer\PluginNormalizer::class, \Docker\API\Model\PluginSettings::class => \Docker\API\Normalizer\PluginSettingsNormalizer::class, @@ -636,21 +855,25 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\PluginConfigRootfs::class => \Docker\API\Normalizer\PluginConfigRootfsNormalizer::class, + \Docker\API\Model\ObjectVersion::class => \Docker\API\Normalizer\ObjectVersionNormalizer::class, + \Docker\API\Model\NodeSpec::class => \Docker\API\Normalizer\NodeSpecNormalizer::class, \Docker\API\Model\Node::class => \Docker\API\Normalizer\NodeNormalizer::class, - \Docker\API\Model\NodeVersion::class => \Docker\API\Normalizer\NodeVersionNormalizer::class, - \Docker\API\Model\NodeDescription::class => \Docker\API\Normalizer\NodeDescriptionNormalizer::class, - \Docker\API\Model\NodeDescriptionPlatform::class => \Docker\API\Normalizer\NodeDescriptionPlatformNormalizer::class, + \Docker\API\Model\Platform::class => \Docker\API\Normalizer\PlatformNormalizer::class, - \Docker\API\Model\NodeDescriptionResources::class => \Docker\API\Normalizer\NodeDescriptionResourcesNormalizer::class, + \Docker\API\Model\EngineDescription::class => \Docker\API\Normalizer\EngineDescriptionNormalizer::class, - \Docker\API\Model\NodeDescriptionEngine::class => \Docker\API\Normalizer\NodeDescriptionEngineNormalizer::class, + \Docker\API\Model\EngineDescriptionPluginsItem::class => \Docker\API\Normalizer\EngineDescriptionPluginsItemNormalizer::class, - \Docker\API\Model\NodeDescriptionEnginePluginsItem::class => \Docker\API\Normalizer\NodeDescriptionEnginePluginsItemNormalizer::class, + \Docker\API\Model\TLSInfo::class => \Docker\API\Normalizer\TLSInfoNormalizer::class, + + \Docker\API\Model\NodeStatus::class => \Docker\API\Normalizer\NodeStatusNormalizer::class, + + \Docker\API\Model\ManagerStatus::class => \Docker\API\Normalizer\ManagerStatusNormalizer::class, \Docker\API\Model\SwarmSpec::class => \Docker\API\Normalizer\SwarmSpecNormalizer::class, @@ -672,35 +895,59 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\ClusterInfo::class => \Docker\API\Normalizer\ClusterInfoNormalizer::class, - \Docker\API\Model\ClusterInfoVersion::class => \Docker\API\Normalizer\ClusterInfoVersionNormalizer::class, + \Docker\API\Model\JoinTokens::class => \Docker\API\Normalizer\JoinTokensNormalizer::class, + + \Docker\API\Model\Swarm::class => \Docker\API\Normalizer\SwarmNormalizer::class, \Docker\API\Model\TaskSpec::class => \Docker\API\Normalizer\TaskSpecNormalizer::class, + \Docker\API\Model\TaskSpecPluginSpec::class => \Docker\API\Normalizer\TaskSpecPluginSpecNormalizer::class, + \Docker\API\Model\TaskSpecContainerSpec::class => \Docker\API\Normalizer\TaskSpecContainerSpecNormalizer::class, + \Docker\API\Model\TaskSpecContainerSpecPrivileges::class => \Docker\API\Normalizer\TaskSpecContainerSpecPrivilegesNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpecPrivilegesCredentialSpec::class => \Docker\API\Normalizer\TaskSpecContainerSpecPrivilegesCredentialSpecNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpecPrivilegesSELinuxContext::class => \Docker\API\Normalizer\TaskSpecContainerSpecPrivilegesSELinuxContextNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpecPrivilegesSeccomp::class => \Docker\API\Normalizer\TaskSpecContainerSpecPrivilegesSeccompNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpecPrivilegesAppArmor::class => \Docker\API\Normalizer\TaskSpecContainerSpecPrivilegesAppArmorNormalizer::class, + \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class => \Docker\API\Normalizer\TaskSpecContainerSpecDNSConfigNormalizer::class, - \Docker\API\Model\TaskSpecResources::class => \Docker\API\Normalizer\TaskSpecResourcesNormalizer::class, + \Docker\API\Model\TaskSpecContainerSpecSecretsItem::class => \Docker\API\Normalizer\TaskSpecContainerSpecSecretsItemNormalizer::class, - \Docker\API\Model\TaskSpecResourcesLimits::class => \Docker\API\Normalizer\TaskSpecResourcesLimitsNormalizer::class, + \Docker\API\Model\TaskSpecContainerSpecSecretsItemFile::class => \Docker\API\Normalizer\TaskSpecContainerSpecSecretsItemFileNormalizer::class, - \Docker\API\Model\TaskSpecResourcesReservations::class => \Docker\API\Normalizer\TaskSpecResourcesReservationsNormalizer::class, + \Docker\API\Model\TaskSpecContainerSpecConfigsItem::class => \Docker\API\Normalizer\TaskSpecContainerSpecConfigsItemNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpecConfigsItemFile::class => \Docker\API\Normalizer\TaskSpecContainerSpecConfigsItemFileNormalizer::class, + + \Docker\API\Model\TaskSpecContainerSpecUlimitsItem::class => \Docker\API\Normalizer\TaskSpecContainerSpecUlimitsItemNormalizer::class, + + \Docker\API\Model\TaskSpecNetworkAttachmentSpec::class => \Docker\API\Normalizer\TaskSpecNetworkAttachmentSpecNormalizer::class, + + \Docker\API\Model\TaskSpecResources::class => \Docker\API\Normalizer\TaskSpecResourcesNormalizer::class, \Docker\API\Model\TaskSpecRestartPolicy::class => \Docker\API\Normalizer\TaskSpecRestartPolicyNormalizer::class, \Docker\API\Model\TaskSpecPlacement::class => \Docker\API\Normalizer\TaskSpecPlacementNormalizer::class, - \Docker\API\Model\TaskSpecNetworksItem::class => \Docker\API\Normalizer\TaskSpecNetworksItemNormalizer::class, + \Docker\API\Model\TaskSpecPlacementPreferencesItem::class => \Docker\API\Normalizer\TaskSpecPlacementPreferencesItemNormalizer::class, + + \Docker\API\Model\TaskSpecPlacementPreferencesItemSpread::class => \Docker\API\Normalizer\TaskSpecPlacementPreferencesItemSpreadNormalizer::class, \Docker\API\Model\TaskSpecLogDriver::class => \Docker\API\Normalizer\TaskSpecLogDriverNormalizer::class, - \Docker\API\Model\Task::class => \Docker\API\Normalizer\TaskNormalizer::class, + \Docker\API\Model\ContainerStatus::class => \Docker\API\Normalizer\ContainerStatusNormalizer::class, - \Docker\API\Model\TaskVersion::class => \Docker\API\Normalizer\TaskVersionNormalizer::class, + \Docker\API\Model\PortStatus::class => \Docker\API\Normalizer\PortStatusNormalizer::class, \Docker\API\Model\TaskStatus::class => \Docker\API\Normalizer\TaskStatusNormalizer::class, - \Docker\API\Model\TaskStatusContainerStatus::class => \Docker\API\Normalizer\TaskStatusContainerStatusNormalizer::class, + \Docker\API\Model\Task::class => \Docker\API\Normalizer\TaskNormalizer::class, \Docker\API\Model\ServiceSpec::class => \Docker\API\Normalizer\ServiceSpecNormalizer::class, @@ -708,9 +955,11 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\ServiceSpecModeReplicated::class => \Docker\API\Normalizer\ServiceSpecModeReplicatedNormalizer::class, + \Docker\API\Model\ServiceSpecModeReplicatedJob::class => \Docker\API\Normalizer\ServiceSpecModeReplicatedJobNormalizer::class, + \Docker\API\Model\ServiceSpecUpdateConfig::class => \Docker\API\Normalizer\ServiceSpecUpdateConfigNormalizer::class, - \Docker\API\Model\ServiceSpecNetworksItem::class => \Docker\API\Normalizer\ServiceSpecNetworksItemNormalizer::class, + \Docker\API\Model\ServiceSpecRollbackConfig::class => \Docker\API\Normalizer\ServiceSpecRollbackConfigNormalizer::class, \Docker\API\Model\EndpointPortConfig::class => \Docker\API\Normalizer\EndpointPortConfigNormalizer::class, @@ -718,73 +967,133 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\Service::class => \Docker\API\Normalizer\ServiceNormalizer::class, - \Docker\API\Model\ServiceVersion::class => \Docker\API\Normalizer\ServiceVersionNormalizer::class, - \Docker\API\Model\ServiceEndpoint::class => \Docker\API\Normalizer\ServiceEndpointNormalizer::class, \Docker\API\Model\ServiceEndpointVirtualIPsItem::class => \Docker\API\Normalizer\ServiceEndpointVirtualIPsItemNormalizer::class, \Docker\API\Model\ServiceUpdateStatus::class => \Docker\API\Normalizer\ServiceUpdateStatusNormalizer::class, - \Docker\API\Model\ImageDeleteResponse::class => \Docker\API\Normalizer\ImageDeleteResponseNormalizer::class, + \Docker\API\Model\ServiceServiceStatus::class => \Docker\API\Normalizer\ServiceServiceStatusNormalizer::class, + + \Docker\API\Model\ServiceJobStatus::class => \Docker\API\Normalizer\ServiceJobStatusNormalizer::class, + + \Docker\API\Model\ImageDeleteResponseItem::class => \Docker\API\Normalizer\ImageDeleteResponseItemNormalizer::class, + + \Docker\API\Model\ServiceCreateResponse::class => \Docker\API\Normalizer\ServiceCreateResponseNormalizer::class, \Docker\API\Model\ServiceUpdateResponse::class => \Docker\API\Normalizer\ServiceUpdateResponseNormalizer::class, - \Docker\API\Model\ContainerSummaryItem::class => \Docker\API\Normalizer\ContainerSummaryItemNormalizer::class, + \Docker\API\Model\ContainerSummary::class => \Docker\API\Normalizer\ContainerSummaryNormalizer::class, + + \Docker\API\Model\ContainerSummaryHostConfig::class => \Docker\API\Normalizer\ContainerSummaryHostConfigNormalizer::class, - \Docker\API\Model\ContainerSummaryItemHostConfig::class => \Docker\API\Normalizer\ContainerSummaryItemHostConfigNormalizer::class, + \Docker\API\Model\ContainerSummaryNetworkSettings::class => \Docker\API\Normalizer\ContainerSummaryNetworkSettingsNormalizer::class, - \Docker\API\Model\ContainerSummaryItemNetworkSettings::class => \Docker\API\Normalizer\ContainerSummaryItemNetworkSettingsNormalizer::class, + \Docker\API\Model\Driver::class => \Docker\API\Normalizer\DriverNormalizer::class, \Docker\API\Model\SecretSpec::class => \Docker\API\Normalizer\SecretSpecNormalizer::class, \Docker\API\Model\Secret::class => \Docker\API\Normalizer\SecretNormalizer::class, - \Docker\API\Model\SecretVersion::class => \Docker\API\Normalizer\SecretVersionNormalizer::class, + \Docker\API\Model\ConfigSpec::class => \Docker\API\Normalizer\ConfigSpecNormalizer::class, - \Docker\API\Model\ContainersCreatePostBody::class => \Docker\API\Normalizer\ContainersCreatePostBodyNormalizer::class, + \Docker\API\Model\Config::class => \Docker\API\Normalizer\ConfigNormalizer::class, - \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class => \Docker\API\Normalizer\ContainersCreatePostBodyNetworkingConfigNormalizer::class, + \Docker\API\Model\ContainerState::class => \Docker\API\Normalizer\ContainerStateNormalizer::class, - \Docker\API\Model\ContainersCreatePostResponse201::class => \Docker\API\Normalizer\ContainersCreatePostResponse201Normalizer::class, + \Docker\API\Model\ContainerCreateResponse::class => \Docker\API\Normalizer\ContainerCreateResponseNormalizer::class, - \Docker\API\Model\ContainersIdJsonGetResponse200::class => \Docker\API\Normalizer\ContainersIdJsonGetResponse200Normalizer::class, + \Docker\API\Model\ContainerWaitResponse::class => \Docker\API\Normalizer\ContainerWaitResponseNormalizer::class, - \Docker\API\Model\ContainersIdJsonGetResponse200State::class => \Docker\API\Normalizer\ContainersIdJsonGetResponse200StateNormalizer::class, + \Docker\API\Model\ContainerWaitExitError::class => \Docker\API\Normalizer\ContainerWaitExitErrorNormalizer::class, - \Docker\API\Model\ContainersIdTopGetResponse200::class => \Docker\API\Normalizer\ContainersIdTopGetResponse200Normalizer::class, + \Docker\API\Model\SystemVersion::class => \Docker\API\Normalizer\SystemVersionNormalizer::class, - \Docker\API\Model\ContainersIdChangesGetResponse200Item::class => \Docker\API\Normalizer\ContainersIdChangesGetResponse200ItemNormalizer::class, + \Docker\API\Model\SystemVersionPlatform::class => \Docker\API\Normalizer\SystemVersionPlatformNormalizer::class, - \Docker\API\Model\ContainersIdUpdatePostBody::class => \Docker\API\Normalizer\ContainersIdUpdatePostBodyNormalizer::class, + \Docker\API\Model\SystemVersionComponentsItem::class => \Docker\API\Normalizer\SystemVersionComponentsItemNormalizer::class, - \Docker\API\Model\ContainersIdUpdatePostResponse200::class => \Docker\API\Normalizer\ContainersIdUpdatePostResponse200Normalizer::class, + \Docker\API\Model\SystemInfo::class => \Docker\API\Normalizer\SystemInfoNormalizer::class, - \Docker\API\Model\ContainersIdWaitPostResponse200::class => \Docker\API\Normalizer\ContainersIdWaitPostResponse200Normalizer::class, + \Docker\API\Model\SystemInfoDefaultAddressPoolsItem::class => \Docker\API\Normalizer\SystemInfoDefaultAddressPoolsItemNormalizer::class, - \Docker\API\Model\ContainersPrunePostResponse200::class => \Docker\API\Normalizer\ContainersPrunePostResponse200Normalizer::class, + \Docker\API\Model\ContainerdInfo::class => \Docker\API\Normalizer\ContainerdInfoNormalizer::class, - \Docker\API\Model\ImagesNameHistoryGetResponse200Item::class => \Docker\API\Normalizer\ImagesNameHistoryGetResponse200ItemNormalizer::class, + \Docker\API\Model\ContainerdInfoNamespaces::class => \Docker\API\Normalizer\ContainerdInfoNamespacesNormalizer::class, - \Docker\API\Model\ImagesSearchGetResponse200Item::class => \Docker\API\Normalizer\ImagesSearchGetResponse200ItemNormalizer::class, + \Docker\API\Model\PluginsInfo::class => \Docker\API\Normalizer\PluginsInfoNormalizer::class, - \Docker\API\Model\ImagesPrunePostResponse200::class => \Docker\API\Normalizer\ImagesPrunePostResponse200Normalizer::class, + \Docker\API\Model\RegistryServiceConfig::class => \Docker\API\Normalizer\RegistryServiceConfigNormalizer::class, - \Docker\API\Model\AuthPostResponse200::class => \Docker\API\Normalizer\AuthPostResponse200Normalizer::class, + \Docker\API\Model\IndexInfo::class => \Docker\API\Normalizer\IndexInfoNormalizer::class, + + \Docker\API\Model\Runtime::class => \Docker\API\Normalizer\RuntimeNormalizer::class, + + \Docker\API\Model\Commit::class => \Docker\API\Normalizer\CommitNormalizer::class, + + \Docker\API\Model\SwarmInfo::class => \Docker\API\Normalizer\SwarmInfoNormalizer::class, + + \Docker\API\Model\PeerNode::class => \Docker\API\Normalizer\PeerNodeNormalizer::class, + + \Docker\API\Model\NetworkAttachmentConfig::class => \Docker\API\Normalizer\NetworkAttachmentConfigNormalizer::class, + + \Docker\API\Model\EventActor::class => \Docker\API\Normalizer\EventActorNormalizer::class, + + \Docker\API\Model\EventMessage::class => \Docker\API\Normalizer\EventMessageNormalizer::class, + + \Docker\API\Model\OCIDescriptor::class => \Docker\API\Normalizer\OCIDescriptorNormalizer::class, + + \Docker\API\Model\OCIPlatform::class => \Docker\API\Normalizer\OCIPlatformNormalizer::class, - \Docker\API\Model\InfoGetResponse200::class => \Docker\API\Normalizer\InfoGetResponse200Normalizer::class, + \Docker\API\Model\DistributionInspect::class => \Docker\API\Normalizer\DistributionInspectNormalizer::class, - \Docker\API\Model\InfoGetResponse200Plugins::class => \Docker\API\Normalizer\InfoGetResponse200PluginsNormalizer::class, + \Docker\API\Model\ClusterVolume::class => \Docker\API\Normalizer\ClusterVolumeNormalizer::class, - \Docker\API\Model\InfoGetResponse200RegistryConfig::class => \Docker\API\Normalizer\InfoGetResponse200RegistryConfigNormalizer::class, + \Docker\API\Model\ClusterVolumeInfo::class => \Docker\API\Normalizer\ClusterVolumeInfoNormalizer::class, - \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class => \Docker\API\Normalizer\InfoGetResponse200RegistryConfigIndexConfigsItemNormalizer::class, + \Docker\API\Model\ClusterVolumePublishStatusItem::class => \Docker\API\Normalizer\ClusterVolumePublishStatusItemNormalizer::class, - \Docker\API\Model\VersionGetResponse200::class => \Docker\API\Normalizer\VersionGetResponse200Normalizer::class, + \Docker\API\Model\ClusterVolumeSpec::class => \Docker\API\Normalizer\ClusterVolumeSpecNormalizer::class, - \Docker\API\Model\EventsGetResponse200::class => \Docker\API\Normalizer\EventsGetResponse200Normalizer::class, + \Docker\API\Model\ClusterVolumeSpecAccessMode::class => \Docker\API\Normalizer\ClusterVolumeSpecAccessModeNormalizer::class, - \Docker\API\Model\EventsGetResponse200Actor::class => \Docker\API\Normalizer\EventsGetResponse200ActorNormalizer::class, + \Docker\API\Model\ClusterVolumeSpecAccessModeSecretsItem::class => \Docker\API\Normalizer\ClusterVolumeSpecAccessModeSecretsItemNormalizer::class, + + \Docker\API\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements::class => \Docker\API\Normalizer\ClusterVolumeSpecAccessModeAccessibilityRequirementsNormalizer::class, + + \Docker\API\Model\ClusterVolumeSpecAccessModeCapacityRange::class => \Docker\API\Normalizer\ClusterVolumeSpecAccessModeCapacityRangeNormalizer::class, + + \Docker\API\Model\ImageManifestSummary::class => \Docker\API\Normalizer\ImageManifestSummaryNormalizer::class, + + \Docker\API\Model\ImageManifestSummarySize::class => \Docker\API\Normalizer\ImageManifestSummarySizeNormalizer::class, + + \Docker\API\Model\ImageManifestSummaryImageData::class => \Docker\API\Normalizer\ImageManifestSummaryImageDataNormalizer::class, + + \Docker\API\Model\ImageManifestSummaryImageDataSize::class => \Docker\API\Normalizer\ImageManifestSummaryImageDataSizeNormalizer::class, + + \Docker\API\Model\ImageManifestSummaryAttestationData::class => \Docker\API\Normalizer\ImageManifestSummaryAttestationDataNormalizer::class, + + \Docker\API\Model\ContainersCreatePostBody::class => \Docker\API\Normalizer\ContainersCreatePostBodyNormalizer::class, + + \Docker\API\Model\ContainersIdJsonGetResponse200::class => \Docker\API\Normalizer\ContainersIdJsonGetResponse200Normalizer::class, + + \Docker\API\Model\ContainersIdTopGetResponse200::class => \Docker\API\Normalizer\ContainersIdTopGetResponse200Normalizer::class, + + \Docker\API\Model\ContainersIdUpdatePostBody::class => \Docker\API\Normalizer\ContainersIdUpdatePostBodyNormalizer::class, + + \Docker\API\Model\ContainersIdUpdatePostResponse200::class => \Docker\API\Normalizer\ContainersIdUpdatePostResponse200Normalizer::class, + + \Docker\API\Model\ContainersPrunePostResponse200::class => \Docker\API\Normalizer\ContainersPrunePostResponse200Normalizer::class, + + \Docker\API\Model\BuildPrunePostResponse200::class => \Docker\API\Normalizer\BuildPrunePostResponse200Normalizer::class, + + \Docker\API\Model\ImagesNameHistoryGetResponse200Item::class => \Docker\API\Normalizer\ImagesNameHistoryGetResponse200ItemNormalizer::class, + + \Docker\API\Model\ImagesSearchGetResponse200Item::class => \Docker\API\Normalizer\ImagesSearchGetResponse200ItemNormalizer::class, + + \Docker\API\Model\ImagesPrunePostResponse200::class => \Docker\API\Normalizer\ImagesPrunePostResponse200Normalizer::class, + + \Docker\API\Model\AuthPostResponse200::class => \Docker\API\Normalizer\AuthPostResponse200Normalizer::class, \Docker\API\Model\SystemDfGetResponse200::class => \Docker\API\Normalizer\SystemDfGetResponse200Normalizer::class, @@ -794,30 +1103,18 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\ExecIdJsonGetResponse200::class => \Docker\API\Normalizer\ExecIdJsonGetResponse200Normalizer::class, - \Docker\API\Model\VolumesGetResponse200::class => \Docker\API\Normalizer\VolumesGetResponse200Normalizer::class, - - \Docker\API\Model\VolumesCreatePostBody::class => \Docker\API\Normalizer\VolumesCreatePostBodyNormalizer::class, + \Docker\API\Model\VolumesNamePutBody::class => \Docker\API\Normalizer\VolumesNamePutBodyNormalizer::class, \Docker\API\Model\VolumesPrunePostResponse200::class => \Docker\API\Normalizer\VolumesPrunePostResponse200Normalizer::class, \Docker\API\Model\NetworksCreatePostBody::class => \Docker\API\Normalizer\NetworksCreatePostBodyNormalizer::class, - \Docker\API\Model\NetworksCreatePostResponse201::class => \Docker\API\Normalizer\NetworksCreatePostResponse201Normalizer::class, - \Docker\API\Model\NetworksIdConnectPostBody::class => \Docker\API\Normalizer\NetworksIdConnectPostBodyNormalizer::class, \Docker\API\Model\NetworksIdDisconnectPostBody::class => \Docker\API\Normalizer\NetworksIdDisconnectPostBodyNormalizer::class, \Docker\API\Model\NetworksPrunePostResponse200::class => \Docker\API\Normalizer\NetworksPrunePostResponse200Normalizer::class, - \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class => \Docker\API\Normalizer\PluginsPrivilegesGetResponse200ItemNormalizer::class, - - \Docker\API\Model\PluginsPullPostBodyItem::class => \Docker\API\Normalizer\PluginsPullPostBodyItemNormalizer::class, - - \Docker\API\Model\SwarmGetResponse200::class => \Docker\API\Normalizer\SwarmGetResponse200Normalizer::class, - - \Docker\API\Model\SwarmGetResponse200JoinTokens::class => \Docker\API\Normalizer\SwarmGetResponse200JoinTokensNormalizer::class, - \Docker\API\Model\SwarmInitPostBody::class => \Docker\API\Normalizer\SwarmInitPostBodyNormalizer::class, \Docker\API\Model\SwarmJoinPostBody::class => \Docker\API\Normalizer\SwarmJoinPostBodyNormalizer::class, @@ -828,13 +1125,11 @@ class JaneObjectNormalizer implements DenormalizerInterface, NormalizerInterface \Docker\API\Model\ServicesCreatePostBody::class => \Docker\API\Normalizer\ServicesCreatePostBodyNormalizer::class, - \Docker\API\Model\ServicesCreatePostResponse201::class => \Docker\API\Normalizer\ServicesCreatePostResponse201Normalizer::class, - \Docker\API\Model\ServicesIdUpdatePostBody::class => \Docker\API\Normalizer\ServicesIdUpdatePostBodyNormalizer::class, \Docker\API\Model\SecretsCreatePostBody::class => \Docker\API\Normalizer\SecretsCreatePostBodyNormalizer::class, - \Docker\API\Model\SecretsCreatePostResponse201::class => \Docker\API\Normalizer\SecretsCreatePostResponse201Normalizer::class, + \Docker\API\Model\ConfigsCreatePostBody::class => \Docker\API\Normalizer\ConfigsCreatePostBodyNormalizer::class, \Jane\Component\JsonSchemaRuntime\Reference::class => \Docker\API\Runtime\Normalizer\ReferenceNormalizer::class, ], $normalizersCache = []; @@ -883,6 +1178,7 @@ public function getSupportedTypes(?string $format = null): array \Docker\API\Model\Port::class => false, \Docker\API\Model\MountPoint::class => false, \Docker\API\Model\DeviceMapping::class => false, + \Docker\API\Model\DeviceRequest::class => false, \Docker\API\Model\ThrottleDevice::class => false, \Docker\API\Model\Mount::class => false, \Docker\API\Model\MountBindOptions::class => false, @@ -893,25 +1189,44 @@ public function getSupportedTypes(?string $format = null): array \Docker\API\Model\Resources::class => false, \Docker\API\Model\ResourcesBlkioWeightDeviceItem::class => false, \Docker\API\Model\ResourcesUlimitsItem::class => false, + \Docker\API\Model\Limit::class => false, + \Docker\API\Model\ResourceObject::class => false, + \Docker\API\Model\GenericResourcesItem::class => false, + \Docker\API\Model\GenericResourcesItemNamedResourceSpec::class => false, + \Docker\API\Model\GenericResourcesItemDiscreteResourceSpec::class => false, + \Docker\API\Model\HealthConfig::class => false, + \Docker\API\Model\Health::class => false, + \Docker\API\Model\HealthcheckResult::class => false, \Docker\API\Model\HostConfig::class => false, \Docker\API\Model\HostConfigLogConfig::class => false, - \Docker\API\Model\HostConfigPortBindingsItem::class => false, - \Docker\API\Model\Config::class => false, - \Docker\API\Model\ConfigHealthcheck::class => false, - \Docker\API\Model\ConfigVolumes::class => false, - \Docker\API\Model\NetworkConfig::class => false, - \Docker\API\Model\GraphDriver::class => false, - \Docker\API\Model\Image::class => false, - \Docker\API\Model\ImageRootFS::class => false, + \Docker\API\Model\ContainerConfig::class => false, + \Docker\API\Model\ImageConfig::class => false, + \Docker\API\Model\NetworkingConfig::class => false, + \Docker\API\Model\NetworkSettings::class => false, + \Docker\API\Model\Address::class => false, + \Docker\API\Model\PortBinding::class => false, + \Docker\API\Model\DriverData::class => false, + \Docker\API\Model\FilesystemChange::class => false, + \Docker\API\Model\ImageInspect::class => false, + \Docker\API\Model\ImageInspectRootFS::class => false, + \Docker\API\Model\ImageInspectMetadata::class => false, \Docker\API\Model\ImageSummary::class => false, \Docker\API\Model\AuthConfig::class => false, \Docker\API\Model\ProcessConfig::class => false, \Docker\API\Model\Volume::class => false, \Docker\API\Model\VolumeUsageData::class => false, + \Docker\API\Model\VolumeCreateOptions::class => false, + \Docker\API\Model\VolumeListResponse::class => false, \Docker\API\Model\Network::class => false, + \Docker\API\Model\ConfigReference::class => false, \Docker\API\Model\IPAM::class => false, + \Docker\API\Model\IPAMConfig::class => false, \Docker\API\Model\NetworkContainer::class => false, + \Docker\API\Model\PeerInfo::class => false, + \Docker\API\Model\NetworkCreateResponse::class => false, \Docker\API\Model\BuildInfo::class => false, + \Docker\API\Model\BuildCache::class => false, + \Docker\API\Model\ImageID::class => false, \Docker\API\Model\CreateImageInfo::class => false, \Docker\API\Model\PushImageInfo::class => false, \Docker\API\Model\ErrorDetail::class => false, @@ -919,11 +1234,12 @@ public function getSupportedTypes(?string $format = null): array \Docker\API\Model\ErrorResponse::class => false, \Docker\API\Model\IdResponse::class => false, \Docker\API\Model\EndpointSettings::class => false, - \Docker\API\Model\EndpointSettingsIPAMConfig::class => false, + \Docker\API\Model\EndpointIPAMConfig::class => false, \Docker\API\Model\PluginMount::class => false, \Docker\API\Model\PluginDevice::class => false, \Docker\API\Model\PluginEnv::class => false, \Docker\API\Model\PluginInterfaceType::class => false, + \Docker\API\Model\PluginPrivilege::class => false, \Docker\API\Model\Plugin::class => false, \Docker\API\Model\PluginSettings::class => false, \Docker\API\Model\PluginConfig::class => false, @@ -933,14 +1249,16 @@ public function getSupportedTypes(?string $format = null): array \Docker\API\Model\PluginConfigLinux::class => false, \Docker\API\Model\PluginConfigArgs::class => false, \Docker\API\Model\PluginConfigRootfs::class => false, + \Docker\API\Model\ObjectVersion::class => false, \Docker\API\Model\NodeSpec::class => false, \Docker\API\Model\Node::class => false, - \Docker\API\Model\NodeVersion::class => false, \Docker\API\Model\NodeDescription::class => false, - \Docker\API\Model\NodeDescriptionPlatform::class => false, - \Docker\API\Model\NodeDescriptionResources::class => false, - \Docker\API\Model\NodeDescriptionEngine::class => false, - \Docker\API\Model\NodeDescriptionEnginePluginsItem::class => false, + \Docker\API\Model\Platform::class => false, + \Docker\API\Model\EngineDescription::class => false, + \Docker\API\Model\EngineDescriptionPluginsItem::class => false, + \Docker\API\Model\TLSInfo::class => false, + \Docker\API\Model\NodeStatus::class => false, + \Docker\API\Model\ManagerStatus::class => false, \Docker\API\Model\SwarmSpec::class => false, \Docker\API\Model\SwarmSpecOrchestration::class => false, \Docker\API\Model\SwarmSpecRaft::class => false, @@ -951,88 +1269,124 @@ public function getSupportedTypes(?string $format = null): array \Docker\API\Model\SwarmSpecTaskDefaults::class => false, \Docker\API\Model\SwarmSpecTaskDefaultsLogDriver::class => false, \Docker\API\Model\ClusterInfo::class => false, - \Docker\API\Model\ClusterInfoVersion::class => false, + \Docker\API\Model\JoinTokens::class => false, + \Docker\API\Model\Swarm::class => false, \Docker\API\Model\TaskSpec::class => false, + \Docker\API\Model\TaskSpecPluginSpec::class => false, \Docker\API\Model\TaskSpecContainerSpec::class => false, + \Docker\API\Model\TaskSpecContainerSpecPrivileges::class => false, + \Docker\API\Model\TaskSpecContainerSpecPrivilegesCredentialSpec::class => false, + \Docker\API\Model\TaskSpecContainerSpecPrivilegesSELinuxContext::class => false, + \Docker\API\Model\TaskSpecContainerSpecPrivilegesSeccomp::class => false, + \Docker\API\Model\TaskSpecContainerSpecPrivilegesAppArmor::class => false, \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class => false, + \Docker\API\Model\TaskSpecContainerSpecSecretsItem::class => false, + \Docker\API\Model\TaskSpecContainerSpecSecretsItemFile::class => false, + \Docker\API\Model\TaskSpecContainerSpecConfigsItem::class => false, + \Docker\API\Model\TaskSpecContainerSpecConfigsItemFile::class => false, + \Docker\API\Model\TaskSpecContainerSpecUlimitsItem::class => false, + \Docker\API\Model\TaskSpecNetworkAttachmentSpec::class => false, \Docker\API\Model\TaskSpecResources::class => false, - \Docker\API\Model\TaskSpecResourcesLimits::class => false, - \Docker\API\Model\TaskSpecResourcesReservations::class => false, \Docker\API\Model\TaskSpecRestartPolicy::class => false, \Docker\API\Model\TaskSpecPlacement::class => false, - \Docker\API\Model\TaskSpecNetworksItem::class => false, + \Docker\API\Model\TaskSpecPlacementPreferencesItem::class => false, + \Docker\API\Model\TaskSpecPlacementPreferencesItemSpread::class => false, \Docker\API\Model\TaskSpecLogDriver::class => false, - \Docker\API\Model\Task::class => false, - \Docker\API\Model\TaskVersion::class => false, + \Docker\API\Model\ContainerStatus::class => false, + \Docker\API\Model\PortStatus::class => false, \Docker\API\Model\TaskStatus::class => false, - \Docker\API\Model\TaskStatusContainerStatus::class => false, + \Docker\API\Model\Task::class => false, \Docker\API\Model\ServiceSpec::class => false, \Docker\API\Model\ServiceSpecMode::class => false, \Docker\API\Model\ServiceSpecModeReplicated::class => false, + \Docker\API\Model\ServiceSpecModeReplicatedJob::class => false, \Docker\API\Model\ServiceSpecUpdateConfig::class => false, - \Docker\API\Model\ServiceSpecNetworksItem::class => false, + \Docker\API\Model\ServiceSpecRollbackConfig::class => false, \Docker\API\Model\EndpointPortConfig::class => false, \Docker\API\Model\EndpointSpec::class => false, \Docker\API\Model\Service::class => false, - \Docker\API\Model\ServiceVersion::class => false, \Docker\API\Model\ServiceEndpoint::class => false, \Docker\API\Model\ServiceEndpointVirtualIPsItem::class => false, \Docker\API\Model\ServiceUpdateStatus::class => false, - \Docker\API\Model\ImageDeleteResponse::class => false, + \Docker\API\Model\ServiceServiceStatus::class => false, + \Docker\API\Model\ServiceJobStatus::class => false, + \Docker\API\Model\ImageDeleteResponseItem::class => false, + \Docker\API\Model\ServiceCreateResponse::class => false, \Docker\API\Model\ServiceUpdateResponse::class => false, - \Docker\API\Model\ContainerSummaryItem::class => false, - \Docker\API\Model\ContainerSummaryItemHostConfig::class => false, - \Docker\API\Model\ContainerSummaryItemNetworkSettings::class => false, + \Docker\API\Model\ContainerSummary::class => false, + \Docker\API\Model\ContainerSummaryHostConfig::class => false, + \Docker\API\Model\ContainerSummaryNetworkSettings::class => false, + \Docker\API\Model\Driver::class => false, \Docker\API\Model\SecretSpec::class => false, \Docker\API\Model\Secret::class => false, - \Docker\API\Model\SecretVersion::class => false, + \Docker\API\Model\ConfigSpec::class => false, + \Docker\API\Model\Config::class => false, + \Docker\API\Model\ContainerState::class => false, + \Docker\API\Model\ContainerCreateResponse::class => false, + \Docker\API\Model\ContainerWaitResponse::class => false, + \Docker\API\Model\ContainerWaitExitError::class => false, + \Docker\API\Model\SystemVersion::class => false, + \Docker\API\Model\SystemVersionPlatform::class => false, + \Docker\API\Model\SystemVersionComponentsItem::class => false, + \Docker\API\Model\SystemInfo::class => false, + \Docker\API\Model\SystemInfoDefaultAddressPoolsItem::class => false, + \Docker\API\Model\ContainerdInfo::class => false, + \Docker\API\Model\ContainerdInfoNamespaces::class => false, + \Docker\API\Model\PluginsInfo::class => false, + \Docker\API\Model\RegistryServiceConfig::class => false, + \Docker\API\Model\IndexInfo::class => false, + \Docker\API\Model\Runtime::class => false, + \Docker\API\Model\Commit::class => false, + \Docker\API\Model\SwarmInfo::class => false, + \Docker\API\Model\PeerNode::class => false, + \Docker\API\Model\NetworkAttachmentConfig::class => false, + \Docker\API\Model\EventActor::class => false, + \Docker\API\Model\EventMessage::class => false, + \Docker\API\Model\OCIDescriptor::class => false, + \Docker\API\Model\OCIPlatform::class => false, + \Docker\API\Model\DistributionInspect::class => false, + \Docker\API\Model\ClusterVolume::class => false, + \Docker\API\Model\ClusterVolumeInfo::class => false, + \Docker\API\Model\ClusterVolumePublishStatusItem::class => false, + \Docker\API\Model\ClusterVolumeSpec::class => false, + \Docker\API\Model\ClusterVolumeSpecAccessMode::class => false, + \Docker\API\Model\ClusterVolumeSpecAccessModeSecretsItem::class => false, + \Docker\API\Model\ClusterVolumeSpecAccessModeAccessibilityRequirements::class => false, + \Docker\API\Model\ClusterVolumeSpecAccessModeCapacityRange::class => false, + \Docker\API\Model\ImageManifestSummary::class => false, + \Docker\API\Model\ImageManifestSummarySize::class => false, + \Docker\API\Model\ImageManifestSummaryImageData::class => false, + \Docker\API\Model\ImageManifestSummaryImageDataSize::class => false, + \Docker\API\Model\ImageManifestSummaryAttestationData::class => false, \Docker\API\Model\ContainersCreatePostBody::class => false, - \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class => false, - \Docker\API\Model\ContainersCreatePostResponse201::class => false, \Docker\API\Model\ContainersIdJsonGetResponse200::class => false, - \Docker\API\Model\ContainersIdJsonGetResponse200State::class => false, \Docker\API\Model\ContainersIdTopGetResponse200::class => false, - \Docker\API\Model\ContainersIdChangesGetResponse200Item::class => false, \Docker\API\Model\ContainersIdUpdatePostBody::class => false, \Docker\API\Model\ContainersIdUpdatePostResponse200::class => false, - \Docker\API\Model\ContainersIdWaitPostResponse200::class => false, \Docker\API\Model\ContainersPrunePostResponse200::class => false, + \Docker\API\Model\BuildPrunePostResponse200::class => false, \Docker\API\Model\ImagesNameHistoryGetResponse200Item::class => false, \Docker\API\Model\ImagesSearchGetResponse200Item::class => false, \Docker\API\Model\ImagesPrunePostResponse200::class => false, \Docker\API\Model\AuthPostResponse200::class => false, - \Docker\API\Model\InfoGetResponse200::class => false, - \Docker\API\Model\InfoGetResponse200Plugins::class => false, - \Docker\API\Model\InfoGetResponse200RegistryConfig::class => false, - \Docker\API\Model\InfoGetResponse200RegistryConfigIndexConfigsItem::class => false, - \Docker\API\Model\VersionGetResponse200::class => false, - \Docker\API\Model\EventsGetResponse200::class => false, - \Docker\API\Model\EventsGetResponse200Actor::class => false, \Docker\API\Model\SystemDfGetResponse200::class => false, \Docker\API\Model\ContainersIdExecPostBody::class => false, \Docker\API\Model\ExecIdStartPostBody::class => false, \Docker\API\Model\ExecIdJsonGetResponse200::class => false, - \Docker\API\Model\VolumesGetResponse200::class => false, - \Docker\API\Model\VolumesCreatePostBody::class => false, + \Docker\API\Model\VolumesNamePutBody::class => false, \Docker\API\Model\VolumesPrunePostResponse200::class => false, \Docker\API\Model\NetworksCreatePostBody::class => false, - \Docker\API\Model\NetworksCreatePostResponse201::class => false, \Docker\API\Model\NetworksIdConnectPostBody::class => false, \Docker\API\Model\NetworksIdDisconnectPostBody::class => false, \Docker\API\Model\NetworksPrunePostResponse200::class => false, - \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class => false, - \Docker\API\Model\PluginsPullPostBodyItem::class => false, - \Docker\API\Model\SwarmGetResponse200::class => false, - \Docker\API\Model\SwarmGetResponse200JoinTokens::class => false, \Docker\API\Model\SwarmInitPostBody::class => false, \Docker\API\Model\SwarmJoinPostBody::class => false, \Docker\API\Model\SwarmUnlockkeyGetResponse200::class => false, \Docker\API\Model\SwarmUnlockPostBody::class => false, \Docker\API\Model\ServicesCreatePostBody::class => false, - \Docker\API\Model\ServicesCreatePostResponse201::class => false, \Docker\API\Model\ServicesIdUpdatePostBody::class => false, \Docker\API\Model\SecretsCreatePostBody::class => false, - \Docker\API\Model\SecretsCreatePostResponse201::class => false, + \Docker\API\Model\ConfigsCreatePostBody::class => false, \Jane\Component\JsonSchemaRuntime\Reference::class => false, ]; } diff --git a/generated/Normalizer/SwarmGetResponse200JoinTokensNormalizer.php b/generated/Normalizer/JoinTokensNormalizer.php similarity index 85% rename from generated/Normalizer/SwarmGetResponse200JoinTokensNormalizer.php rename to generated/Normalizer/JoinTokensNormalizer.php index d57fdc988..690638736 100644 --- a/generated/Normalizer/SwarmGetResponse200JoinTokensNormalizer.php +++ b/generated/Normalizer/JoinTokensNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SwarmGetResponse200JoinTokensNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class JoinTokensNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class SwarmGetResponse200JoinTokensNormalizer implements DenormalizerInterface, use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\SwarmGetResponse200JoinTokens::class; + return $type === \Docker\API\Model\JoinTokens::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\SwarmGetResponse200JoinTokens::class; + return is_object($data) && get_class($data) === \Docker\API\Model\JoinTokens::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\SwarmGetResponse200JoinTokens(); + $object = new \Docker\API\Model\JoinTokens(); if (null === $data || false === \is_array($data)) { return $object; } @@ -67,11 +67,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\SwarmGetResponse200JoinTokens::class => false]; + return [\Docker\API\Model\JoinTokens::class => false]; } } } else { - class SwarmGetResponse200JoinTokensNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class JoinTokensNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -79,11 +79,11 @@ class SwarmGetResponse200JoinTokensNormalizer implements DenormalizerInterface, use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\SwarmGetResponse200JoinTokens::class; + return $type === \Docker\API\Model\JoinTokens::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\SwarmGetResponse200JoinTokens::class; + return is_object($data) && get_class($data) === \Docker\API\Model\JoinTokens::class; } /** * @return mixed @@ -96,7 +96,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\SwarmGetResponse200JoinTokens(); + $object = new \Docker\API\Model\JoinTokens(); if (null === $data || false === \is_array($data)) { return $object; } @@ -130,7 +130,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\SwarmGetResponse200JoinTokens::class => false]; + return [\Docker\API\Model\JoinTokens::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/NodeDescriptionResourcesNormalizer.php b/generated/Normalizer/LimitNormalizer.php similarity index 78% rename from generated/Normalizer/NodeDescriptionResourcesNormalizer.php rename to generated/Normalizer/LimitNormalizer.php index 6ee9e5122..6580fd26f 100644 --- a/generated/Normalizer/NodeDescriptionResourcesNormalizer.php +++ b/generated/Normalizer/LimitNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NodeDescriptionResourcesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class LimitNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class NodeDescriptionResourcesNormalizer implements DenormalizerInterface, Norma use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\NodeDescriptionResources::class; + return $type === \Docker\API\Model\Limit::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionResources::class; + return is_object($data) && get_class($data) === \Docker\API\Model\Limit::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\NodeDescriptionResources(); + $object = new \Docker\API\Model\Limit(); if (null === $data || false === \is_array($data)) { return $object; } @@ -52,6 +52,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] === null) { $object->setMemoryBytes(null); } + if (\array_key_exists('Pids', $data) && $data['Pids'] !== null) { + $object->setPids($data['Pids']); + } + elseif (\array_key_exists('Pids', $data) && $data['Pids'] === null) { + $object->setPids(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -63,15 +69,18 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('memoryBytes') && null !== $object->getMemoryBytes()) { $data['MemoryBytes'] = $object->getMemoryBytes(); } + if ($object->isInitialized('pids') && null !== $object->getPids()) { + $data['Pids'] = $object->getPids(); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\NodeDescriptionResources::class => false]; + return [\Docker\API\Model\Limit::class => false]; } } } else { - class NodeDescriptionResourcesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class LimitNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -79,11 +88,11 @@ class NodeDescriptionResourcesNormalizer implements DenormalizerInterface, Norma use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\NodeDescriptionResources::class; + return $type === \Docker\API\Model\Limit::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionResources::class; + return is_object($data) && get_class($data) === \Docker\API\Model\Limit::class; } /** * @return mixed @@ -96,7 +105,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\NodeDescriptionResources(); + $object = new \Docker\API\Model\Limit(); if (null === $data || false === \is_array($data)) { return $object; } @@ -112,6 +121,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] === null) { $object->setMemoryBytes(null); } + if (\array_key_exists('Pids', $data) && $data['Pids'] !== null) { + $object->setPids($data['Pids']); + } + elseif (\array_key_exists('Pids', $data) && $data['Pids'] === null) { + $object->setPids(null); + } return $object; } /** @@ -126,11 +141,14 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('memoryBytes') && null !== $object->getMemoryBytes()) { $data['MemoryBytes'] = $object->getMemoryBytes(); } + if ($object->isInitialized('pids') && null !== $object->getPids()) { + $data['Pids'] = $object->getPids(); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\NodeDescriptionResources::class => false]; + return [\Docker\API\Model\Limit::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ManagerStatusNormalizer.php b/generated/Normalizer/ManagerStatusNormalizer.php new file mode 100644 index 000000000..330337414 --- /dev/null +++ b/generated/Normalizer/ManagerStatusNormalizer.php @@ -0,0 +1,154 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ManagerStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ManagerStatus::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ManagerStatus::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ManagerStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Leader', $data) && $data['Leader'] !== null) { + $object->setLeader($data['Leader']); + } + elseif (\array_key_exists('Leader', $data) && $data['Leader'] === null) { + $object->setLeader(null); + } + if (\array_key_exists('Reachability', $data) && $data['Reachability'] !== null) { + $object->setReachability($data['Reachability']); + } + elseif (\array_key_exists('Reachability', $data) && $data['Reachability'] === null) { + $object->setReachability(null); + } + if (\array_key_exists('Addr', $data) && $data['Addr'] !== null) { + $object->setAddr($data['Addr']); + } + elseif (\array_key_exists('Addr', $data) && $data['Addr'] === null) { + $object->setAddr(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('leader') && null !== $object->getLeader()) { + $data['Leader'] = $object->getLeader(); + } + if ($object->isInitialized('reachability') && null !== $object->getReachability()) { + $data['Reachability'] = $object->getReachability(); + } + if ($object->isInitialized('addr') && null !== $object->getAddr()) { + $data['Addr'] = $object->getAddr(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ManagerStatus::class => false]; + } + } +} else { + class ManagerStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ManagerStatus::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ManagerStatus::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ManagerStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Leader', $data) && $data['Leader'] !== null) { + $object->setLeader($data['Leader']); + } + elseif (\array_key_exists('Leader', $data) && $data['Leader'] === null) { + $object->setLeader(null); + } + if (\array_key_exists('Reachability', $data) && $data['Reachability'] !== null) { + $object->setReachability($data['Reachability']); + } + elseif (\array_key_exists('Reachability', $data) && $data['Reachability'] === null) { + $object->setReachability(null); + } + if (\array_key_exists('Addr', $data) && $data['Addr'] !== null) { + $object->setAddr($data['Addr']); + } + elseif (\array_key_exists('Addr', $data) && $data['Addr'] === null) { + $object->setAddr(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('leader') && null !== $object->getLeader()) { + $data['Leader'] = $object->getLeader(); + } + if ($object->isInitialized('reachability') && null !== $object->getReachability()) { + $data['Reachability'] = $object->getReachability(); + } + if ($object->isInitialized('addr') && null !== $object->getAddr()) { + $data['Addr'] = $object->getAddr(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ManagerStatus::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/MountBindOptionsNormalizer.php b/generated/Normalizer/MountBindOptionsNormalizer.php index 992222369..206a9d6ed 100644 --- a/generated/Normalizer/MountBindOptionsNormalizer.php +++ b/generated/Normalizer/MountBindOptionsNormalizer.php @@ -46,6 +46,30 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Propagation', $data) && $data['Propagation'] === null) { $object->setPropagation(null); } + if (\array_key_exists('NonRecursive', $data) && $data['NonRecursive'] !== null) { + $object->setNonRecursive($data['NonRecursive']); + } + elseif (\array_key_exists('NonRecursive', $data) && $data['NonRecursive'] === null) { + $object->setNonRecursive(null); + } + if (\array_key_exists('CreateMountpoint', $data) && $data['CreateMountpoint'] !== null) { + $object->setCreateMountpoint($data['CreateMountpoint']); + } + elseif (\array_key_exists('CreateMountpoint', $data) && $data['CreateMountpoint'] === null) { + $object->setCreateMountpoint(null); + } + if (\array_key_exists('ReadOnlyNonRecursive', $data) && $data['ReadOnlyNonRecursive'] !== null) { + $object->setReadOnlyNonRecursive($data['ReadOnlyNonRecursive']); + } + elseif (\array_key_exists('ReadOnlyNonRecursive', $data) && $data['ReadOnlyNonRecursive'] === null) { + $object->setReadOnlyNonRecursive(null); + } + if (\array_key_exists('ReadOnlyForceRecursive', $data) && $data['ReadOnlyForceRecursive'] !== null) { + $object->setReadOnlyForceRecursive($data['ReadOnlyForceRecursive']); + } + elseif (\array_key_exists('ReadOnlyForceRecursive', $data) && $data['ReadOnlyForceRecursive'] === null) { + $object->setReadOnlyForceRecursive(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -54,6 +78,18 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('propagation') && null !== $object->getPropagation()) { $data['Propagation'] = $object->getPropagation(); } + if ($object->isInitialized('nonRecursive') && null !== $object->getNonRecursive()) { + $data['NonRecursive'] = $object->getNonRecursive(); + } + if ($object->isInitialized('createMountpoint') && null !== $object->getCreateMountpoint()) { + $data['CreateMountpoint'] = $object->getCreateMountpoint(); + } + if ($object->isInitialized('readOnlyNonRecursive') && null !== $object->getReadOnlyNonRecursive()) { + $data['ReadOnlyNonRecursive'] = $object->getReadOnlyNonRecursive(); + } + if ($object->isInitialized('readOnlyForceRecursive') && null !== $object->getReadOnlyForceRecursive()) { + $data['ReadOnlyForceRecursive'] = $object->getReadOnlyForceRecursive(); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -97,6 +133,30 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Propagation', $data) && $data['Propagation'] === null) { $object->setPropagation(null); } + if (\array_key_exists('NonRecursive', $data) && $data['NonRecursive'] !== null) { + $object->setNonRecursive($data['NonRecursive']); + } + elseif (\array_key_exists('NonRecursive', $data) && $data['NonRecursive'] === null) { + $object->setNonRecursive(null); + } + if (\array_key_exists('CreateMountpoint', $data) && $data['CreateMountpoint'] !== null) { + $object->setCreateMountpoint($data['CreateMountpoint']); + } + elseif (\array_key_exists('CreateMountpoint', $data) && $data['CreateMountpoint'] === null) { + $object->setCreateMountpoint(null); + } + if (\array_key_exists('ReadOnlyNonRecursive', $data) && $data['ReadOnlyNonRecursive'] !== null) { + $object->setReadOnlyNonRecursive($data['ReadOnlyNonRecursive']); + } + elseif (\array_key_exists('ReadOnlyNonRecursive', $data) && $data['ReadOnlyNonRecursive'] === null) { + $object->setReadOnlyNonRecursive(null); + } + if (\array_key_exists('ReadOnlyForceRecursive', $data) && $data['ReadOnlyForceRecursive'] !== null) { + $object->setReadOnlyForceRecursive($data['ReadOnlyForceRecursive']); + } + elseif (\array_key_exists('ReadOnlyForceRecursive', $data) && $data['ReadOnlyForceRecursive'] === null) { + $object->setReadOnlyForceRecursive(null); + } return $object; } /** @@ -108,6 +168,18 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('propagation') && null !== $object->getPropagation()) { $data['Propagation'] = $object->getPropagation(); } + if ($object->isInitialized('nonRecursive') && null !== $object->getNonRecursive()) { + $data['NonRecursive'] = $object->getNonRecursive(); + } + if ($object->isInitialized('createMountpoint') && null !== $object->getCreateMountpoint()) { + $data['CreateMountpoint'] = $object->getCreateMountpoint(); + } + if ($object->isInitialized('readOnlyNonRecursive') && null !== $object->getReadOnlyNonRecursive()) { + $data['ReadOnlyNonRecursive'] = $object->getReadOnlyNonRecursive(); + } + if ($object->isInitialized('readOnlyForceRecursive') && null !== $object->getReadOnlyForceRecursive()) { + $data['ReadOnlyForceRecursive'] = $object->getReadOnlyForceRecursive(); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/MountNormalizer.php b/generated/Normalizer/MountNormalizer.php index 9e89c4de4..941d010d1 100644 --- a/generated/Normalizer/MountNormalizer.php +++ b/generated/Normalizer/MountNormalizer.php @@ -64,6 +64,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('ReadOnly', $data) && $data['ReadOnly'] === null) { $object->setReadOnly(null); } + if (\array_key_exists('Consistency', $data) && $data['Consistency'] !== null) { + $object->setConsistency($data['Consistency']); + } + elseif (\array_key_exists('Consistency', $data) && $data['Consistency'] === null) { + $object->setConsistency(null); + } if (\array_key_exists('BindOptions', $data) && $data['BindOptions'] !== null) { $object->setBindOptions($this->denormalizer->denormalize($data['BindOptions'], \Docker\API\Model\MountBindOptions::class, 'json', $context)); } @@ -99,6 +105,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('readOnly') && null !== $object->getReadOnly()) { $data['ReadOnly'] = $object->getReadOnly(); } + if ($object->isInitialized('consistency') && null !== $object->getConsistency()) { + $data['Consistency'] = $object->getConsistency(); + } if ($object->isInitialized('bindOptions') && null !== $object->getBindOptions()) { $data['BindOptions'] = $this->normalizer->normalize($object->getBindOptions(), 'json', $context); } @@ -169,6 +178,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('ReadOnly', $data) && $data['ReadOnly'] === null) { $object->setReadOnly(null); } + if (\array_key_exists('Consistency', $data) && $data['Consistency'] !== null) { + $object->setConsistency($data['Consistency']); + } + elseif (\array_key_exists('Consistency', $data) && $data['Consistency'] === null) { + $object->setConsistency(null); + } if (\array_key_exists('BindOptions', $data) && $data['BindOptions'] !== null) { $object->setBindOptions($this->denormalizer->denormalize($data['BindOptions'], \Docker\API\Model\MountBindOptions::class, 'json', $context)); } @@ -207,6 +222,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('readOnly') && null !== $object->getReadOnly()) { $data['ReadOnly'] = $object->getReadOnly(); } + if ($object->isInitialized('consistency') && null !== $object->getConsistency()) { + $data['Consistency'] = $object->getConsistency(); + } if ($object->isInitialized('bindOptions') && null !== $object->getBindOptions()) { $data['BindOptions'] = $this->normalizer->normalize($object->getBindOptions(), 'json', $context); } diff --git a/generated/Normalizer/MountTmpfsOptionsNormalizer.php b/generated/Normalizer/MountTmpfsOptionsNormalizer.php index 30df6fb49..8588f3a29 100644 --- a/generated/Normalizer/MountTmpfsOptionsNormalizer.php +++ b/generated/Normalizer/MountTmpfsOptionsNormalizer.php @@ -52,6 +52,20 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { $object->setMode(null); } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values = []; + foreach ($data['Options'] as $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $value_1; + } + $values[] = $values_1; + } + $object->setOptions($values); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -63,6 +77,17 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('mode') && null !== $object->getMode()) { $data['Mode'] = $object->getMode(); } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values = []; + foreach ($object->getOptions() as $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $value_1; + } + $values[] = $values_1; + } + $data['Options'] = $values; + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -112,6 +137,20 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { $object->setMode(null); } + if (\array_key_exists('Options', $data) && $data['Options'] !== null) { + $values = []; + foreach ($data['Options'] as $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $value_1; + } + $values[] = $values_1; + } + $object->setOptions($values); + } + elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { + $object->setOptions(null); + } return $object; } /** @@ -126,6 +165,17 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('mode') && null !== $object->getMode()) { $data['Mode'] = $object->getMode(); } + if ($object->isInitialized('options') && null !== $object->getOptions()) { + $values = []; + foreach ($object->getOptions() as $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $value_1; + } + $values[] = $values_1; + } + $data['Options'] = $values; + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/MountVolumeOptionsNormalizer.php b/generated/Normalizer/MountVolumeOptionsNormalizer.php index a02728d19..1234e20ed 100644 --- a/generated/Normalizer/MountVolumeOptionsNormalizer.php +++ b/generated/Normalizer/MountVolumeOptionsNormalizer.php @@ -62,6 +62,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('DriverConfig', $data) && $data['DriverConfig'] === null) { $object->setDriverConfig(null); } + if (\array_key_exists('Subpath', $data) && $data['Subpath'] !== null) { + $object->setSubpath($data['Subpath']); + } + elseif (\array_key_exists('Subpath', $data) && $data['Subpath'] === null) { + $object->setSubpath(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -80,6 +86,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('driverConfig') && null !== $object->getDriverConfig()) { $data['DriverConfig'] = $this->normalizer->normalize($object->getDriverConfig(), 'json', $context); } + if ($object->isInitialized('subpath') && null !== $object->getSubpath()) { + $data['Subpath'] = $object->getSubpath(); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -139,6 +148,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('DriverConfig', $data) && $data['DriverConfig'] === null) { $object->setDriverConfig(null); } + if (\array_key_exists('Subpath', $data) && $data['Subpath'] !== null) { + $object->setSubpath($data['Subpath']); + } + elseif (\array_key_exists('Subpath', $data) && $data['Subpath'] === null) { + $object->setSubpath(null); + } return $object; } /** @@ -160,6 +175,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('driverConfig') && null !== $object->getDriverConfig()) { $data['DriverConfig'] = $this->normalizer->normalize($object->getDriverConfig(), 'json', $context); } + if ($object->isInitialized('subpath') && null !== $object->getSubpath()) { + $data['Subpath'] = $object->getSubpath(); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/ServiceSpecNetworksItemNormalizer.php b/generated/Normalizer/NetworkAttachmentConfigNormalizer.php similarity index 72% rename from generated/Normalizer/ServiceSpecNetworksItemNormalizer.php rename to generated/Normalizer/NetworkAttachmentConfigNormalizer.php index a430b411c..fc7c5d6d0 100644 --- a/generated/Normalizer/ServiceSpecNetworksItemNormalizer.php +++ b/generated/Normalizer/NetworkAttachmentConfigNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ServiceSpecNetworksItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class NetworkAttachmentConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ServiceSpecNetworksItemNormalizer implements DenormalizerInterface, Normal use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ServiceSpecNetworksItem::class; + return $type === \Docker\API\Model\NetworkAttachmentConfig::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpecNetworksItem::class; + return is_object($data) && get_class($data) === \Docker\API\Model\NetworkAttachmentConfig::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ServiceSpecNetworksItem(); + $object = new \Docker\API\Model\NetworkAttachmentConfig(); if (null === $data || false === \is_array($data)) { return $object; } @@ -56,6 +56,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Aliases', $data) && $data['Aliases'] === null) { $object->setAliases(null); } + if (\array_key_exists('DriverOpts', $data) && $data['DriverOpts'] !== null) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['DriverOpts'] as $key => $value_1) { + $values_1[$key] = $value_1; + } + $object->setDriverOpts($values_1); + } + elseif (\array_key_exists('DriverOpts', $data) && $data['DriverOpts'] === null) { + $object->setDriverOpts(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -71,15 +81,22 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['Aliases'] = $values; } + if ($object->isInitialized('driverOpts') && null !== $object->getDriverOpts()) { + $values_1 = []; + foreach ($object->getDriverOpts() as $key => $value_1) { + $values_1[$key] = $value_1; + } + $data['DriverOpts'] = $values_1; + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ServiceSpecNetworksItem::class => false]; + return [\Docker\API\Model\NetworkAttachmentConfig::class => false]; } } } else { - class ServiceSpecNetworksItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class NetworkAttachmentConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -87,11 +104,11 @@ class ServiceSpecNetworksItemNormalizer implements DenormalizerInterface, Normal use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ServiceSpecNetworksItem::class; + return $type === \Docker\API\Model\NetworkAttachmentConfig::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpecNetworksItem::class; + return is_object($data) && get_class($data) === \Docker\API\Model\NetworkAttachmentConfig::class; } /** * @return mixed @@ -104,7 +121,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ServiceSpecNetworksItem(); + $object = new \Docker\API\Model\NetworkAttachmentConfig(); if (null === $data || false === \is_array($data)) { return $object; } @@ -124,6 +141,16 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Aliases', $data) && $data['Aliases'] === null) { $object->setAliases(null); } + if (\array_key_exists('DriverOpts', $data) && $data['DriverOpts'] !== null) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['DriverOpts'] as $key => $value_1) { + $values_1[$key] = $value_1; + } + $object->setDriverOpts($values_1); + } + elseif (\array_key_exists('DriverOpts', $data) && $data['DriverOpts'] === null) { + $object->setDriverOpts(null); + } return $object; } /** @@ -142,11 +169,18 @@ public function normalize($object, $format = null, array $context = []) } $data['Aliases'] = $values; } + if ($object->isInitialized('driverOpts') && null !== $object->getDriverOpts()) { + $values_1 = []; + foreach ($object->getDriverOpts() as $key => $value_1) { + $values_1[$key] = $value_1; + } + $data['DriverOpts'] = $values_1; + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ServiceSpecNetworksItem::class => false]; + return [\Docker\API\Model\NetworkAttachmentConfig::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/NetworkConfigNormalizer.php b/generated/Normalizer/NetworkConfigNormalizer.php deleted file mode 100644 index 91722e53d..000000000 --- a/generated/Normalizer/NetworkConfigNormalizer.php +++ /dev/null @@ -1,242 +0,0 @@ -= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NetworkConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool - { - return $type === \Docker\API\Model\NetworkConfig::class; - } - public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool - { - return is_object($data) && get_class($data) === \Docker\API\Model\NetworkConfig::class; - } - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \Docker\API\Model\NetworkConfig(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('Bridge', $data) && $data['Bridge'] !== null) { - $object->setBridge($data['Bridge']); - } - elseif (\array_key_exists('Bridge', $data) && $data['Bridge'] === null) { - $object->setBridge(null); - } - if (\array_key_exists('Gateway', $data) && $data['Gateway'] !== null) { - $object->setGateway($data['Gateway']); - } - elseif (\array_key_exists('Gateway', $data) && $data['Gateway'] === null) { - $object->setGateway(null); - } - if (\array_key_exists('Address', $data) && $data['Address'] !== null) { - $object->setAddress($data['Address']); - } - elseif (\array_key_exists('Address', $data) && $data['Address'] === null) { - $object->setAddress(null); - } - if (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] !== null) { - $object->setIPPrefixLen($data['IPPrefixLen']); - } - elseif (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] === null) { - $object->setIPPrefixLen(null); - } - if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { - $object->setMacAddress($data['MacAddress']); - } - elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { - $object->setMacAddress(null); - } - if (\array_key_exists('PortMapping', $data) && $data['PortMapping'] !== null) { - $object->setPortMapping($data['PortMapping']); - } - elseif (\array_key_exists('PortMapping', $data) && $data['PortMapping'] === null) { - $object->setPortMapping(null); - } - if (\array_key_exists('Ports', $data) && $data['Ports'] !== null) { - $values = []; - foreach ($data['Ports'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\Port::class, 'json', $context); - } - $object->setPorts($values); - } - elseif (\array_key_exists('Ports', $data) && $data['Ports'] === null) { - $object->setPorts(null); - } - return $object; - } - public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('bridge') && null !== $object->getBridge()) { - $data['Bridge'] = $object->getBridge(); - } - if ($object->isInitialized('gateway') && null !== $object->getGateway()) { - $data['Gateway'] = $object->getGateway(); - } - if ($object->isInitialized('address') && null !== $object->getAddress()) { - $data['Address'] = $object->getAddress(); - } - if ($object->isInitialized('iPPrefixLen') && null !== $object->getIPPrefixLen()) { - $data['IPPrefixLen'] = $object->getIPPrefixLen(); - } - if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { - $data['MacAddress'] = $object->getMacAddress(); - } - if ($object->isInitialized('portMapping') && null !== $object->getPortMapping()) { - $data['PortMapping'] = $object->getPortMapping(); - } - if ($object->isInitialized('ports') && null !== $object->getPorts()) { - $values = []; - foreach ($object->getPorts() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['Ports'] = $values; - } - return $data; - } - public function getSupportedTypes(?string $format = null): array - { - return [\Docker\API\Model\NetworkConfig::class => false]; - } - } -} else { - class NetworkConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool - { - return $type === \Docker\API\Model\NetworkConfig::class; - } - public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool - { - return is_object($data) && get_class($data) === \Docker\API\Model\NetworkConfig::class; - } - /** - * @return mixed - */ - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \Docker\API\Model\NetworkConfig(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('Bridge', $data) && $data['Bridge'] !== null) { - $object->setBridge($data['Bridge']); - } - elseif (\array_key_exists('Bridge', $data) && $data['Bridge'] === null) { - $object->setBridge(null); - } - if (\array_key_exists('Gateway', $data) && $data['Gateway'] !== null) { - $object->setGateway($data['Gateway']); - } - elseif (\array_key_exists('Gateway', $data) && $data['Gateway'] === null) { - $object->setGateway(null); - } - if (\array_key_exists('Address', $data) && $data['Address'] !== null) { - $object->setAddress($data['Address']); - } - elseif (\array_key_exists('Address', $data) && $data['Address'] === null) { - $object->setAddress(null); - } - if (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] !== null) { - $object->setIPPrefixLen($data['IPPrefixLen']); - } - elseif (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] === null) { - $object->setIPPrefixLen(null); - } - if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { - $object->setMacAddress($data['MacAddress']); - } - elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { - $object->setMacAddress(null); - } - if (\array_key_exists('PortMapping', $data) && $data['PortMapping'] !== null) { - $object->setPortMapping($data['PortMapping']); - } - elseif (\array_key_exists('PortMapping', $data) && $data['PortMapping'] === null) { - $object->setPortMapping(null); - } - if (\array_key_exists('Ports', $data) && $data['Ports'] !== null) { - $values = []; - foreach ($data['Ports'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\Port::class, 'json', $context); - } - $object->setPorts($values); - } - elseif (\array_key_exists('Ports', $data) && $data['Ports'] === null) { - $object->setPorts(null); - } - return $object; - } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('bridge') && null !== $object->getBridge()) { - $data['Bridge'] = $object->getBridge(); - } - if ($object->isInitialized('gateway') && null !== $object->getGateway()) { - $data['Gateway'] = $object->getGateway(); - } - if ($object->isInitialized('address') && null !== $object->getAddress()) { - $data['Address'] = $object->getAddress(); - } - if ($object->isInitialized('iPPrefixLen') && null !== $object->getIPPrefixLen()) { - $data['IPPrefixLen'] = $object->getIPPrefixLen(); - } - if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { - $data['MacAddress'] = $object->getMacAddress(); - } - if ($object->isInitialized('portMapping') && null !== $object->getPortMapping()) { - $data['PortMapping'] = $object->getPortMapping(); - } - if ($object->isInitialized('ports') && null !== $object->getPorts()) { - $values = []; - foreach ($object->getPorts() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); - } - $data['Ports'] = $values; - } - return $data; - } - public function getSupportedTypes(?string $format = null): array - { - return [\Docker\API\Model\NetworkConfig::class => false]; - } - } -} \ No newline at end of file diff --git a/generated/Normalizer/NetworkContainerNormalizer.php b/generated/Normalizer/NetworkContainerNormalizer.php index 4af11ecfc..a37c84de2 100644 --- a/generated/Normalizer/NetworkContainerNormalizer.php +++ b/generated/Normalizer/NetworkContainerNormalizer.php @@ -40,6 +40,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (null === $data || false === \is_array($data)) { return $object; } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } if (\array_key_exists('EndpointID', $data) && $data['EndpointID'] !== null) { $object->setEndpointID($data['EndpointID']); } @@ -69,6 +75,9 @@ public function denormalize(mixed $data, string $type, string $format = null, ar public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } if ($object->isInitialized('endpointID') && null !== $object->getEndpointID()) { $data['EndpointID'] = $object->getEndpointID(); } @@ -118,6 +127,12 @@ public function denormalize($data, $type, $format = null, array $context = []) if (null === $data || false === \is_array($data)) { return $object; } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } if (\array_key_exists('EndpointID', $data) && $data['EndpointID'] !== null) { $object->setEndpointID($data['EndpointID']); } @@ -150,6 +165,9 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } if ($object->isInitialized('endpointID') && null !== $object->getEndpointID()) { $data['EndpointID'] = $object->getEndpointID(); } diff --git a/generated/Normalizer/NetworksCreatePostResponse201Normalizer.php b/generated/Normalizer/NetworkCreateResponseNormalizer.php similarity index 75% rename from generated/Normalizer/NetworksCreatePostResponse201Normalizer.php rename to generated/Normalizer/NetworkCreateResponseNormalizer.php index 6115ebb2c..72a839647 100644 --- a/generated/Normalizer/NetworksCreatePostResponse201Normalizer.php +++ b/generated/Normalizer/NetworkCreateResponseNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NetworksCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class NetworkCreateResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class NetworksCreatePostResponse201Normalizer implements DenormalizerInterface, use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\NetworksCreatePostResponse201::class; + return $type === \Docker\API\Model\NetworkCreateResponse::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\NetworksCreatePostResponse201::class; + return is_object($data) && get_class($data) === \Docker\API\Model\NetworkCreateResponse::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\NetworksCreatePostResponse201(); + $object = new \Docker\API\Model\NetworkCreateResponse(); if (null === $data || false === \is_array($data)) { return $object; } @@ -57,21 +57,17 @@ public function denormalize(mixed $data, string $type, string $format = null, ar public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('id') && null !== $object->getId()) { - $data['Id'] = $object->getId(); - } - if ($object->isInitialized('warning') && null !== $object->getWarning()) { - $data['Warning'] = $object->getWarning(); - } + $data['Id'] = $object->getId(); + $data['Warning'] = $object->getWarning(); return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\NetworksCreatePostResponse201::class => false]; + return [\Docker\API\Model\NetworkCreateResponse::class => false]; } } } else { - class NetworksCreatePostResponse201Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class NetworkCreateResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -79,11 +75,11 @@ class NetworksCreatePostResponse201Normalizer implements DenormalizerInterface, use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\NetworksCreatePostResponse201::class; + return $type === \Docker\API\Model\NetworkCreateResponse::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\NetworksCreatePostResponse201::class; + return is_object($data) && get_class($data) === \Docker\API\Model\NetworkCreateResponse::class; } /** * @return mixed @@ -96,7 +92,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\NetworksCreatePostResponse201(); + $object = new \Docker\API\Model\NetworkCreateResponse(); if (null === $data || false === \is_array($data)) { return $object; } @@ -120,17 +116,13 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('id') && null !== $object->getId()) { - $data['Id'] = $object->getId(); - } - if ($object->isInitialized('warning') && null !== $object->getWarning()) { - $data['Warning'] = $object->getWarning(); - } + $data['Id'] = $object->getId(); + $data['Warning'] = $object->getWarning(); return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\NetworksCreatePostResponse201::class => false]; + return [\Docker\API\Model\NetworkCreateResponse::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/NetworkNormalizer.php b/generated/Normalizer/NetworkNormalizer.php index 28fec9321..7b1c7d5eb 100644 --- a/generated/Normalizer/NetworkNormalizer.php +++ b/generated/Normalizer/NetworkNormalizer.php @@ -70,6 +70,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { $object->setDriver(null); } + if (\array_key_exists('EnableIPv4', $data) && $data['EnableIPv4'] !== null) { + $object->setEnableIPv4($data['EnableIPv4']); + } + elseif (\array_key_exists('EnableIPv4', $data) && $data['EnableIPv4'] === null) { + $object->setEnableIPv4(null); + } if (\array_key_exists('EnableIPv6', $data) && $data['EnableIPv6'] !== null) { $object->setEnableIPv6($data['EnableIPv6']); } @@ -88,6 +94,30 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Internal', $data) && $data['Internal'] === null) { $object->setInternal(null); } + if (\array_key_exists('Attachable', $data) && $data['Attachable'] !== null) { + $object->setAttachable($data['Attachable']); + } + elseif (\array_key_exists('Attachable', $data) && $data['Attachable'] === null) { + $object->setAttachable(null); + } + if (\array_key_exists('Ingress', $data) && $data['Ingress'] !== null) { + $object->setIngress($data['Ingress']); + } + elseif (\array_key_exists('Ingress', $data) && $data['Ingress'] === null) { + $object->setIngress(null); + } + if (\array_key_exists('ConfigFrom', $data) && $data['ConfigFrom'] !== null) { + $object->setConfigFrom($this->denormalizer->denormalize($data['ConfigFrom'], \Docker\API\Model\ConfigReference::class, 'json', $context)); + } + elseif (\array_key_exists('ConfigFrom', $data) && $data['ConfigFrom'] === null) { + $object->setConfigFrom(null); + } + if (\array_key_exists('ConfigOnly', $data) && $data['ConfigOnly'] !== null) { + $object->setConfigOnly($data['ConfigOnly']); + } + elseif (\array_key_exists('ConfigOnly', $data) && $data['ConfigOnly'] === null) { + $object->setConfigOnly(null); + } if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); foreach ($data['Containers'] as $key => $value) { @@ -118,6 +148,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { $object->setLabels(null); } + if (\array_key_exists('Peers', $data) && $data['Peers'] !== null) { + $values_3 = []; + foreach ($data['Peers'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\PeerInfo::class, 'json', $context); + } + $object->setPeers($values_3); + } + elseif (\array_key_exists('Peers', $data) && $data['Peers'] === null) { + $object->setPeers(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -138,6 +178,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('driver') && null !== $object->getDriver()) { $data['Driver'] = $object->getDriver(); } + if ($object->isInitialized('enableIPv4') && null !== $object->getEnableIPv4()) { + $data['EnableIPv4'] = $object->getEnableIPv4(); + } if ($object->isInitialized('enableIPv6') && null !== $object->getEnableIPv6()) { $data['EnableIPv6'] = $object->getEnableIPv6(); } @@ -147,6 +190,18 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('internal') && null !== $object->getInternal()) { $data['Internal'] = $object->getInternal(); } + if ($object->isInitialized('attachable') && null !== $object->getAttachable()) { + $data['Attachable'] = $object->getAttachable(); + } + if ($object->isInitialized('ingress') && null !== $object->getIngress()) { + $data['Ingress'] = $object->getIngress(); + } + if ($object->isInitialized('configFrom') && null !== $object->getConfigFrom()) { + $data['ConfigFrom'] = $this->normalizer->normalize($object->getConfigFrom(), 'json', $context); + } + if ($object->isInitialized('configOnly') && null !== $object->getConfigOnly()) { + $data['ConfigOnly'] = $object->getConfigOnly(); + } if ($object->isInitialized('containers') && null !== $object->getContainers()) { $values = []; foreach ($object->getContainers() as $key => $value) { @@ -168,6 +223,13 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['Labels'] = $values_2; } + if ($object->isInitialized('peers') && null !== $object->getPeers()) { + $values_3 = []; + foreach ($object->getPeers() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['Peers'] = $values_3; + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -235,6 +297,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { $object->setDriver(null); } + if (\array_key_exists('EnableIPv4', $data) && $data['EnableIPv4'] !== null) { + $object->setEnableIPv4($data['EnableIPv4']); + } + elseif (\array_key_exists('EnableIPv4', $data) && $data['EnableIPv4'] === null) { + $object->setEnableIPv4(null); + } if (\array_key_exists('EnableIPv6', $data) && $data['EnableIPv6'] !== null) { $object->setEnableIPv6($data['EnableIPv6']); } @@ -253,6 +321,30 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Internal', $data) && $data['Internal'] === null) { $object->setInternal(null); } + if (\array_key_exists('Attachable', $data) && $data['Attachable'] !== null) { + $object->setAttachable($data['Attachable']); + } + elseif (\array_key_exists('Attachable', $data) && $data['Attachable'] === null) { + $object->setAttachable(null); + } + if (\array_key_exists('Ingress', $data) && $data['Ingress'] !== null) { + $object->setIngress($data['Ingress']); + } + elseif (\array_key_exists('Ingress', $data) && $data['Ingress'] === null) { + $object->setIngress(null); + } + if (\array_key_exists('ConfigFrom', $data) && $data['ConfigFrom'] !== null) { + $object->setConfigFrom($this->denormalizer->denormalize($data['ConfigFrom'], \Docker\API\Model\ConfigReference::class, 'json', $context)); + } + elseif (\array_key_exists('ConfigFrom', $data) && $data['ConfigFrom'] === null) { + $object->setConfigFrom(null); + } + if (\array_key_exists('ConfigOnly', $data) && $data['ConfigOnly'] !== null) { + $object->setConfigOnly($data['ConfigOnly']); + } + elseif (\array_key_exists('ConfigOnly', $data) && $data['ConfigOnly'] === null) { + $object->setConfigOnly(null); + } if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); foreach ($data['Containers'] as $key => $value) { @@ -283,6 +375,16 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { $object->setLabels(null); } + if (\array_key_exists('Peers', $data) && $data['Peers'] !== null) { + $values_3 = []; + foreach ($data['Peers'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\PeerInfo::class, 'json', $context); + } + $object->setPeers($values_3); + } + elseif (\array_key_exists('Peers', $data) && $data['Peers'] === null) { + $object->setPeers(null); + } return $object; } /** @@ -306,6 +408,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('driver') && null !== $object->getDriver()) { $data['Driver'] = $object->getDriver(); } + if ($object->isInitialized('enableIPv4') && null !== $object->getEnableIPv4()) { + $data['EnableIPv4'] = $object->getEnableIPv4(); + } if ($object->isInitialized('enableIPv6') && null !== $object->getEnableIPv6()) { $data['EnableIPv6'] = $object->getEnableIPv6(); } @@ -315,6 +420,18 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('internal') && null !== $object->getInternal()) { $data['Internal'] = $object->getInternal(); } + if ($object->isInitialized('attachable') && null !== $object->getAttachable()) { + $data['Attachable'] = $object->getAttachable(); + } + if ($object->isInitialized('ingress') && null !== $object->getIngress()) { + $data['Ingress'] = $object->getIngress(); + } + if ($object->isInitialized('configFrom') && null !== $object->getConfigFrom()) { + $data['ConfigFrom'] = $this->normalizer->normalize($object->getConfigFrom(), 'json', $context); + } + if ($object->isInitialized('configOnly') && null !== $object->getConfigOnly()) { + $data['ConfigOnly'] = $object->getConfigOnly(); + } if ($object->isInitialized('containers') && null !== $object->getContainers()) { $values = []; foreach ($object->getContainers() as $key => $value) { @@ -336,6 +453,13 @@ public function normalize($object, $format = null, array $context = []) } $data['Labels'] = $values_2; } + if ($object->isInitialized('peers') && null !== $object->getPeers()) { + $values_3 = []; + foreach ($object->getPeers() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['Peers'] = $values_3; + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/NetworkSettingsNormalizer.php b/generated/Normalizer/NetworkSettingsNormalizer.php new file mode 100644 index 000000000..2ec0511f3 --- /dev/null +++ b/generated/Normalizer/NetworkSettingsNormalizer.php @@ -0,0 +1,504 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NetworkSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworkSettings::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworkSettings::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworkSettings(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Bridge', $data) && $data['Bridge'] !== null) { + $object->setBridge($data['Bridge']); + } + elseif (\array_key_exists('Bridge', $data) && $data['Bridge'] === null) { + $object->setBridge(null); + } + if (\array_key_exists('SandboxID', $data) && $data['SandboxID'] !== null) { + $object->setSandboxID($data['SandboxID']); + } + elseif (\array_key_exists('SandboxID', $data) && $data['SandboxID'] === null) { + $object->setSandboxID(null); + } + if (\array_key_exists('HairpinMode', $data) && $data['HairpinMode'] !== null) { + $object->setHairpinMode($data['HairpinMode']); + } + elseif (\array_key_exists('HairpinMode', $data) && $data['HairpinMode'] === null) { + $object->setHairpinMode(null); + } + if (\array_key_exists('LinkLocalIPv6Address', $data) && $data['LinkLocalIPv6Address'] !== null) { + $object->setLinkLocalIPv6Address($data['LinkLocalIPv6Address']); + } + elseif (\array_key_exists('LinkLocalIPv6Address', $data) && $data['LinkLocalIPv6Address'] === null) { + $object->setLinkLocalIPv6Address(null); + } + if (\array_key_exists('LinkLocalIPv6PrefixLen', $data) && $data['LinkLocalIPv6PrefixLen'] !== null) { + $object->setLinkLocalIPv6PrefixLen($data['LinkLocalIPv6PrefixLen']); + } + elseif (\array_key_exists('LinkLocalIPv6PrefixLen', $data) && $data['LinkLocalIPv6PrefixLen'] === null) { + $object->setLinkLocalIPv6PrefixLen(null); + } + if (\array_key_exists('Ports', $data) && $data['Ports'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Ports'] as $key => $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\PortBinding::class, 'json', $context); + } + $values[$key] = $values_1; + } + $object->setPorts($values); + } + elseif (\array_key_exists('Ports', $data) && $data['Ports'] === null) { + $object->setPorts(null); + } + if (\array_key_exists('SandboxKey', $data) && $data['SandboxKey'] !== null) { + $object->setSandboxKey($data['SandboxKey']); + } + elseif (\array_key_exists('SandboxKey', $data) && $data['SandboxKey'] === null) { + $object->setSandboxKey(null); + } + if (\array_key_exists('SecondaryIPAddresses', $data) && $data['SecondaryIPAddresses'] !== null) { + $values_2 = []; + foreach ($data['SecondaryIPAddresses'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\Address::class, 'json', $context); + } + $object->setSecondaryIPAddresses($values_2); + } + elseif (\array_key_exists('SecondaryIPAddresses', $data) && $data['SecondaryIPAddresses'] === null) { + $object->setSecondaryIPAddresses(null); + } + if (\array_key_exists('SecondaryIPv6Addresses', $data) && $data['SecondaryIPv6Addresses'] !== null) { + $values_3 = []; + foreach ($data['SecondaryIPv6Addresses'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\Address::class, 'json', $context); + } + $object->setSecondaryIPv6Addresses($values_3); + } + elseif (\array_key_exists('SecondaryIPv6Addresses', $data) && $data['SecondaryIPv6Addresses'] === null) { + $object->setSecondaryIPv6Addresses(null); + } + if (\array_key_exists('EndpointID', $data) && $data['EndpointID'] !== null) { + $object->setEndpointID($data['EndpointID']); + } + elseif (\array_key_exists('EndpointID', $data) && $data['EndpointID'] === null) { + $object->setEndpointID(null); + } + if (\array_key_exists('Gateway', $data) && $data['Gateway'] !== null) { + $object->setGateway($data['Gateway']); + } + elseif (\array_key_exists('Gateway', $data) && $data['Gateway'] === null) { + $object->setGateway(null); + } + if (\array_key_exists('GlobalIPv6Address', $data) && $data['GlobalIPv6Address'] !== null) { + $object->setGlobalIPv6Address($data['GlobalIPv6Address']); + } + elseif (\array_key_exists('GlobalIPv6Address', $data) && $data['GlobalIPv6Address'] === null) { + $object->setGlobalIPv6Address(null); + } + if (\array_key_exists('GlobalIPv6PrefixLen', $data) && $data['GlobalIPv6PrefixLen'] !== null) { + $object->setGlobalIPv6PrefixLen($data['GlobalIPv6PrefixLen']); + } + elseif (\array_key_exists('GlobalIPv6PrefixLen', $data) && $data['GlobalIPv6PrefixLen'] === null) { + $object->setGlobalIPv6PrefixLen(null); + } + if (\array_key_exists('IPAddress', $data) && $data['IPAddress'] !== null) { + $object->setIPAddress($data['IPAddress']); + } + elseif (\array_key_exists('IPAddress', $data) && $data['IPAddress'] === null) { + $object->setIPAddress(null); + } + if (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] !== null) { + $object->setIPPrefixLen($data['IPPrefixLen']); + } + elseif (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] === null) { + $object->setIPPrefixLen(null); + } + if (\array_key_exists('IPv6Gateway', $data) && $data['IPv6Gateway'] !== null) { + $object->setIPv6Gateway($data['IPv6Gateway']); + } + elseif (\array_key_exists('IPv6Gateway', $data) && $data['IPv6Gateway'] === null) { + $object->setIPv6Gateway(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { + $values_4 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Networks'] as $key_1 => $value_4) { + $values_4[$key_1] = $this->denormalizer->denormalize($value_4, \Docker\API\Model\EndpointSettings::class, 'json', $context); + } + $object->setNetworks($values_4); + } + elseif (\array_key_exists('Networks', $data) && $data['Networks'] === null) { + $object->setNetworks(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('bridge') && null !== $object->getBridge()) { + $data['Bridge'] = $object->getBridge(); + } + if ($object->isInitialized('sandboxID') && null !== $object->getSandboxID()) { + $data['SandboxID'] = $object->getSandboxID(); + } + if ($object->isInitialized('hairpinMode') && null !== $object->getHairpinMode()) { + $data['HairpinMode'] = $object->getHairpinMode(); + } + if ($object->isInitialized('linkLocalIPv6Address') && null !== $object->getLinkLocalIPv6Address()) { + $data['LinkLocalIPv6Address'] = $object->getLinkLocalIPv6Address(); + } + if ($object->isInitialized('linkLocalIPv6PrefixLen') && null !== $object->getLinkLocalIPv6PrefixLen()) { + $data['LinkLocalIPv6PrefixLen'] = $object->getLinkLocalIPv6PrefixLen(); + } + if ($object->isInitialized('ports') && null !== $object->getPorts()) { + $values = []; + foreach ($object->getPorts() as $key => $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $values[$key] = $values_1; + } + $data['Ports'] = $values; + } + if ($object->isInitialized('sandboxKey') && null !== $object->getSandboxKey()) { + $data['SandboxKey'] = $object->getSandboxKey(); + } + if ($object->isInitialized('secondaryIPAddresses') && null !== $object->getSecondaryIPAddresses()) { + $values_2 = []; + foreach ($object->getSecondaryIPAddresses() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['SecondaryIPAddresses'] = $values_2; + } + if ($object->isInitialized('secondaryIPv6Addresses') && null !== $object->getSecondaryIPv6Addresses()) { + $values_3 = []; + foreach ($object->getSecondaryIPv6Addresses() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['SecondaryIPv6Addresses'] = $values_3; + } + if ($object->isInitialized('endpointID') && null !== $object->getEndpointID()) { + $data['EndpointID'] = $object->getEndpointID(); + } + if ($object->isInitialized('gateway') && null !== $object->getGateway()) { + $data['Gateway'] = $object->getGateway(); + } + if ($object->isInitialized('globalIPv6Address') && null !== $object->getGlobalIPv6Address()) { + $data['GlobalIPv6Address'] = $object->getGlobalIPv6Address(); + } + if ($object->isInitialized('globalIPv6PrefixLen') && null !== $object->getGlobalIPv6PrefixLen()) { + $data['GlobalIPv6PrefixLen'] = $object->getGlobalIPv6PrefixLen(); + } + if ($object->isInitialized('iPAddress') && null !== $object->getIPAddress()) { + $data['IPAddress'] = $object->getIPAddress(); + } + if ($object->isInitialized('iPPrefixLen') && null !== $object->getIPPrefixLen()) { + $data['IPPrefixLen'] = $object->getIPPrefixLen(); + } + if ($object->isInitialized('iPv6Gateway') && null !== $object->getIPv6Gateway()) { + $data['IPv6Gateway'] = $object->getIPv6Gateway(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + if ($object->isInitialized('networks') && null !== $object->getNetworks()) { + $values_4 = []; + foreach ($object->getNetworks() as $key_1 => $value_4) { + $values_4[$key_1] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['Networks'] = $values_4; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworkSettings::class => false]; + } + } +} else { + class NetworkSettingsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NetworkSettings::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NetworkSettings::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NetworkSettings(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Bridge', $data) && $data['Bridge'] !== null) { + $object->setBridge($data['Bridge']); + } + elseif (\array_key_exists('Bridge', $data) && $data['Bridge'] === null) { + $object->setBridge(null); + } + if (\array_key_exists('SandboxID', $data) && $data['SandboxID'] !== null) { + $object->setSandboxID($data['SandboxID']); + } + elseif (\array_key_exists('SandboxID', $data) && $data['SandboxID'] === null) { + $object->setSandboxID(null); + } + if (\array_key_exists('HairpinMode', $data) && $data['HairpinMode'] !== null) { + $object->setHairpinMode($data['HairpinMode']); + } + elseif (\array_key_exists('HairpinMode', $data) && $data['HairpinMode'] === null) { + $object->setHairpinMode(null); + } + if (\array_key_exists('LinkLocalIPv6Address', $data) && $data['LinkLocalIPv6Address'] !== null) { + $object->setLinkLocalIPv6Address($data['LinkLocalIPv6Address']); + } + elseif (\array_key_exists('LinkLocalIPv6Address', $data) && $data['LinkLocalIPv6Address'] === null) { + $object->setLinkLocalIPv6Address(null); + } + if (\array_key_exists('LinkLocalIPv6PrefixLen', $data) && $data['LinkLocalIPv6PrefixLen'] !== null) { + $object->setLinkLocalIPv6PrefixLen($data['LinkLocalIPv6PrefixLen']); + } + elseif (\array_key_exists('LinkLocalIPv6PrefixLen', $data) && $data['LinkLocalIPv6PrefixLen'] === null) { + $object->setLinkLocalIPv6PrefixLen(null); + } + if (\array_key_exists('Ports', $data) && $data['Ports'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Ports'] as $key => $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\PortBinding::class, 'json', $context); + } + $values[$key] = $values_1; + } + $object->setPorts($values); + } + elseif (\array_key_exists('Ports', $data) && $data['Ports'] === null) { + $object->setPorts(null); + } + if (\array_key_exists('SandboxKey', $data) && $data['SandboxKey'] !== null) { + $object->setSandboxKey($data['SandboxKey']); + } + elseif (\array_key_exists('SandboxKey', $data) && $data['SandboxKey'] === null) { + $object->setSandboxKey(null); + } + if (\array_key_exists('SecondaryIPAddresses', $data) && $data['SecondaryIPAddresses'] !== null) { + $values_2 = []; + foreach ($data['SecondaryIPAddresses'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\Address::class, 'json', $context); + } + $object->setSecondaryIPAddresses($values_2); + } + elseif (\array_key_exists('SecondaryIPAddresses', $data) && $data['SecondaryIPAddresses'] === null) { + $object->setSecondaryIPAddresses(null); + } + if (\array_key_exists('SecondaryIPv6Addresses', $data) && $data['SecondaryIPv6Addresses'] !== null) { + $values_3 = []; + foreach ($data['SecondaryIPv6Addresses'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\Address::class, 'json', $context); + } + $object->setSecondaryIPv6Addresses($values_3); + } + elseif (\array_key_exists('SecondaryIPv6Addresses', $data) && $data['SecondaryIPv6Addresses'] === null) { + $object->setSecondaryIPv6Addresses(null); + } + if (\array_key_exists('EndpointID', $data) && $data['EndpointID'] !== null) { + $object->setEndpointID($data['EndpointID']); + } + elseif (\array_key_exists('EndpointID', $data) && $data['EndpointID'] === null) { + $object->setEndpointID(null); + } + if (\array_key_exists('Gateway', $data) && $data['Gateway'] !== null) { + $object->setGateway($data['Gateway']); + } + elseif (\array_key_exists('Gateway', $data) && $data['Gateway'] === null) { + $object->setGateway(null); + } + if (\array_key_exists('GlobalIPv6Address', $data) && $data['GlobalIPv6Address'] !== null) { + $object->setGlobalIPv6Address($data['GlobalIPv6Address']); + } + elseif (\array_key_exists('GlobalIPv6Address', $data) && $data['GlobalIPv6Address'] === null) { + $object->setGlobalIPv6Address(null); + } + if (\array_key_exists('GlobalIPv6PrefixLen', $data) && $data['GlobalIPv6PrefixLen'] !== null) { + $object->setGlobalIPv6PrefixLen($data['GlobalIPv6PrefixLen']); + } + elseif (\array_key_exists('GlobalIPv6PrefixLen', $data) && $data['GlobalIPv6PrefixLen'] === null) { + $object->setGlobalIPv6PrefixLen(null); + } + if (\array_key_exists('IPAddress', $data) && $data['IPAddress'] !== null) { + $object->setIPAddress($data['IPAddress']); + } + elseif (\array_key_exists('IPAddress', $data) && $data['IPAddress'] === null) { + $object->setIPAddress(null); + } + if (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] !== null) { + $object->setIPPrefixLen($data['IPPrefixLen']); + } + elseif (\array_key_exists('IPPrefixLen', $data) && $data['IPPrefixLen'] === null) { + $object->setIPPrefixLen(null); + } + if (\array_key_exists('IPv6Gateway', $data) && $data['IPv6Gateway'] !== null) { + $object->setIPv6Gateway($data['IPv6Gateway']); + } + elseif (\array_key_exists('IPv6Gateway', $data) && $data['IPv6Gateway'] === null) { + $object->setIPv6Gateway(null); + } + if (\array_key_exists('MacAddress', $data) && $data['MacAddress'] !== null) { + $object->setMacAddress($data['MacAddress']); + } + elseif (\array_key_exists('MacAddress', $data) && $data['MacAddress'] === null) { + $object->setMacAddress(null); + } + if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { + $values_4 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Networks'] as $key_1 => $value_4) { + $values_4[$key_1] = $this->denormalizer->denormalize($value_4, \Docker\API\Model\EndpointSettings::class, 'json', $context); + } + $object->setNetworks($values_4); + } + elseif (\array_key_exists('Networks', $data) && $data['Networks'] === null) { + $object->setNetworks(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('bridge') && null !== $object->getBridge()) { + $data['Bridge'] = $object->getBridge(); + } + if ($object->isInitialized('sandboxID') && null !== $object->getSandboxID()) { + $data['SandboxID'] = $object->getSandboxID(); + } + if ($object->isInitialized('hairpinMode') && null !== $object->getHairpinMode()) { + $data['HairpinMode'] = $object->getHairpinMode(); + } + if ($object->isInitialized('linkLocalIPv6Address') && null !== $object->getLinkLocalIPv6Address()) { + $data['LinkLocalIPv6Address'] = $object->getLinkLocalIPv6Address(); + } + if ($object->isInitialized('linkLocalIPv6PrefixLen') && null !== $object->getLinkLocalIPv6PrefixLen()) { + $data['LinkLocalIPv6PrefixLen'] = $object->getLinkLocalIPv6PrefixLen(); + } + if ($object->isInitialized('ports') && null !== $object->getPorts()) { + $values = []; + foreach ($object->getPorts() as $key => $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $values[$key] = $values_1; + } + $data['Ports'] = $values; + } + if ($object->isInitialized('sandboxKey') && null !== $object->getSandboxKey()) { + $data['SandboxKey'] = $object->getSandboxKey(); + } + if ($object->isInitialized('secondaryIPAddresses') && null !== $object->getSecondaryIPAddresses()) { + $values_2 = []; + foreach ($object->getSecondaryIPAddresses() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['SecondaryIPAddresses'] = $values_2; + } + if ($object->isInitialized('secondaryIPv6Addresses') && null !== $object->getSecondaryIPv6Addresses()) { + $values_3 = []; + foreach ($object->getSecondaryIPv6Addresses() as $value_3) { + $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['SecondaryIPv6Addresses'] = $values_3; + } + if ($object->isInitialized('endpointID') && null !== $object->getEndpointID()) { + $data['EndpointID'] = $object->getEndpointID(); + } + if ($object->isInitialized('gateway') && null !== $object->getGateway()) { + $data['Gateway'] = $object->getGateway(); + } + if ($object->isInitialized('globalIPv6Address') && null !== $object->getGlobalIPv6Address()) { + $data['GlobalIPv6Address'] = $object->getGlobalIPv6Address(); + } + if ($object->isInitialized('globalIPv6PrefixLen') && null !== $object->getGlobalIPv6PrefixLen()) { + $data['GlobalIPv6PrefixLen'] = $object->getGlobalIPv6PrefixLen(); + } + if ($object->isInitialized('iPAddress') && null !== $object->getIPAddress()) { + $data['IPAddress'] = $object->getIPAddress(); + } + if ($object->isInitialized('iPPrefixLen') && null !== $object->getIPPrefixLen()) { + $data['IPPrefixLen'] = $object->getIPPrefixLen(); + } + if ($object->isInitialized('iPv6Gateway') && null !== $object->getIPv6Gateway()) { + $data['IPv6Gateway'] = $object->getIPv6Gateway(); + } + if ($object->isInitialized('macAddress') && null !== $object->getMacAddress()) { + $data['MacAddress'] = $object->getMacAddress(); + } + if ($object->isInitialized('networks') && null !== $object->getNetworks()) { + $values_4 = []; + foreach ($object->getNetworks() as $key_1 => $value_4) { + $values_4[$key_1] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['Networks'] = $values_4; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NetworkSettings::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainersCreatePostBodyNetworkingConfigNormalizer.php b/generated/Normalizer/NetworkingConfigNormalizer.php similarity index 84% rename from generated/Normalizer/ContainersCreatePostBodyNetworkingConfigNormalizer.php rename to generated/Normalizer/NetworkingConfigNormalizer.php index 1bface653..59cdbf7c4 100644 --- a/generated/Normalizer/ContainersCreatePostBodyNetworkingConfigNormalizer.php +++ b/generated/Normalizer/NetworkingConfigNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ContainersCreatePostBodyNetworkingConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class NetworkingConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ContainersCreatePostBodyNetworkingConfigNormalizer implements Denormalizer use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class; + return $type === \Docker\API\Model\NetworkingConfig::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class; + return is_object($data) && get_class($data) === \Docker\API\Model\NetworkingConfig::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig(); + $object = new \Docker\API\Model\NetworkingConfig(); if (null === $data || false === \is_array($data)) { return $object; } @@ -66,11 +66,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class => false]; + return [\Docker\API\Model\NetworkingConfig::class => false]; } } } else { - class ContainersCreatePostBodyNetworkingConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class NetworkingConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -78,11 +78,11 @@ class ContainersCreatePostBodyNetworkingConfigNormalizer implements Denormalizer use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class; + return $type === \Docker\API\Model\NetworkingConfig::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class; + return is_object($data) && get_class($data) === \Docker\API\Model\NetworkingConfig::class; } /** * @return mixed @@ -95,7 +95,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainersCreatePostBodyNetworkingConfig(); + $object = new \Docker\API\Model\NetworkingConfig(); if (null === $data || false === \is_array($data)) { return $object; } @@ -128,7 +128,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainersCreatePostBodyNetworkingConfig::class => false]; + return [\Docker\API\Model\NetworkingConfig::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/NetworksCreatePostBodyNormalizer.php b/generated/Normalizer/NetworksCreatePostBodyNormalizer.php index 2e8c81870..3ed860f4d 100644 --- a/generated/Normalizer/NetworksCreatePostBodyNormalizer.php +++ b/generated/Normalizer/NetworksCreatePostBodyNormalizer.php @@ -46,30 +46,60 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { $object->setName(null); } - if (\array_key_exists('CheckDuplicate', $data) && $data['CheckDuplicate'] !== null) { - $object->setCheckDuplicate($data['CheckDuplicate']); - } - elseif (\array_key_exists('CheckDuplicate', $data) && $data['CheckDuplicate'] === null) { - $object->setCheckDuplicate(null); - } if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { $object->setDriver($data['Driver']); } elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { $object->setDriver(null); } + if (\array_key_exists('Scope', $data) && $data['Scope'] !== null) { + $object->setScope($data['Scope']); + } + elseif (\array_key_exists('Scope', $data) && $data['Scope'] === null) { + $object->setScope(null); + } if (\array_key_exists('Internal', $data) && $data['Internal'] !== null) { $object->setInternal($data['Internal']); } elseif (\array_key_exists('Internal', $data) && $data['Internal'] === null) { $object->setInternal(null); } + if (\array_key_exists('Attachable', $data) && $data['Attachable'] !== null) { + $object->setAttachable($data['Attachable']); + } + elseif (\array_key_exists('Attachable', $data) && $data['Attachable'] === null) { + $object->setAttachable(null); + } + if (\array_key_exists('Ingress', $data) && $data['Ingress'] !== null) { + $object->setIngress($data['Ingress']); + } + elseif (\array_key_exists('Ingress', $data) && $data['Ingress'] === null) { + $object->setIngress(null); + } + if (\array_key_exists('ConfigOnly', $data) && $data['ConfigOnly'] !== null) { + $object->setConfigOnly($data['ConfigOnly']); + } + elseif (\array_key_exists('ConfigOnly', $data) && $data['ConfigOnly'] === null) { + $object->setConfigOnly(null); + } + if (\array_key_exists('ConfigFrom', $data) && $data['ConfigFrom'] !== null) { + $object->setConfigFrom($this->denormalizer->denormalize($data['ConfigFrom'], \Docker\API\Model\ConfigReference::class, 'json', $context)); + } + elseif (\array_key_exists('ConfigFrom', $data) && $data['ConfigFrom'] === null) { + $object->setConfigFrom(null); + } if (\array_key_exists('IPAM', $data) && $data['IPAM'] !== null) { $object->setIPAM($this->denormalizer->denormalize($data['IPAM'], \Docker\API\Model\IPAM::class, 'json', $context)); } elseif (\array_key_exists('IPAM', $data) && $data['IPAM'] === null) { $object->setIPAM(null); } + if (\array_key_exists('EnableIPv4', $data) && $data['EnableIPv4'] !== null) { + $object->setEnableIPv4($data['EnableIPv4']); + } + elseif (\array_key_exists('EnableIPv4', $data) && $data['EnableIPv4'] === null) { + $object->setEnableIPv4(null); + } if (\array_key_exists('EnableIPv6', $data) && $data['EnableIPv6'] !== null) { $object->setEnableIPv6($data['EnableIPv6']); } @@ -102,18 +132,33 @@ public function normalize(mixed $object, string $format = null, array $context = { $data = []; $data['Name'] = $object->getName(); - if ($object->isInitialized('checkDuplicate') && null !== $object->getCheckDuplicate()) { - $data['CheckDuplicate'] = $object->getCheckDuplicate(); - } if ($object->isInitialized('driver') && null !== $object->getDriver()) { $data['Driver'] = $object->getDriver(); } + if ($object->isInitialized('scope') && null !== $object->getScope()) { + $data['Scope'] = $object->getScope(); + } if ($object->isInitialized('internal') && null !== $object->getInternal()) { $data['Internal'] = $object->getInternal(); } + if ($object->isInitialized('attachable') && null !== $object->getAttachable()) { + $data['Attachable'] = $object->getAttachable(); + } + if ($object->isInitialized('ingress') && null !== $object->getIngress()) { + $data['Ingress'] = $object->getIngress(); + } + if ($object->isInitialized('configOnly') && null !== $object->getConfigOnly()) { + $data['ConfigOnly'] = $object->getConfigOnly(); + } + if ($object->isInitialized('configFrom') && null !== $object->getConfigFrom()) { + $data['ConfigFrom'] = $this->normalizer->normalize($object->getConfigFrom(), 'json', $context); + } if ($object->isInitialized('iPAM') && null !== $object->getIPAM()) { $data['IPAM'] = $this->normalizer->normalize($object->getIPAM(), 'json', $context); } + if ($object->isInitialized('enableIPv4') && null !== $object->getEnableIPv4()) { + $data['EnableIPv4'] = $object->getEnableIPv4(); + } if ($object->isInitialized('enableIPv6') && null !== $object->getEnableIPv6()) { $data['EnableIPv6'] = $object->getEnableIPv6(); } @@ -174,30 +219,60 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { $object->setName(null); } - if (\array_key_exists('CheckDuplicate', $data) && $data['CheckDuplicate'] !== null) { - $object->setCheckDuplicate($data['CheckDuplicate']); - } - elseif (\array_key_exists('CheckDuplicate', $data) && $data['CheckDuplicate'] === null) { - $object->setCheckDuplicate(null); - } if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { $object->setDriver($data['Driver']); } elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { $object->setDriver(null); } + if (\array_key_exists('Scope', $data) && $data['Scope'] !== null) { + $object->setScope($data['Scope']); + } + elseif (\array_key_exists('Scope', $data) && $data['Scope'] === null) { + $object->setScope(null); + } if (\array_key_exists('Internal', $data) && $data['Internal'] !== null) { $object->setInternal($data['Internal']); } elseif (\array_key_exists('Internal', $data) && $data['Internal'] === null) { $object->setInternal(null); } + if (\array_key_exists('Attachable', $data) && $data['Attachable'] !== null) { + $object->setAttachable($data['Attachable']); + } + elseif (\array_key_exists('Attachable', $data) && $data['Attachable'] === null) { + $object->setAttachable(null); + } + if (\array_key_exists('Ingress', $data) && $data['Ingress'] !== null) { + $object->setIngress($data['Ingress']); + } + elseif (\array_key_exists('Ingress', $data) && $data['Ingress'] === null) { + $object->setIngress(null); + } + if (\array_key_exists('ConfigOnly', $data) && $data['ConfigOnly'] !== null) { + $object->setConfigOnly($data['ConfigOnly']); + } + elseif (\array_key_exists('ConfigOnly', $data) && $data['ConfigOnly'] === null) { + $object->setConfigOnly(null); + } + if (\array_key_exists('ConfigFrom', $data) && $data['ConfigFrom'] !== null) { + $object->setConfigFrom($this->denormalizer->denormalize($data['ConfigFrom'], \Docker\API\Model\ConfigReference::class, 'json', $context)); + } + elseif (\array_key_exists('ConfigFrom', $data) && $data['ConfigFrom'] === null) { + $object->setConfigFrom(null); + } if (\array_key_exists('IPAM', $data) && $data['IPAM'] !== null) { $object->setIPAM($this->denormalizer->denormalize($data['IPAM'], \Docker\API\Model\IPAM::class, 'json', $context)); } elseif (\array_key_exists('IPAM', $data) && $data['IPAM'] === null) { $object->setIPAM(null); } + if (\array_key_exists('EnableIPv4', $data) && $data['EnableIPv4'] !== null) { + $object->setEnableIPv4($data['EnableIPv4']); + } + elseif (\array_key_exists('EnableIPv4', $data) && $data['EnableIPv4'] === null) { + $object->setEnableIPv4(null); + } if (\array_key_exists('EnableIPv6', $data) && $data['EnableIPv6'] !== null) { $object->setEnableIPv6($data['EnableIPv6']); } @@ -233,18 +308,33 @@ public function normalize($object, $format = null, array $context = []) { $data = []; $data['Name'] = $object->getName(); - if ($object->isInitialized('checkDuplicate') && null !== $object->getCheckDuplicate()) { - $data['CheckDuplicate'] = $object->getCheckDuplicate(); - } if ($object->isInitialized('driver') && null !== $object->getDriver()) { $data['Driver'] = $object->getDriver(); } + if ($object->isInitialized('scope') && null !== $object->getScope()) { + $data['Scope'] = $object->getScope(); + } if ($object->isInitialized('internal') && null !== $object->getInternal()) { $data['Internal'] = $object->getInternal(); } + if ($object->isInitialized('attachable') && null !== $object->getAttachable()) { + $data['Attachable'] = $object->getAttachable(); + } + if ($object->isInitialized('ingress') && null !== $object->getIngress()) { + $data['Ingress'] = $object->getIngress(); + } + if ($object->isInitialized('configOnly') && null !== $object->getConfigOnly()) { + $data['ConfigOnly'] = $object->getConfigOnly(); + } + if ($object->isInitialized('configFrom') && null !== $object->getConfigFrom()) { + $data['ConfigFrom'] = $this->normalizer->normalize($object->getConfigFrom(), 'json', $context); + } if ($object->isInitialized('iPAM') && null !== $object->getIPAM()) { $data['IPAM'] = $this->normalizer->normalize($object->getIPAM(), 'json', $context); } + if ($object->isInitialized('enableIPv4') && null !== $object->getEnableIPv4()) { + $data['EnableIPv4'] = $object->getEnableIPv4(); + } if ($object->isInitialized('enableIPv6') && null !== $object->getEnableIPv6()) { $data['EnableIPv6'] = $object->getEnableIPv6(); } diff --git a/generated/Normalizer/NetworksPrunePostResponse200Normalizer.php b/generated/Normalizer/NetworksPrunePostResponse200Normalizer.php index 15af9d475..96d9a5b83 100644 --- a/generated/Normalizer/NetworksPrunePostResponse200Normalizer.php +++ b/generated/Normalizer/NetworksPrunePostResponse200Normalizer.php @@ -40,27 +40,27 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('VolumesDeleted', $data) && $data['VolumesDeleted'] !== null) { + if (\array_key_exists('NetworksDeleted', $data) && $data['NetworksDeleted'] !== null) { $values = []; - foreach ($data['VolumesDeleted'] as $value) { + foreach ($data['NetworksDeleted'] as $value) { $values[] = $value; } - $object->setVolumesDeleted($values); + $object->setNetworksDeleted($values); } - elseif (\array_key_exists('VolumesDeleted', $data) && $data['VolumesDeleted'] === null) { - $object->setVolumesDeleted(null); + elseif (\array_key_exists('NetworksDeleted', $data) && $data['NetworksDeleted'] === null) { + $object->setNetworksDeleted(null); } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('volumesDeleted') && null !== $object->getVolumesDeleted()) { + if ($object->isInitialized('networksDeleted') && null !== $object->getNetworksDeleted()) { $values = []; - foreach ($object->getVolumesDeleted() as $value) { + foreach ($object->getNetworksDeleted() as $value) { $values[] = $value; } - $data['VolumesDeleted'] = $values; + $data['NetworksDeleted'] = $values; } return $data; } @@ -99,15 +99,15 @@ public function denormalize($data, $type, $format = null, array $context = []) if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('VolumesDeleted', $data) && $data['VolumesDeleted'] !== null) { + if (\array_key_exists('NetworksDeleted', $data) && $data['NetworksDeleted'] !== null) { $values = []; - foreach ($data['VolumesDeleted'] as $value) { + foreach ($data['NetworksDeleted'] as $value) { $values[] = $value; } - $object->setVolumesDeleted($values); + $object->setNetworksDeleted($values); } - elseif (\array_key_exists('VolumesDeleted', $data) && $data['VolumesDeleted'] === null) { - $object->setVolumesDeleted(null); + elseif (\array_key_exists('NetworksDeleted', $data) && $data['NetworksDeleted'] === null) { + $object->setNetworksDeleted(null); } return $object; } @@ -117,12 +117,12 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('volumesDeleted') && null !== $object->getVolumesDeleted()) { + if ($object->isInitialized('networksDeleted') && null !== $object->getNetworksDeleted()) { $values = []; - foreach ($object->getVolumesDeleted() as $value) { + foreach ($object->getNetworksDeleted() as $value) { $values[] = $value; } - $data['VolumesDeleted'] = $values; + $data['NetworksDeleted'] = $values; } return $data; } diff --git a/generated/Normalizer/NodeDescriptionNormalizer.php b/generated/Normalizer/NodeDescriptionNormalizer.php index aced57b17..ee047c379 100644 --- a/generated/Normalizer/NodeDescriptionNormalizer.php +++ b/generated/Normalizer/NodeDescriptionNormalizer.php @@ -47,23 +47,29 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setHostname(null); } if (\array_key_exists('Platform', $data) && $data['Platform'] !== null) { - $object->setPlatform($this->denormalizer->denormalize($data['Platform'], \Docker\API\Model\NodeDescriptionPlatform::class, 'json', $context)); + $object->setPlatform($this->denormalizer->denormalize($data['Platform'], \Docker\API\Model\Platform::class, 'json', $context)); } elseif (\array_key_exists('Platform', $data) && $data['Platform'] === null) { $object->setPlatform(null); } if (\array_key_exists('Resources', $data) && $data['Resources'] !== null) { - $object->setResources($this->denormalizer->denormalize($data['Resources'], \Docker\API\Model\NodeDescriptionResources::class, 'json', $context)); + $object->setResources($this->denormalizer->denormalize($data['Resources'], \Docker\API\Model\ResourceObject::class, 'json', $context)); } elseif (\array_key_exists('Resources', $data) && $data['Resources'] === null) { $object->setResources(null); } if (\array_key_exists('Engine', $data) && $data['Engine'] !== null) { - $object->setEngine($this->denormalizer->denormalize($data['Engine'], \Docker\API\Model\NodeDescriptionEngine::class, 'json', $context)); + $object->setEngine($this->denormalizer->denormalize($data['Engine'], \Docker\API\Model\EngineDescription::class, 'json', $context)); } elseif (\array_key_exists('Engine', $data) && $data['Engine'] === null) { $object->setEngine(null); } + if (\array_key_exists('TLSInfo', $data) && $data['TLSInfo'] !== null) { + $object->setTLSInfo($this->denormalizer->denormalize($data['TLSInfo'], \Docker\API\Model\TLSInfo::class, 'json', $context)); + } + elseif (\array_key_exists('TLSInfo', $data) && $data['TLSInfo'] === null) { + $object->setTLSInfo(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -81,6 +87,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('engine') && null !== $object->getEngine()) { $data['Engine'] = $this->normalizer->normalize($object->getEngine(), 'json', $context); } + if ($object->isInitialized('tLSInfo') && null !== $object->getTLSInfo()) { + $data['TLSInfo'] = $this->normalizer->normalize($object->getTLSInfo(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -125,23 +134,29 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setHostname(null); } if (\array_key_exists('Platform', $data) && $data['Platform'] !== null) { - $object->setPlatform($this->denormalizer->denormalize($data['Platform'], \Docker\API\Model\NodeDescriptionPlatform::class, 'json', $context)); + $object->setPlatform($this->denormalizer->denormalize($data['Platform'], \Docker\API\Model\Platform::class, 'json', $context)); } elseif (\array_key_exists('Platform', $data) && $data['Platform'] === null) { $object->setPlatform(null); } if (\array_key_exists('Resources', $data) && $data['Resources'] !== null) { - $object->setResources($this->denormalizer->denormalize($data['Resources'], \Docker\API\Model\NodeDescriptionResources::class, 'json', $context)); + $object->setResources($this->denormalizer->denormalize($data['Resources'], \Docker\API\Model\ResourceObject::class, 'json', $context)); } elseif (\array_key_exists('Resources', $data) && $data['Resources'] === null) { $object->setResources(null); } if (\array_key_exists('Engine', $data) && $data['Engine'] !== null) { - $object->setEngine($this->denormalizer->denormalize($data['Engine'], \Docker\API\Model\NodeDescriptionEngine::class, 'json', $context)); + $object->setEngine($this->denormalizer->denormalize($data['Engine'], \Docker\API\Model\EngineDescription::class, 'json', $context)); } elseif (\array_key_exists('Engine', $data) && $data['Engine'] === null) { $object->setEngine(null); } + if (\array_key_exists('TLSInfo', $data) && $data['TLSInfo'] !== null) { + $object->setTLSInfo($this->denormalizer->denormalize($data['TLSInfo'], \Docker\API\Model\TLSInfo::class, 'json', $context)); + } + elseif (\array_key_exists('TLSInfo', $data) && $data['TLSInfo'] === null) { + $object->setTLSInfo(null); + } return $object; } /** @@ -162,6 +177,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('engine') && null !== $object->getEngine()) { $data['Engine'] = $this->normalizer->normalize($object->getEngine(), 'json', $context); } + if ($object->isInitialized('tLSInfo') && null !== $object->getTLSInfo()) { + $data['TLSInfo'] = $this->normalizer->normalize($object->getTLSInfo(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/NodeNormalizer.php b/generated/Normalizer/NodeNormalizer.php index 7c3a3be9d..55f940765 100644 --- a/generated/Normalizer/NodeNormalizer.php +++ b/generated/Normalizer/NodeNormalizer.php @@ -47,7 +47,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setID(null); } if (\array_key_exists('Version', $data) && $data['Version'] !== null) { - $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\NodeVersion::class, 'json', $context)); + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); } elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { $object->setVersion(null); @@ -76,6 +76,18 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { $object->setDescription(null); } + if (\array_key_exists('Status', $data) && $data['Status'] !== null) { + $object->setStatus($this->denormalizer->denormalize($data['Status'], \Docker\API\Model\NodeStatus::class, 'json', $context)); + } + elseif (\array_key_exists('Status', $data) && $data['Status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('ManagerStatus', $data) && $data['ManagerStatus'] !== null) { + $object->setManagerStatus($this->denormalizer->denormalize($data['ManagerStatus'], \Docker\API\Model\ManagerStatus::class, 'json', $context)); + } + elseif (\array_key_exists('ManagerStatus', $data) && $data['ManagerStatus'] === null) { + $object->setManagerStatus(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -99,6 +111,12 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('description') && null !== $object->getDescription()) { $data['Description'] = $this->normalizer->normalize($object->getDescription(), 'json', $context); } + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['Status'] = $this->normalizer->normalize($object->getStatus(), 'json', $context); + } + if ($object->isInitialized('managerStatus') && null !== $object->getManagerStatus()) { + $data['ManagerStatus'] = $this->normalizer->normalize($object->getManagerStatus(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -143,7 +161,7 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setID(null); } if (\array_key_exists('Version', $data) && $data['Version'] !== null) { - $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\NodeVersion::class, 'json', $context)); + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); } elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { $object->setVersion(null); @@ -172,6 +190,18 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { $object->setDescription(null); } + if (\array_key_exists('Status', $data) && $data['Status'] !== null) { + $object->setStatus($this->denormalizer->denormalize($data['Status'], \Docker\API\Model\NodeStatus::class, 'json', $context)); + } + elseif (\array_key_exists('Status', $data) && $data['Status'] === null) { + $object->setStatus(null); + } + if (\array_key_exists('ManagerStatus', $data) && $data['ManagerStatus'] !== null) { + $object->setManagerStatus($this->denormalizer->denormalize($data['ManagerStatus'], \Docker\API\Model\ManagerStatus::class, 'json', $context)); + } + elseif (\array_key_exists('ManagerStatus', $data) && $data['ManagerStatus'] === null) { + $object->setManagerStatus(null); + } return $object; } /** @@ -198,6 +228,12 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('description') && null !== $object->getDescription()) { $data['Description'] = $this->normalizer->normalize($object->getDescription(), 'json', $context); } + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $data['Status'] = $this->normalizer->normalize($object->getStatus(), 'json', $context); + } + if ($object->isInitialized('managerStatus') && null !== $object->getManagerStatus()) { + $data['ManagerStatus'] = $this->normalizer->normalize($object->getManagerStatus(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/NodeStatusNormalizer.php b/generated/Normalizer/NodeStatusNormalizer.php new file mode 100644 index 000000000..e3762842f --- /dev/null +++ b/generated/Normalizer/NodeStatusNormalizer.php @@ -0,0 +1,154 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class NodeStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeStatus::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeStatus::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('State', $data) && $data['State'] !== null) { + $object->setState($data['State']); + } + elseif (\array_key_exists('State', $data) && $data['State'] === null) { + $object->setState(null); + } + if (\array_key_exists('Message', $data) && $data['Message'] !== null) { + $object->setMessage($data['Message']); + } + elseif (\array_key_exists('Message', $data) && $data['Message'] === null) { + $object->setMessage(null); + } + if (\array_key_exists('Addr', $data) && $data['Addr'] !== null) { + $object->setAddr($data['Addr']); + } + elseif (\array_key_exists('Addr', $data) && $data['Addr'] === null) { + $object->setAddr(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['State'] = $object->getState(); + } + if ($object->isInitialized('message') && null !== $object->getMessage()) { + $data['Message'] = $object->getMessage(); + } + if ($object->isInitialized('addr') && null !== $object->getAddr()) { + $data['Addr'] = $object->getAddr(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeStatus::class => false]; + } + } +} else { + class NodeStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\NodeStatus::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\NodeStatus::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\NodeStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('State', $data) && $data['State'] !== null) { + $object->setState($data['State']); + } + elseif (\array_key_exists('State', $data) && $data['State'] === null) { + $object->setState(null); + } + if (\array_key_exists('Message', $data) && $data['Message'] !== null) { + $object->setMessage($data['Message']); + } + elseif (\array_key_exists('Message', $data) && $data['Message'] === null) { + $object->setMessage(null); + } + if (\array_key_exists('Addr', $data) && $data['Addr'] !== null) { + $object->setAddr($data['Addr']); + } + elseif (\array_key_exists('Addr', $data) && $data['Addr'] === null) { + $object->setAddr(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('state') && null !== $object->getState()) { + $data['State'] = $object->getState(); + } + if ($object->isInitialized('message') && null !== $object->getMessage()) { + $data['Message'] = $object->getMessage(); + } + if ($object->isInitialized('addr') && null !== $object->getAddr()) { + $data['Addr'] = $object->getAddr(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\NodeStatus::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/OCIDescriptorNormalizer.php b/generated/Normalizer/OCIDescriptorNormalizer.php new file mode 100644 index 000000000..2d67e2426 --- /dev/null +++ b/generated/Normalizer/OCIDescriptorNormalizer.php @@ -0,0 +1,154 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class OCIDescriptorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\OCIDescriptor::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\OCIDescriptor::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\OCIDescriptor(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('mediaType', $data) && $data['mediaType'] !== null) { + $object->setMediaType($data['mediaType']); + } + elseif (\array_key_exists('mediaType', $data) && $data['mediaType'] === null) { + $object->setMediaType(null); + } + if (\array_key_exists('digest', $data) && $data['digest'] !== null) { + $object->setDigest($data['digest']); + } + elseif (\array_key_exists('digest', $data) && $data['digest'] === null) { + $object->setDigest(null); + } + if (\array_key_exists('size', $data) && $data['size'] !== null) { + $object->setSize($data['size']); + } + elseif (\array_key_exists('size', $data) && $data['size'] === null) { + $object->setSize(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('mediaType') && null !== $object->getMediaType()) { + $data['mediaType'] = $object->getMediaType(); + } + if ($object->isInitialized('digest') && null !== $object->getDigest()) { + $data['digest'] = $object->getDigest(); + } + if ($object->isInitialized('size') && null !== $object->getSize()) { + $data['size'] = $object->getSize(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\OCIDescriptor::class => false]; + } + } +} else { + class OCIDescriptorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\OCIDescriptor::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\OCIDescriptor::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\OCIDescriptor(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('mediaType', $data) && $data['mediaType'] !== null) { + $object->setMediaType($data['mediaType']); + } + elseif (\array_key_exists('mediaType', $data) && $data['mediaType'] === null) { + $object->setMediaType(null); + } + if (\array_key_exists('digest', $data) && $data['digest'] !== null) { + $object->setDigest($data['digest']); + } + elseif (\array_key_exists('digest', $data) && $data['digest'] === null) { + $object->setDigest(null); + } + if (\array_key_exists('size', $data) && $data['size'] !== null) { + $object->setSize($data['size']); + } + elseif (\array_key_exists('size', $data) && $data['size'] === null) { + $object->setSize(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('mediaType') && null !== $object->getMediaType()) { + $data['mediaType'] = $object->getMediaType(); + } + if ($object->isInitialized('digest') && null !== $object->getDigest()) { + $data['digest'] = $object->getDigest(); + } + if ($object->isInitialized('size') && null !== $object->getSize()) { + $data['size'] = $object->getSize(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\OCIDescriptor::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/OCIPlatformNormalizer.php b/generated/Normalizer/OCIPlatformNormalizer.php new file mode 100644 index 000000000..0d42d8ef1 --- /dev/null +++ b/generated/Normalizer/OCIPlatformNormalizer.php @@ -0,0 +1,206 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class OCIPlatformNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\OCIPlatform::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\OCIPlatform::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\OCIPlatform(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('architecture', $data) && $data['architecture'] !== null) { + $object->setArchitecture($data['architecture']); + } + elseif (\array_key_exists('architecture', $data) && $data['architecture'] === null) { + $object->setArchitecture(null); + } + if (\array_key_exists('os', $data) && $data['os'] !== null) { + $object->setOs($data['os']); + } + elseif (\array_key_exists('os', $data) && $data['os'] === null) { + $object->setOs(null); + } + if (\array_key_exists('os.version', $data) && $data['os.version'] !== null) { + $object->setOsVersion($data['os.version']); + } + elseif (\array_key_exists('os.version', $data) && $data['os.version'] === null) { + $object->setOsVersion(null); + } + if (\array_key_exists('os.features', $data) && $data['os.features'] !== null) { + $values = []; + foreach ($data['os.features'] as $value) { + $values[] = $value; + } + $object->setOsFeatures($values); + } + elseif (\array_key_exists('os.features', $data) && $data['os.features'] === null) { + $object->setOsFeatures(null); + } + if (\array_key_exists('variant', $data) && $data['variant'] !== null) { + $object->setVariant($data['variant']); + } + elseif (\array_key_exists('variant', $data) && $data['variant'] === null) { + $object->setVariant(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('architecture') && null !== $object->getArchitecture()) { + $data['architecture'] = $object->getArchitecture(); + } + if ($object->isInitialized('os') && null !== $object->getOs()) { + $data['os'] = $object->getOs(); + } + if ($object->isInitialized('osVersion') && null !== $object->getOsVersion()) { + $data['os.version'] = $object->getOsVersion(); + } + if ($object->isInitialized('osFeatures') && null !== $object->getOsFeatures()) { + $values = []; + foreach ($object->getOsFeatures() as $value) { + $values[] = $value; + } + $data['os.features'] = $values; + } + if ($object->isInitialized('variant') && null !== $object->getVariant()) { + $data['variant'] = $object->getVariant(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\OCIPlatform::class => false]; + } + } +} else { + class OCIPlatformNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\OCIPlatform::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\OCIPlatform::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\OCIPlatform(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('architecture', $data) && $data['architecture'] !== null) { + $object->setArchitecture($data['architecture']); + } + elseif (\array_key_exists('architecture', $data) && $data['architecture'] === null) { + $object->setArchitecture(null); + } + if (\array_key_exists('os', $data) && $data['os'] !== null) { + $object->setOs($data['os']); + } + elseif (\array_key_exists('os', $data) && $data['os'] === null) { + $object->setOs(null); + } + if (\array_key_exists('os.version', $data) && $data['os.version'] !== null) { + $object->setOsVersion($data['os.version']); + } + elseif (\array_key_exists('os.version', $data) && $data['os.version'] === null) { + $object->setOsVersion(null); + } + if (\array_key_exists('os.features', $data) && $data['os.features'] !== null) { + $values = []; + foreach ($data['os.features'] as $value) { + $values[] = $value; + } + $object->setOsFeatures($values); + } + elseif (\array_key_exists('os.features', $data) && $data['os.features'] === null) { + $object->setOsFeatures(null); + } + if (\array_key_exists('variant', $data) && $data['variant'] !== null) { + $object->setVariant($data['variant']); + } + elseif (\array_key_exists('variant', $data) && $data['variant'] === null) { + $object->setVariant(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('architecture') && null !== $object->getArchitecture()) { + $data['architecture'] = $object->getArchitecture(); + } + if ($object->isInitialized('os') && null !== $object->getOs()) { + $data['os'] = $object->getOs(); + } + if ($object->isInitialized('osVersion') && null !== $object->getOsVersion()) { + $data['os.version'] = $object->getOsVersion(); + } + if ($object->isInitialized('osFeatures') && null !== $object->getOsFeatures()) { + $values = []; + foreach ($object->getOsFeatures() as $value) { + $values[] = $value; + } + $data['os.features'] = $values; + } + if ($object->isInitialized('variant') && null !== $object->getVariant()) { + $data['variant'] = $object->getVariant(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\OCIPlatform::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SecretVersionNormalizer.php b/generated/Normalizer/ObjectVersionNormalizer.php similarity index 88% rename from generated/Normalizer/SecretVersionNormalizer.php rename to generated/Normalizer/ObjectVersionNormalizer.php index 14ac028d3..38f71ebb4 100644 --- a/generated/Normalizer/SecretVersionNormalizer.php +++ b/generated/Normalizer/ObjectVersionNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class SecretVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ObjectVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class SecretVersionNormalizer implements DenormalizerInterface, NormalizerInterf use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\SecretVersion::class; + return $type === \Docker\API\Model\ObjectVersion::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\SecretVersion::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ObjectVersion::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\SecretVersion(); + $object = new \Docker\API\Model\ObjectVersion(); if (null === $data || false === \is_array($data)) { return $object; } @@ -58,11 +58,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\SecretVersion::class => false]; + return [\Docker\API\Model\ObjectVersion::class => false]; } } } else { - class SecretVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ObjectVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -70,11 +70,11 @@ class SecretVersionNormalizer implements DenormalizerInterface, NormalizerInterf use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\SecretVersion::class; + return $type === \Docker\API\Model\ObjectVersion::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\SecretVersion::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ObjectVersion::class; } /** * @return mixed @@ -87,7 +87,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\SecretVersion(); + $object = new \Docker\API\Model\ObjectVersion(); if (null === $data || false === \is_array($data)) { return $object; } @@ -112,7 +112,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\SecretVersion::class => false]; + return [\Docker\API\Model\ObjectVersion::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/PeerInfoNormalizer.php b/generated/Normalizer/PeerInfoNormalizer.php new file mode 100644 index 000000000..d6d3e9a0c --- /dev/null +++ b/generated/Normalizer/PeerInfoNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PeerInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PeerInfo::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PeerInfo::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PeerInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('IP', $data) && $data['IP'] !== null) { + $object->setIP($data['IP']); + } + elseif (\array_key_exists('IP', $data) && $data['IP'] === null) { + $object->setIP(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('iP') && null !== $object->getIP()) { + $data['IP'] = $object->getIP(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PeerInfo::class => false]; + } + } +} else { + class PeerInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PeerInfo::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PeerInfo::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PeerInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('IP', $data) && $data['IP'] !== null) { + $object->setIP($data['IP']); + } + elseif (\array_key_exists('IP', $data) && $data['IP'] === null) { + $object->setIP(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('iP') && null !== $object->getIP()) { + $data['IP'] = $object->getIP(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PeerInfo::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PeerNodeNormalizer.php b/generated/Normalizer/PeerNodeNormalizer.php new file mode 100644 index 000000000..b9e0c48ff --- /dev/null +++ b/generated/Normalizer/PeerNodeNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PeerNodeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PeerNode::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PeerNode::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PeerNode(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NodeID', $data) && $data['NodeID'] !== null) { + $object->setNodeID($data['NodeID']); + } + elseif (\array_key_exists('NodeID', $data) && $data['NodeID'] === null) { + $object->setNodeID(null); + } + if (\array_key_exists('Addr', $data) && $data['Addr'] !== null) { + $object->setAddr($data['Addr']); + } + elseif (\array_key_exists('Addr', $data) && $data['Addr'] === null) { + $object->setAddr(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('nodeID') && null !== $object->getNodeID()) { + $data['NodeID'] = $object->getNodeID(); + } + if ($object->isInitialized('addr') && null !== $object->getAddr()) { + $data['Addr'] = $object->getAddr(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PeerNode::class => false]; + } + } +} else { + class PeerNodeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PeerNode::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PeerNode::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PeerNode(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NodeID', $data) && $data['NodeID'] !== null) { + $object->setNodeID($data['NodeID']); + } + elseif (\array_key_exists('NodeID', $data) && $data['NodeID'] === null) { + $object->setNodeID(null); + } + if (\array_key_exists('Addr', $data) && $data['Addr'] !== null) { + $object->setAddr($data['Addr']); + } + elseif (\array_key_exists('Addr', $data) && $data['Addr'] === null) { + $object->setAddr(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('nodeID') && null !== $object->getNodeID()) { + $data['NodeID'] = $object->getNodeID(); + } + if ($object->isInitialized('addr') && null !== $object->getAddr()) { + $data['Addr'] = $object->getAddr(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PeerNode::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/NodeDescriptionPlatformNormalizer.php b/generated/Normalizer/PlatformNormalizer.php similarity index 86% rename from generated/Normalizer/NodeDescriptionPlatformNormalizer.php rename to generated/Normalizer/PlatformNormalizer.php index 2442bc676..cfc3551db 100644 --- a/generated/Normalizer/NodeDescriptionPlatformNormalizer.php +++ b/generated/Normalizer/PlatformNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NodeDescriptionPlatformNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class PlatformNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class NodeDescriptionPlatformNormalizer implements DenormalizerInterface, Normal use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\NodeDescriptionPlatform::class; + return $type === \Docker\API\Model\Platform::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionPlatform::class; + return is_object($data) && get_class($data) === \Docker\API\Model\Platform::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\NodeDescriptionPlatform(); + $object = new \Docker\API\Model\Platform(); if (null === $data || false === \is_array($data)) { return $object; } @@ -67,11 +67,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\NodeDescriptionPlatform::class => false]; + return [\Docker\API\Model\Platform::class => false]; } } } else { - class NodeDescriptionPlatformNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class PlatformNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -79,11 +79,11 @@ class NodeDescriptionPlatformNormalizer implements DenormalizerInterface, Normal use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\NodeDescriptionPlatform::class; + return $type === \Docker\API\Model\Platform::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\NodeDescriptionPlatform::class; + return is_object($data) && get_class($data) === \Docker\API\Model\Platform::class; } /** * @return mixed @@ -96,7 +96,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\NodeDescriptionPlatform(); + $object = new \Docker\API\Model\Platform(); if (null === $data || false === \is_array($data)) { return $object; } @@ -130,7 +130,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\NodeDescriptionPlatform::class => false]; + return [\Docker\API\Model\Platform::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/PluginConfigInterfaceNormalizer.php b/generated/Normalizer/PluginConfigInterfaceNormalizer.php index 537f626aa..2f6201e21 100644 --- a/generated/Normalizer/PluginConfigInterfaceNormalizer.php +++ b/generated/Normalizer/PluginConfigInterfaceNormalizer.php @@ -56,6 +56,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Socket', $data) && $data['Socket'] === null) { $object->setSocket(null); } + if (\array_key_exists('ProtocolScheme', $data) && $data['ProtocolScheme'] !== null) { + $object->setProtocolScheme($data['ProtocolScheme']); + } + elseif (\array_key_exists('ProtocolScheme', $data) && $data['ProtocolScheme'] === null) { + $object->setProtocolScheme(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -67,6 +73,9 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['Types'] = $values; $data['Socket'] = $object->getSocket(); + if ($object->isInitialized('protocolScheme') && null !== $object->getProtocolScheme()) { + $data['ProtocolScheme'] = $object->getProtocolScheme(); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -120,6 +129,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Socket', $data) && $data['Socket'] === null) { $object->setSocket(null); } + if (\array_key_exists('ProtocolScheme', $data) && $data['ProtocolScheme'] !== null) { + $object->setProtocolScheme($data['ProtocolScheme']); + } + elseif (\array_key_exists('ProtocolScheme', $data) && $data['ProtocolScheme'] === null) { + $object->setProtocolScheme(null); + } return $object; } /** @@ -134,6 +149,9 @@ public function normalize($object, $format = null, array $context = []) } $data['Types'] = $values; $data['Socket'] = $object->getSocket(); + if ($object->isInitialized('protocolScheme') && null !== $object->getProtocolScheme()) { + $data['ProtocolScheme'] = $object->getProtocolScheme(); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/PluginConfigNormalizer.php b/generated/Normalizer/PluginConfigNormalizer.php index 9de6087a7..d2a4a3668 100644 --- a/generated/Normalizer/PluginConfigNormalizer.php +++ b/generated/Normalizer/PluginConfigNormalizer.php @@ -40,6 +40,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (null === $data || false === \is_array($data)) { return $object; } + if (\array_key_exists('DockerVersion', $data) && $data['DockerVersion'] !== null) { + $object->setDockerVersion($data['DockerVersion']); + } + elseif (\array_key_exists('DockerVersion', $data) && $data['DockerVersion'] === null) { + $object->setDockerVersion(null); + } if (\array_key_exists('Description', $data) && $data['Description'] !== null) { $object->setDescription($data['Description']); } @@ -98,6 +104,18 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('PropagatedMount', $data) && $data['PropagatedMount'] === null) { $object->setPropagatedMount(null); } + if (\array_key_exists('IpcHost', $data) && $data['IpcHost'] !== null) { + $object->setIpcHost($data['IpcHost']); + } + elseif (\array_key_exists('IpcHost', $data) && $data['IpcHost'] === null) { + $object->setIpcHost(null); + } + if (\array_key_exists('PidHost', $data) && $data['PidHost'] !== null) { + $object->setPidHost($data['PidHost']); + } + elseif (\array_key_exists('PidHost', $data) && $data['PidHost'] === null) { + $object->setPidHost(null); + } if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { $values_1 = []; foreach ($data['Mounts'] as $value_1) { @@ -135,6 +153,9 @@ public function denormalize(mixed $data, string $type, string $format = null, ar public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; + if ($object->isInitialized('dockerVersion') && null !== $object->getDockerVersion()) { + $data['DockerVersion'] = $object->getDockerVersion(); + } $data['Description'] = $object->getDescription(); $data['Documentation'] = $object->getDocumentation(); $data['Interface'] = $this->normalizer->normalize($object->getInterface(), 'json', $context); @@ -150,6 +171,8 @@ public function normalize(mixed $object, string $format = null, array $context = $data['Network'] = $this->normalizer->normalize($object->getNetwork(), 'json', $context); $data['Linux'] = $this->normalizer->normalize($object->getLinux(), 'json', $context); $data['PropagatedMount'] = $object->getPropagatedMount(); + $data['IpcHost'] = $object->getIpcHost(); + $data['PidHost'] = $object->getPidHost(); $values_1 = []; foreach ($object->getMounts() as $value_1) { $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); @@ -201,6 +224,12 @@ public function denormalize($data, $type, $format = null, array $context = []) if (null === $data || false === \is_array($data)) { return $object; } + if (\array_key_exists('DockerVersion', $data) && $data['DockerVersion'] !== null) { + $object->setDockerVersion($data['DockerVersion']); + } + elseif (\array_key_exists('DockerVersion', $data) && $data['DockerVersion'] === null) { + $object->setDockerVersion(null); + } if (\array_key_exists('Description', $data) && $data['Description'] !== null) { $object->setDescription($data['Description']); } @@ -259,6 +288,18 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('PropagatedMount', $data) && $data['PropagatedMount'] === null) { $object->setPropagatedMount(null); } + if (\array_key_exists('IpcHost', $data) && $data['IpcHost'] !== null) { + $object->setIpcHost($data['IpcHost']); + } + elseif (\array_key_exists('IpcHost', $data) && $data['IpcHost'] === null) { + $object->setIpcHost(null); + } + if (\array_key_exists('PidHost', $data) && $data['PidHost'] !== null) { + $object->setPidHost($data['PidHost']); + } + elseif (\array_key_exists('PidHost', $data) && $data['PidHost'] === null) { + $object->setPidHost(null); + } if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { $values_1 = []; foreach ($data['Mounts'] as $value_1) { @@ -299,6 +340,9 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; + if ($object->isInitialized('dockerVersion') && null !== $object->getDockerVersion()) { + $data['DockerVersion'] = $object->getDockerVersion(); + } $data['Description'] = $object->getDescription(); $data['Documentation'] = $object->getDocumentation(); $data['Interface'] = $this->normalizer->normalize($object->getInterface(), 'json', $context); @@ -314,6 +358,8 @@ public function normalize($object, $format = null, array $context = []) $data['Network'] = $this->normalizer->normalize($object->getNetwork(), 'json', $context); $data['Linux'] = $this->normalizer->normalize($object->getLinux(), 'json', $context); $data['PropagatedMount'] = $object->getPropagatedMount(); + $data['IpcHost'] = $object->getIpcHost(); + $data['PidHost'] = $object->getPidHost(); $values_1 = []; foreach ($object->getMounts() as $value_1) { $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); diff --git a/generated/Normalizer/PluginNormalizer.php b/generated/Normalizer/PluginNormalizer.php index 9b127dd5f..524d71cb5 100644 --- a/generated/Normalizer/PluginNormalizer.php +++ b/generated/Normalizer/PluginNormalizer.php @@ -64,6 +64,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Settings', $data) && $data['Settings'] === null) { $object->setSettings(null); } + if (\array_key_exists('PluginReference', $data) && $data['PluginReference'] !== null) { + $object->setPluginReference($data['PluginReference']); + } + elseif (\array_key_exists('PluginReference', $data) && $data['PluginReference'] === null) { + $object->setPluginReference(null); + } if (\array_key_exists('Config', $data) && $data['Config'] !== null) { $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\PluginConfig::class, 'json', $context)); } @@ -81,6 +87,9 @@ public function normalize(mixed $object, string $format = null, array $context = $data['Name'] = $object->getName(); $data['Enabled'] = $object->getEnabled(); $data['Settings'] = $this->normalizer->normalize($object->getSettings(), 'json', $context); + if ($object->isInitialized('pluginReference') && null !== $object->getPluginReference()) { + $data['PluginReference'] = $object->getPluginReference(); + } $data['Config'] = $this->normalizer->normalize($object->getConfig(), 'json', $context); return $data; } @@ -143,6 +152,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Settings', $data) && $data['Settings'] === null) { $object->setSettings(null); } + if (\array_key_exists('PluginReference', $data) && $data['PluginReference'] !== null) { + $object->setPluginReference($data['PluginReference']); + } + elseif (\array_key_exists('PluginReference', $data) && $data['PluginReference'] === null) { + $object->setPluginReference(null); + } if (\array_key_exists('Config', $data) && $data['Config'] !== null) { $object->setConfig($this->denormalizer->denormalize($data['Config'], \Docker\API\Model\PluginConfig::class, 'json', $context)); } @@ -163,6 +178,9 @@ public function normalize($object, $format = null, array $context = []) $data['Name'] = $object->getName(); $data['Enabled'] = $object->getEnabled(); $data['Settings'] = $this->normalizer->normalize($object->getSettings(), 'json', $context); + if ($object->isInitialized('pluginReference') && null !== $object->getPluginReference()) { + $data['PluginReference'] = $object->getPluginReference(); + } $data['Config'] = $this->normalizer->normalize($object->getConfig(), 'json', $context); return $data; } diff --git a/generated/Normalizer/PluginsPullPostBodyItemNormalizer.php b/generated/Normalizer/PluginPrivilegeNormalizer.php similarity index 88% rename from generated/Normalizer/PluginsPullPostBodyItemNormalizer.php rename to generated/Normalizer/PluginPrivilegeNormalizer.php index 7a093e9f2..aabcfcb6e 100644 --- a/generated/Normalizer/PluginsPullPostBodyItemNormalizer.php +++ b/generated/Normalizer/PluginPrivilegeNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PluginsPullPostBodyItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class PluginPrivilegeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class PluginsPullPostBodyItemNormalizer implements DenormalizerInterface, Normal use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\PluginsPullPostBodyItem::class; + return $type === \Docker\API\Model\PluginPrivilege::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\PluginsPullPostBodyItem::class; + return is_object($data) && get_class($data) === \Docker\API\Model\PluginPrivilege::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\PluginsPullPostBodyItem(); + $object = new \Docker\API\Model\PluginPrivilege(); if (null === $data || false === \is_array($data)) { return $object; } @@ -84,11 +84,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\PluginsPullPostBodyItem::class => false]; + return [\Docker\API\Model\PluginPrivilege::class => false]; } } } else { - class PluginsPullPostBodyItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class PluginPrivilegeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -96,11 +96,11 @@ class PluginsPullPostBodyItemNormalizer implements DenormalizerInterface, Normal use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\PluginsPullPostBodyItem::class; + return $type === \Docker\API\Model\PluginPrivilege::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\PluginsPullPostBodyItem::class; + return is_object($data) && get_class($data) === \Docker\API\Model\PluginPrivilege::class; } /** * @return mixed @@ -113,7 +113,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\PluginsPullPostBodyItem(); + $object = new \Docker\API\Model\PluginPrivilege(); if (null === $data || false === \is_array($data)) { return $object; } @@ -164,7 +164,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\PluginsPullPostBodyItem::class => false]; + return [\Docker\API\Model\PluginPrivilege::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/InfoGetResponse200PluginsNormalizer.php b/generated/Normalizer/PluginsInfoNormalizer.php similarity index 63% rename from generated/Normalizer/InfoGetResponse200PluginsNormalizer.php rename to generated/Normalizer/PluginsInfoNormalizer.php index ccfbb3df7..4d80ebcd3 100644 --- a/generated/Normalizer/InfoGetResponse200PluginsNormalizer.php +++ b/generated/Normalizer/PluginsInfoNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InfoGetResponse200PluginsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class PluginsInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class InfoGetResponse200PluginsNormalizer implements DenormalizerInterface, Norm use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\InfoGetResponse200Plugins::class; + return $type === \Docker\API\Model\PluginsInfo::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200Plugins::class; + return is_object($data) && get_class($data) === \Docker\API\Model\PluginsInfo::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\InfoGetResponse200Plugins(); + $object = new \Docker\API\Model\PluginsInfo(); if (null === $data || false === \is_array($data)) { return $object; } @@ -60,6 +60,26 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Network', $data) && $data['Network'] === null) { $object->setNetwork(null); } + if (\array_key_exists('Authorization', $data) && $data['Authorization'] !== null) { + $values_2 = []; + foreach ($data['Authorization'] as $value_2) { + $values_2[] = $value_2; + } + $object->setAuthorization($values_2); + } + elseif (\array_key_exists('Authorization', $data) && $data['Authorization'] === null) { + $object->setAuthorization(null); + } + if (\array_key_exists('Log', $data) && $data['Log'] !== null) { + $values_3 = []; + foreach ($data['Log'] as $value_3) { + $values_3[] = $value_3; + } + $object->setLog($values_3); + } + elseif (\array_key_exists('Log', $data) && $data['Log'] === null) { + $object->setLog(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -79,15 +99,29 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['Network'] = $values_1; } + if ($object->isInitialized('authorization') && null !== $object->getAuthorization()) { + $values_2 = []; + foreach ($object->getAuthorization() as $value_2) { + $values_2[] = $value_2; + } + $data['Authorization'] = $values_2; + } + if ($object->isInitialized('log') && null !== $object->getLog()) { + $values_3 = []; + foreach ($object->getLog() as $value_3) { + $values_3[] = $value_3; + } + $data['Log'] = $values_3; + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\InfoGetResponse200Plugins::class => false]; + return [\Docker\API\Model\PluginsInfo::class => false]; } } } else { - class InfoGetResponse200PluginsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class PluginsInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -95,11 +129,11 @@ class InfoGetResponse200PluginsNormalizer implements DenormalizerInterface, Norm use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\InfoGetResponse200Plugins::class; + return $type === \Docker\API\Model\PluginsInfo::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200Plugins::class; + return is_object($data) && get_class($data) === \Docker\API\Model\PluginsInfo::class; } /** * @return mixed @@ -112,7 +146,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\InfoGetResponse200Plugins(); + $object = new \Docker\API\Model\PluginsInfo(); if (null === $data || false === \is_array($data)) { return $object; } @@ -136,6 +170,26 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Network', $data) && $data['Network'] === null) { $object->setNetwork(null); } + if (\array_key_exists('Authorization', $data) && $data['Authorization'] !== null) { + $values_2 = []; + foreach ($data['Authorization'] as $value_2) { + $values_2[] = $value_2; + } + $object->setAuthorization($values_2); + } + elseif (\array_key_exists('Authorization', $data) && $data['Authorization'] === null) { + $object->setAuthorization(null); + } + if (\array_key_exists('Log', $data) && $data['Log'] !== null) { + $values_3 = []; + foreach ($data['Log'] as $value_3) { + $values_3[] = $value_3; + } + $object->setLog($values_3); + } + elseif (\array_key_exists('Log', $data) && $data['Log'] === null) { + $object->setLog(null); + } return $object; } /** @@ -158,11 +212,25 @@ public function normalize($object, $format = null, array $context = []) } $data['Network'] = $values_1; } + if ($object->isInitialized('authorization') && null !== $object->getAuthorization()) { + $values_2 = []; + foreach ($object->getAuthorization() as $value_2) { + $values_2[] = $value_2; + } + $data['Authorization'] = $values_2; + } + if ($object->isInitialized('log') && null !== $object->getLog()) { + $values_3 = []; + foreach ($object->getLog() as $value_3) { + $values_3[] = $value_3; + } + $data['Log'] = $values_3; + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\InfoGetResponse200Plugins::class => false]; + return [\Docker\API\Model\PluginsInfo::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/HostConfigPortBindingsItemNormalizer.php b/generated/Normalizer/PortBindingNormalizer.php similarity index 85% rename from generated/Normalizer/HostConfigPortBindingsItemNormalizer.php rename to generated/Normalizer/PortBindingNormalizer.php index fea68518d..0d760316a 100644 --- a/generated/Normalizer/HostConfigPortBindingsItemNormalizer.php +++ b/generated/Normalizer/PortBindingNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class HostConfigPortBindingsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class PortBindingNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class HostConfigPortBindingsItemNormalizer implements DenormalizerInterface, Nor use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\HostConfigPortBindingsItem::class; + return $type === \Docker\API\Model\PortBinding::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\HostConfigPortBindingsItem::class; + return is_object($data) && get_class($data) === \Docker\API\Model\PortBinding::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\HostConfigPortBindingsItem(); + $object = new \Docker\API\Model\PortBinding(); if (null === $data || false === \is_array($data)) { return $object; } @@ -67,11 +67,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\HostConfigPortBindingsItem::class => false]; + return [\Docker\API\Model\PortBinding::class => false]; } } } else { - class HostConfigPortBindingsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class PortBindingNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -79,11 +79,11 @@ class HostConfigPortBindingsItemNormalizer implements DenormalizerInterface, Nor use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\HostConfigPortBindingsItem::class; + return $type === \Docker\API\Model\PortBinding::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\HostConfigPortBindingsItem::class; + return is_object($data) && get_class($data) === \Docker\API\Model\PortBinding::class; } /** * @return mixed @@ -96,7 +96,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\HostConfigPortBindingsItem(); + $object = new \Docker\API\Model\PortBinding(); if (null === $data || false === \is_array($data)) { return $object; } @@ -130,7 +130,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\HostConfigPortBindingsItem::class => false]; + return [\Docker\API\Model\PortBinding::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/PortStatusNormalizer.php b/generated/Normalizer/PortStatusNormalizer.php new file mode 100644 index 000000000..1efbef447 --- /dev/null +++ b/generated/Normalizer/PortStatusNormalizer.php @@ -0,0 +1,134 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class PortStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PortStatus::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PortStatus::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PortStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Ports', $data) && $data['Ports'] !== null) { + $values = []; + foreach ($data['Ports'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\EndpointPortConfig::class, 'json', $context); + } + $object->setPorts($values); + } + elseif (\array_key_exists('Ports', $data) && $data['Ports'] === null) { + $object->setPorts(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('ports') && null !== $object->getPorts()) { + $values = []; + foreach ($object->getPorts() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Ports'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PortStatus::class => false]; + } + } +} else { + class PortStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\PortStatus::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\PortStatus::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\PortStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Ports', $data) && $data['Ports'] !== null) { + $values = []; + foreach ($data['Ports'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\EndpointPortConfig::class, 'json', $context); + } + $object->setPorts($values); + } + elseif (\array_key_exists('Ports', $data) && $data['Ports'] === null) { + $object->setPorts(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('ports') && null !== $object->getPorts()) { + $values = []; + foreach ($object->getPorts() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Ports'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\PortStatus::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ProgressDetailNormalizer.php b/generated/Normalizer/ProgressDetailNormalizer.php index bd5e7df40..6125f8845 100644 --- a/generated/Normalizer/ProgressDetailNormalizer.php +++ b/generated/Normalizer/ProgressDetailNormalizer.php @@ -40,28 +40,28 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('code', $data) && $data['code'] !== null) { - $object->setCode($data['code']); + if (\array_key_exists('current', $data) && $data['current'] !== null) { + $object->setCurrent($data['current']); } - elseif (\array_key_exists('code', $data) && $data['code'] === null) { - $object->setCode(null); + elseif (\array_key_exists('current', $data) && $data['current'] === null) { + $object->setCurrent(null); } - if (\array_key_exists('message', $data) && $data['message'] !== null) { - $object->setMessage($data['message']); + if (\array_key_exists('total', $data) && $data['total'] !== null) { + $object->setTotal($data['total']); } - elseif (\array_key_exists('message', $data) && $data['message'] === null) { - $object->setMessage(null); + elseif (\array_key_exists('total', $data) && $data['total'] === null) { + $object->setTotal(null); } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('code') && null !== $object->getCode()) { - $data['code'] = $object->getCode(); + if ($object->isInitialized('current') && null !== $object->getCurrent()) { + $data['current'] = $object->getCurrent(); } - if ($object->isInitialized('message') && null !== $object->getMessage()) { - $data['message'] = $object->getMessage(); + if ($object->isInitialized('total') && null !== $object->getTotal()) { + $data['total'] = $object->getTotal(); } return $data; } @@ -100,17 +100,17 @@ public function denormalize($data, $type, $format = null, array $context = []) if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('code', $data) && $data['code'] !== null) { - $object->setCode($data['code']); + if (\array_key_exists('current', $data) && $data['current'] !== null) { + $object->setCurrent($data['current']); } - elseif (\array_key_exists('code', $data) && $data['code'] === null) { - $object->setCode(null); + elseif (\array_key_exists('current', $data) && $data['current'] === null) { + $object->setCurrent(null); } - if (\array_key_exists('message', $data) && $data['message'] !== null) { - $object->setMessage($data['message']); + if (\array_key_exists('total', $data) && $data['total'] !== null) { + $object->setTotal($data['total']); } - elseif (\array_key_exists('message', $data) && $data['message'] === null) { - $object->setMessage(null); + elseif (\array_key_exists('total', $data) && $data['total'] === null) { + $object->setTotal(null); } return $object; } @@ -120,11 +120,11 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('code') && null !== $object->getCode()) { - $data['code'] = $object->getCode(); + if ($object->isInitialized('current') && null !== $object->getCurrent()) { + $data['current'] = $object->getCurrent(); } - if ($object->isInitialized('message') && null !== $object->getMessage()) { - $data['message'] = $object->getMessage(); + if ($object->isInitialized('total') && null !== $object->getTotal()) { + $data['total'] = $object->getTotal(); } return $data; } diff --git a/generated/Normalizer/RegistryServiceConfigNormalizer.php b/generated/Normalizer/RegistryServiceConfigNormalizer.php new file mode 100644 index 000000000..65697d7de --- /dev/null +++ b/generated/Normalizer/RegistryServiceConfigNormalizer.php @@ -0,0 +1,270 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class RegistryServiceConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\RegistryServiceConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\RegistryServiceConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\RegistryServiceConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('AllowNondistributableArtifactsCIDRs', $data) && $data['AllowNondistributableArtifactsCIDRs'] !== null) { + $values = []; + foreach ($data['AllowNondistributableArtifactsCIDRs'] as $value) { + $values[] = $value; + } + $object->setAllowNondistributableArtifactsCIDRs($values); + } + elseif (\array_key_exists('AllowNondistributableArtifactsCIDRs', $data) && $data['AllowNondistributableArtifactsCIDRs'] === null) { + $object->setAllowNondistributableArtifactsCIDRs(null); + } + if (\array_key_exists('AllowNondistributableArtifactsHostnames', $data) && $data['AllowNondistributableArtifactsHostnames'] !== null) { + $values_1 = []; + foreach ($data['AllowNondistributableArtifactsHostnames'] as $value_1) { + $values_1[] = $value_1; + } + $object->setAllowNondistributableArtifactsHostnames($values_1); + } + elseif (\array_key_exists('AllowNondistributableArtifactsHostnames', $data) && $data['AllowNondistributableArtifactsHostnames'] === null) { + $object->setAllowNondistributableArtifactsHostnames(null); + } + if (\array_key_exists('InsecureRegistryCIDRs', $data) && $data['InsecureRegistryCIDRs'] !== null) { + $values_2 = []; + foreach ($data['InsecureRegistryCIDRs'] as $value_2) { + $values_2[] = $value_2; + } + $object->setInsecureRegistryCIDRs($values_2); + } + elseif (\array_key_exists('InsecureRegistryCIDRs', $data) && $data['InsecureRegistryCIDRs'] === null) { + $object->setInsecureRegistryCIDRs(null); + } + if (\array_key_exists('IndexConfigs', $data) && $data['IndexConfigs'] !== null) { + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['IndexConfigs'] as $key => $value_3) { + $values_3[$key] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\IndexInfo::class, 'json', $context); + } + $object->setIndexConfigs($values_3); + } + elseif (\array_key_exists('IndexConfigs', $data) && $data['IndexConfigs'] === null) { + $object->setIndexConfigs(null); + } + if (\array_key_exists('Mirrors', $data) && $data['Mirrors'] !== null) { + $values_4 = []; + foreach ($data['Mirrors'] as $value_4) { + $values_4[] = $value_4; + } + $object->setMirrors($values_4); + } + elseif (\array_key_exists('Mirrors', $data) && $data['Mirrors'] === null) { + $object->setMirrors(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('allowNondistributableArtifactsCIDRs') && null !== $object->getAllowNondistributableArtifactsCIDRs()) { + $values = []; + foreach ($object->getAllowNondistributableArtifactsCIDRs() as $value) { + $values[] = $value; + } + $data['AllowNondistributableArtifactsCIDRs'] = $values; + } + if ($object->isInitialized('allowNondistributableArtifactsHostnames') && null !== $object->getAllowNondistributableArtifactsHostnames()) { + $values_1 = []; + foreach ($object->getAllowNondistributableArtifactsHostnames() as $value_1) { + $values_1[] = $value_1; + } + $data['AllowNondistributableArtifactsHostnames'] = $values_1; + } + if ($object->isInitialized('insecureRegistryCIDRs') && null !== $object->getInsecureRegistryCIDRs()) { + $values_2 = []; + foreach ($object->getInsecureRegistryCIDRs() as $value_2) { + $values_2[] = $value_2; + } + $data['InsecureRegistryCIDRs'] = $values_2; + } + if ($object->isInitialized('indexConfigs') && null !== $object->getIndexConfigs()) { + $values_3 = []; + foreach ($object->getIndexConfigs() as $key => $value_3) { + $values_3[$key] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['IndexConfigs'] = $values_3; + } + if ($object->isInitialized('mirrors') && null !== $object->getMirrors()) { + $values_4 = []; + foreach ($object->getMirrors() as $value_4) { + $values_4[] = $value_4; + } + $data['Mirrors'] = $values_4; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\RegistryServiceConfig::class => false]; + } + } +} else { + class RegistryServiceConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\RegistryServiceConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\RegistryServiceConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\RegistryServiceConfig(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('AllowNondistributableArtifactsCIDRs', $data) && $data['AllowNondistributableArtifactsCIDRs'] !== null) { + $values = []; + foreach ($data['AllowNondistributableArtifactsCIDRs'] as $value) { + $values[] = $value; + } + $object->setAllowNondistributableArtifactsCIDRs($values); + } + elseif (\array_key_exists('AllowNondistributableArtifactsCIDRs', $data) && $data['AllowNondistributableArtifactsCIDRs'] === null) { + $object->setAllowNondistributableArtifactsCIDRs(null); + } + if (\array_key_exists('AllowNondistributableArtifactsHostnames', $data) && $data['AllowNondistributableArtifactsHostnames'] !== null) { + $values_1 = []; + foreach ($data['AllowNondistributableArtifactsHostnames'] as $value_1) { + $values_1[] = $value_1; + } + $object->setAllowNondistributableArtifactsHostnames($values_1); + } + elseif (\array_key_exists('AllowNondistributableArtifactsHostnames', $data) && $data['AllowNondistributableArtifactsHostnames'] === null) { + $object->setAllowNondistributableArtifactsHostnames(null); + } + if (\array_key_exists('InsecureRegistryCIDRs', $data) && $data['InsecureRegistryCIDRs'] !== null) { + $values_2 = []; + foreach ($data['InsecureRegistryCIDRs'] as $value_2) { + $values_2[] = $value_2; + } + $object->setInsecureRegistryCIDRs($values_2); + } + elseif (\array_key_exists('InsecureRegistryCIDRs', $data) && $data['InsecureRegistryCIDRs'] === null) { + $object->setInsecureRegistryCIDRs(null); + } + if (\array_key_exists('IndexConfigs', $data) && $data['IndexConfigs'] !== null) { + $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['IndexConfigs'] as $key => $value_3) { + $values_3[$key] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\IndexInfo::class, 'json', $context); + } + $object->setIndexConfigs($values_3); + } + elseif (\array_key_exists('IndexConfigs', $data) && $data['IndexConfigs'] === null) { + $object->setIndexConfigs(null); + } + if (\array_key_exists('Mirrors', $data) && $data['Mirrors'] !== null) { + $values_4 = []; + foreach ($data['Mirrors'] as $value_4) { + $values_4[] = $value_4; + } + $object->setMirrors($values_4); + } + elseif (\array_key_exists('Mirrors', $data) && $data['Mirrors'] === null) { + $object->setMirrors(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('allowNondistributableArtifactsCIDRs') && null !== $object->getAllowNondistributableArtifactsCIDRs()) { + $values = []; + foreach ($object->getAllowNondistributableArtifactsCIDRs() as $value) { + $values[] = $value; + } + $data['AllowNondistributableArtifactsCIDRs'] = $values; + } + if ($object->isInitialized('allowNondistributableArtifactsHostnames') && null !== $object->getAllowNondistributableArtifactsHostnames()) { + $values_1 = []; + foreach ($object->getAllowNondistributableArtifactsHostnames() as $value_1) { + $values_1[] = $value_1; + } + $data['AllowNondistributableArtifactsHostnames'] = $values_1; + } + if ($object->isInitialized('insecureRegistryCIDRs') && null !== $object->getInsecureRegistryCIDRs()) { + $values_2 = []; + foreach ($object->getInsecureRegistryCIDRs() as $value_2) { + $values_2[] = $value_2; + } + $data['InsecureRegistryCIDRs'] = $values_2; + } + if ($object->isInitialized('indexConfigs') && null !== $object->getIndexConfigs()) { + $values_3 = []; + foreach ($object->getIndexConfigs() as $key => $value_3) { + $values_3[$key] = $this->normalizer->normalize($value_3, 'json', $context); + } + $data['IndexConfigs'] = $values_3; + } + if ($object->isInitialized('mirrors') && null !== $object->getMirrors()) { + $values_4 = []; + foreach ($object->getMirrors() as $value_4) { + $values_4[] = $value_4; + } + $data['Mirrors'] = $values_4; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\RegistryServiceConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecResourcesLimitsNormalizer.php b/generated/Normalizer/ResourceObjectNormalizer.php similarity index 66% rename from generated/Normalizer/TaskSpecResourcesLimitsNormalizer.php rename to generated/Normalizer/ResourceObjectNormalizer.php index 2fcc8adf4..f90501708 100644 --- a/generated/Normalizer/TaskSpecResourcesLimitsNormalizer.php +++ b/generated/Normalizer/ResourceObjectNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TaskSpecResourcesLimitsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ResourceObjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class TaskSpecResourcesLimitsNormalizer implements DenormalizerInterface, Normal use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\TaskSpecResourcesLimits::class; + return $type === \Docker\API\Model\ResourceObject::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecResourcesLimits::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ResourceObject::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\TaskSpecResourcesLimits(); + $object = new \Docker\API\Model\ResourceObject(); if (null === $data || false === \is_array($data)) { return $object; } @@ -52,6 +52,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] === null) { $object->setMemoryBytes(null); } + if (\array_key_exists('GenericResources', $data) && $data['GenericResources'] !== null) { + $values = []; + foreach ($data['GenericResources'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\GenericResourcesItem::class, 'json', $context); + } + $object->setGenericResources($values); + } + elseif (\array_key_exists('GenericResources', $data) && $data['GenericResources'] === null) { + $object->setGenericResources(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -63,15 +73,22 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('memoryBytes') && null !== $object->getMemoryBytes()) { $data['MemoryBytes'] = $object->getMemoryBytes(); } + if ($object->isInitialized('genericResources') && null !== $object->getGenericResources()) { + $values = []; + foreach ($object->getGenericResources() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['GenericResources'] = $values; + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\TaskSpecResourcesLimits::class => false]; + return [\Docker\API\Model\ResourceObject::class => false]; } } } else { - class TaskSpecResourcesLimitsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class ResourceObjectNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -79,11 +96,11 @@ class TaskSpecResourcesLimitsNormalizer implements DenormalizerInterface, Normal use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\TaskSpecResourcesLimits::class; + return $type === \Docker\API\Model\ResourceObject::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecResourcesLimits::class; + return is_object($data) && get_class($data) === \Docker\API\Model\ResourceObject::class; } /** * @return mixed @@ -96,7 +113,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\TaskSpecResourcesLimits(); + $object = new \Docker\API\Model\ResourceObject(); if (null === $data || false === \is_array($data)) { return $object; } @@ -112,6 +129,16 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] === null) { $object->setMemoryBytes(null); } + if (\array_key_exists('GenericResources', $data) && $data['GenericResources'] !== null) { + $values = []; + foreach ($data['GenericResources'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\GenericResourcesItem::class, 'json', $context); + } + $object->setGenericResources($values); + } + elseif (\array_key_exists('GenericResources', $data) && $data['GenericResources'] === null) { + $object->setGenericResources(null); + } return $object; } /** @@ -126,11 +153,18 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('memoryBytes') && null !== $object->getMemoryBytes()) { $data['MemoryBytes'] = $object->getMemoryBytes(); } + if ($object->isInitialized('genericResources') && null !== $object->getGenericResources()) { + $values = []; + foreach ($object->getGenericResources() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['GenericResources'] = $values; + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\TaskSpecResourcesLimits::class => false]; + return [\Docker\API\Model\ResourceObject::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/ResourcesNormalizer.php b/generated/Normalizer/ResourcesNormalizer.php index 8cf72cb4a..eafa1ebaa 100644 --- a/generated/Normalizer/ResourcesNormalizer.php +++ b/generated/Normalizer/ResourcesNormalizer.php @@ -160,17 +160,31 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { $object->setDevices(null); } - if (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] !== null) { - $object->setDiskQuota($data['DiskQuota']); + if (\array_key_exists('DeviceCgroupRules', $data) && $data['DeviceCgroupRules'] !== null) { + $values_6 = []; + foreach ($data['DeviceCgroupRules'] as $value_6) { + $values_6[] = $value_6; + } + $object->setDeviceCgroupRules($values_6); } - elseif (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] === null) { - $object->setDiskQuota(null); + elseif (\array_key_exists('DeviceCgroupRules', $data) && $data['DeviceCgroupRules'] === null) { + $object->setDeviceCgroupRules(null); + } + if (\array_key_exists('DeviceRequests', $data) && $data['DeviceRequests'] !== null) { + $values_7 = []; + foreach ($data['DeviceRequests'] as $value_7) { + $values_7[] = $this->denormalizer->denormalize($value_7, \Docker\API\Model\DeviceRequest::class, 'json', $context); + } + $object->setDeviceRequests($values_7); } - if (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] !== null) { - $object->setKernelMemory($data['KernelMemory']); + elseif (\array_key_exists('DeviceRequests', $data) && $data['DeviceRequests'] === null) { + $object->setDeviceRequests(null); } - elseif (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] === null) { - $object->setKernelMemory(null); + if (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] !== null) { + $object->setKernelMemoryTCP($data['KernelMemoryTCP']); + } + elseif (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] === null) { + $object->setKernelMemoryTCP(null); } if (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] !== null) { $object->setMemoryReservation($data['MemoryReservation']); @@ -202,6 +216,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { $object->setOomKillDisable(null); } + if (\array_key_exists('Init', $data) && $data['Init'] !== null) { + $object->setInit($data['Init']); + } + elseif (\array_key_exists('Init', $data) && $data['Init'] === null) { + $object->setInit(null); + } if (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] !== null) { $object->setPidsLimit($data['PidsLimit']); } @@ -209,11 +229,11 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setPidsLimit(null); } if (\array_key_exists('Ulimits', $data) && $data['Ulimits'] !== null) { - $values_6 = []; - foreach ($data['Ulimits'] as $value_6) { - $values_6[] = $this->denormalizer->denormalize($value_6, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); + $values_8 = []; + foreach ($data['Ulimits'] as $value_8) { + $values_8[] = $this->denormalizer->denormalize($value_8, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); } - $object->setUlimits($values_6); + $object->setUlimits($values_8); } elseif (\array_key_exists('Ulimits', $data) && $data['Ulimits'] === null) { $object->setUlimits(null); @@ -319,11 +339,22 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['Devices'] = $values_5; } - if ($object->isInitialized('diskQuota') && null !== $object->getDiskQuota()) { - $data['DiskQuota'] = $object->getDiskQuota(); + if ($object->isInitialized('deviceCgroupRules') && null !== $object->getDeviceCgroupRules()) { + $values_6 = []; + foreach ($object->getDeviceCgroupRules() as $value_6) { + $values_6[] = $value_6; + } + $data['DeviceCgroupRules'] = $values_6; } - if ($object->isInitialized('kernelMemory') && null !== $object->getKernelMemory()) { - $data['KernelMemory'] = $object->getKernelMemory(); + if ($object->isInitialized('deviceRequests') && null !== $object->getDeviceRequests()) { + $values_7 = []; + foreach ($object->getDeviceRequests() as $value_7) { + $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); + } + $data['DeviceRequests'] = $values_7; + } + if ($object->isInitialized('kernelMemoryTCP') && null !== $object->getKernelMemoryTCP()) { + $data['KernelMemoryTCP'] = $object->getKernelMemoryTCP(); } if ($object->isInitialized('memoryReservation') && null !== $object->getMemoryReservation()) { $data['MemoryReservation'] = $object->getMemoryReservation(); @@ -340,15 +371,18 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { $data['OomKillDisable'] = $object->getOomKillDisable(); } + if ($object->isInitialized('init') && null !== $object->getInit()) { + $data['Init'] = $object->getInit(); + } if ($object->isInitialized('pidsLimit') && null !== $object->getPidsLimit()) { $data['PidsLimit'] = $object->getPidsLimit(); } if ($object->isInitialized('ulimits') && null !== $object->getUlimits()) { - $values_6 = []; - foreach ($object->getUlimits() as $value_6) { - $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + $values_8 = []; + foreach ($object->getUlimits() as $value_8) { + $values_8[] = $this->normalizer->normalize($value_8, 'json', $context); } - $data['Ulimits'] = $values_6; + $data['Ulimits'] = $values_8; } if ($object->isInitialized('cpuCount') && null !== $object->getCpuCount()) { $data['CpuCount'] = $object->getCpuCount(); @@ -519,17 +553,31 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Devices', $data) && $data['Devices'] === null) { $object->setDevices(null); } - if (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] !== null) { - $object->setDiskQuota($data['DiskQuota']); + if (\array_key_exists('DeviceCgroupRules', $data) && $data['DeviceCgroupRules'] !== null) { + $values_6 = []; + foreach ($data['DeviceCgroupRules'] as $value_6) { + $values_6[] = $value_6; + } + $object->setDeviceCgroupRules($values_6); } - elseif (\array_key_exists('DiskQuota', $data) && $data['DiskQuota'] === null) { - $object->setDiskQuota(null); + elseif (\array_key_exists('DeviceCgroupRules', $data) && $data['DeviceCgroupRules'] === null) { + $object->setDeviceCgroupRules(null); + } + if (\array_key_exists('DeviceRequests', $data) && $data['DeviceRequests'] !== null) { + $values_7 = []; + foreach ($data['DeviceRequests'] as $value_7) { + $values_7[] = $this->denormalizer->denormalize($value_7, \Docker\API\Model\DeviceRequest::class, 'json', $context); + } + $object->setDeviceRequests($values_7); } - if (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] !== null) { - $object->setKernelMemory($data['KernelMemory']); + elseif (\array_key_exists('DeviceRequests', $data) && $data['DeviceRequests'] === null) { + $object->setDeviceRequests(null); } - elseif (\array_key_exists('KernelMemory', $data) && $data['KernelMemory'] === null) { - $object->setKernelMemory(null); + if (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] !== null) { + $object->setKernelMemoryTCP($data['KernelMemoryTCP']); + } + elseif (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] === null) { + $object->setKernelMemoryTCP(null); } if (\array_key_exists('MemoryReservation', $data) && $data['MemoryReservation'] !== null) { $object->setMemoryReservation($data['MemoryReservation']); @@ -561,6 +609,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { $object->setOomKillDisable(null); } + if (\array_key_exists('Init', $data) && $data['Init'] !== null) { + $object->setInit($data['Init']); + } + elseif (\array_key_exists('Init', $data) && $data['Init'] === null) { + $object->setInit(null); + } if (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] !== null) { $object->setPidsLimit($data['PidsLimit']); } @@ -568,11 +622,11 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setPidsLimit(null); } if (\array_key_exists('Ulimits', $data) && $data['Ulimits'] !== null) { - $values_6 = []; - foreach ($data['Ulimits'] as $value_6) { - $values_6[] = $this->denormalizer->denormalize($value_6, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); + $values_8 = []; + foreach ($data['Ulimits'] as $value_8) { + $values_8[] = $this->denormalizer->denormalize($value_8, \Docker\API\Model\ResourcesUlimitsItem::class, 'json', $context); } - $object->setUlimits($values_6); + $object->setUlimits($values_8); } elseif (\array_key_exists('Ulimits', $data) && $data['Ulimits'] === null) { $object->setUlimits(null); @@ -681,11 +735,22 @@ public function normalize($object, $format = null, array $context = []) } $data['Devices'] = $values_5; } - if ($object->isInitialized('diskQuota') && null !== $object->getDiskQuota()) { - $data['DiskQuota'] = $object->getDiskQuota(); + if ($object->isInitialized('deviceCgroupRules') && null !== $object->getDeviceCgroupRules()) { + $values_6 = []; + foreach ($object->getDeviceCgroupRules() as $value_6) { + $values_6[] = $value_6; + } + $data['DeviceCgroupRules'] = $values_6; } - if ($object->isInitialized('kernelMemory') && null !== $object->getKernelMemory()) { - $data['KernelMemory'] = $object->getKernelMemory(); + if ($object->isInitialized('deviceRequests') && null !== $object->getDeviceRequests()) { + $values_7 = []; + foreach ($object->getDeviceRequests() as $value_7) { + $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); + } + $data['DeviceRequests'] = $values_7; + } + if ($object->isInitialized('kernelMemoryTCP') && null !== $object->getKernelMemoryTCP()) { + $data['KernelMemoryTCP'] = $object->getKernelMemoryTCP(); } if ($object->isInitialized('memoryReservation') && null !== $object->getMemoryReservation()) { $data['MemoryReservation'] = $object->getMemoryReservation(); @@ -702,15 +767,18 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { $data['OomKillDisable'] = $object->getOomKillDisable(); } + if ($object->isInitialized('init') && null !== $object->getInit()) { + $data['Init'] = $object->getInit(); + } if ($object->isInitialized('pidsLimit') && null !== $object->getPidsLimit()) { $data['PidsLimit'] = $object->getPidsLimit(); } if ($object->isInitialized('ulimits') && null !== $object->getUlimits()) { - $values_6 = []; - foreach ($object->getUlimits() as $value_6) { - $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + $values_8 = []; + foreach ($object->getUlimits() as $value_8) { + $values_8[] = $this->normalizer->normalize($value_8, 'json', $context); } - $data['Ulimits'] = $values_6; + $data['Ulimits'] = $values_8; } if ($object->isInitialized('cpuCount') && null !== $object->getCpuCount()) { $data['CpuCount'] = $object->getCpuCount(); diff --git a/generated/Normalizer/RuntimeNormalizer.php b/generated/Normalizer/RuntimeNormalizer.php new file mode 100644 index 000000000..03dbd9119 --- /dev/null +++ b/generated/Normalizer/RuntimeNormalizer.php @@ -0,0 +1,186 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class RuntimeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Runtime::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Runtime::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Runtime(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('path', $data) && $data['path'] !== null) { + $object->setPath($data['path']); + } + elseif (\array_key_exists('path', $data) && $data['path'] === null) { + $object->setPath(null); + } + if (\array_key_exists('runtimeArgs', $data) && $data['runtimeArgs'] !== null) { + $values = []; + foreach ($data['runtimeArgs'] as $value) { + $values[] = $value; + } + $object->setRuntimeArgs($values); + } + elseif (\array_key_exists('runtimeArgs', $data) && $data['runtimeArgs'] === null) { + $object->setRuntimeArgs(null); + } + if (\array_key_exists('status', $data) && $data['status'] !== null) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['status'] as $key => $value_1) { + $values_1[$key] = $value_1; + } + $object->setStatus($values_1); + } + elseif (\array_key_exists('status', $data) && $data['status'] === null) { + $object->setStatus(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('path') && null !== $object->getPath()) { + $data['path'] = $object->getPath(); + } + if ($object->isInitialized('runtimeArgs') && null !== $object->getRuntimeArgs()) { + $values = []; + foreach ($object->getRuntimeArgs() as $value) { + $values[] = $value; + } + $data['runtimeArgs'] = $values; + } + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $values_1 = []; + foreach ($object->getStatus() as $key => $value_1) { + $values_1[$key] = $value_1; + } + $data['status'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Runtime::class => false]; + } + } +} else { + class RuntimeNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Runtime::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Runtime::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Runtime(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('path', $data) && $data['path'] !== null) { + $object->setPath($data['path']); + } + elseif (\array_key_exists('path', $data) && $data['path'] === null) { + $object->setPath(null); + } + if (\array_key_exists('runtimeArgs', $data) && $data['runtimeArgs'] !== null) { + $values = []; + foreach ($data['runtimeArgs'] as $value) { + $values[] = $value; + } + $object->setRuntimeArgs($values); + } + elseif (\array_key_exists('runtimeArgs', $data) && $data['runtimeArgs'] === null) { + $object->setRuntimeArgs(null); + } + if (\array_key_exists('status', $data) && $data['status'] !== null) { + $values_1 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['status'] as $key => $value_1) { + $values_1[$key] = $value_1; + } + $object->setStatus($values_1); + } + elseif (\array_key_exists('status', $data) && $data['status'] === null) { + $object->setStatus(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('path') && null !== $object->getPath()) { + $data['path'] = $object->getPath(); + } + if ($object->isInitialized('runtimeArgs') && null !== $object->getRuntimeArgs()) { + $values = []; + foreach ($object->getRuntimeArgs() as $value) { + $values[] = $value; + } + $data['runtimeArgs'] = $values; + } + if ($object->isInitialized('status') && null !== $object->getStatus()) { + $values_1 = []; + foreach ($object->getStatus() as $key => $value_1) { + $values_1[$key] = $value_1; + } + $data['status'] = $values_1; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Runtime::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SecretNormalizer.php b/generated/Normalizer/SecretNormalizer.php index 9505359c4..5400beda5 100644 --- a/generated/Normalizer/SecretNormalizer.php +++ b/generated/Normalizer/SecretNormalizer.php @@ -47,7 +47,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setID(null); } if (\array_key_exists('Version', $data) && $data['Version'] !== null) { - $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\SecretVersion::class, 'json', $context)); + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); } elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { $object->setVersion(null); @@ -65,7 +65,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setUpdatedAt(null); } if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { - $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\ServiceSpec::class, 'json', $context)); + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\SecretSpec::class, 'json', $context)); } elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { $object->setSpec(null); @@ -134,7 +134,7 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setID(null); } if (\array_key_exists('Version', $data) && $data['Version'] !== null) { - $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\SecretVersion::class, 'json', $context)); + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); } elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { $object->setVersion(null); @@ -152,7 +152,7 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setUpdatedAt(null); } if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { - $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\ServiceSpec::class, 'json', $context)); + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\SecretSpec::class, 'json', $context)); } elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { $object->setSpec(null); diff --git a/generated/Normalizer/SecretSpecNormalizer.php b/generated/Normalizer/SecretSpecNormalizer.php index 2128f6d4f..28a8ab809 100644 --- a/generated/Normalizer/SecretSpecNormalizer.php +++ b/generated/Normalizer/SecretSpecNormalizer.php @@ -57,15 +57,23 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setLabels(null); } if (\array_key_exists('Data', $data) && $data['Data'] !== null) { - $values_1 = []; - foreach ($data['Data'] as $value_1) { - $values_1[] = $value_1; - } - $object->setData($values_1); + $object->setData($data['Data']); } elseif (\array_key_exists('Data', $data) && $data['Data'] === null) { $object->setData(null); } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($this->denormalizer->denormalize($data['Driver'], \Docker\API\Model\Driver::class, 'json', $context)); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('Templating', $data) && $data['Templating'] !== null) { + $object->setTemplating($this->denormalizer->denormalize($data['Templating'], \Docker\API\Model\Driver::class, 'json', $context)); + } + elseif (\array_key_exists('Templating', $data) && $data['Templating'] === null) { + $object->setTemplating(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -82,11 +90,13 @@ public function normalize(mixed $object, string $format = null, array $context = $data['Labels'] = $values; } if ($object->isInitialized('data') && null !== $object->getData()) { - $values_1 = []; - foreach ($object->getData() as $value_1) { - $values_1[] = $value_1; - } - $data['Data'] = $values_1; + $data['Data'] = $object->getData(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $this->normalizer->normalize($object->getDriver(), 'json', $context); + } + if ($object->isInitialized('templating') && null !== $object->getTemplating()) { + $data['Templating'] = $this->normalizer->normalize($object->getTemplating(), 'json', $context); } return $data; } @@ -142,15 +152,23 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setLabels(null); } if (\array_key_exists('Data', $data) && $data['Data'] !== null) { - $values_1 = []; - foreach ($data['Data'] as $value_1) { - $values_1[] = $value_1; - } - $object->setData($values_1); + $object->setData($data['Data']); } elseif (\array_key_exists('Data', $data) && $data['Data'] === null) { $object->setData(null); } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($this->denormalizer->denormalize($data['Driver'], \Docker\API\Model\Driver::class, 'json', $context)); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('Templating', $data) && $data['Templating'] !== null) { + $object->setTemplating($this->denormalizer->denormalize($data['Templating'], \Docker\API\Model\Driver::class, 'json', $context)); + } + elseif (\array_key_exists('Templating', $data) && $data['Templating'] === null) { + $object->setTemplating(null); + } return $object; } /** @@ -170,11 +188,13 @@ public function normalize($object, $format = null, array $context = []) $data['Labels'] = $values; } if ($object->isInitialized('data') && null !== $object->getData()) { - $values_1 = []; - foreach ($object->getData() as $value_1) { - $values_1[] = $value_1; - } - $data['Data'] = $values_1; + $data['Data'] = $object->getData(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $this->normalizer->normalize($object->getDriver(), 'json', $context); + } + if ($object->isInitialized('templating') && null !== $object->getTemplating()) { + $data['Templating'] = $this->normalizer->normalize($object->getTemplating(), 'json', $context); } return $data; } diff --git a/generated/Normalizer/SecretsCreatePostBodyNormalizer.php b/generated/Normalizer/SecretsCreatePostBodyNormalizer.php index 246825134..c3cd46596 100644 --- a/generated/Normalizer/SecretsCreatePostBodyNormalizer.php +++ b/generated/Normalizer/SecretsCreatePostBodyNormalizer.php @@ -57,15 +57,23 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setLabels(null); } if (\array_key_exists('Data', $data) && $data['Data'] !== null) { - $values_1 = []; - foreach ($data['Data'] as $value_1) { - $values_1[] = $value_1; - } - $object->setData($values_1); + $object->setData($data['Data']); } elseif (\array_key_exists('Data', $data) && $data['Data'] === null) { $object->setData(null); } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($this->denormalizer->denormalize($data['Driver'], \Docker\API\Model\Driver::class, 'json', $context)); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('Templating', $data) && $data['Templating'] !== null) { + $object->setTemplating($this->denormalizer->denormalize($data['Templating'], \Docker\API\Model\Driver::class, 'json', $context)); + } + elseif (\array_key_exists('Templating', $data) && $data['Templating'] === null) { + $object->setTemplating(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -82,11 +90,13 @@ public function normalize(mixed $object, string $format = null, array $context = $data['Labels'] = $values; } if ($object->isInitialized('data') && null !== $object->getData()) { - $values_1 = []; - foreach ($object->getData() as $value_1) { - $values_1[] = $value_1; - } - $data['Data'] = $values_1; + $data['Data'] = $object->getData(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $this->normalizer->normalize($object->getDriver(), 'json', $context); + } + if ($object->isInitialized('templating') && null !== $object->getTemplating()) { + $data['Templating'] = $this->normalizer->normalize($object->getTemplating(), 'json', $context); } return $data; } @@ -142,15 +152,23 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setLabels(null); } if (\array_key_exists('Data', $data) && $data['Data'] !== null) { - $values_1 = []; - foreach ($data['Data'] as $value_1) { - $values_1[] = $value_1; - } - $object->setData($values_1); + $object->setData($data['Data']); } elseif (\array_key_exists('Data', $data) && $data['Data'] === null) { $object->setData(null); } + if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { + $object->setDriver($this->denormalizer->denormalize($data['Driver'], \Docker\API\Model\Driver::class, 'json', $context)); + } + elseif (\array_key_exists('Driver', $data) && $data['Driver'] === null) { + $object->setDriver(null); + } + if (\array_key_exists('Templating', $data) && $data['Templating'] !== null) { + $object->setTemplating($this->denormalizer->denormalize($data['Templating'], \Docker\API\Model\Driver::class, 'json', $context)); + } + elseif (\array_key_exists('Templating', $data) && $data['Templating'] === null) { + $object->setTemplating(null); + } return $object; } /** @@ -170,11 +188,13 @@ public function normalize($object, $format = null, array $context = []) $data['Labels'] = $values; } if ($object->isInitialized('data') && null !== $object->getData()) { - $values_1 = []; - foreach ($object->getData() as $value_1) { - $values_1[] = $value_1; - } - $data['Data'] = $values_1; + $data['Data'] = $object->getData(); + } + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $this->normalizer->normalize($object->getDriver(), 'json', $context); + } + if ($object->isInitialized('templating') && null !== $object->getTemplating()) { + $data['Templating'] = $this->normalizer->normalize($object->getTemplating(), 'json', $context); } return $data; } diff --git a/generated/Normalizer/ServiceCreateResponseNormalizer.php b/generated/Normalizer/ServiceCreateResponseNormalizer.php new file mode 100644 index 000000000..3a3304ac0 --- /dev/null +++ b/generated/Normalizer/ServiceCreateResponseNormalizer.php @@ -0,0 +1,152 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceCreateResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceCreateResponse::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceCreateResponse::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceCreateResponse(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Warnings', $data) && $data['Warnings'] !== null) { + $values = []; + foreach ($data['Warnings'] as $value) { + $values[] = $value; + } + $object->setWarnings($values); + } + elseif (\array_key_exists('Warnings', $data) && $data['Warnings'] === null) { + $object->setWarnings(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { + $values = []; + foreach ($object->getWarnings() as $value) { + $values[] = $value; + } + $data['Warnings'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceCreateResponse::class => false]; + } + } +} else { + class ServiceCreateResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceCreateResponse::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceCreateResponse::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceCreateResponse(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Warnings', $data) && $data['Warnings'] !== null) { + $values = []; + foreach ($data['Warnings'] as $value) { + $values[] = $value; + } + $object->setWarnings($values); + } + elseif (\array_key_exists('Warnings', $data) && $data['Warnings'] === null) { + $object->setWarnings(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { + $values = []; + foreach ($object->getWarnings() as $value) { + $values[] = $value; + } + $data['Warnings'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceCreateResponse::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceJobStatusNormalizer.php b/generated/Normalizer/ServiceJobStatusNormalizer.php new file mode 100644 index 000000000..aa8fa5ae1 --- /dev/null +++ b/generated/Normalizer/ServiceJobStatusNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceJobStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceJobStatus::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceJobStatus::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceJobStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('JobIteration', $data) && $data['JobIteration'] !== null) { + $object->setJobIteration($this->denormalizer->denormalize($data['JobIteration'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); + } + elseif (\array_key_exists('JobIteration', $data) && $data['JobIteration'] === null) { + $object->setJobIteration(null); + } + if (\array_key_exists('LastExecution', $data) && $data['LastExecution'] !== null) { + $object->setLastExecution($data['LastExecution']); + } + elseif (\array_key_exists('LastExecution', $data) && $data['LastExecution'] === null) { + $object->setLastExecution(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('jobIteration') && null !== $object->getJobIteration()) { + $data['JobIteration'] = $this->normalizer->normalize($object->getJobIteration(), 'json', $context); + } + if ($object->isInitialized('lastExecution') && null !== $object->getLastExecution()) { + $data['LastExecution'] = $object->getLastExecution(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceJobStatus::class => false]; + } + } +} else { + class ServiceJobStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceJobStatus::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceJobStatus::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceJobStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('JobIteration', $data) && $data['JobIteration'] !== null) { + $object->setJobIteration($this->denormalizer->denormalize($data['JobIteration'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); + } + elseif (\array_key_exists('JobIteration', $data) && $data['JobIteration'] === null) { + $object->setJobIteration(null); + } + if (\array_key_exists('LastExecution', $data) && $data['LastExecution'] !== null) { + $object->setLastExecution($data['LastExecution']); + } + elseif (\array_key_exists('LastExecution', $data) && $data['LastExecution'] === null) { + $object->setLastExecution(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('jobIteration') && null !== $object->getJobIteration()) { + $data['JobIteration'] = $this->normalizer->normalize($object->getJobIteration(), 'json', $context); + } + if ($object->isInitialized('lastExecution') && null !== $object->getLastExecution()) { + $data['LastExecution'] = $object->getLastExecution(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceJobStatus::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceNormalizer.php b/generated/Normalizer/ServiceNormalizer.php index 114bec717..4a3215c7f 100644 --- a/generated/Normalizer/ServiceNormalizer.php +++ b/generated/Normalizer/ServiceNormalizer.php @@ -47,7 +47,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setID(null); } if (\array_key_exists('Version', $data) && $data['Version'] !== null) { - $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ServiceVersion::class, 'json', $context)); + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); } elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { $object->setVersion(null); @@ -82,6 +82,18 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('UpdateStatus', $data) && $data['UpdateStatus'] === null) { $object->setUpdateStatus(null); } + if (\array_key_exists('ServiceStatus', $data) && $data['ServiceStatus'] !== null) { + $object->setServiceStatus($this->denormalizer->denormalize($data['ServiceStatus'], \Docker\API\Model\ServiceServiceStatus::class, 'json', $context)); + } + elseif (\array_key_exists('ServiceStatus', $data) && $data['ServiceStatus'] === null) { + $object->setServiceStatus(null); + } + if (\array_key_exists('JobStatus', $data) && $data['JobStatus'] !== null) { + $object->setJobStatus($this->denormalizer->denormalize($data['JobStatus'], \Docker\API\Model\ServiceJobStatus::class, 'json', $context)); + } + elseif (\array_key_exists('JobStatus', $data) && $data['JobStatus'] === null) { + $object->setJobStatus(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -108,6 +120,12 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('updateStatus') && null !== $object->getUpdateStatus()) { $data['UpdateStatus'] = $this->normalizer->normalize($object->getUpdateStatus(), 'json', $context); } + if ($object->isInitialized('serviceStatus') && null !== $object->getServiceStatus()) { + $data['ServiceStatus'] = $this->normalizer->normalize($object->getServiceStatus(), 'json', $context); + } + if ($object->isInitialized('jobStatus') && null !== $object->getJobStatus()) { + $data['JobStatus'] = $this->normalizer->normalize($object->getJobStatus(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -152,7 +170,7 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setID(null); } if (\array_key_exists('Version', $data) && $data['Version'] !== null) { - $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ServiceVersion::class, 'json', $context)); + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); } elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { $object->setVersion(null); @@ -187,6 +205,18 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('UpdateStatus', $data) && $data['UpdateStatus'] === null) { $object->setUpdateStatus(null); } + if (\array_key_exists('ServiceStatus', $data) && $data['ServiceStatus'] !== null) { + $object->setServiceStatus($this->denormalizer->denormalize($data['ServiceStatus'], \Docker\API\Model\ServiceServiceStatus::class, 'json', $context)); + } + elseif (\array_key_exists('ServiceStatus', $data) && $data['ServiceStatus'] === null) { + $object->setServiceStatus(null); + } + if (\array_key_exists('JobStatus', $data) && $data['JobStatus'] !== null) { + $object->setJobStatus($this->denormalizer->denormalize($data['JobStatus'], \Docker\API\Model\ServiceJobStatus::class, 'json', $context)); + } + elseif (\array_key_exists('JobStatus', $data) && $data['JobStatus'] === null) { + $object->setJobStatus(null); + } return $object; } /** @@ -216,6 +246,12 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('updateStatus') && null !== $object->getUpdateStatus()) { $data['UpdateStatus'] = $this->normalizer->normalize($object->getUpdateStatus(), 'json', $context); } + if ($object->isInitialized('serviceStatus') && null !== $object->getServiceStatus()) { + $data['ServiceStatus'] = $this->normalizer->normalize($object->getServiceStatus(), 'json', $context); + } + if ($object->isInitialized('jobStatus') && null !== $object->getJobStatus()) { + $data['JobStatus'] = $this->normalizer->normalize($object->getJobStatus(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/ServiceServiceStatusNormalizer.php b/generated/Normalizer/ServiceServiceStatusNormalizer.php new file mode 100644 index 000000000..924740ce5 --- /dev/null +++ b/generated/Normalizer/ServiceServiceStatusNormalizer.php @@ -0,0 +1,154 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceServiceStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceServiceStatus::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceServiceStatus::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceServiceStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('RunningTasks', $data) && $data['RunningTasks'] !== null) { + $object->setRunningTasks($data['RunningTasks']); + } + elseif (\array_key_exists('RunningTasks', $data) && $data['RunningTasks'] === null) { + $object->setRunningTasks(null); + } + if (\array_key_exists('DesiredTasks', $data) && $data['DesiredTasks'] !== null) { + $object->setDesiredTasks($data['DesiredTasks']); + } + elseif (\array_key_exists('DesiredTasks', $data) && $data['DesiredTasks'] === null) { + $object->setDesiredTasks(null); + } + if (\array_key_exists('CompletedTasks', $data) && $data['CompletedTasks'] !== null) { + $object->setCompletedTasks($data['CompletedTasks']); + } + elseif (\array_key_exists('CompletedTasks', $data) && $data['CompletedTasks'] === null) { + $object->setCompletedTasks(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('runningTasks') && null !== $object->getRunningTasks()) { + $data['RunningTasks'] = $object->getRunningTasks(); + } + if ($object->isInitialized('desiredTasks') && null !== $object->getDesiredTasks()) { + $data['DesiredTasks'] = $object->getDesiredTasks(); + } + if ($object->isInitialized('completedTasks') && null !== $object->getCompletedTasks()) { + $data['CompletedTasks'] = $object->getCompletedTasks(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceServiceStatus::class => false]; + } + } +} else { + class ServiceServiceStatusNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceServiceStatus::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceServiceStatus::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceServiceStatus(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('RunningTasks', $data) && $data['RunningTasks'] !== null) { + $object->setRunningTasks($data['RunningTasks']); + } + elseif (\array_key_exists('RunningTasks', $data) && $data['RunningTasks'] === null) { + $object->setRunningTasks(null); + } + if (\array_key_exists('DesiredTasks', $data) && $data['DesiredTasks'] !== null) { + $object->setDesiredTasks($data['DesiredTasks']); + } + elseif (\array_key_exists('DesiredTasks', $data) && $data['DesiredTasks'] === null) { + $object->setDesiredTasks(null); + } + if (\array_key_exists('CompletedTasks', $data) && $data['CompletedTasks'] !== null) { + $object->setCompletedTasks($data['CompletedTasks']); + } + elseif (\array_key_exists('CompletedTasks', $data) && $data['CompletedTasks'] === null) { + $object->setCompletedTasks(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('runningTasks') && null !== $object->getRunningTasks()) { + $data['RunningTasks'] = $object->getRunningTasks(); + } + if ($object->isInitialized('desiredTasks') && null !== $object->getDesiredTasks()) { + $data['DesiredTasks'] = $object->getDesiredTasks(); + } + if ($object->isInitialized('completedTasks') && null !== $object->getCompletedTasks()) { + $data['CompletedTasks'] = $object->getCompletedTasks(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceServiceStatus::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceSpecModeNormalizer.php b/generated/Normalizer/ServiceSpecModeNormalizer.php index ea70450c8..9305be295 100644 --- a/generated/Normalizer/ServiceSpecModeNormalizer.php +++ b/generated/Normalizer/ServiceSpecModeNormalizer.php @@ -52,6 +52,18 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Global', $data) && $data['Global'] === null) { $object->setGlobal(null); } + if (\array_key_exists('ReplicatedJob', $data) && $data['ReplicatedJob'] !== null) { + $object->setReplicatedJob($this->denormalizer->denormalize($data['ReplicatedJob'], \Docker\API\Model\ServiceSpecModeReplicatedJob::class, 'json', $context)); + } + elseif (\array_key_exists('ReplicatedJob', $data) && $data['ReplicatedJob'] === null) { + $object->setReplicatedJob(null); + } + if (\array_key_exists('GlobalJob', $data) && $data['GlobalJob'] !== null) { + $object->setGlobalJob($data['GlobalJob']); + } + elseif (\array_key_exists('GlobalJob', $data) && $data['GlobalJob'] === null) { + $object->setGlobalJob(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -63,6 +75,12 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('global') && null !== $object->getGlobal()) { $data['Global'] = $object->getGlobal(); } + if ($object->isInitialized('replicatedJob') && null !== $object->getReplicatedJob()) { + $data['ReplicatedJob'] = $this->normalizer->normalize($object->getReplicatedJob(), 'json', $context); + } + if ($object->isInitialized('globalJob') && null !== $object->getGlobalJob()) { + $data['GlobalJob'] = $object->getGlobalJob(); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -112,6 +130,18 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Global', $data) && $data['Global'] === null) { $object->setGlobal(null); } + if (\array_key_exists('ReplicatedJob', $data) && $data['ReplicatedJob'] !== null) { + $object->setReplicatedJob($this->denormalizer->denormalize($data['ReplicatedJob'], \Docker\API\Model\ServiceSpecModeReplicatedJob::class, 'json', $context)); + } + elseif (\array_key_exists('ReplicatedJob', $data) && $data['ReplicatedJob'] === null) { + $object->setReplicatedJob(null); + } + if (\array_key_exists('GlobalJob', $data) && $data['GlobalJob'] !== null) { + $object->setGlobalJob($data['GlobalJob']); + } + elseif (\array_key_exists('GlobalJob', $data) && $data['GlobalJob'] === null) { + $object->setGlobalJob(null); + } return $object; } /** @@ -126,6 +156,12 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('global') && null !== $object->getGlobal()) { $data['Global'] = $object->getGlobal(); } + if ($object->isInitialized('replicatedJob') && null !== $object->getReplicatedJob()) { + $data['ReplicatedJob'] = $this->normalizer->normalize($object->getReplicatedJob(), 'json', $context); + } + if ($object->isInitialized('globalJob') && null !== $object->getGlobalJob()) { + $data['GlobalJob'] = $object->getGlobalJob(); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/ServiceSpecModeReplicatedJobNormalizer.php b/generated/Normalizer/ServiceSpecModeReplicatedJobNormalizer.php new file mode 100644 index 000000000..2d77e71c5 --- /dev/null +++ b/generated/Normalizer/ServiceSpecModeReplicatedJobNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceSpecModeReplicatedJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceSpecModeReplicatedJob::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpecModeReplicatedJob::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceSpecModeReplicatedJob(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('MaxConcurrent', $data) && $data['MaxConcurrent'] !== null) { + $object->setMaxConcurrent($data['MaxConcurrent']); + } + elseif (\array_key_exists('MaxConcurrent', $data) && $data['MaxConcurrent'] === null) { + $object->setMaxConcurrent(null); + } + if (\array_key_exists('TotalCompletions', $data) && $data['TotalCompletions'] !== null) { + $object->setTotalCompletions($data['TotalCompletions']); + } + elseif (\array_key_exists('TotalCompletions', $data) && $data['TotalCompletions'] === null) { + $object->setTotalCompletions(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('maxConcurrent') && null !== $object->getMaxConcurrent()) { + $data['MaxConcurrent'] = $object->getMaxConcurrent(); + } + if ($object->isInitialized('totalCompletions') && null !== $object->getTotalCompletions()) { + $data['TotalCompletions'] = $object->getTotalCompletions(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceSpecModeReplicatedJob::class => false]; + } + } +} else { + class ServiceSpecModeReplicatedJobNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceSpecModeReplicatedJob::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpecModeReplicatedJob::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceSpecModeReplicatedJob(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('MaxConcurrent', $data) && $data['MaxConcurrent'] !== null) { + $object->setMaxConcurrent($data['MaxConcurrent']); + } + elseif (\array_key_exists('MaxConcurrent', $data) && $data['MaxConcurrent'] === null) { + $object->setMaxConcurrent(null); + } + if (\array_key_exists('TotalCompletions', $data) && $data['TotalCompletions'] !== null) { + $object->setTotalCompletions($data['TotalCompletions']); + } + elseif (\array_key_exists('TotalCompletions', $data) && $data['TotalCompletions'] === null) { + $object->setTotalCompletions(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('maxConcurrent') && null !== $object->getMaxConcurrent()) { + $data['MaxConcurrent'] = $object->getMaxConcurrent(); + } + if ($object->isInitialized('totalCompletions') && null !== $object->getTotalCompletions()) { + $data['TotalCompletions'] = $object->getTotalCompletions(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceSpecModeReplicatedJob::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceSpecNormalizer.php b/generated/Normalizer/ServiceSpecNormalizer.php index 2fa838c28..9a4bcc321 100644 --- a/generated/Normalizer/ServiceSpecNormalizer.php +++ b/generated/Normalizer/ServiceSpecNormalizer.php @@ -74,10 +74,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] === null) { $object->setUpdateConfig(null); } + if (\array_key_exists('RollbackConfig', $data) && $data['RollbackConfig'] !== null) { + $object->setRollbackConfig($this->denormalizer->denormalize($data['RollbackConfig'], \Docker\API\Model\ServiceSpecRollbackConfig::class, 'json', $context)); + } + elseif (\array_key_exists('RollbackConfig', $data) && $data['RollbackConfig'] === null) { + $object->setRollbackConfig(null); + } if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { $values_1 = []; foreach ($data['Networks'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ServiceSpecNetworksItem::class, 'json', $context); + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\NetworkAttachmentConfig::class, 'json', $context); } $object->setNetworks($values_1); } @@ -114,6 +120,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('updateConfig') && null !== $object->getUpdateConfig()) { $data['UpdateConfig'] = $this->normalizer->normalize($object->getUpdateConfig(), 'json', $context); } + if ($object->isInitialized('rollbackConfig') && null !== $object->getRollbackConfig()) { + $data['RollbackConfig'] = $this->normalizer->normalize($object->getRollbackConfig(), 'json', $context); + } if ($object->isInitialized('networks') && null !== $object->getNetworks()) { $values_1 = []; foreach ($object->getNetworks() as $value_1) { @@ -195,10 +204,16 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] === null) { $object->setUpdateConfig(null); } + if (\array_key_exists('RollbackConfig', $data) && $data['RollbackConfig'] !== null) { + $object->setRollbackConfig($this->denormalizer->denormalize($data['RollbackConfig'], \Docker\API\Model\ServiceSpecRollbackConfig::class, 'json', $context)); + } + elseif (\array_key_exists('RollbackConfig', $data) && $data['RollbackConfig'] === null) { + $object->setRollbackConfig(null); + } if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { $values_1 = []; foreach ($data['Networks'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ServiceSpecNetworksItem::class, 'json', $context); + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\NetworkAttachmentConfig::class, 'json', $context); } $object->setNetworks($values_1); } @@ -238,6 +253,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('updateConfig') && null !== $object->getUpdateConfig()) { $data['UpdateConfig'] = $this->normalizer->normalize($object->getUpdateConfig(), 'json', $context); } + if ($object->isInitialized('rollbackConfig') && null !== $object->getRollbackConfig()) { + $data['RollbackConfig'] = $this->normalizer->normalize($object->getRollbackConfig(), 'json', $context); + } if ($object->isInitialized('networks') && null !== $object->getNetworks()) { $values_1 = []; foreach ($object->getNetworks() as $value_1) { diff --git a/generated/Normalizer/ServiceSpecRollbackConfigNormalizer.php b/generated/Normalizer/ServiceSpecRollbackConfigNormalizer.php new file mode 100644 index 000000000..6295d5f5f --- /dev/null +++ b/generated/Normalizer/ServiceSpecRollbackConfigNormalizer.php @@ -0,0 +1,214 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class ServiceSpecRollbackConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceSpecRollbackConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpecRollbackConfig::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceSpecRollbackConfig(); + if (\array_key_exists('MaxFailureRatio', $data) && \is_int($data['MaxFailureRatio'])) { + $data['MaxFailureRatio'] = (double) $data['MaxFailureRatio']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Parallelism', $data) && $data['Parallelism'] !== null) { + $object->setParallelism($data['Parallelism']); + } + elseif (\array_key_exists('Parallelism', $data) && $data['Parallelism'] === null) { + $object->setParallelism(null); + } + if (\array_key_exists('Delay', $data) && $data['Delay'] !== null) { + $object->setDelay($data['Delay']); + } + elseif (\array_key_exists('Delay', $data) && $data['Delay'] === null) { + $object->setDelay(null); + } + if (\array_key_exists('FailureAction', $data) && $data['FailureAction'] !== null) { + $object->setFailureAction($data['FailureAction']); + } + elseif (\array_key_exists('FailureAction', $data) && $data['FailureAction'] === null) { + $object->setFailureAction(null); + } + if (\array_key_exists('Monitor', $data) && $data['Monitor'] !== null) { + $object->setMonitor($data['Monitor']); + } + elseif (\array_key_exists('Monitor', $data) && $data['Monitor'] === null) { + $object->setMonitor(null); + } + if (\array_key_exists('MaxFailureRatio', $data) && $data['MaxFailureRatio'] !== null) { + $object->setMaxFailureRatio($data['MaxFailureRatio']); + } + elseif (\array_key_exists('MaxFailureRatio', $data) && $data['MaxFailureRatio'] === null) { + $object->setMaxFailureRatio(null); + } + if (\array_key_exists('Order', $data) && $data['Order'] !== null) { + $object->setOrder($data['Order']); + } + elseif (\array_key_exists('Order', $data) && $data['Order'] === null) { + $object->setOrder(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('parallelism') && null !== $object->getParallelism()) { + $data['Parallelism'] = $object->getParallelism(); + } + if ($object->isInitialized('delay') && null !== $object->getDelay()) { + $data['Delay'] = $object->getDelay(); + } + if ($object->isInitialized('failureAction') && null !== $object->getFailureAction()) { + $data['FailureAction'] = $object->getFailureAction(); + } + if ($object->isInitialized('monitor') && null !== $object->getMonitor()) { + $data['Monitor'] = $object->getMonitor(); + } + if ($object->isInitialized('maxFailureRatio') && null !== $object->getMaxFailureRatio()) { + $data['MaxFailureRatio'] = $object->getMaxFailureRatio(); + } + if ($object->isInitialized('order') && null !== $object->getOrder()) { + $data['Order'] = $object->getOrder(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceSpecRollbackConfig::class => false]; + } + } +} else { + class ServiceSpecRollbackConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\ServiceSpecRollbackConfig::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\ServiceSpecRollbackConfig::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\ServiceSpecRollbackConfig(); + if (\array_key_exists('MaxFailureRatio', $data) && \is_int($data['MaxFailureRatio'])) { + $data['MaxFailureRatio'] = (double) $data['MaxFailureRatio']; + } + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Parallelism', $data) && $data['Parallelism'] !== null) { + $object->setParallelism($data['Parallelism']); + } + elseif (\array_key_exists('Parallelism', $data) && $data['Parallelism'] === null) { + $object->setParallelism(null); + } + if (\array_key_exists('Delay', $data) && $data['Delay'] !== null) { + $object->setDelay($data['Delay']); + } + elseif (\array_key_exists('Delay', $data) && $data['Delay'] === null) { + $object->setDelay(null); + } + if (\array_key_exists('FailureAction', $data) && $data['FailureAction'] !== null) { + $object->setFailureAction($data['FailureAction']); + } + elseif (\array_key_exists('FailureAction', $data) && $data['FailureAction'] === null) { + $object->setFailureAction(null); + } + if (\array_key_exists('Monitor', $data) && $data['Monitor'] !== null) { + $object->setMonitor($data['Monitor']); + } + elseif (\array_key_exists('Monitor', $data) && $data['Monitor'] === null) { + $object->setMonitor(null); + } + if (\array_key_exists('MaxFailureRatio', $data) && $data['MaxFailureRatio'] !== null) { + $object->setMaxFailureRatio($data['MaxFailureRatio']); + } + elseif (\array_key_exists('MaxFailureRatio', $data) && $data['MaxFailureRatio'] === null) { + $object->setMaxFailureRatio(null); + } + if (\array_key_exists('Order', $data) && $data['Order'] !== null) { + $object->setOrder($data['Order']); + } + elseif (\array_key_exists('Order', $data) && $data['Order'] === null) { + $object->setOrder(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('parallelism') && null !== $object->getParallelism()) { + $data['Parallelism'] = $object->getParallelism(); + } + if ($object->isInitialized('delay') && null !== $object->getDelay()) { + $data['Delay'] = $object->getDelay(); + } + if ($object->isInitialized('failureAction') && null !== $object->getFailureAction()) { + $data['FailureAction'] = $object->getFailureAction(); + } + if ($object->isInitialized('monitor') && null !== $object->getMonitor()) { + $data['Monitor'] = $object->getMonitor(); + } + if ($object->isInitialized('maxFailureRatio') && null !== $object->getMaxFailureRatio()) { + $data['MaxFailureRatio'] = $object->getMaxFailureRatio(); + } + if ($object->isInitialized('order') && null !== $object->getOrder()) { + $data['Order'] = $object->getOrder(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\ServiceSpecRollbackConfig::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ServiceSpecUpdateConfigNormalizer.php b/generated/Normalizer/ServiceSpecUpdateConfigNormalizer.php index 86e1a9344..51a57192e 100644 --- a/generated/Normalizer/ServiceSpecUpdateConfigNormalizer.php +++ b/generated/Normalizer/ServiceSpecUpdateConfigNormalizer.php @@ -73,6 +73,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('MaxFailureRatio', $data) && $data['MaxFailureRatio'] === null) { $object->setMaxFailureRatio(null); } + if (\array_key_exists('Order', $data) && $data['Order'] !== null) { + $object->setOrder($data['Order']); + } + elseif (\array_key_exists('Order', $data) && $data['Order'] === null) { + $object->setOrder(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -93,6 +99,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('maxFailureRatio') && null !== $object->getMaxFailureRatio()) { $data['MaxFailureRatio'] = $object->getMaxFailureRatio(); } + if ($object->isInitialized('order') && null !== $object->getOrder()) { + $data['Order'] = $object->getOrder(); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -163,6 +172,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('MaxFailureRatio', $data) && $data['MaxFailureRatio'] === null) { $object->setMaxFailureRatio(null); } + if (\array_key_exists('Order', $data) && $data['Order'] !== null) { + $object->setOrder($data['Order']); + } + elseif (\array_key_exists('Order', $data) && $data['Order'] === null) { + $object->setOrder(null); + } return $object; } /** @@ -186,6 +201,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('maxFailureRatio') && null !== $object->getMaxFailureRatio()) { $data['MaxFailureRatio'] = $object->getMaxFailureRatio(); } + if ($object->isInitialized('order') && null !== $object->getOrder()) { + $data['Order'] = $object->getOrder(); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/ServicesCreatePostBodyNormalizer.php b/generated/Normalizer/ServicesCreatePostBodyNormalizer.php index d65bfb18a..b08181856 100644 --- a/generated/Normalizer/ServicesCreatePostBodyNormalizer.php +++ b/generated/Normalizer/ServicesCreatePostBodyNormalizer.php @@ -74,10 +74,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] === null) { $object->setUpdateConfig(null); } + if (\array_key_exists('RollbackConfig', $data) && $data['RollbackConfig'] !== null) { + $object->setRollbackConfig($this->denormalizer->denormalize($data['RollbackConfig'], \Docker\API\Model\ServiceSpecRollbackConfig::class, 'json', $context)); + } + elseif (\array_key_exists('RollbackConfig', $data) && $data['RollbackConfig'] === null) { + $object->setRollbackConfig(null); + } if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { $values_1 = []; foreach ($data['Networks'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ServiceSpecNetworksItem::class, 'json', $context); + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\NetworkAttachmentConfig::class, 'json', $context); } $object->setNetworks($values_1); } @@ -114,6 +120,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('updateConfig') && null !== $object->getUpdateConfig()) { $data['UpdateConfig'] = $this->normalizer->normalize($object->getUpdateConfig(), 'json', $context); } + if ($object->isInitialized('rollbackConfig') && null !== $object->getRollbackConfig()) { + $data['RollbackConfig'] = $this->normalizer->normalize($object->getRollbackConfig(), 'json', $context); + } if ($object->isInitialized('networks') && null !== $object->getNetworks()) { $values_1 = []; foreach ($object->getNetworks() as $value_1) { @@ -195,10 +204,16 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] === null) { $object->setUpdateConfig(null); } + if (\array_key_exists('RollbackConfig', $data) && $data['RollbackConfig'] !== null) { + $object->setRollbackConfig($this->denormalizer->denormalize($data['RollbackConfig'], \Docker\API\Model\ServiceSpecRollbackConfig::class, 'json', $context)); + } + elseif (\array_key_exists('RollbackConfig', $data) && $data['RollbackConfig'] === null) { + $object->setRollbackConfig(null); + } if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { $values_1 = []; foreach ($data['Networks'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ServiceSpecNetworksItem::class, 'json', $context); + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\NetworkAttachmentConfig::class, 'json', $context); } $object->setNetworks($values_1); } @@ -238,6 +253,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('updateConfig') && null !== $object->getUpdateConfig()) { $data['UpdateConfig'] = $this->normalizer->normalize($object->getUpdateConfig(), 'json', $context); } + if ($object->isInitialized('rollbackConfig') && null !== $object->getRollbackConfig()) { + $data['RollbackConfig'] = $this->normalizer->normalize($object->getRollbackConfig(), 'json', $context); + } if ($object->isInitialized('networks') && null !== $object->getNetworks()) { $values_1 = []; foreach ($object->getNetworks() as $value_1) { diff --git a/generated/Normalizer/ServicesIdUpdatePostBodyNormalizer.php b/generated/Normalizer/ServicesIdUpdatePostBodyNormalizer.php index abff7c616..775ba486f 100644 --- a/generated/Normalizer/ServicesIdUpdatePostBodyNormalizer.php +++ b/generated/Normalizer/ServicesIdUpdatePostBodyNormalizer.php @@ -74,10 +74,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] === null) { $object->setUpdateConfig(null); } + if (\array_key_exists('RollbackConfig', $data) && $data['RollbackConfig'] !== null) { + $object->setRollbackConfig($this->denormalizer->denormalize($data['RollbackConfig'], \Docker\API\Model\ServiceSpecRollbackConfig::class, 'json', $context)); + } + elseif (\array_key_exists('RollbackConfig', $data) && $data['RollbackConfig'] === null) { + $object->setRollbackConfig(null); + } if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { $values_1 = []; foreach ($data['Networks'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ServiceSpecNetworksItem::class, 'json', $context); + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\NetworkAttachmentConfig::class, 'json', $context); } $object->setNetworks($values_1); } @@ -114,6 +120,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('updateConfig') && null !== $object->getUpdateConfig()) { $data['UpdateConfig'] = $this->normalizer->normalize($object->getUpdateConfig(), 'json', $context); } + if ($object->isInitialized('rollbackConfig') && null !== $object->getRollbackConfig()) { + $data['RollbackConfig'] = $this->normalizer->normalize($object->getRollbackConfig(), 'json', $context); + } if ($object->isInitialized('networks') && null !== $object->getNetworks()) { $values_1 = []; foreach ($object->getNetworks() as $value_1) { @@ -195,10 +204,16 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('UpdateConfig', $data) && $data['UpdateConfig'] === null) { $object->setUpdateConfig(null); } + if (\array_key_exists('RollbackConfig', $data) && $data['RollbackConfig'] !== null) { + $object->setRollbackConfig($this->denormalizer->denormalize($data['RollbackConfig'], \Docker\API\Model\ServiceSpecRollbackConfig::class, 'json', $context)); + } + elseif (\array_key_exists('RollbackConfig', $data) && $data['RollbackConfig'] === null) { + $object->setRollbackConfig(null); + } if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { $values_1 = []; foreach ($data['Networks'] as $value_1) { - $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ServiceSpecNetworksItem::class, 'json', $context); + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\NetworkAttachmentConfig::class, 'json', $context); } $object->setNetworks($values_1); } @@ -238,6 +253,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('updateConfig') && null !== $object->getUpdateConfig()) { $data['UpdateConfig'] = $this->normalizer->normalize($object->getUpdateConfig(), 'json', $context); } + if ($object->isInitialized('rollbackConfig') && null !== $object->getRollbackConfig()) { + $data['RollbackConfig'] = $this->normalizer->normalize($object->getRollbackConfig(), 'json', $context); + } if ($object->isInitialized('networks') && null !== $object->getNetworks()) { $values_1 = []; foreach ($object->getNetworks() as $value_1) { diff --git a/generated/Normalizer/SwarmInfoNormalizer.php b/generated/Normalizer/SwarmInfoNormalizer.php new file mode 100644 index 000000000..8dc91f8d3 --- /dev/null +++ b/generated/Normalizer/SwarmInfoNormalizer.php @@ -0,0 +1,278 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmInfo::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmInfo::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NodeID', $data) && $data['NodeID'] !== null) { + $object->setNodeID($data['NodeID']); + } + elseif (\array_key_exists('NodeID', $data) && $data['NodeID'] === null) { + $object->setNodeID(null); + } + if (\array_key_exists('NodeAddr', $data) && $data['NodeAddr'] !== null) { + $object->setNodeAddr($data['NodeAddr']); + } + elseif (\array_key_exists('NodeAddr', $data) && $data['NodeAddr'] === null) { + $object->setNodeAddr(null); + } + if (\array_key_exists('LocalNodeState', $data) && $data['LocalNodeState'] !== null) { + $object->setLocalNodeState($data['LocalNodeState']); + } + elseif (\array_key_exists('LocalNodeState', $data) && $data['LocalNodeState'] === null) { + $object->setLocalNodeState(null); + } + if (\array_key_exists('ControlAvailable', $data) && $data['ControlAvailable'] !== null) { + $object->setControlAvailable($data['ControlAvailable']); + } + elseif (\array_key_exists('ControlAvailable', $data) && $data['ControlAvailable'] === null) { + $object->setControlAvailable(null); + } + if (\array_key_exists('Error', $data) && $data['Error'] !== null) { + $object->setError($data['Error']); + } + elseif (\array_key_exists('Error', $data) && $data['Error'] === null) { + $object->setError(null); + } + if (\array_key_exists('RemoteManagers', $data) && $data['RemoteManagers'] !== null) { + $values = []; + foreach ($data['RemoteManagers'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\PeerNode::class, 'json', $context); + } + $object->setRemoteManagers($values); + } + elseif (\array_key_exists('RemoteManagers', $data) && $data['RemoteManagers'] === null) { + $object->setRemoteManagers(null); + } + if (\array_key_exists('Nodes', $data) && $data['Nodes'] !== null) { + $object->setNodes($data['Nodes']); + } + elseif (\array_key_exists('Nodes', $data) && $data['Nodes'] === null) { + $object->setNodes(null); + } + if (\array_key_exists('Managers', $data) && $data['Managers'] !== null) { + $object->setManagers($data['Managers']); + } + elseif (\array_key_exists('Managers', $data) && $data['Managers'] === null) { + $object->setManagers(null); + } + if (\array_key_exists('Cluster', $data) && $data['Cluster'] !== null) { + $object->setCluster($this->denormalizer->denormalize($data['Cluster'], \Docker\API\Model\ClusterInfo::class, 'json', $context)); + } + elseif (\array_key_exists('Cluster', $data) && $data['Cluster'] === null) { + $object->setCluster(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('nodeID') && null !== $object->getNodeID()) { + $data['NodeID'] = $object->getNodeID(); + } + if ($object->isInitialized('nodeAddr') && null !== $object->getNodeAddr()) { + $data['NodeAddr'] = $object->getNodeAddr(); + } + if ($object->isInitialized('localNodeState') && null !== $object->getLocalNodeState()) { + $data['LocalNodeState'] = $object->getLocalNodeState(); + } + if ($object->isInitialized('controlAvailable') && null !== $object->getControlAvailable()) { + $data['ControlAvailable'] = $object->getControlAvailable(); + } + if ($object->isInitialized('error') && null !== $object->getError()) { + $data['Error'] = $object->getError(); + } + if ($object->isInitialized('remoteManagers') && null !== $object->getRemoteManagers()) { + $values = []; + foreach ($object->getRemoteManagers() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['RemoteManagers'] = $values; + } + if ($object->isInitialized('nodes') && null !== $object->getNodes()) { + $data['Nodes'] = $object->getNodes(); + } + if ($object->isInitialized('managers') && null !== $object->getManagers()) { + $data['Managers'] = $object->getManagers(); + } + if ($object->isInitialized('cluster') && null !== $object->getCluster()) { + $data['Cluster'] = $this->normalizer->normalize($object->getCluster(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmInfo::class => false]; + } + } +} else { + class SwarmInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SwarmInfo::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SwarmInfo::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SwarmInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('NodeID', $data) && $data['NodeID'] !== null) { + $object->setNodeID($data['NodeID']); + } + elseif (\array_key_exists('NodeID', $data) && $data['NodeID'] === null) { + $object->setNodeID(null); + } + if (\array_key_exists('NodeAddr', $data) && $data['NodeAddr'] !== null) { + $object->setNodeAddr($data['NodeAddr']); + } + elseif (\array_key_exists('NodeAddr', $data) && $data['NodeAddr'] === null) { + $object->setNodeAddr(null); + } + if (\array_key_exists('LocalNodeState', $data) && $data['LocalNodeState'] !== null) { + $object->setLocalNodeState($data['LocalNodeState']); + } + elseif (\array_key_exists('LocalNodeState', $data) && $data['LocalNodeState'] === null) { + $object->setLocalNodeState(null); + } + if (\array_key_exists('ControlAvailable', $data) && $data['ControlAvailable'] !== null) { + $object->setControlAvailable($data['ControlAvailable']); + } + elseif (\array_key_exists('ControlAvailable', $data) && $data['ControlAvailable'] === null) { + $object->setControlAvailable(null); + } + if (\array_key_exists('Error', $data) && $data['Error'] !== null) { + $object->setError($data['Error']); + } + elseif (\array_key_exists('Error', $data) && $data['Error'] === null) { + $object->setError(null); + } + if (\array_key_exists('RemoteManagers', $data) && $data['RemoteManagers'] !== null) { + $values = []; + foreach ($data['RemoteManagers'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\PeerNode::class, 'json', $context); + } + $object->setRemoteManagers($values); + } + elseif (\array_key_exists('RemoteManagers', $data) && $data['RemoteManagers'] === null) { + $object->setRemoteManagers(null); + } + if (\array_key_exists('Nodes', $data) && $data['Nodes'] !== null) { + $object->setNodes($data['Nodes']); + } + elseif (\array_key_exists('Nodes', $data) && $data['Nodes'] === null) { + $object->setNodes(null); + } + if (\array_key_exists('Managers', $data) && $data['Managers'] !== null) { + $object->setManagers($data['Managers']); + } + elseif (\array_key_exists('Managers', $data) && $data['Managers'] === null) { + $object->setManagers(null); + } + if (\array_key_exists('Cluster', $data) && $data['Cluster'] !== null) { + $object->setCluster($this->denormalizer->denormalize($data['Cluster'], \Docker\API\Model\ClusterInfo::class, 'json', $context)); + } + elseif (\array_key_exists('Cluster', $data) && $data['Cluster'] === null) { + $object->setCluster(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('nodeID') && null !== $object->getNodeID()) { + $data['NodeID'] = $object->getNodeID(); + } + if ($object->isInitialized('nodeAddr') && null !== $object->getNodeAddr()) { + $data['NodeAddr'] = $object->getNodeAddr(); + } + if ($object->isInitialized('localNodeState') && null !== $object->getLocalNodeState()) { + $data['LocalNodeState'] = $object->getLocalNodeState(); + } + if ($object->isInitialized('controlAvailable') && null !== $object->getControlAvailable()) { + $data['ControlAvailable'] = $object->getControlAvailable(); + } + if ($object->isInitialized('error') && null !== $object->getError()) { + $data['Error'] = $object->getError(); + } + if ($object->isInitialized('remoteManagers') && null !== $object->getRemoteManagers()) { + $values = []; + foreach ($object->getRemoteManagers() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['RemoteManagers'] = $values; + } + if ($object->isInitialized('nodes') && null !== $object->getNodes()) { + $data['Nodes'] = $object->getNodes(); + } + if ($object->isInitialized('managers') && null !== $object->getManagers()) { + $data['Managers'] = $object->getManagers(); + } + if ($object->isInitialized('cluster') && null !== $object->getCluster()) { + $data['Cluster'] = $this->normalizer->normalize($object->getCluster(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SwarmInfo::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmInitPostBodyNormalizer.php b/generated/Normalizer/SwarmInitPostBodyNormalizer.php index c02346596..9dd9d7ac1 100644 --- a/generated/Normalizer/SwarmInitPostBodyNormalizer.php +++ b/generated/Normalizer/SwarmInitPostBodyNormalizer.php @@ -52,12 +52,40 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('AdvertiseAddr', $data) && $data['AdvertiseAddr'] === null) { $object->setAdvertiseAddr(null); } + if (\array_key_exists('DataPathAddr', $data) && $data['DataPathAddr'] !== null) { + $object->setDataPathAddr($data['DataPathAddr']); + } + elseif (\array_key_exists('DataPathAddr', $data) && $data['DataPathAddr'] === null) { + $object->setDataPathAddr(null); + } + if (\array_key_exists('DataPathPort', $data) && $data['DataPathPort'] !== null) { + $object->setDataPathPort($data['DataPathPort']); + } + elseif (\array_key_exists('DataPathPort', $data) && $data['DataPathPort'] === null) { + $object->setDataPathPort(null); + } + if (\array_key_exists('DefaultAddrPool', $data) && $data['DefaultAddrPool'] !== null) { + $values = []; + foreach ($data['DefaultAddrPool'] as $value) { + $values[] = $value; + } + $object->setDefaultAddrPool($values); + } + elseif (\array_key_exists('DefaultAddrPool', $data) && $data['DefaultAddrPool'] === null) { + $object->setDefaultAddrPool(null); + } if (\array_key_exists('ForceNewCluster', $data) && $data['ForceNewCluster'] !== null) { $object->setForceNewCluster($data['ForceNewCluster']); } elseif (\array_key_exists('ForceNewCluster', $data) && $data['ForceNewCluster'] === null) { $object->setForceNewCluster(null); } + if (\array_key_exists('SubnetSize', $data) && $data['SubnetSize'] !== null) { + $object->setSubnetSize($data['SubnetSize']); + } + elseif (\array_key_exists('SubnetSize', $data) && $data['SubnetSize'] === null) { + $object->setSubnetSize(null); + } if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\SwarmSpec::class, 'json', $context)); } @@ -75,9 +103,25 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('advertiseAddr') && null !== $object->getAdvertiseAddr()) { $data['AdvertiseAddr'] = $object->getAdvertiseAddr(); } + if ($object->isInitialized('dataPathAddr') && null !== $object->getDataPathAddr()) { + $data['DataPathAddr'] = $object->getDataPathAddr(); + } + if ($object->isInitialized('dataPathPort') && null !== $object->getDataPathPort()) { + $data['DataPathPort'] = $object->getDataPathPort(); + } + if ($object->isInitialized('defaultAddrPool') && null !== $object->getDefaultAddrPool()) { + $values = []; + foreach ($object->getDefaultAddrPool() as $value) { + $values[] = $value; + } + $data['DefaultAddrPool'] = $values; + } if ($object->isInitialized('forceNewCluster') && null !== $object->getForceNewCluster()) { $data['ForceNewCluster'] = $object->getForceNewCluster(); } + if ($object->isInitialized('subnetSize') && null !== $object->getSubnetSize()) { + $data['SubnetSize'] = $object->getSubnetSize(); + } if ($object->isInitialized('spec') && null !== $object->getSpec()) { $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); } @@ -130,12 +174,40 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('AdvertiseAddr', $data) && $data['AdvertiseAddr'] === null) { $object->setAdvertiseAddr(null); } + if (\array_key_exists('DataPathAddr', $data) && $data['DataPathAddr'] !== null) { + $object->setDataPathAddr($data['DataPathAddr']); + } + elseif (\array_key_exists('DataPathAddr', $data) && $data['DataPathAddr'] === null) { + $object->setDataPathAddr(null); + } + if (\array_key_exists('DataPathPort', $data) && $data['DataPathPort'] !== null) { + $object->setDataPathPort($data['DataPathPort']); + } + elseif (\array_key_exists('DataPathPort', $data) && $data['DataPathPort'] === null) { + $object->setDataPathPort(null); + } + if (\array_key_exists('DefaultAddrPool', $data) && $data['DefaultAddrPool'] !== null) { + $values = []; + foreach ($data['DefaultAddrPool'] as $value) { + $values[] = $value; + } + $object->setDefaultAddrPool($values); + } + elseif (\array_key_exists('DefaultAddrPool', $data) && $data['DefaultAddrPool'] === null) { + $object->setDefaultAddrPool(null); + } if (\array_key_exists('ForceNewCluster', $data) && $data['ForceNewCluster'] !== null) { $object->setForceNewCluster($data['ForceNewCluster']); } elseif (\array_key_exists('ForceNewCluster', $data) && $data['ForceNewCluster'] === null) { $object->setForceNewCluster(null); } + if (\array_key_exists('SubnetSize', $data) && $data['SubnetSize'] !== null) { + $object->setSubnetSize($data['SubnetSize']); + } + elseif (\array_key_exists('SubnetSize', $data) && $data['SubnetSize'] === null) { + $object->setSubnetSize(null); + } if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\SwarmSpec::class, 'json', $context)); } @@ -156,9 +228,25 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('advertiseAddr') && null !== $object->getAdvertiseAddr()) { $data['AdvertiseAddr'] = $object->getAdvertiseAddr(); } + if ($object->isInitialized('dataPathAddr') && null !== $object->getDataPathAddr()) { + $data['DataPathAddr'] = $object->getDataPathAddr(); + } + if ($object->isInitialized('dataPathPort') && null !== $object->getDataPathPort()) { + $data['DataPathPort'] = $object->getDataPathPort(); + } + if ($object->isInitialized('defaultAddrPool') && null !== $object->getDefaultAddrPool()) { + $values = []; + foreach ($object->getDefaultAddrPool() as $value) { + $values[] = $value; + } + $data['DefaultAddrPool'] = $values; + } if ($object->isInitialized('forceNewCluster') && null !== $object->getForceNewCluster()) { $data['ForceNewCluster'] = $object->getForceNewCluster(); } + if ($object->isInitialized('subnetSize') && null !== $object->getSubnetSize()) { + $data['SubnetSize'] = $object->getSubnetSize(); + } if ($object->isInitialized('spec') && null !== $object->getSpec()) { $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); } diff --git a/generated/Normalizer/SwarmJoinPostBodyNormalizer.php b/generated/Normalizer/SwarmJoinPostBodyNormalizer.php index 50cb57f23..8e788f25a 100644 --- a/generated/Normalizer/SwarmJoinPostBodyNormalizer.php +++ b/generated/Normalizer/SwarmJoinPostBodyNormalizer.php @@ -52,8 +52,18 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('AdvertiseAddr', $data) && $data['AdvertiseAddr'] === null) { $object->setAdvertiseAddr(null); } + if (\array_key_exists('DataPathAddr', $data) && $data['DataPathAddr'] !== null) { + $object->setDataPathAddr($data['DataPathAddr']); + } + elseif (\array_key_exists('DataPathAddr', $data) && $data['DataPathAddr'] === null) { + $object->setDataPathAddr(null); + } if (\array_key_exists('RemoteAddrs', $data) && $data['RemoteAddrs'] !== null) { - $object->setRemoteAddrs($data['RemoteAddrs']); + $values = []; + foreach ($data['RemoteAddrs'] as $value) { + $values[] = $value; + } + $object->setRemoteAddrs($values); } elseif (\array_key_exists('RemoteAddrs', $data) && $data['RemoteAddrs'] === null) { $object->setRemoteAddrs(null); @@ -75,8 +85,15 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('advertiseAddr') && null !== $object->getAdvertiseAddr()) { $data['AdvertiseAddr'] = $object->getAdvertiseAddr(); } + if ($object->isInitialized('dataPathAddr') && null !== $object->getDataPathAddr()) { + $data['DataPathAddr'] = $object->getDataPathAddr(); + } if ($object->isInitialized('remoteAddrs') && null !== $object->getRemoteAddrs()) { - $data['RemoteAddrs'] = $object->getRemoteAddrs(); + $values = []; + foreach ($object->getRemoteAddrs() as $value) { + $values[] = $value; + } + $data['RemoteAddrs'] = $values; } if ($object->isInitialized('joinToken') && null !== $object->getJoinToken()) { $data['JoinToken'] = $object->getJoinToken(); @@ -130,8 +147,18 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('AdvertiseAddr', $data) && $data['AdvertiseAddr'] === null) { $object->setAdvertiseAddr(null); } + if (\array_key_exists('DataPathAddr', $data) && $data['DataPathAddr'] !== null) { + $object->setDataPathAddr($data['DataPathAddr']); + } + elseif (\array_key_exists('DataPathAddr', $data) && $data['DataPathAddr'] === null) { + $object->setDataPathAddr(null); + } if (\array_key_exists('RemoteAddrs', $data) && $data['RemoteAddrs'] !== null) { - $object->setRemoteAddrs($data['RemoteAddrs']); + $values = []; + foreach ($data['RemoteAddrs'] as $value) { + $values[] = $value; + } + $object->setRemoteAddrs($values); } elseif (\array_key_exists('RemoteAddrs', $data) && $data['RemoteAddrs'] === null) { $object->setRemoteAddrs(null); @@ -156,8 +183,15 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('advertiseAddr') && null !== $object->getAdvertiseAddr()) { $data['AdvertiseAddr'] = $object->getAdvertiseAddr(); } + if ($object->isInitialized('dataPathAddr') && null !== $object->getDataPathAddr()) { + $data['DataPathAddr'] = $object->getDataPathAddr(); + } if ($object->isInitialized('remoteAddrs') && null !== $object->getRemoteAddrs()) { - $data['RemoteAddrs'] = $object->getRemoteAddrs(); + $values = []; + foreach ($object->getRemoteAddrs() as $value) { + $values[] = $value; + } + $data['RemoteAddrs'] = $values; } if ($object->isInitialized('joinToken') && null !== $object->getJoinToken()) { $data['JoinToken'] = $object->getJoinToken(); diff --git a/generated/Normalizer/SwarmNormalizer.php b/generated/Normalizer/SwarmNormalizer.php new file mode 100644 index 000000000..48d24fe7a --- /dev/null +++ b/generated/Normalizer/SwarmNormalizer.php @@ -0,0 +1,314 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SwarmNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Swarm::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Swarm::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Swarm(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); + } + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\SwarmSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + if (\array_key_exists('TLSInfo', $data) && $data['TLSInfo'] !== null) { + $object->setTLSInfo($this->denormalizer->denormalize($data['TLSInfo'], \Docker\API\Model\TLSInfo::class, 'json', $context)); + } + elseif (\array_key_exists('TLSInfo', $data) && $data['TLSInfo'] === null) { + $object->setTLSInfo(null); + } + if (\array_key_exists('RootRotationInProgress', $data) && $data['RootRotationInProgress'] !== null) { + $object->setRootRotationInProgress($data['RootRotationInProgress']); + } + elseif (\array_key_exists('RootRotationInProgress', $data) && $data['RootRotationInProgress'] === null) { + $object->setRootRotationInProgress(null); + } + if (\array_key_exists('DataPathPort', $data) && $data['DataPathPort'] !== null) { + $object->setDataPathPort($data['DataPathPort']); + } + elseif (\array_key_exists('DataPathPort', $data) && $data['DataPathPort'] === null) { + $object->setDataPathPort(null); + } + if (\array_key_exists('DefaultAddrPool', $data) && $data['DefaultAddrPool'] !== null) { + $values = []; + foreach ($data['DefaultAddrPool'] as $value) { + $values[] = $value; + } + $object->setDefaultAddrPool($values); + } + elseif (\array_key_exists('DefaultAddrPool', $data) && $data['DefaultAddrPool'] === null) { + $object->setDefaultAddrPool(null); + } + if (\array_key_exists('SubnetSize', $data) && $data['SubnetSize'] !== null) { + $object->setSubnetSize($data['SubnetSize']); + } + elseif (\array_key_exists('SubnetSize', $data) && $data['SubnetSize'] === null) { + $object->setSubnetSize(null); + } + if (\array_key_exists('JoinTokens', $data) && $data['JoinTokens'] !== null) { + $object->setJoinTokens($this->denormalizer->denormalize($data['JoinTokens'], \Docker\API\Model\JoinTokens::class, 'json', $context)); + } + elseif (\array_key_exists('JoinTokens', $data) && $data['JoinTokens'] === null) { + $object->setJoinTokens(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + if ($object->isInitialized('tLSInfo') && null !== $object->getTLSInfo()) { + $data['TLSInfo'] = $this->normalizer->normalize($object->getTLSInfo(), 'json', $context); + } + if ($object->isInitialized('rootRotationInProgress') && null !== $object->getRootRotationInProgress()) { + $data['RootRotationInProgress'] = $object->getRootRotationInProgress(); + } + if ($object->isInitialized('dataPathPort') && null !== $object->getDataPathPort()) { + $data['DataPathPort'] = $object->getDataPathPort(); + } + if ($object->isInitialized('defaultAddrPool') && null !== $object->getDefaultAddrPool()) { + $values = []; + foreach ($object->getDefaultAddrPool() as $value) { + $values[] = $value; + } + $data['DefaultAddrPool'] = $values; + } + if ($object->isInitialized('subnetSize') && null !== $object->getSubnetSize()) { + $data['SubnetSize'] = $object->getSubnetSize(); + } + if ($object->isInitialized('joinTokens') && null !== $object->getJoinTokens()) { + $data['JoinTokens'] = $this->normalizer->normalize($object->getJoinTokens(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Swarm::class => false]; + } + } +} else { + class SwarmNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\Swarm::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\Swarm::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\Swarm(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); + } + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } + if (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] !== null) { + $object->setUpdatedAt($data['UpdatedAt']); + } + elseif (\array_key_exists('UpdatedAt', $data) && $data['UpdatedAt'] === null) { + $object->setUpdatedAt(null); + } + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\SwarmSpec::class, 'json', $context)); + } + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); + } + if (\array_key_exists('TLSInfo', $data) && $data['TLSInfo'] !== null) { + $object->setTLSInfo($this->denormalizer->denormalize($data['TLSInfo'], \Docker\API\Model\TLSInfo::class, 'json', $context)); + } + elseif (\array_key_exists('TLSInfo', $data) && $data['TLSInfo'] === null) { + $object->setTLSInfo(null); + } + if (\array_key_exists('RootRotationInProgress', $data) && $data['RootRotationInProgress'] !== null) { + $object->setRootRotationInProgress($data['RootRotationInProgress']); + } + elseif (\array_key_exists('RootRotationInProgress', $data) && $data['RootRotationInProgress'] === null) { + $object->setRootRotationInProgress(null); + } + if (\array_key_exists('DataPathPort', $data) && $data['DataPathPort'] !== null) { + $object->setDataPathPort($data['DataPathPort']); + } + elseif (\array_key_exists('DataPathPort', $data) && $data['DataPathPort'] === null) { + $object->setDataPathPort(null); + } + if (\array_key_exists('DefaultAddrPool', $data) && $data['DefaultAddrPool'] !== null) { + $values = []; + foreach ($data['DefaultAddrPool'] as $value) { + $values[] = $value; + } + $object->setDefaultAddrPool($values); + } + elseif (\array_key_exists('DefaultAddrPool', $data) && $data['DefaultAddrPool'] === null) { + $object->setDefaultAddrPool(null); + } + if (\array_key_exists('SubnetSize', $data) && $data['SubnetSize'] !== null) { + $object->setSubnetSize($data['SubnetSize']); + } + elseif (\array_key_exists('SubnetSize', $data) && $data['SubnetSize'] === null) { + $object->setSubnetSize(null); + } + if (\array_key_exists('JoinTokens', $data) && $data['JoinTokens'] !== null) { + $object->setJoinTokens($this->denormalizer->denormalize($data['JoinTokens'], \Docker\API\Model\JoinTokens::class, 'json', $context)); + } + elseif (\array_key_exists('JoinTokens', $data) && $data['JoinTokens'] === null) { + $object->setJoinTokens(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); + } + if ($object->isInitialized('version') && null !== $object->getVersion()) { + $data['Version'] = $this->normalizer->normalize($object->getVersion(), 'json', $context); + } + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } + if ($object->isInitialized('updatedAt') && null !== $object->getUpdatedAt()) { + $data['UpdatedAt'] = $object->getUpdatedAt(); + } + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); + } + if ($object->isInitialized('tLSInfo') && null !== $object->getTLSInfo()) { + $data['TLSInfo'] = $this->normalizer->normalize($object->getTLSInfo(), 'json', $context); + } + if ($object->isInitialized('rootRotationInProgress') && null !== $object->getRootRotationInProgress()) { + $data['RootRotationInProgress'] = $object->getRootRotationInProgress(); + } + if ($object->isInitialized('dataPathPort') && null !== $object->getDataPathPort()) { + $data['DataPathPort'] = $object->getDataPathPort(); + } + if ($object->isInitialized('defaultAddrPool') && null !== $object->getDefaultAddrPool()) { + $values = []; + foreach ($object->getDefaultAddrPool() as $value) { + $values[] = $value; + } + $data['DefaultAddrPool'] = $values; + } + if ($object->isInitialized('subnetSize') && null !== $object->getSubnetSize()) { + $data['SubnetSize'] = $object->getSubnetSize(); + } + if ($object->isInitialized('joinTokens') && null !== $object->getJoinTokens()) { + $data['JoinTokens'] = $this->normalizer->normalize($object->getJoinTokens(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\Swarm::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/SwarmSpecCAConfigExternalCAsItemNormalizer.php b/generated/Normalizer/SwarmSpecCAConfigExternalCAsItemNormalizer.php index 27e8c6f8d..58d609fc1 100644 --- a/generated/Normalizer/SwarmSpecCAConfigExternalCAsItemNormalizer.php +++ b/generated/Normalizer/SwarmSpecCAConfigExternalCAsItemNormalizer.php @@ -62,6 +62,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { $object->setOptions(null); } + if (\array_key_exists('CACert', $data) && $data['CACert'] !== null) { + $object->setCACert($data['CACert']); + } + elseif (\array_key_exists('CACert', $data) && $data['CACert'] === null) { + $object->setCACert(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -80,6 +86,9 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['Options'] = $values; } + if ($object->isInitialized('cACert') && null !== $object->getCACert()) { + $data['CACert'] = $object->getCACert(); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -139,6 +148,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Options', $data) && $data['Options'] === null) { $object->setOptions(null); } + if (\array_key_exists('CACert', $data) && $data['CACert'] !== null) { + $object->setCACert($data['CACert']); + } + elseif (\array_key_exists('CACert', $data) && $data['CACert'] === null) { + $object->setCACert(null); + } return $object; } /** @@ -160,6 +175,9 @@ public function normalize($object, $format = null, array $context = []) } $data['Options'] = $values; } + if ($object->isInitialized('cACert') && null !== $object->getCACert()) { + $data['CACert'] = $object->getCACert(); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/SwarmSpecCAConfigNormalizer.php b/generated/Normalizer/SwarmSpecCAConfigNormalizer.php index 90bc60103..9eafffb69 100644 --- a/generated/Normalizer/SwarmSpecCAConfigNormalizer.php +++ b/generated/Normalizer/SwarmSpecCAConfigNormalizer.php @@ -56,6 +56,24 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('ExternalCAs', $data) && $data['ExternalCAs'] === null) { $object->setExternalCAs(null); } + if (\array_key_exists('SigningCACert', $data) && $data['SigningCACert'] !== null) { + $object->setSigningCACert($data['SigningCACert']); + } + elseif (\array_key_exists('SigningCACert', $data) && $data['SigningCACert'] === null) { + $object->setSigningCACert(null); + } + if (\array_key_exists('SigningCAKey', $data) && $data['SigningCAKey'] !== null) { + $object->setSigningCAKey($data['SigningCAKey']); + } + elseif (\array_key_exists('SigningCAKey', $data) && $data['SigningCAKey'] === null) { + $object->setSigningCAKey(null); + } + if (\array_key_exists('ForceRotate', $data) && $data['ForceRotate'] !== null) { + $object->setForceRotate($data['ForceRotate']); + } + elseif (\array_key_exists('ForceRotate', $data) && $data['ForceRotate'] === null) { + $object->setForceRotate(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -71,6 +89,15 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['ExternalCAs'] = $values; } + if ($object->isInitialized('signingCACert') && null !== $object->getSigningCACert()) { + $data['SigningCACert'] = $object->getSigningCACert(); + } + if ($object->isInitialized('signingCAKey') && null !== $object->getSigningCAKey()) { + $data['SigningCAKey'] = $object->getSigningCAKey(); + } + if ($object->isInitialized('forceRotate') && null !== $object->getForceRotate()) { + $data['ForceRotate'] = $object->getForceRotate(); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -124,6 +151,24 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('ExternalCAs', $data) && $data['ExternalCAs'] === null) { $object->setExternalCAs(null); } + if (\array_key_exists('SigningCACert', $data) && $data['SigningCACert'] !== null) { + $object->setSigningCACert($data['SigningCACert']); + } + elseif (\array_key_exists('SigningCACert', $data) && $data['SigningCACert'] === null) { + $object->setSigningCACert(null); + } + if (\array_key_exists('SigningCAKey', $data) && $data['SigningCAKey'] !== null) { + $object->setSigningCAKey($data['SigningCAKey']); + } + elseif (\array_key_exists('SigningCAKey', $data) && $data['SigningCAKey'] === null) { + $object->setSigningCAKey(null); + } + if (\array_key_exists('ForceRotate', $data) && $data['ForceRotate'] !== null) { + $object->setForceRotate($data['ForceRotate']); + } + elseif (\array_key_exists('ForceRotate', $data) && $data['ForceRotate'] === null) { + $object->setForceRotate(null); + } return $object; } /** @@ -142,6 +187,15 @@ public function normalize($object, $format = null, array $context = []) } $data['ExternalCAs'] = $values; } + if ($object->isInitialized('signingCACert') && null !== $object->getSigningCACert()) { + $data['SigningCACert'] = $object->getSigningCACert(); + } + if ($object->isInitialized('signingCAKey') && null !== $object->getSigningCAKey()) { + $data['SigningCAKey'] = $object->getSigningCAKey(); + } + if ($object->isInitialized('forceRotate') && null !== $object->getForceRotate()) { + $data['ForceRotate'] = $object->getForceRotate(); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/SystemDfGetResponse200Normalizer.php b/generated/Normalizer/SystemDfGetResponse200Normalizer.php index 3644b795f..61a90503e 100644 --- a/generated/Normalizer/SystemDfGetResponse200Normalizer.php +++ b/generated/Normalizer/SystemDfGetResponse200Normalizer.php @@ -59,11 +59,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { $values_1 = []; foreach ($data['Containers'] as $value_1) { - $values_2 = []; - foreach ($value_1 as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\ContainerSummaryItem::class, 'json', $context); - } - $values_1[] = $values_2; + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ContainerSummary::class, 'json', $context); } $object->setContainers($values_1); } @@ -71,15 +67,25 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setContainers(null); } if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { - $values_3 = []; - foreach ($data['Volumes'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\Volume::class, 'json', $context); + $values_2 = []; + foreach ($data['Volumes'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\Volume::class, 'json', $context); } - $object->setVolumes($values_3); + $object->setVolumes($values_2); } elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { $object->setVolumes(null); } + if (\array_key_exists('BuildCache', $data) && $data['BuildCache'] !== null) { + $values_3 = []; + foreach ($data['BuildCache'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\BuildCache::class, 'json', $context); + } + $object->setBuildCache($values_3); + } + elseif (\array_key_exists('BuildCache', $data) && $data['BuildCache'] === null) { + $object->setBuildCache(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -98,20 +104,23 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('containers') && null !== $object->getContainers()) { $values_1 = []; foreach ($object->getContainers() as $value_1) { - $values_2 = []; - foreach ($value_1 as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $values_1[] = $values_2; + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } $data['Containers'] = $values_1; } if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { + $values_2 = []; + foreach ($object->getVolumes() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['Volumes'] = $values_2; + } + if ($object->isInitialized('buildCache') && null !== $object->getBuildCache()) { $values_3 = []; - foreach ($object->getVolumes() as $value_3) { + foreach ($object->getBuildCache() as $value_3) { $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); } - $data['Volumes'] = $values_3; + $data['BuildCache'] = $values_3; } return $data; } @@ -169,11 +178,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { $values_1 = []; foreach ($data['Containers'] as $value_1) { - $values_2 = []; - foreach ($value_1 as $value_2) { - $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\ContainerSummaryItem::class, 'json', $context); - } - $values_1[] = $values_2; + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\ContainerSummary::class, 'json', $context); } $object->setContainers($values_1); } @@ -181,15 +186,25 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setContainers(null); } if (\array_key_exists('Volumes', $data) && $data['Volumes'] !== null) { - $values_3 = []; - foreach ($data['Volumes'] as $value_3) { - $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\Volume::class, 'json', $context); + $values_2 = []; + foreach ($data['Volumes'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\Volume::class, 'json', $context); } - $object->setVolumes($values_3); + $object->setVolumes($values_2); } elseif (\array_key_exists('Volumes', $data) && $data['Volumes'] === null) { $object->setVolumes(null); } + if (\array_key_exists('BuildCache', $data) && $data['BuildCache'] !== null) { + $values_3 = []; + foreach ($data['BuildCache'] as $value_3) { + $values_3[] = $this->denormalizer->denormalize($value_3, \Docker\API\Model\BuildCache::class, 'json', $context); + } + $object->setBuildCache($values_3); + } + elseif (\array_key_exists('BuildCache', $data) && $data['BuildCache'] === null) { + $object->setBuildCache(null); + } return $object; } /** @@ -211,20 +226,23 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('containers') && null !== $object->getContainers()) { $values_1 = []; foreach ($object->getContainers() as $value_1) { - $values_2 = []; - foreach ($value_1 as $value_2) { - $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); - } - $values_1[] = $values_2; + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); } $data['Containers'] = $values_1; } if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { + $values_2 = []; + foreach ($object->getVolumes() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['Volumes'] = $values_2; + } + if ($object->isInitialized('buildCache') && null !== $object->getBuildCache()) { $values_3 = []; - foreach ($object->getVolumes() as $value_3) { + foreach ($object->getBuildCache() as $value_3) { $values_3[] = $this->normalizer->normalize($value_3, 'json', $context); } - $data['Volumes'] = $values_3; + $data['BuildCache'] = $values_3; } return $data; } diff --git a/generated/Normalizer/SystemInfoDefaultAddressPoolsItemNormalizer.php b/generated/Normalizer/SystemInfoDefaultAddressPoolsItemNormalizer.php new file mode 100644 index 000000000..f3b4344e9 --- /dev/null +++ b/generated/Normalizer/SystemInfoDefaultAddressPoolsItemNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SystemInfoDefaultAddressPoolsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SystemInfoDefaultAddressPoolsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SystemInfoDefaultAddressPoolsItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SystemInfoDefaultAddressPoolsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Base', $data) && $data['Base'] !== null) { + $object->setBase($data['Base']); + } + elseif (\array_key_exists('Base', $data) && $data['Base'] === null) { + $object->setBase(null); + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($data['Size']); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('base') && null !== $object->getBase()) { + $data['Base'] = $object->getBase(); + } + if ($object->isInitialized('size') && null !== $object->getSize()) { + $data['Size'] = $object->getSize(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SystemInfoDefaultAddressPoolsItem::class => false]; + } + } +} else { + class SystemInfoDefaultAddressPoolsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SystemInfoDefaultAddressPoolsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SystemInfoDefaultAddressPoolsItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SystemInfoDefaultAddressPoolsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Base', $data) && $data['Base'] !== null) { + $object->setBase($data['Base']); + } + elseif (\array_key_exists('Base', $data) && $data['Base'] === null) { + $object->setBase(null); + } + if (\array_key_exists('Size', $data) && $data['Size'] !== null) { + $object->setSize($data['Size']); + } + elseif (\array_key_exists('Size', $data) && $data['Size'] === null) { + $object->setSize(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('base') && null !== $object->getBase()) { + $data['Base'] = $object->getBase(); + } + if ($object->isInitialized('size') && null !== $object->getSize()) { + $data['Size'] = $object->getSize(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SystemInfoDefaultAddressPoolsItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/InfoGetResponse200Normalizer.php b/generated/Normalizer/SystemInfoNormalizer.php similarity index 55% rename from generated/Normalizer/InfoGetResponse200Normalizer.php rename to generated/Normalizer/SystemInfoNormalizer.php index d8e60bd41..bef663c53 100644 --- a/generated/Normalizer/InfoGetResponse200Normalizer.php +++ b/generated/Normalizer/SystemInfoNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class InfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class SystemInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class InfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerI use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\InfoGetResponse200::class; + return $type === \Docker\API\Model\SystemInfo::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200::class; + return is_object($data) && get_class($data) === \Docker\API\Model\SystemInfo::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,15 +36,15 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\InfoGetResponse200(); + $object = new \Docker\API\Model\SystemInfo(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Architecture', $data) && $data['Architecture'] !== null) { - $object->setArchitecture($data['Architecture']); + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); } - elseif (\array_key_exists('Architecture', $data) && $data['Architecture'] === null) { - $object->setArchitecture(null); + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); } if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { $object->setContainers($data['Containers']); @@ -58,47 +58,23 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('ContainersRunning', $data) && $data['ContainersRunning'] === null) { $object->setContainersRunning(null); } - if (\array_key_exists('ContainersStopped', $data) && $data['ContainersStopped'] !== null) { - $object->setContainersStopped($data['ContainersStopped']); - } - elseif (\array_key_exists('ContainersStopped', $data) && $data['ContainersStopped'] === null) { - $object->setContainersStopped(null); - } if (\array_key_exists('ContainersPaused', $data) && $data['ContainersPaused'] !== null) { $object->setContainersPaused($data['ContainersPaused']); } elseif (\array_key_exists('ContainersPaused', $data) && $data['ContainersPaused'] === null) { $object->setContainersPaused(null); } - if (\array_key_exists('CpuCfsPeriod', $data) && $data['CpuCfsPeriod'] !== null) { - $object->setCpuCfsPeriod($data['CpuCfsPeriod']); - } - elseif (\array_key_exists('CpuCfsPeriod', $data) && $data['CpuCfsPeriod'] === null) { - $object->setCpuCfsPeriod(null); - } - if (\array_key_exists('CpuCfsQuota', $data) && $data['CpuCfsQuota'] !== null) { - $object->setCpuCfsQuota($data['CpuCfsQuota']); - } - elseif (\array_key_exists('CpuCfsQuota', $data) && $data['CpuCfsQuota'] === null) { - $object->setCpuCfsQuota(null); - } - if (\array_key_exists('Debug', $data) && $data['Debug'] !== null) { - $object->setDebug($data['Debug']); - } - elseif (\array_key_exists('Debug', $data) && $data['Debug'] === null) { - $object->setDebug(null); - } - if (\array_key_exists('DiscoveryBackend', $data) && $data['DiscoveryBackend'] !== null) { - $object->setDiscoveryBackend($data['DiscoveryBackend']); + if (\array_key_exists('ContainersStopped', $data) && $data['ContainersStopped'] !== null) { + $object->setContainersStopped($data['ContainersStopped']); } - elseif (\array_key_exists('DiscoveryBackend', $data) && $data['DiscoveryBackend'] === null) { - $object->setDiscoveryBackend(null); + elseif (\array_key_exists('ContainersStopped', $data) && $data['ContainersStopped'] === null) { + $object->setContainersStopped(null); } - if (\array_key_exists('DockerRootDir', $data) && $data['DockerRootDir'] !== null) { - $object->setDockerRootDir($data['DockerRootDir']); + if (\array_key_exists('Images', $data) && $data['Images'] !== null) { + $object->setImages($data['Images']); } - elseif (\array_key_exists('DockerRootDir', $data) && $data['DockerRootDir'] === null) { - $object->setDockerRootDir(null); + elseif (\array_key_exists('Images', $data) && $data['Images'] === null) { + $object->setImages(null); } if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { $object->setDriver($data['Driver']); @@ -120,119 +96,95 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('DriverStatus', $data) && $data['DriverStatus'] === null) { $object->setDriverStatus(null); } - if (\array_key_exists('SystemStatus', $data) && $data['SystemStatus'] !== null) { - $values_2 = []; - foreach ($data['SystemStatus'] as $value_2) { - $values_3 = []; - foreach ($value_2 as $value_3) { - $values_3[] = $value_3; - } - $values_2[] = $values_3; - } - $object->setSystemStatus($values_2); + if (\array_key_exists('DockerRootDir', $data) && $data['DockerRootDir'] !== null) { + $object->setDockerRootDir($data['DockerRootDir']); } - elseif (\array_key_exists('SystemStatus', $data) && $data['SystemStatus'] === null) { - $object->setSystemStatus(null); + elseif (\array_key_exists('DockerRootDir', $data) && $data['DockerRootDir'] === null) { + $object->setDockerRootDir(null); } if (\array_key_exists('Plugins', $data) && $data['Plugins'] !== null) { - $object->setPlugins($this->denormalizer->denormalize($data['Plugins'], \Docker\API\Model\InfoGetResponse200Plugins::class, 'json', $context)); + $object->setPlugins($this->denormalizer->denormalize($data['Plugins'], \Docker\API\Model\PluginsInfo::class, 'json', $context)); } elseif (\array_key_exists('Plugins', $data) && $data['Plugins'] === null) { $object->setPlugins(null); } - if (\array_key_exists('ExperimentalBuild', $data) && $data['ExperimentalBuild'] !== null) { - $object->setExperimentalBuild($data['ExperimentalBuild']); - } - elseif (\array_key_exists('ExperimentalBuild', $data) && $data['ExperimentalBuild'] === null) { - $object->setExperimentalBuild(null); - } - if (\array_key_exists('HttpProxy', $data) && $data['HttpProxy'] !== null) { - $object->setHttpProxy($data['HttpProxy']); - } - elseif (\array_key_exists('HttpProxy', $data) && $data['HttpProxy'] === null) { - $object->setHttpProxy(null); - } - if (\array_key_exists('HttpsProxy', $data) && $data['HttpsProxy'] !== null) { - $object->setHttpsProxy($data['HttpsProxy']); + if (\array_key_exists('MemoryLimit', $data) && $data['MemoryLimit'] !== null) { + $object->setMemoryLimit($data['MemoryLimit']); } - elseif (\array_key_exists('HttpsProxy', $data) && $data['HttpsProxy'] === null) { - $object->setHttpsProxy(null); + elseif (\array_key_exists('MemoryLimit', $data) && $data['MemoryLimit'] === null) { + $object->setMemoryLimit(null); } - if (\array_key_exists('ID', $data) && $data['ID'] !== null) { - $object->setID($data['ID']); + if (\array_key_exists('SwapLimit', $data) && $data['SwapLimit'] !== null) { + $object->setSwapLimit($data['SwapLimit']); } - elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { - $object->setID(null); + elseif (\array_key_exists('SwapLimit', $data) && $data['SwapLimit'] === null) { + $object->setSwapLimit(null); } - if (\array_key_exists('IPv4Forwarding', $data) && $data['IPv4Forwarding'] !== null) { - $object->setIPv4Forwarding($data['IPv4Forwarding']); + if (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] !== null) { + $object->setKernelMemoryTCP($data['KernelMemoryTCP']); } - elseif (\array_key_exists('IPv4Forwarding', $data) && $data['IPv4Forwarding'] === null) { - $object->setIPv4Forwarding(null); + elseif (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] === null) { + $object->setKernelMemoryTCP(null); } - if (\array_key_exists('Images', $data) && $data['Images'] !== null) { - $object->setImages($data['Images']); + if (\array_key_exists('CpuCfsPeriod', $data) && $data['CpuCfsPeriod'] !== null) { + $object->setCpuCfsPeriod($data['CpuCfsPeriod']); } - elseif (\array_key_exists('Images', $data) && $data['Images'] === null) { - $object->setImages(null); + elseif (\array_key_exists('CpuCfsPeriod', $data) && $data['CpuCfsPeriod'] === null) { + $object->setCpuCfsPeriod(null); } - if (\array_key_exists('IndexServerAddress', $data) && $data['IndexServerAddress'] !== null) { - $object->setIndexServerAddress($data['IndexServerAddress']); + if (\array_key_exists('CpuCfsQuota', $data) && $data['CpuCfsQuota'] !== null) { + $object->setCpuCfsQuota($data['CpuCfsQuota']); } - elseif (\array_key_exists('IndexServerAddress', $data) && $data['IndexServerAddress'] === null) { - $object->setIndexServerAddress(null); + elseif (\array_key_exists('CpuCfsQuota', $data) && $data['CpuCfsQuota'] === null) { + $object->setCpuCfsQuota(null); } - if (\array_key_exists('InitPath', $data) && $data['InitPath'] !== null) { - $object->setInitPath($data['InitPath']); + if (\array_key_exists('CPUShares', $data) && $data['CPUShares'] !== null) { + $object->setCPUShares($data['CPUShares']); } - elseif (\array_key_exists('InitPath', $data) && $data['InitPath'] === null) { - $object->setInitPath(null); + elseif (\array_key_exists('CPUShares', $data) && $data['CPUShares'] === null) { + $object->setCPUShares(null); } - if (\array_key_exists('InitSha1', $data) && $data['InitSha1'] !== null) { - $object->setInitSha1($data['InitSha1']); + if (\array_key_exists('CPUSet', $data) && $data['CPUSet'] !== null) { + $object->setCPUSet($data['CPUSet']); } - elseif (\array_key_exists('InitSha1', $data) && $data['InitSha1'] === null) { - $object->setInitSha1(null); + elseif (\array_key_exists('CPUSet', $data) && $data['CPUSet'] === null) { + $object->setCPUSet(null); } - if (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] !== null) { - $object->setKernelVersion($data['KernelVersion']); + if (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] !== null) { + $object->setPidsLimit($data['PidsLimit']); } - elseif (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] === null) { - $object->setKernelVersion(null); + elseif (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] === null) { + $object->setPidsLimit(null); } - if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { - $values_4 = []; - foreach ($data['Labels'] as $value_4) { - $values_4[] = $value_4; - } - $object->setLabels($values_4); + if (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] !== null) { + $object->setOomKillDisable($data['OomKillDisable']); } - elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { - $object->setLabels(null); + elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { + $object->setOomKillDisable(null); } - if (\array_key_exists('MemTotal', $data) && $data['MemTotal'] !== null) { - $object->setMemTotal($data['MemTotal']); + if (\array_key_exists('IPv4Forwarding', $data) && $data['IPv4Forwarding'] !== null) { + $object->setIPv4Forwarding($data['IPv4Forwarding']); } - elseif (\array_key_exists('MemTotal', $data) && $data['MemTotal'] === null) { - $object->setMemTotal(null); + elseif (\array_key_exists('IPv4Forwarding', $data) && $data['IPv4Forwarding'] === null) { + $object->setIPv4Forwarding(null); } - if (\array_key_exists('MemoryLimit', $data) && $data['MemoryLimit'] !== null) { - $object->setMemoryLimit($data['MemoryLimit']); + if (\array_key_exists('BridgeNfIptables', $data) && $data['BridgeNfIptables'] !== null) { + $object->setBridgeNfIptables($data['BridgeNfIptables']); } - elseif (\array_key_exists('MemoryLimit', $data) && $data['MemoryLimit'] === null) { - $object->setMemoryLimit(null); + elseif (\array_key_exists('BridgeNfIptables', $data) && $data['BridgeNfIptables'] === null) { + $object->setBridgeNfIptables(null); } - if (\array_key_exists('NCPU', $data) && $data['NCPU'] !== null) { - $object->setNCPU($data['NCPU']); + if (\array_key_exists('BridgeNfIp6tables', $data) && $data['BridgeNfIp6tables'] !== null) { + $object->setBridgeNfIp6tables($data['BridgeNfIp6tables']); } - elseif (\array_key_exists('NCPU', $data) && $data['NCPU'] === null) { - $object->setNCPU(null); + elseif (\array_key_exists('BridgeNfIp6tables', $data) && $data['BridgeNfIp6tables'] === null) { + $object->setBridgeNfIp6tables(null); } - if (\array_key_exists('NEventsListener', $data) && $data['NEventsListener'] !== null) { - $object->setNEventsListener($data['NEventsListener']); + if (\array_key_exists('Debug', $data) && $data['Debug'] !== null) { + $object->setDebug($data['Debug']); } - elseif (\array_key_exists('NEventsListener', $data) && $data['NEventsListener'] === null) { - $object->setNEventsListener(null); + elseif (\array_key_exists('Debug', $data) && $data['Debug'] === null) { + $object->setDebug(null); } if (\array_key_exists('NFd', $data) && $data['NFd'] !== null) { $object->setNFd($data['NFd']); @@ -246,35 +198,41 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('NGoroutines', $data) && $data['NGoroutines'] === null) { $object->setNGoroutines(null); } - if (\array_key_exists('Name', $data) && $data['Name'] !== null) { - $object->setName($data['Name']); + if (\array_key_exists('SystemTime', $data) && $data['SystemTime'] !== null) { + $object->setSystemTime($data['SystemTime']); } - elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { - $object->setName(null); + elseif (\array_key_exists('SystemTime', $data) && $data['SystemTime'] === null) { + $object->setSystemTime(null); } - if (\array_key_exists('NoProxy', $data) && $data['NoProxy'] !== null) { - $object->setNoProxy($data['NoProxy']); + if (\array_key_exists('LoggingDriver', $data) && $data['LoggingDriver'] !== null) { + $object->setLoggingDriver($data['LoggingDriver']); } - elseif (\array_key_exists('NoProxy', $data) && $data['NoProxy'] === null) { - $object->setNoProxy(null); + elseif (\array_key_exists('LoggingDriver', $data) && $data['LoggingDriver'] === null) { + $object->setLoggingDriver(null); } - if (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] !== null) { - $object->setOomKillDisable($data['OomKillDisable']); + if (\array_key_exists('CgroupDriver', $data) && $data['CgroupDriver'] !== null) { + $object->setCgroupDriver($data['CgroupDriver']); } - elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { - $object->setOomKillDisable(null); + elseif (\array_key_exists('CgroupDriver', $data) && $data['CgroupDriver'] === null) { + $object->setCgroupDriver(null); } - if (\array_key_exists('OSType', $data) && $data['OSType'] !== null) { - $object->setOSType($data['OSType']); + if (\array_key_exists('CgroupVersion', $data) && $data['CgroupVersion'] !== null) { + $object->setCgroupVersion($data['CgroupVersion']); } - elseif (\array_key_exists('OSType', $data) && $data['OSType'] === null) { - $object->setOSType(null); + elseif (\array_key_exists('CgroupVersion', $data) && $data['CgroupVersion'] === null) { + $object->setCgroupVersion(null); + } + if (\array_key_exists('NEventsListener', $data) && $data['NEventsListener'] !== null) { + $object->setNEventsListener($data['NEventsListener']); + } + elseif (\array_key_exists('NEventsListener', $data) && $data['NEventsListener'] === null) { + $object->setNEventsListener(null); } - if (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] !== null) { - $object->setOomScoreAdj($data['OomScoreAdj']); + if (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] !== null) { + $object->setKernelVersion($data['KernelVersion']); } - elseif (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] === null) { - $object->setOomScoreAdj(null); + elseif (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] === null) { + $object->setKernelVersion(null); } if (\array_key_exists('OperatingSystem', $data) && $data['OperatingSystem'] !== null) { $object->setOperatingSystem($data['OperatingSystem']); @@ -282,141 +240,295 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('OperatingSystem', $data) && $data['OperatingSystem'] === null) { $object->setOperatingSystem(null); } - if (\array_key_exists('RegistryConfig', $data) && $data['RegistryConfig'] !== null) { - $object->setRegistryConfig($this->denormalizer->denormalize($data['RegistryConfig'], \Docker\API\Model\InfoGetResponse200RegistryConfig::class, 'json', $context)); + if (\array_key_exists('OSVersion', $data) && $data['OSVersion'] !== null) { + $object->setOSVersion($data['OSVersion']); } - elseif (\array_key_exists('RegistryConfig', $data) && $data['RegistryConfig'] === null) { - $object->setRegistryConfig(null); + elseif (\array_key_exists('OSVersion', $data) && $data['OSVersion'] === null) { + $object->setOSVersion(null); } - if (\array_key_exists('SwapLimit', $data) && $data['SwapLimit'] !== null) { - $object->setSwapLimit($data['SwapLimit']); + if (\array_key_exists('OSType', $data) && $data['OSType'] !== null) { + $object->setOSType($data['OSType']); } - elseif (\array_key_exists('SwapLimit', $data) && $data['SwapLimit'] === null) { - $object->setSwapLimit(null); + elseif (\array_key_exists('OSType', $data) && $data['OSType'] === null) { + $object->setOSType(null); } - if (\array_key_exists('SystemTime', $data) && $data['SystemTime'] !== null) { - $object->setSystemTime($data['SystemTime']); + if (\array_key_exists('Architecture', $data) && $data['Architecture'] !== null) { + $object->setArchitecture($data['Architecture']); } - elseif (\array_key_exists('SystemTime', $data) && $data['SystemTime'] === null) { - $object->setSystemTime(null); + elseif (\array_key_exists('Architecture', $data) && $data['Architecture'] === null) { + $object->setArchitecture(null); } - if (\array_key_exists('ServerVersion', $data) && $data['ServerVersion'] !== null) { - $object->setServerVersion($data['ServerVersion']); + if (\array_key_exists('NCPU', $data) && $data['NCPU'] !== null) { + $object->setNCPU($data['NCPU']); } - elseif (\array_key_exists('ServerVersion', $data) && $data['ServerVersion'] === null) { - $object->setServerVersion(null); + elseif (\array_key_exists('NCPU', $data) && $data['NCPU'] === null) { + $object->setNCPU(null); } - return $object; - } - public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('architecture') && null !== $object->getArchitecture()) { - $data['Architecture'] = $object->getArchitecture(); + if (\array_key_exists('MemTotal', $data) && $data['MemTotal'] !== null) { + $object->setMemTotal($data['MemTotal']); } - if ($object->isInitialized('containers') && null !== $object->getContainers()) { - $data['Containers'] = $object->getContainers(); + elseif (\array_key_exists('MemTotal', $data) && $data['MemTotal'] === null) { + $object->setMemTotal(null); } - if ($object->isInitialized('containersRunning') && null !== $object->getContainersRunning()) { - $data['ContainersRunning'] = $object->getContainersRunning(); + if (\array_key_exists('IndexServerAddress', $data) && $data['IndexServerAddress'] !== null) { + $object->setIndexServerAddress($data['IndexServerAddress']); } - if ($object->isInitialized('containersStopped') && null !== $object->getContainersStopped()) { - $data['ContainersStopped'] = $object->getContainersStopped(); + elseif (\array_key_exists('IndexServerAddress', $data) && $data['IndexServerAddress'] === null) { + $object->setIndexServerAddress(null); } - if ($object->isInitialized('containersPaused') && null !== $object->getContainersPaused()) { - $data['ContainersPaused'] = $object->getContainersPaused(); + if (\array_key_exists('RegistryConfig', $data) && $data['RegistryConfig'] !== null) { + $object->setRegistryConfig($this->denormalizer->denormalize($data['RegistryConfig'], \Docker\API\Model\RegistryServiceConfig::class, 'json', $context)); } - if ($object->isInitialized('cpuCfsPeriod') && null !== $object->getCpuCfsPeriod()) { - $data['CpuCfsPeriod'] = $object->getCpuCfsPeriod(); + elseif (\array_key_exists('RegistryConfig', $data) && $data['RegistryConfig'] === null) { + $object->setRegistryConfig(null); } - if ($object->isInitialized('cpuCfsQuota') && null !== $object->getCpuCfsQuota()) { - $data['CpuCfsQuota'] = $object->getCpuCfsQuota(); + if (\array_key_exists('GenericResources', $data) && $data['GenericResources'] !== null) { + $values_2 = []; + foreach ($data['GenericResources'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\GenericResourcesItem::class, 'json', $context); + } + $object->setGenericResources($values_2); } - if ($object->isInitialized('debug') && null !== $object->getDebug()) { - $data['Debug'] = $object->getDebug(); + elseif (\array_key_exists('GenericResources', $data) && $data['GenericResources'] === null) { + $object->setGenericResources(null); } - if ($object->isInitialized('discoveryBackend') && null !== $object->getDiscoveryBackend()) { - $data['DiscoveryBackend'] = $object->getDiscoveryBackend(); + if (\array_key_exists('HttpProxy', $data) && $data['HttpProxy'] !== null) { + $object->setHttpProxy($data['HttpProxy']); } - if ($object->isInitialized('dockerRootDir') && null !== $object->getDockerRootDir()) { - $data['DockerRootDir'] = $object->getDockerRootDir(); + elseif (\array_key_exists('HttpProxy', $data) && $data['HttpProxy'] === null) { + $object->setHttpProxy(null); } - if ($object->isInitialized('driver') && null !== $object->getDriver()) { - $data['Driver'] = $object->getDriver(); + if (\array_key_exists('HttpsProxy', $data) && $data['HttpsProxy'] !== null) { + $object->setHttpsProxy($data['HttpsProxy']); } - if ($object->isInitialized('driverStatus') && null !== $object->getDriverStatus()) { - $values = []; - foreach ($object->getDriverStatus() as $value) { - $values_1 = []; - foreach ($value as $value_1) { - $values_1[] = $value_1; - } - $values[] = $values_1; - } - $data['DriverStatus'] = $values; + elseif (\array_key_exists('HttpsProxy', $data) && $data['HttpsProxy'] === null) { + $object->setHttpsProxy(null); } - if ($object->isInitialized('systemStatus') && null !== $object->getSystemStatus()) { - $values_2 = []; - foreach ($object->getSystemStatus() as $value_2) { - $values_3 = []; - foreach ($value_2 as $value_3) { - $values_3[] = $value_3; - } - $values_2[] = $values_3; - } - $data['SystemStatus'] = $values_2; + if (\array_key_exists('NoProxy', $data) && $data['NoProxy'] !== null) { + $object->setNoProxy($data['NoProxy']); } - if ($object->isInitialized('plugins') && null !== $object->getPlugins()) { - $data['Plugins'] = $this->normalizer->normalize($object->getPlugins(), 'json', $context); + elseif (\array_key_exists('NoProxy', $data) && $data['NoProxy'] === null) { + $object->setNoProxy(null); } - if ($object->isInitialized('experimentalBuild') && null !== $object->getExperimentalBuild()) { - $data['ExperimentalBuild'] = $object->getExperimentalBuild(); + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); } - if ($object->isInitialized('httpProxy') && null !== $object->getHttpProxy()) { - $data['HttpProxy'] = $object->getHttpProxy(); + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); } - if ($object->isInitialized('httpsProxy') && null !== $object->getHttpsProxy()) { - $data['HttpsProxy'] = $object->getHttpsProxy(); + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values_3 = []; + foreach ($data['Labels'] as $value_3) { + $values_3[] = $value_3; + } + $object->setLabels($values_3); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } + if (\array_key_exists('ExperimentalBuild', $data) && $data['ExperimentalBuild'] !== null) { + $object->setExperimentalBuild($data['ExperimentalBuild']); + } + elseif (\array_key_exists('ExperimentalBuild', $data) && $data['ExperimentalBuild'] === null) { + $object->setExperimentalBuild(null); + } + if (\array_key_exists('ServerVersion', $data) && $data['ServerVersion'] !== null) { + $object->setServerVersion($data['ServerVersion']); + } + elseif (\array_key_exists('ServerVersion', $data) && $data['ServerVersion'] === null) { + $object->setServerVersion(null); + } + if (\array_key_exists('Runtimes', $data) && $data['Runtimes'] !== null) { + $values_4 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Runtimes'] as $key => $value_4) { + $values_4[$key] = $this->denormalizer->denormalize($value_4, \Docker\API\Model\Runtime::class, 'json', $context); + } + $object->setRuntimes($values_4); + } + elseif (\array_key_exists('Runtimes', $data) && $data['Runtimes'] === null) { + $object->setRuntimes(null); + } + if (\array_key_exists('DefaultRuntime', $data) && $data['DefaultRuntime'] !== null) { + $object->setDefaultRuntime($data['DefaultRuntime']); + } + elseif (\array_key_exists('DefaultRuntime', $data) && $data['DefaultRuntime'] === null) { + $object->setDefaultRuntime(null); + } + if (\array_key_exists('Swarm', $data) && $data['Swarm'] !== null) { + $object->setSwarm($this->denormalizer->denormalize($data['Swarm'], \Docker\API\Model\SwarmInfo::class, 'json', $context)); + } + elseif (\array_key_exists('Swarm', $data) && $data['Swarm'] === null) { + $object->setSwarm(null); + } + if (\array_key_exists('LiveRestoreEnabled', $data) && $data['LiveRestoreEnabled'] !== null) { + $object->setLiveRestoreEnabled($data['LiveRestoreEnabled']); + } + elseif (\array_key_exists('LiveRestoreEnabled', $data) && $data['LiveRestoreEnabled'] === null) { + $object->setLiveRestoreEnabled(null); + } + if (\array_key_exists('Isolation', $data) && $data['Isolation'] !== null) { + $object->setIsolation($data['Isolation']); + } + elseif (\array_key_exists('Isolation', $data) && $data['Isolation'] === null) { + $object->setIsolation(null); + } + if (\array_key_exists('InitBinary', $data) && $data['InitBinary'] !== null) { + $object->setInitBinary($data['InitBinary']); + } + elseif (\array_key_exists('InitBinary', $data) && $data['InitBinary'] === null) { + $object->setInitBinary(null); + } + if (\array_key_exists('ContainerdCommit', $data) && $data['ContainerdCommit'] !== null) { + $object->setContainerdCommit($this->denormalizer->denormalize($data['ContainerdCommit'], \Docker\API\Model\Commit::class, 'json', $context)); + } + elseif (\array_key_exists('ContainerdCommit', $data) && $data['ContainerdCommit'] === null) { + $object->setContainerdCommit(null); + } + if (\array_key_exists('RuncCommit', $data) && $data['RuncCommit'] !== null) { + $object->setRuncCommit($this->denormalizer->denormalize($data['RuncCommit'], \Docker\API\Model\Commit::class, 'json', $context)); + } + elseif (\array_key_exists('RuncCommit', $data) && $data['RuncCommit'] === null) { + $object->setRuncCommit(null); + } + if (\array_key_exists('InitCommit', $data) && $data['InitCommit'] !== null) { + $object->setInitCommit($this->denormalizer->denormalize($data['InitCommit'], \Docker\API\Model\Commit::class, 'json', $context)); + } + elseif (\array_key_exists('InitCommit', $data) && $data['InitCommit'] === null) { + $object->setInitCommit(null); } + if (\array_key_exists('SecurityOptions', $data) && $data['SecurityOptions'] !== null) { + $values_5 = []; + foreach ($data['SecurityOptions'] as $value_5) { + $values_5[] = $value_5; + } + $object->setSecurityOptions($values_5); + } + elseif (\array_key_exists('SecurityOptions', $data) && $data['SecurityOptions'] === null) { + $object->setSecurityOptions(null); + } + if (\array_key_exists('ProductLicense', $data) && $data['ProductLicense'] !== null) { + $object->setProductLicense($data['ProductLicense']); + } + elseif (\array_key_exists('ProductLicense', $data) && $data['ProductLicense'] === null) { + $object->setProductLicense(null); + } + if (\array_key_exists('DefaultAddressPools', $data) && $data['DefaultAddressPools'] !== null) { + $values_6 = []; + foreach ($data['DefaultAddressPools'] as $value_6) { + $values_6[] = $this->denormalizer->denormalize($value_6, \Docker\API\Model\SystemInfoDefaultAddressPoolsItem::class, 'json', $context); + } + $object->setDefaultAddressPools($values_6); + } + elseif (\array_key_exists('DefaultAddressPools', $data) && $data['DefaultAddressPools'] === null) { + $object->setDefaultAddressPools(null); + } + if (\array_key_exists('Warnings', $data) && $data['Warnings'] !== null) { + $values_7 = []; + foreach ($data['Warnings'] as $value_7) { + $values_7[] = $value_7; + } + $object->setWarnings($values_7); + } + elseif (\array_key_exists('Warnings', $data) && $data['Warnings'] === null) { + $object->setWarnings(null); + } + if (\array_key_exists('CDISpecDirs', $data) && $data['CDISpecDirs'] !== null) { + $values_8 = []; + foreach ($data['CDISpecDirs'] as $value_8) { + $values_8[] = $value_8; + } + $object->setCDISpecDirs($values_8); + } + elseif (\array_key_exists('CDISpecDirs', $data) && $data['CDISpecDirs'] === null) { + $object->setCDISpecDirs(null); + } + if (\array_key_exists('Containerd', $data) && $data['Containerd'] !== null) { + $object->setContainerd($this->denormalizer->denormalize($data['Containerd'], \Docker\API\Model\ContainerdInfo::class, 'json', $context)); + } + elseif (\array_key_exists('Containerd', $data) && $data['Containerd'] === null) { + $object->setContainerd(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; if ($object->isInitialized('iD') && null !== $object->getID()) { $data['ID'] = $object->getID(); } - if ($object->isInitialized('iPv4Forwarding') && null !== $object->getIPv4Forwarding()) { - $data['IPv4Forwarding'] = $object->getIPv4Forwarding(); + if ($object->isInitialized('containers') && null !== $object->getContainers()) { + $data['Containers'] = $object->getContainers(); } - if ($object->isInitialized('images') && null !== $object->getImages()) { - $data['Images'] = $object->getImages(); + if ($object->isInitialized('containersRunning') && null !== $object->getContainersRunning()) { + $data['ContainersRunning'] = $object->getContainersRunning(); } - if ($object->isInitialized('indexServerAddress') && null !== $object->getIndexServerAddress()) { - $data['IndexServerAddress'] = $object->getIndexServerAddress(); + if ($object->isInitialized('containersPaused') && null !== $object->getContainersPaused()) { + $data['ContainersPaused'] = $object->getContainersPaused(); } - if ($object->isInitialized('initPath') && null !== $object->getInitPath()) { - $data['InitPath'] = $object->getInitPath(); + if ($object->isInitialized('containersStopped') && null !== $object->getContainersStopped()) { + $data['ContainersStopped'] = $object->getContainersStopped(); } - if ($object->isInitialized('initSha1') && null !== $object->getInitSha1()) { - $data['InitSha1'] = $object->getInitSha1(); + if ($object->isInitialized('images') && null !== $object->getImages()) { + $data['Images'] = $object->getImages(); } - if ($object->isInitialized('kernelVersion') && null !== $object->getKernelVersion()) { - $data['KernelVersion'] = $object->getKernelVersion(); + if ($object->isInitialized('driver') && null !== $object->getDriver()) { + $data['Driver'] = $object->getDriver(); } - if ($object->isInitialized('labels') && null !== $object->getLabels()) { - $values_4 = []; - foreach ($object->getLabels() as $value_4) { - $values_4[] = $value_4; + if ($object->isInitialized('driverStatus') && null !== $object->getDriverStatus()) { + $values = []; + foreach ($object->getDriverStatus() as $value) { + $values_1 = []; + foreach ($value as $value_1) { + $values_1[] = $value_1; + } + $values[] = $values_1; } - $data['Labels'] = $values_4; + $data['DriverStatus'] = $values; } - if ($object->isInitialized('memTotal') && null !== $object->getMemTotal()) { - $data['MemTotal'] = $object->getMemTotal(); + if ($object->isInitialized('dockerRootDir') && null !== $object->getDockerRootDir()) { + $data['DockerRootDir'] = $object->getDockerRootDir(); + } + if ($object->isInitialized('plugins') && null !== $object->getPlugins()) { + $data['Plugins'] = $this->normalizer->normalize($object->getPlugins(), 'json', $context); } if ($object->isInitialized('memoryLimit') && null !== $object->getMemoryLimit()) { $data['MemoryLimit'] = $object->getMemoryLimit(); } - if ($object->isInitialized('nCPU') && null !== $object->getNCPU()) { - $data['NCPU'] = $object->getNCPU(); + if ($object->isInitialized('swapLimit') && null !== $object->getSwapLimit()) { + $data['SwapLimit'] = $object->getSwapLimit(); } - if ($object->isInitialized('nEventsListener') && null !== $object->getNEventsListener()) { - $data['NEventsListener'] = $object->getNEventsListener(); + if ($object->isInitialized('kernelMemoryTCP') && null !== $object->getKernelMemoryTCP()) { + $data['KernelMemoryTCP'] = $object->getKernelMemoryTCP(); + } + if ($object->isInitialized('cpuCfsPeriod') && null !== $object->getCpuCfsPeriod()) { + $data['CpuCfsPeriod'] = $object->getCpuCfsPeriod(); + } + if ($object->isInitialized('cpuCfsQuota') && null !== $object->getCpuCfsQuota()) { + $data['CpuCfsQuota'] = $object->getCpuCfsQuota(); + } + if ($object->isInitialized('cPUShares') && null !== $object->getCPUShares()) { + $data['CPUShares'] = $object->getCPUShares(); + } + if ($object->isInitialized('cPUSet') && null !== $object->getCPUSet()) { + $data['CPUSet'] = $object->getCPUSet(); + } + if ($object->isInitialized('pidsLimit') && null !== $object->getPidsLimit()) { + $data['PidsLimit'] = $object->getPidsLimit(); + } + if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { + $data['OomKillDisable'] = $object->getOomKillDisable(); + } + if ($object->isInitialized('iPv4Forwarding') && null !== $object->getIPv4Forwarding()) { + $data['IPv4Forwarding'] = $object->getIPv4Forwarding(); + } + if ($object->isInitialized('bridgeNfIptables') && null !== $object->getBridgeNfIptables()) { + $data['BridgeNfIptables'] = $object->getBridgeNfIptables(); + } + if ($object->isInitialized('bridgeNfIp6tables') && null !== $object->getBridgeNfIp6tables()) { + $data['BridgeNfIp6tables'] = $object->getBridgeNfIp6tables(); + } + if ($object->isInitialized('debug') && null !== $object->getDebug()) { + $data['Debug'] = $object->getDebug(); } if ($object->isInitialized('nFd') && null !== $object->getNFd()) { $data['NFd'] = $object->getNFd(); @@ -424,45 +536,154 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('nGoroutines') && null !== $object->getNGoroutines()) { $data['NGoroutines'] = $object->getNGoroutines(); } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['Name'] = $object->getName(); + if ($object->isInitialized('systemTime') && null !== $object->getSystemTime()) { + $data['SystemTime'] = $object->getSystemTime(); } - if ($object->isInitialized('noProxy') && null !== $object->getNoProxy()) { - $data['NoProxy'] = $object->getNoProxy(); + if ($object->isInitialized('loggingDriver') && null !== $object->getLoggingDriver()) { + $data['LoggingDriver'] = $object->getLoggingDriver(); } - if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { - $data['OomKillDisable'] = $object->getOomKillDisable(); + if ($object->isInitialized('cgroupDriver') && null !== $object->getCgroupDriver()) { + $data['CgroupDriver'] = $object->getCgroupDriver(); } - if ($object->isInitialized('oSType') && null !== $object->getOSType()) { - $data['OSType'] = $object->getOSType(); + if ($object->isInitialized('cgroupVersion') && null !== $object->getCgroupVersion()) { + $data['CgroupVersion'] = $object->getCgroupVersion(); } - if ($object->isInitialized('oomScoreAdj') && null !== $object->getOomScoreAdj()) { - $data['OomScoreAdj'] = $object->getOomScoreAdj(); + if ($object->isInitialized('nEventsListener') && null !== $object->getNEventsListener()) { + $data['NEventsListener'] = $object->getNEventsListener(); + } + if ($object->isInitialized('kernelVersion') && null !== $object->getKernelVersion()) { + $data['KernelVersion'] = $object->getKernelVersion(); } if ($object->isInitialized('operatingSystem') && null !== $object->getOperatingSystem()) { $data['OperatingSystem'] = $object->getOperatingSystem(); } + if ($object->isInitialized('oSVersion') && null !== $object->getOSVersion()) { + $data['OSVersion'] = $object->getOSVersion(); + } + if ($object->isInitialized('oSType') && null !== $object->getOSType()) { + $data['OSType'] = $object->getOSType(); + } + if ($object->isInitialized('architecture') && null !== $object->getArchitecture()) { + $data['Architecture'] = $object->getArchitecture(); + } + if ($object->isInitialized('nCPU') && null !== $object->getNCPU()) { + $data['NCPU'] = $object->getNCPU(); + } + if ($object->isInitialized('memTotal') && null !== $object->getMemTotal()) { + $data['MemTotal'] = $object->getMemTotal(); + } + if ($object->isInitialized('indexServerAddress') && null !== $object->getIndexServerAddress()) { + $data['IndexServerAddress'] = $object->getIndexServerAddress(); + } if ($object->isInitialized('registryConfig') && null !== $object->getRegistryConfig()) { $data['RegistryConfig'] = $this->normalizer->normalize($object->getRegistryConfig(), 'json', $context); } - if ($object->isInitialized('swapLimit') && null !== $object->getSwapLimit()) { - $data['SwapLimit'] = $object->getSwapLimit(); + if ($object->isInitialized('genericResources') && null !== $object->getGenericResources()) { + $values_2 = []; + foreach ($object->getGenericResources() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['GenericResources'] = $values_2; } - if ($object->isInitialized('systemTime') && null !== $object->getSystemTime()) { - $data['SystemTime'] = $object->getSystemTime(); + if ($object->isInitialized('httpProxy') && null !== $object->getHttpProxy()) { + $data['HttpProxy'] = $object->getHttpProxy(); + } + if ($object->isInitialized('httpsProxy') && null !== $object->getHttpsProxy()) { + $data['HttpsProxy'] = $object->getHttpsProxy(); + } + if ($object->isInitialized('noProxy') && null !== $object->getNoProxy()) { + $data['NoProxy'] = $object->getNoProxy(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_3 = []; + foreach ($object->getLabels() as $value_3) { + $values_3[] = $value_3; + } + $data['Labels'] = $values_3; + } + if ($object->isInitialized('experimentalBuild') && null !== $object->getExperimentalBuild()) { + $data['ExperimentalBuild'] = $object->getExperimentalBuild(); } if ($object->isInitialized('serverVersion') && null !== $object->getServerVersion()) { $data['ServerVersion'] = $object->getServerVersion(); } + if ($object->isInitialized('runtimes') && null !== $object->getRuntimes()) { + $values_4 = []; + foreach ($object->getRuntimes() as $key => $value_4) { + $values_4[$key] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['Runtimes'] = $values_4; + } + if ($object->isInitialized('defaultRuntime') && null !== $object->getDefaultRuntime()) { + $data['DefaultRuntime'] = $object->getDefaultRuntime(); + } + if ($object->isInitialized('swarm') && null !== $object->getSwarm()) { + $data['Swarm'] = $this->normalizer->normalize($object->getSwarm(), 'json', $context); + } + if ($object->isInitialized('liveRestoreEnabled') && null !== $object->getLiveRestoreEnabled()) { + $data['LiveRestoreEnabled'] = $object->getLiveRestoreEnabled(); + } + if ($object->isInitialized('isolation') && null !== $object->getIsolation()) { + $data['Isolation'] = $object->getIsolation(); + } + if ($object->isInitialized('initBinary') && null !== $object->getInitBinary()) { + $data['InitBinary'] = $object->getInitBinary(); + } + if ($object->isInitialized('containerdCommit') && null !== $object->getContainerdCommit()) { + $data['ContainerdCommit'] = $this->normalizer->normalize($object->getContainerdCommit(), 'json', $context); + } + if ($object->isInitialized('runcCommit') && null !== $object->getRuncCommit()) { + $data['RuncCommit'] = $this->normalizer->normalize($object->getRuncCommit(), 'json', $context); + } + if ($object->isInitialized('initCommit') && null !== $object->getInitCommit()) { + $data['InitCommit'] = $this->normalizer->normalize($object->getInitCommit(), 'json', $context); + } + if ($object->isInitialized('securityOptions') && null !== $object->getSecurityOptions()) { + $values_5 = []; + foreach ($object->getSecurityOptions() as $value_5) { + $values_5[] = $value_5; + } + $data['SecurityOptions'] = $values_5; + } + if ($object->isInitialized('productLicense') && null !== $object->getProductLicense()) { + $data['ProductLicense'] = $object->getProductLicense(); + } + if ($object->isInitialized('defaultAddressPools') && null !== $object->getDefaultAddressPools()) { + $values_6 = []; + foreach ($object->getDefaultAddressPools() as $value_6) { + $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + } + $data['DefaultAddressPools'] = $values_6; + } + if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { + $values_7 = []; + foreach ($object->getWarnings() as $value_7) { + $values_7[] = $value_7; + } + $data['Warnings'] = $values_7; + } + if ($object->isInitialized('cDISpecDirs') && null !== $object->getCDISpecDirs()) { + $values_8 = []; + foreach ($object->getCDISpecDirs() as $value_8) { + $values_8[] = $value_8; + } + $data['CDISpecDirs'] = $values_8; + } + if ($object->isInitialized('containerd') && null !== $object->getContainerd()) { + $data['Containerd'] = $this->normalizer->normalize($object->getContainerd(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\InfoGetResponse200::class => false]; + return [\Docker\API\Model\SystemInfo::class => false]; } } } else { - class InfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class SystemInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -470,11 +691,11 @@ class InfoGetResponse200Normalizer implements DenormalizerInterface, NormalizerI use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\InfoGetResponse200::class; + return $type === \Docker\API\Model\SystemInfo::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\InfoGetResponse200::class; + return is_object($data) && get_class($data) === \Docker\API\Model\SystemInfo::class; } /** * @return mixed @@ -487,15 +708,15 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\InfoGetResponse200(); + $object = new \Docker\API\Model\SystemInfo(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Architecture', $data) && $data['Architecture'] !== null) { - $object->setArchitecture($data['Architecture']); + if (\array_key_exists('ID', $data) && $data['ID'] !== null) { + $object->setID($data['ID']); } - elseif (\array_key_exists('Architecture', $data) && $data['Architecture'] === null) { - $object->setArchitecture(null); + elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { + $object->setID(null); } if (\array_key_exists('Containers', $data) && $data['Containers'] !== null) { $object->setContainers($data['Containers']); @@ -509,47 +730,23 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('ContainersRunning', $data) && $data['ContainersRunning'] === null) { $object->setContainersRunning(null); } - if (\array_key_exists('ContainersStopped', $data) && $data['ContainersStopped'] !== null) { - $object->setContainersStopped($data['ContainersStopped']); - } - elseif (\array_key_exists('ContainersStopped', $data) && $data['ContainersStopped'] === null) { - $object->setContainersStopped(null); - } if (\array_key_exists('ContainersPaused', $data) && $data['ContainersPaused'] !== null) { $object->setContainersPaused($data['ContainersPaused']); } elseif (\array_key_exists('ContainersPaused', $data) && $data['ContainersPaused'] === null) { $object->setContainersPaused(null); } - if (\array_key_exists('CpuCfsPeriod', $data) && $data['CpuCfsPeriod'] !== null) { - $object->setCpuCfsPeriod($data['CpuCfsPeriod']); - } - elseif (\array_key_exists('CpuCfsPeriod', $data) && $data['CpuCfsPeriod'] === null) { - $object->setCpuCfsPeriod(null); - } - if (\array_key_exists('CpuCfsQuota', $data) && $data['CpuCfsQuota'] !== null) { - $object->setCpuCfsQuota($data['CpuCfsQuota']); - } - elseif (\array_key_exists('CpuCfsQuota', $data) && $data['CpuCfsQuota'] === null) { - $object->setCpuCfsQuota(null); - } - if (\array_key_exists('Debug', $data) && $data['Debug'] !== null) { - $object->setDebug($data['Debug']); - } - elseif (\array_key_exists('Debug', $data) && $data['Debug'] === null) { - $object->setDebug(null); - } - if (\array_key_exists('DiscoveryBackend', $data) && $data['DiscoveryBackend'] !== null) { - $object->setDiscoveryBackend($data['DiscoveryBackend']); + if (\array_key_exists('ContainersStopped', $data) && $data['ContainersStopped'] !== null) { + $object->setContainersStopped($data['ContainersStopped']); } - elseif (\array_key_exists('DiscoveryBackend', $data) && $data['DiscoveryBackend'] === null) { - $object->setDiscoveryBackend(null); + elseif (\array_key_exists('ContainersStopped', $data) && $data['ContainersStopped'] === null) { + $object->setContainersStopped(null); } - if (\array_key_exists('DockerRootDir', $data) && $data['DockerRootDir'] !== null) { - $object->setDockerRootDir($data['DockerRootDir']); + if (\array_key_exists('Images', $data) && $data['Images'] !== null) { + $object->setImages($data['Images']); } - elseif (\array_key_exists('DockerRootDir', $data) && $data['DockerRootDir'] === null) { - $object->setDockerRootDir(null); + elseif (\array_key_exists('Images', $data) && $data['Images'] === null) { + $object->setImages(null); } if (\array_key_exists('Driver', $data) && $data['Driver'] !== null) { $object->setDriver($data['Driver']); @@ -571,49 +768,71 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('DriverStatus', $data) && $data['DriverStatus'] === null) { $object->setDriverStatus(null); } - if (\array_key_exists('SystemStatus', $data) && $data['SystemStatus'] !== null) { - $values_2 = []; - foreach ($data['SystemStatus'] as $value_2) { - $values_3 = []; - foreach ($value_2 as $value_3) { - $values_3[] = $value_3; - } - $values_2[] = $values_3; - } - $object->setSystemStatus($values_2); + if (\array_key_exists('DockerRootDir', $data) && $data['DockerRootDir'] !== null) { + $object->setDockerRootDir($data['DockerRootDir']); } - elseif (\array_key_exists('SystemStatus', $data) && $data['SystemStatus'] === null) { - $object->setSystemStatus(null); + elseif (\array_key_exists('DockerRootDir', $data) && $data['DockerRootDir'] === null) { + $object->setDockerRootDir(null); } if (\array_key_exists('Plugins', $data) && $data['Plugins'] !== null) { - $object->setPlugins($this->denormalizer->denormalize($data['Plugins'], \Docker\API\Model\InfoGetResponse200Plugins::class, 'json', $context)); + $object->setPlugins($this->denormalizer->denormalize($data['Plugins'], \Docker\API\Model\PluginsInfo::class, 'json', $context)); } elseif (\array_key_exists('Plugins', $data) && $data['Plugins'] === null) { $object->setPlugins(null); } - if (\array_key_exists('ExperimentalBuild', $data) && $data['ExperimentalBuild'] !== null) { - $object->setExperimentalBuild($data['ExperimentalBuild']); + if (\array_key_exists('MemoryLimit', $data) && $data['MemoryLimit'] !== null) { + $object->setMemoryLimit($data['MemoryLimit']); } - elseif (\array_key_exists('ExperimentalBuild', $data) && $data['ExperimentalBuild'] === null) { - $object->setExperimentalBuild(null); + elseif (\array_key_exists('MemoryLimit', $data) && $data['MemoryLimit'] === null) { + $object->setMemoryLimit(null); } - if (\array_key_exists('HttpProxy', $data) && $data['HttpProxy'] !== null) { - $object->setHttpProxy($data['HttpProxy']); + if (\array_key_exists('SwapLimit', $data) && $data['SwapLimit'] !== null) { + $object->setSwapLimit($data['SwapLimit']); } - elseif (\array_key_exists('HttpProxy', $data) && $data['HttpProxy'] === null) { - $object->setHttpProxy(null); + elseif (\array_key_exists('SwapLimit', $data) && $data['SwapLimit'] === null) { + $object->setSwapLimit(null); } - if (\array_key_exists('HttpsProxy', $data) && $data['HttpsProxy'] !== null) { - $object->setHttpsProxy($data['HttpsProxy']); + if (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] !== null) { + $object->setKernelMemoryTCP($data['KernelMemoryTCP']); } - elseif (\array_key_exists('HttpsProxy', $data) && $data['HttpsProxy'] === null) { - $object->setHttpsProxy(null); + elseif (\array_key_exists('KernelMemoryTCP', $data) && $data['KernelMemoryTCP'] === null) { + $object->setKernelMemoryTCP(null); } - if (\array_key_exists('ID', $data) && $data['ID'] !== null) { - $object->setID($data['ID']); + if (\array_key_exists('CpuCfsPeriod', $data) && $data['CpuCfsPeriod'] !== null) { + $object->setCpuCfsPeriod($data['CpuCfsPeriod']); } - elseif (\array_key_exists('ID', $data) && $data['ID'] === null) { - $object->setID(null); + elseif (\array_key_exists('CpuCfsPeriod', $data) && $data['CpuCfsPeriod'] === null) { + $object->setCpuCfsPeriod(null); + } + if (\array_key_exists('CpuCfsQuota', $data) && $data['CpuCfsQuota'] !== null) { + $object->setCpuCfsQuota($data['CpuCfsQuota']); + } + elseif (\array_key_exists('CpuCfsQuota', $data) && $data['CpuCfsQuota'] === null) { + $object->setCpuCfsQuota(null); + } + if (\array_key_exists('CPUShares', $data) && $data['CPUShares'] !== null) { + $object->setCPUShares($data['CPUShares']); + } + elseif (\array_key_exists('CPUShares', $data) && $data['CPUShares'] === null) { + $object->setCPUShares(null); + } + if (\array_key_exists('CPUSet', $data) && $data['CPUSet'] !== null) { + $object->setCPUSet($data['CPUSet']); + } + elseif (\array_key_exists('CPUSet', $data) && $data['CPUSet'] === null) { + $object->setCPUSet(null); + } + if (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] !== null) { + $object->setPidsLimit($data['PidsLimit']); + } + elseif (\array_key_exists('PidsLimit', $data) && $data['PidsLimit'] === null) { + $object->setPidsLimit(null); + } + if (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] !== null) { + $object->setOomKillDisable($data['OomKillDisable']); + } + elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { + $object->setOomKillDisable(null); } if (\array_key_exists('IPv4Forwarding', $data) && $data['IPv4Forwarding'] !== null) { $object->setIPv4Forwarding($data['IPv4Forwarding']); @@ -621,11 +840,107 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('IPv4Forwarding', $data) && $data['IPv4Forwarding'] === null) { $object->setIPv4Forwarding(null); } - if (\array_key_exists('Images', $data) && $data['Images'] !== null) { - $object->setImages($data['Images']); + if (\array_key_exists('BridgeNfIptables', $data) && $data['BridgeNfIptables'] !== null) { + $object->setBridgeNfIptables($data['BridgeNfIptables']); + } + elseif (\array_key_exists('BridgeNfIptables', $data) && $data['BridgeNfIptables'] === null) { + $object->setBridgeNfIptables(null); + } + if (\array_key_exists('BridgeNfIp6tables', $data) && $data['BridgeNfIp6tables'] !== null) { + $object->setBridgeNfIp6tables($data['BridgeNfIp6tables']); + } + elseif (\array_key_exists('BridgeNfIp6tables', $data) && $data['BridgeNfIp6tables'] === null) { + $object->setBridgeNfIp6tables(null); + } + if (\array_key_exists('Debug', $data) && $data['Debug'] !== null) { + $object->setDebug($data['Debug']); + } + elseif (\array_key_exists('Debug', $data) && $data['Debug'] === null) { + $object->setDebug(null); + } + if (\array_key_exists('NFd', $data) && $data['NFd'] !== null) { + $object->setNFd($data['NFd']); + } + elseif (\array_key_exists('NFd', $data) && $data['NFd'] === null) { + $object->setNFd(null); + } + if (\array_key_exists('NGoroutines', $data) && $data['NGoroutines'] !== null) { + $object->setNGoroutines($data['NGoroutines']); + } + elseif (\array_key_exists('NGoroutines', $data) && $data['NGoroutines'] === null) { + $object->setNGoroutines(null); + } + if (\array_key_exists('SystemTime', $data) && $data['SystemTime'] !== null) { + $object->setSystemTime($data['SystemTime']); + } + elseif (\array_key_exists('SystemTime', $data) && $data['SystemTime'] === null) { + $object->setSystemTime(null); + } + if (\array_key_exists('LoggingDriver', $data) && $data['LoggingDriver'] !== null) { + $object->setLoggingDriver($data['LoggingDriver']); + } + elseif (\array_key_exists('LoggingDriver', $data) && $data['LoggingDriver'] === null) { + $object->setLoggingDriver(null); + } + if (\array_key_exists('CgroupDriver', $data) && $data['CgroupDriver'] !== null) { + $object->setCgroupDriver($data['CgroupDriver']); + } + elseif (\array_key_exists('CgroupDriver', $data) && $data['CgroupDriver'] === null) { + $object->setCgroupDriver(null); + } + if (\array_key_exists('CgroupVersion', $data) && $data['CgroupVersion'] !== null) { + $object->setCgroupVersion($data['CgroupVersion']); + } + elseif (\array_key_exists('CgroupVersion', $data) && $data['CgroupVersion'] === null) { + $object->setCgroupVersion(null); + } + if (\array_key_exists('NEventsListener', $data) && $data['NEventsListener'] !== null) { + $object->setNEventsListener($data['NEventsListener']); + } + elseif (\array_key_exists('NEventsListener', $data) && $data['NEventsListener'] === null) { + $object->setNEventsListener(null); + } + if (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] !== null) { + $object->setKernelVersion($data['KernelVersion']); + } + elseif (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] === null) { + $object->setKernelVersion(null); + } + if (\array_key_exists('OperatingSystem', $data) && $data['OperatingSystem'] !== null) { + $object->setOperatingSystem($data['OperatingSystem']); + } + elseif (\array_key_exists('OperatingSystem', $data) && $data['OperatingSystem'] === null) { + $object->setOperatingSystem(null); + } + if (\array_key_exists('OSVersion', $data) && $data['OSVersion'] !== null) { + $object->setOSVersion($data['OSVersion']); + } + elseif (\array_key_exists('OSVersion', $data) && $data['OSVersion'] === null) { + $object->setOSVersion(null); + } + if (\array_key_exists('OSType', $data) && $data['OSType'] !== null) { + $object->setOSType($data['OSType']); + } + elseif (\array_key_exists('OSType', $data) && $data['OSType'] === null) { + $object->setOSType(null); + } + if (\array_key_exists('Architecture', $data) && $data['Architecture'] !== null) { + $object->setArchitecture($data['Architecture']); + } + elseif (\array_key_exists('Architecture', $data) && $data['Architecture'] === null) { + $object->setArchitecture(null); + } + if (\array_key_exists('NCPU', $data) && $data['NCPU'] !== null) { + $object->setNCPU($data['NCPU']); + } + elseif (\array_key_exists('NCPU', $data) && $data['NCPU'] === null) { + $object->setNCPU(null); + } + if (\array_key_exists('MemTotal', $data) && $data['MemTotal'] !== null) { + $object->setMemTotal($data['MemTotal']); } - elseif (\array_key_exists('Images', $data) && $data['Images'] === null) { - $object->setImages(null); + elseif (\array_key_exists('MemTotal', $data) && $data['MemTotal'] === null) { + $object->setMemTotal(null); } if (\array_key_exists('IndexServerAddress', $data) && $data['IndexServerAddress'] !== null) { $object->setIndexServerAddress($data['IndexServerAddress']); @@ -633,129 +948,177 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('IndexServerAddress', $data) && $data['IndexServerAddress'] === null) { $object->setIndexServerAddress(null); } - if (\array_key_exists('InitPath', $data) && $data['InitPath'] !== null) { - $object->setInitPath($data['InitPath']); + if (\array_key_exists('RegistryConfig', $data) && $data['RegistryConfig'] !== null) { + $object->setRegistryConfig($this->denormalizer->denormalize($data['RegistryConfig'], \Docker\API\Model\RegistryServiceConfig::class, 'json', $context)); } - elseif (\array_key_exists('InitPath', $data) && $data['InitPath'] === null) { - $object->setInitPath(null); + elseif (\array_key_exists('RegistryConfig', $data) && $data['RegistryConfig'] === null) { + $object->setRegistryConfig(null); } - if (\array_key_exists('InitSha1', $data) && $data['InitSha1'] !== null) { - $object->setInitSha1($data['InitSha1']); + if (\array_key_exists('GenericResources', $data) && $data['GenericResources'] !== null) { + $values_2 = []; + foreach ($data['GenericResources'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\GenericResourcesItem::class, 'json', $context); + } + $object->setGenericResources($values_2); } - elseif (\array_key_exists('InitSha1', $data) && $data['InitSha1'] === null) { - $object->setInitSha1(null); + elseif (\array_key_exists('GenericResources', $data) && $data['GenericResources'] === null) { + $object->setGenericResources(null); } - if (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] !== null) { - $object->setKernelVersion($data['KernelVersion']); + if (\array_key_exists('HttpProxy', $data) && $data['HttpProxy'] !== null) { + $object->setHttpProxy($data['HttpProxy']); } - elseif (\array_key_exists('KernelVersion', $data) && $data['KernelVersion'] === null) { - $object->setKernelVersion(null); + elseif (\array_key_exists('HttpProxy', $data) && $data['HttpProxy'] === null) { + $object->setHttpProxy(null); + } + if (\array_key_exists('HttpsProxy', $data) && $data['HttpsProxy'] !== null) { + $object->setHttpsProxy($data['HttpsProxy']); + } + elseif (\array_key_exists('HttpsProxy', $data) && $data['HttpsProxy'] === null) { + $object->setHttpsProxy(null); + } + if (\array_key_exists('NoProxy', $data) && $data['NoProxy'] !== null) { + $object->setNoProxy($data['NoProxy']); + } + elseif (\array_key_exists('NoProxy', $data) && $data['NoProxy'] === null) { + $object->setNoProxy(null); + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); } if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { - $values_4 = []; - foreach ($data['Labels'] as $value_4) { - $values_4[] = $value_4; + $values_3 = []; + foreach ($data['Labels'] as $value_3) { + $values_3[] = $value_3; } - $object->setLabels($values_4); + $object->setLabels($values_3); } elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { $object->setLabels(null); } - if (\array_key_exists('MemTotal', $data) && $data['MemTotal'] !== null) { - $object->setMemTotal($data['MemTotal']); + if (\array_key_exists('ExperimentalBuild', $data) && $data['ExperimentalBuild'] !== null) { + $object->setExperimentalBuild($data['ExperimentalBuild']); } - elseif (\array_key_exists('MemTotal', $data) && $data['MemTotal'] === null) { - $object->setMemTotal(null); + elseif (\array_key_exists('ExperimentalBuild', $data) && $data['ExperimentalBuild'] === null) { + $object->setExperimentalBuild(null); } - if (\array_key_exists('MemoryLimit', $data) && $data['MemoryLimit'] !== null) { - $object->setMemoryLimit($data['MemoryLimit']); + if (\array_key_exists('ServerVersion', $data) && $data['ServerVersion'] !== null) { + $object->setServerVersion($data['ServerVersion']); } - elseif (\array_key_exists('MemoryLimit', $data) && $data['MemoryLimit'] === null) { - $object->setMemoryLimit(null); + elseif (\array_key_exists('ServerVersion', $data) && $data['ServerVersion'] === null) { + $object->setServerVersion(null); } - if (\array_key_exists('NCPU', $data) && $data['NCPU'] !== null) { - $object->setNCPU($data['NCPU']); + if (\array_key_exists('Runtimes', $data) && $data['Runtimes'] !== null) { + $values_4 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Runtimes'] as $key => $value_4) { + $values_4[$key] = $this->denormalizer->denormalize($value_4, \Docker\API\Model\Runtime::class, 'json', $context); + } + $object->setRuntimes($values_4); } - elseif (\array_key_exists('NCPU', $data) && $data['NCPU'] === null) { - $object->setNCPU(null); + elseif (\array_key_exists('Runtimes', $data) && $data['Runtimes'] === null) { + $object->setRuntimes(null); } - if (\array_key_exists('NEventsListener', $data) && $data['NEventsListener'] !== null) { - $object->setNEventsListener($data['NEventsListener']); + if (\array_key_exists('DefaultRuntime', $data) && $data['DefaultRuntime'] !== null) { + $object->setDefaultRuntime($data['DefaultRuntime']); } - elseif (\array_key_exists('NEventsListener', $data) && $data['NEventsListener'] === null) { - $object->setNEventsListener(null); + elseif (\array_key_exists('DefaultRuntime', $data) && $data['DefaultRuntime'] === null) { + $object->setDefaultRuntime(null); } - if (\array_key_exists('NFd', $data) && $data['NFd'] !== null) { - $object->setNFd($data['NFd']); + if (\array_key_exists('Swarm', $data) && $data['Swarm'] !== null) { + $object->setSwarm($this->denormalizer->denormalize($data['Swarm'], \Docker\API\Model\SwarmInfo::class, 'json', $context)); } - elseif (\array_key_exists('NFd', $data) && $data['NFd'] === null) { - $object->setNFd(null); + elseif (\array_key_exists('Swarm', $data) && $data['Swarm'] === null) { + $object->setSwarm(null); } - if (\array_key_exists('NGoroutines', $data) && $data['NGoroutines'] !== null) { - $object->setNGoroutines($data['NGoroutines']); + if (\array_key_exists('LiveRestoreEnabled', $data) && $data['LiveRestoreEnabled'] !== null) { + $object->setLiveRestoreEnabled($data['LiveRestoreEnabled']); } - elseif (\array_key_exists('NGoroutines', $data) && $data['NGoroutines'] === null) { - $object->setNGoroutines(null); + elseif (\array_key_exists('LiveRestoreEnabled', $data) && $data['LiveRestoreEnabled'] === null) { + $object->setLiveRestoreEnabled(null); } - if (\array_key_exists('Name', $data) && $data['Name'] !== null) { - $object->setName($data['Name']); + if (\array_key_exists('Isolation', $data) && $data['Isolation'] !== null) { + $object->setIsolation($data['Isolation']); } - elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { - $object->setName(null); + elseif (\array_key_exists('Isolation', $data) && $data['Isolation'] === null) { + $object->setIsolation(null); } - if (\array_key_exists('NoProxy', $data) && $data['NoProxy'] !== null) { - $object->setNoProxy($data['NoProxy']); + if (\array_key_exists('InitBinary', $data) && $data['InitBinary'] !== null) { + $object->setInitBinary($data['InitBinary']); } - elseif (\array_key_exists('NoProxy', $data) && $data['NoProxy'] === null) { - $object->setNoProxy(null); + elseif (\array_key_exists('InitBinary', $data) && $data['InitBinary'] === null) { + $object->setInitBinary(null); } - if (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] !== null) { - $object->setOomKillDisable($data['OomKillDisable']); + if (\array_key_exists('ContainerdCommit', $data) && $data['ContainerdCommit'] !== null) { + $object->setContainerdCommit($this->denormalizer->denormalize($data['ContainerdCommit'], \Docker\API\Model\Commit::class, 'json', $context)); } - elseif (\array_key_exists('OomKillDisable', $data) && $data['OomKillDisable'] === null) { - $object->setOomKillDisable(null); + elseif (\array_key_exists('ContainerdCommit', $data) && $data['ContainerdCommit'] === null) { + $object->setContainerdCommit(null); } - if (\array_key_exists('OSType', $data) && $data['OSType'] !== null) { - $object->setOSType($data['OSType']); + if (\array_key_exists('RuncCommit', $data) && $data['RuncCommit'] !== null) { + $object->setRuncCommit($this->denormalizer->denormalize($data['RuncCommit'], \Docker\API\Model\Commit::class, 'json', $context)); } - elseif (\array_key_exists('OSType', $data) && $data['OSType'] === null) { - $object->setOSType(null); + elseif (\array_key_exists('RuncCommit', $data) && $data['RuncCommit'] === null) { + $object->setRuncCommit(null); } - if (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] !== null) { - $object->setOomScoreAdj($data['OomScoreAdj']); + if (\array_key_exists('InitCommit', $data) && $data['InitCommit'] !== null) { + $object->setInitCommit($this->denormalizer->denormalize($data['InitCommit'], \Docker\API\Model\Commit::class, 'json', $context)); } - elseif (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] === null) { - $object->setOomScoreAdj(null); + elseif (\array_key_exists('InitCommit', $data) && $data['InitCommit'] === null) { + $object->setInitCommit(null); } - if (\array_key_exists('OperatingSystem', $data) && $data['OperatingSystem'] !== null) { - $object->setOperatingSystem($data['OperatingSystem']); + if (\array_key_exists('SecurityOptions', $data) && $data['SecurityOptions'] !== null) { + $values_5 = []; + foreach ($data['SecurityOptions'] as $value_5) { + $values_5[] = $value_5; + } + $object->setSecurityOptions($values_5); } - elseif (\array_key_exists('OperatingSystem', $data) && $data['OperatingSystem'] === null) { - $object->setOperatingSystem(null); + elseif (\array_key_exists('SecurityOptions', $data) && $data['SecurityOptions'] === null) { + $object->setSecurityOptions(null); } - if (\array_key_exists('RegistryConfig', $data) && $data['RegistryConfig'] !== null) { - $object->setRegistryConfig($this->denormalizer->denormalize($data['RegistryConfig'], \Docker\API\Model\InfoGetResponse200RegistryConfig::class, 'json', $context)); + if (\array_key_exists('ProductLicense', $data) && $data['ProductLicense'] !== null) { + $object->setProductLicense($data['ProductLicense']); } - elseif (\array_key_exists('RegistryConfig', $data) && $data['RegistryConfig'] === null) { - $object->setRegistryConfig(null); + elseif (\array_key_exists('ProductLicense', $data) && $data['ProductLicense'] === null) { + $object->setProductLicense(null); } - if (\array_key_exists('SwapLimit', $data) && $data['SwapLimit'] !== null) { - $object->setSwapLimit($data['SwapLimit']); + if (\array_key_exists('DefaultAddressPools', $data) && $data['DefaultAddressPools'] !== null) { + $values_6 = []; + foreach ($data['DefaultAddressPools'] as $value_6) { + $values_6[] = $this->denormalizer->denormalize($value_6, \Docker\API\Model\SystemInfoDefaultAddressPoolsItem::class, 'json', $context); + } + $object->setDefaultAddressPools($values_6); } - elseif (\array_key_exists('SwapLimit', $data) && $data['SwapLimit'] === null) { - $object->setSwapLimit(null); + elseif (\array_key_exists('DefaultAddressPools', $data) && $data['DefaultAddressPools'] === null) { + $object->setDefaultAddressPools(null); } - if (\array_key_exists('SystemTime', $data) && $data['SystemTime'] !== null) { - $object->setSystemTime($data['SystemTime']); + if (\array_key_exists('Warnings', $data) && $data['Warnings'] !== null) { + $values_7 = []; + foreach ($data['Warnings'] as $value_7) { + $values_7[] = $value_7; + } + $object->setWarnings($values_7); } - elseif (\array_key_exists('SystemTime', $data) && $data['SystemTime'] === null) { - $object->setSystemTime(null); + elseif (\array_key_exists('Warnings', $data) && $data['Warnings'] === null) { + $object->setWarnings(null); } - if (\array_key_exists('ServerVersion', $data) && $data['ServerVersion'] !== null) { - $object->setServerVersion($data['ServerVersion']); + if (\array_key_exists('CDISpecDirs', $data) && $data['CDISpecDirs'] !== null) { + $values_8 = []; + foreach ($data['CDISpecDirs'] as $value_8) { + $values_8[] = $value_8; + } + $object->setCDISpecDirs($values_8); } - elseif (\array_key_exists('ServerVersion', $data) && $data['ServerVersion'] === null) { - $object->setServerVersion(null); + elseif (\array_key_exists('CDISpecDirs', $data) && $data['CDISpecDirs'] === null) { + $object->setCDISpecDirs(null); + } + if (\array_key_exists('Containerd', $data) && $data['Containerd'] !== null) { + $object->setContainerd($this->denormalizer->denormalize($data['Containerd'], \Docker\API\Model\ContainerdInfo::class, 'json', $context)); + } + elseif (\array_key_exists('Containerd', $data) && $data['Containerd'] === null) { + $object->setContainerd(null); } return $object; } @@ -765,8 +1128,8 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('architecture') && null !== $object->getArchitecture()) { - $data['Architecture'] = $object->getArchitecture(); + if ($object->isInitialized('iD') && null !== $object->getID()) { + $data['ID'] = $object->getID(); } if ($object->isInitialized('containers') && null !== $object->getContainers()) { $data['Containers'] = $object->getContainers(); @@ -774,26 +1137,14 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('containersRunning') && null !== $object->getContainersRunning()) { $data['ContainersRunning'] = $object->getContainersRunning(); } - if ($object->isInitialized('containersStopped') && null !== $object->getContainersStopped()) { - $data['ContainersStopped'] = $object->getContainersStopped(); - } if ($object->isInitialized('containersPaused') && null !== $object->getContainersPaused()) { $data['ContainersPaused'] = $object->getContainersPaused(); } - if ($object->isInitialized('cpuCfsPeriod') && null !== $object->getCpuCfsPeriod()) { - $data['CpuCfsPeriod'] = $object->getCpuCfsPeriod(); - } - if ($object->isInitialized('cpuCfsQuota') && null !== $object->getCpuCfsQuota()) { - $data['CpuCfsQuota'] = $object->getCpuCfsQuota(); - } - if ($object->isInitialized('debug') && null !== $object->getDebug()) { - $data['Debug'] = $object->getDebug(); - } - if ($object->isInitialized('discoveryBackend') && null !== $object->getDiscoveryBackend()) { - $data['DiscoveryBackend'] = $object->getDiscoveryBackend(); + if ($object->isInitialized('containersStopped') && null !== $object->getContainersStopped()) { + $data['ContainersStopped'] = $object->getContainersStopped(); } - if ($object->isInitialized('dockerRootDir') && null !== $object->getDockerRootDir()) { - $data['DockerRootDir'] = $object->getDockerRootDir(); + if ($object->isInitialized('images') && null !== $object->getImages()) { + $data['Images'] = $object->getImages(); } if ($object->isInitialized('driver') && null !== $object->getDriver()) { $data['Driver'] = $object->getDriver(); @@ -809,68 +1160,50 @@ public function normalize($object, $format = null, array $context = []) } $data['DriverStatus'] = $values; } - if ($object->isInitialized('systemStatus') && null !== $object->getSystemStatus()) { - $values_2 = []; - foreach ($object->getSystemStatus() as $value_2) { - $values_3 = []; - foreach ($value_2 as $value_3) { - $values_3[] = $value_3; - } - $values_2[] = $values_3; - } - $data['SystemStatus'] = $values_2; + if ($object->isInitialized('dockerRootDir') && null !== $object->getDockerRootDir()) { + $data['DockerRootDir'] = $object->getDockerRootDir(); } if ($object->isInitialized('plugins') && null !== $object->getPlugins()) { $data['Plugins'] = $this->normalizer->normalize($object->getPlugins(), 'json', $context); } - if ($object->isInitialized('experimentalBuild') && null !== $object->getExperimentalBuild()) { - $data['ExperimentalBuild'] = $object->getExperimentalBuild(); - } - if ($object->isInitialized('httpProxy') && null !== $object->getHttpProxy()) { - $data['HttpProxy'] = $object->getHttpProxy(); - } - if ($object->isInitialized('httpsProxy') && null !== $object->getHttpsProxy()) { - $data['HttpsProxy'] = $object->getHttpsProxy(); + if ($object->isInitialized('memoryLimit') && null !== $object->getMemoryLimit()) { + $data['MemoryLimit'] = $object->getMemoryLimit(); } - if ($object->isInitialized('iD') && null !== $object->getID()) { - $data['ID'] = $object->getID(); + if ($object->isInitialized('swapLimit') && null !== $object->getSwapLimit()) { + $data['SwapLimit'] = $object->getSwapLimit(); } - if ($object->isInitialized('iPv4Forwarding') && null !== $object->getIPv4Forwarding()) { - $data['IPv4Forwarding'] = $object->getIPv4Forwarding(); + if ($object->isInitialized('kernelMemoryTCP') && null !== $object->getKernelMemoryTCP()) { + $data['KernelMemoryTCP'] = $object->getKernelMemoryTCP(); } - if ($object->isInitialized('images') && null !== $object->getImages()) { - $data['Images'] = $object->getImages(); + if ($object->isInitialized('cpuCfsPeriod') && null !== $object->getCpuCfsPeriod()) { + $data['CpuCfsPeriod'] = $object->getCpuCfsPeriod(); } - if ($object->isInitialized('indexServerAddress') && null !== $object->getIndexServerAddress()) { - $data['IndexServerAddress'] = $object->getIndexServerAddress(); + if ($object->isInitialized('cpuCfsQuota') && null !== $object->getCpuCfsQuota()) { + $data['CpuCfsQuota'] = $object->getCpuCfsQuota(); } - if ($object->isInitialized('initPath') && null !== $object->getInitPath()) { - $data['InitPath'] = $object->getInitPath(); + if ($object->isInitialized('cPUShares') && null !== $object->getCPUShares()) { + $data['CPUShares'] = $object->getCPUShares(); } - if ($object->isInitialized('initSha1') && null !== $object->getInitSha1()) { - $data['InitSha1'] = $object->getInitSha1(); + if ($object->isInitialized('cPUSet') && null !== $object->getCPUSet()) { + $data['CPUSet'] = $object->getCPUSet(); } - if ($object->isInitialized('kernelVersion') && null !== $object->getKernelVersion()) { - $data['KernelVersion'] = $object->getKernelVersion(); + if ($object->isInitialized('pidsLimit') && null !== $object->getPidsLimit()) { + $data['PidsLimit'] = $object->getPidsLimit(); } - if ($object->isInitialized('labels') && null !== $object->getLabels()) { - $values_4 = []; - foreach ($object->getLabels() as $value_4) { - $values_4[] = $value_4; - } - $data['Labels'] = $values_4; + if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { + $data['OomKillDisable'] = $object->getOomKillDisable(); } - if ($object->isInitialized('memTotal') && null !== $object->getMemTotal()) { - $data['MemTotal'] = $object->getMemTotal(); + if ($object->isInitialized('iPv4Forwarding') && null !== $object->getIPv4Forwarding()) { + $data['IPv4Forwarding'] = $object->getIPv4Forwarding(); } - if ($object->isInitialized('memoryLimit') && null !== $object->getMemoryLimit()) { - $data['MemoryLimit'] = $object->getMemoryLimit(); + if ($object->isInitialized('bridgeNfIptables') && null !== $object->getBridgeNfIptables()) { + $data['BridgeNfIptables'] = $object->getBridgeNfIptables(); } - if ($object->isInitialized('nCPU') && null !== $object->getNCPU()) { - $data['NCPU'] = $object->getNCPU(); + if ($object->isInitialized('bridgeNfIp6tables') && null !== $object->getBridgeNfIp6tables()) { + $data['BridgeNfIp6tables'] = $object->getBridgeNfIp6tables(); } - if ($object->isInitialized('nEventsListener') && null !== $object->getNEventsListener()) { - $data['NEventsListener'] = $object->getNEventsListener(); + if ($object->isInitialized('debug') && null !== $object->getDebug()) { + $data['Debug'] = $object->getDebug(); } if ($object->isInitialized('nFd') && null !== $object->getNFd()) { $data['NFd'] = $object->getNFd(); @@ -878,41 +1211,150 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('nGoroutines') && null !== $object->getNGoroutines()) { $data['NGoroutines'] = $object->getNGoroutines(); } - if ($object->isInitialized('name') && null !== $object->getName()) { - $data['Name'] = $object->getName(); + if ($object->isInitialized('systemTime') && null !== $object->getSystemTime()) { + $data['SystemTime'] = $object->getSystemTime(); } - if ($object->isInitialized('noProxy') && null !== $object->getNoProxy()) { - $data['NoProxy'] = $object->getNoProxy(); + if ($object->isInitialized('loggingDriver') && null !== $object->getLoggingDriver()) { + $data['LoggingDriver'] = $object->getLoggingDriver(); } - if ($object->isInitialized('oomKillDisable') && null !== $object->getOomKillDisable()) { - $data['OomKillDisable'] = $object->getOomKillDisable(); + if ($object->isInitialized('cgroupDriver') && null !== $object->getCgroupDriver()) { + $data['CgroupDriver'] = $object->getCgroupDriver(); } - if ($object->isInitialized('oSType') && null !== $object->getOSType()) { - $data['OSType'] = $object->getOSType(); + if ($object->isInitialized('cgroupVersion') && null !== $object->getCgroupVersion()) { + $data['CgroupVersion'] = $object->getCgroupVersion(); + } + if ($object->isInitialized('nEventsListener') && null !== $object->getNEventsListener()) { + $data['NEventsListener'] = $object->getNEventsListener(); } - if ($object->isInitialized('oomScoreAdj') && null !== $object->getOomScoreAdj()) { - $data['OomScoreAdj'] = $object->getOomScoreAdj(); + if ($object->isInitialized('kernelVersion') && null !== $object->getKernelVersion()) { + $data['KernelVersion'] = $object->getKernelVersion(); } if ($object->isInitialized('operatingSystem') && null !== $object->getOperatingSystem()) { $data['OperatingSystem'] = $object->getOperatingSystem(); } + if ($object->isInitialized('oSVersion') && null !== $object->getOSVersion()) { + $data['OSVersion'] = $object->getOSVersion(); + } + if ($object->isInitialized('oSType') && null !== $object->getOSType()) { + $data['OSType'] = $object->getOSType(); + } + if ($object->isInitialized('architecture') && null !== $object->getArchitecture()) { + $data['Architecture'] = $object->getArchitecture(); + } + if ($object->isInitialized('nCPU') && null !== $object->getNCPU()) { + $data['NCPU'] = $object->getNCPU(); + } + if ($object->isInitialized('memTotal') && null !== $object->getMemTotal()) { + $data['MemTotal'] = $object->getMemTotal(); + } + if ($object->isInitialized('indexServerAddress') && null !== $object->getIndexServerAddress()) { + $data['IndexServerAddress'] = $object->getIndexServerAddress(); + } if ($object->isInitialized('registryConfig') && null !== $object->getRegistryConfig()) { $data['RegistryConfig'] = $this->normalizer->normalize($object->getRegistryConfig(), 'json', $context); } - if ($object->isInitialized('swapLimit') && null !== $object->getSwapLimit()) { - $data['SwapLimit'] = $object->getSwapLimit(); + if ($object->isInitialized('genericResources') && null !== $object->getGenericResources()) { + $values_2 = []; + foreach ($object->getGenericResources() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['GenericResources'] = $values_2; } - if ($object->isInitialized('systemTime') && null !== $object->getSystemTime()) { - $data['SystemTime'] = $object->getSystemTime(); + if ($object->isInitialized('httpProxy') && null !== $object->getHttpProxy()) { + $data['HttpProxy'] = $object->getHttpProxy(); + } + if ($object->isInitialized('httpsProxy') && null !== $object->getHttpsProxy()) { + $data['HttpsProxy'] = $object->getHttpsProxy(); + } + if ($object->isInitialized('noProxy') && null !== $object->getNoProxy()) { + $data['NoProxy'] = $object->getNoProxy(); + } + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('labels') && null !== $object->getLabels()) { + $values_3 = []; + foreach ($object->getLabels() as $value_3) { + $values_3[] = $value_3; + } + $data['Labels'] = $values_3; + } + if ($object->isInitialized('experimentalBuild') && null !== $object->getExperimentalBuild()) { + $data['ExperimentalBuild'] = $object->getExperimentalBuild(); } if ($object->isInitialized('serverVersion') && null !== $object->getServerVersion()) { $data['ServerVersion'] = $object->getServerVersion(); } + if ($object->isInitialized('runtimes') && null !== $object->getRuntimes()) { + $values_4 = []; + foreach ($object->getRuntimes() as $key => $value_4) { + $values_4[$key] = $this->normalizer->normalize($value_4, 'json', $context); + } + $data['Runtimes'] = $values_4; + } + if ($object->isInitialized('defaultRuntime') && null !== $object->getDefaultRuntime()) { + $data['DefaultRuntime'] = $object->getDefaultRuntime(); + } + if ($object->isInitialized('swarm') && null !== $object->getSwarm()) { + $data['Swarm'] = $this->normalizer->normalize($object->getSwarm(), 'json', $context); + } + if ($object->isInitialized('liveRestoreEnabled') && null !== $object->getLiveRestoreEnabled()) { + $data['LiveRestoreEnabled'] = $object->getLiveRestoreEnabled(); + } + if ($object->isInitialized('isolation') && null !== $object->getIsolation()) { + $data['Isolation'] = $object->getIsolation(); + } + if ($object->isInitialized('initBinary') && null !== $object->getInitBinary()) { + $data['InitBinary'] = $object->getInitBinary(); + } + if ($object->isInitialized('containerdCommit') && null !== $object->getContainerdCommit()) { + $data['ContainerdCommit'] = $this->normalizer->normalize($object->getContainerdCommit(), 'json', $context); + } + if ($object->isInitialized('runcCommit') && null !== $object->getRuncCommit()) { + $data['RuncCommit'] = $this->normalizer->normalize($object->getRuncCommit(), 'json', $context); + } + if ($object->isInitialized('initCommit') && null !== $object->getInitCommit()) { + $data['InitCommit'] = $this->normalizer->normalize($object->getInitCommit(), 'json', $context); + } + if ($object->isInitialized('securityOptions') && null !== $object->getSecurityOptions()) { + $values_5 = []; + foreach ($object->getSecurityOptions() as $value_5) { + $values_5[] = $value_5; + } + $data['SecurityOptions'] = $values_5; + } + if ($object->isInitialized('productLicense') && null !== $object->getProductLicense()) { + $data['ProductLicense'] = $object->getProductLicense(); + } + if ($object->isInitialized('defaultAddressPools') && null !== $object->getDefaultAddressPools()) { + $values_6 = []; + foreach ($object->getDefaultAddressPools() as $value_6) { + $values_6[] = $this->normalizer->normalize($value_6, 'json', $context); + } + $data['DefaultAddressPools'] = $values_6; + } + if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { + $values_7 = []; + foreach ($object->getWarnings() as $value_7) { + $values_7[] = $value_7; + } + $data['Warnings'] = $values_7; + } + if ($object->isInitialized('cDISpecDirs') && null !== $object->getCDISpecDirs()) { + $values_8 = []; + foreach ($object->getCDISpecDirs() as $value_8) { + $values_8[] = $value_8; + } + $data['CDISpecDirs'] = $values_8; + } + if ($object->isInitialized('containerd') && null !== $object->getContainerd()) { + $data['Containerd'] = $this->normalizer->normalize($object->getContainerd(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\InfoGetResponse200::class => false]; + return [\Docker\API\Model\SystemInfo::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/SystemVersionComponentsItemNormalizer.php b/generated/Normalizer/SystemVersionComponentsItemNormalizer.php new file mode 100644 index 000000000..785c84af6 --- /dev/null +++ b/generated/Normalizer/SystemVersionComponentsItemNormalizer.php @@ -0,0 +1,146 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class SystemVersionComponentsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SystemVersionComponentsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SystemVersionComponentsItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SystemVersionComponentsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($data['Version']); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('Details', $data) && $data['Details'] !== null) { + $object->setDetails($data['Details']); + } + elseif (\array_key_exists('Details', $data) && $data['Details'] === null) { + $object->setDetails(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + $data['Name'] = $object->getName(); + $data['Version'] = $object->getVersion(); + if ($object->isInitialized('details') && null !== $object->getDetails()) { + $data['Details'] = $object->getDetails(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SystemVersionComponentsItem::class => false]; + } + } +} else { + class SystemVersionComponentsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\SystemVersionComponentsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\SystemVersionComponentsItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\SystemVersionComponentsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Version', $data) && $data['Version'] !== null) { + $object->setVersion($data['Version']); + } + elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { + $object->setVersion(null); + } + if (\array_key_exists('Details', $data) && $data['Details'] !== null) { + $object->setDetails($data['Details']); + } + elseif (\array_key_exists('Details', $data) && $data['Details'] === null) { + $object->setDetails(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + $data['Name'] = $object->getName(); + $data['Version'] = $object->getVersion(); + if ($object->isInitialized('details') && null !== $object->getDetails()) { + $data['Details'] = $object->getDetails(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\SystemVersionComponentsItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/VersionGetResponse200Normalizer.php b/generated/Normalizer/SystemVersionNormalizer.php similarity index 77% rename from generated/Normalizer/VersionGetResponse200Normalizer.php rename to generated/Normalizer/SystemVersionNormalizer.php index ce44d5f19..1d00188dc 100644 --- a/generated/Normalizer/VersionGetResponse200Normalizer.php +++ b/generated/Normalizer/SystemVersionNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class VersionGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class SystemVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class VersionGetResponse200Normalizer implements DenormalizerInterface, Normaliz use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\VersionGetResponse200::class; + return $type === \Docker\API\Model\SystemVersion::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\VersionGetResponse200::class; + return is_object($data) && get_class($data) === \Docker\API\Model\SystemVersion::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,10 +36,26 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\VersionGetResponse200(); + $object = new \Docker\API\Model\SystemVersion(); if (null === $data || false === \is_array($data)) { return $object; } + if (\array_key_exists('Platform', $data) && $data['Platform'] !== null) { + $object->setPlatform($this->denormalizer->denormalize($data['Platform'], \Docker\API\Model\SystemVersionPlatform::class, 'json', $context)); + } + elseif (\array_key_exists('Platform', $data) && $data['Platform'] === null) { + $object->setPlatform(null); + } + if (\array_key_exists('Components', $data) && $data['Components'] !== null) { + $values = []; + foreach ($data['Components'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\SystemVersionComponentsItem::class, 'json', $context); + } + $object->setComponents($values); + } + elseif (\array_key_exists('Components', $data) && $data['Components'] === null) { + $object->setComponents(null); + } if (\array_key_exists('Version', $data) && $data['Version'] !== null) { $object->setVersion($data['Version']); } @@ -105,6 +121,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; + if ($object->isInitialized('platform') && null !== $object->getPlatform()) { + $data['Platform'] = $this->normalizer->normalize($object->getPlatform(), 'json', $context); + } + if ($object->isInitialized('components') && null !== $object->getComponents()) { + $values = []; + foreach ($object->getComponents() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Components'] = $values; + } if ($object->isInitialized('version') && null !== $object->getVersion()) { $data['Version'] = $object->getVersion(); } @@ -139,11 +165,11 @@ public function normalize(mixed $object, string $format = null, array $context = } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\VersionGetResponse200::class => false]; + return [\Docker\API\Model\SystemVersion::class => false]; } } } else { - class VersionGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class SystemVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -151,11 +177,11 @@ class VersionGetResponse200Normalizer implements DenormalizerInterface, Normaliz use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\VersionGetResponse200::class; + return $type === \Docker\API\Model\SystemVersion::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\VersionGetResponse200::class; + return is_object($data) && get_class($data) === \Docker\API\Model\SystemVersion::class; } /** * @return mixed @@ -168,10 +194,26 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\VersionGetResponse200(); + $object = new \Docker\API\Model\SystemVersion(); if (null === $data || false === \is_array($data)) { return $object; } + if (\array_key_exists('Platform', $data) && $data['Platform'] !== null) { + $object->setPlatform($this->denormalizer->denormalize($data['Platform'], \Docker\API\Model\SystemVersionPlatform::class, 'json', $context)); + } + elseif (\array_key_exists('Platform', $data) && $data['Platform'] === null) { + $object->setPlatform(null); + } + if (\array_key_exists('Components', $data) && $data['Components'] !== null) { + $values = []; + foreach ($data['Components'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\SystemVersionComponentsItem::class, 'json', $context); + } + $object->setComponents($values); + } + elseif (\array_key_exists('Components', $data) && $data['Components'] === null) { + $object->setComponents(null); + } if (\array_key_exists('Version', $data) && $data['Version'] !== null) { $object->setVersion($data['Version']); } @@ -240,6 +282,16 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; + if ($object->isInitialized('platform') && null !== $object->getPlatform()) { + $data['Platform'] = $this->normalizer->normalize($object->getPlatform(), 'json', $context); + } + if ($object->isInitialized('components') && null !== $object->getComponents()) { + $values = []; + foreach ($object->getComponents() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Components'] = $values; + } if ($object->isInitialized('version') && null !== $object->getVersion()) { $data['Version'] = $object->getVersion(); } @@ -274,7 +326,7 @@ public function normalize($object, $format = null, array $context = []) } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\VersionGetResponse200::class => false]; + return [\Docker\API\Model\SystemVersion::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/NodeVersionNormalizer.php b/generated/Normalizer/SystemVersionPlatformNormalizer.php similarity index 69% rename from generated/Normalizer/NodeVersionNormalizer.php rename to generated/Normalizer/SystemVersionPlatformNormalizer.php index fe80c6498..97f6b28a4 100644 --- a/generated/Normalizer/NodeVersionNormalizer.php +++ b/generated/Normalizer/SystemVersionPlatformNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class NodeVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class SystemVersionPlatformNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class NodeVersionNormalizer implements DenormalizerInterface, NormalizerInterfac use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\NodeVersion::class; + return $type === \Docker\API\Model\SystemVersionPlatform::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\NodeVersion::class; + return is_object($data) && get_class($data) === \Docker\API\Model\SystemVersionPlatform::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,33 +36,31 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\NodeVersion(); + $object = new \Docker\API\Model\SystemVersionPlatform(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Index', $data) && $data['Index'] !== null) { - $object->setIndex($data['Index']); + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); } - elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { - $object->setIndex(null); + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('index') && null !== $object->getIndex()) { - $data['Index'] = $object->getIndex(); - } + $data['Name'] = $object->getName(); return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\NodeVersion::class => false]; + return [\Docker\API\Model\SystemVersionPlatform::class => false]; } } } else { - class NodeVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class SystemVersionPlatformNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -70,11 +68,11 @@ class NodeVersionNormalizer implements DenormalizerInterface, NormalizerInterfac use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\NodeVersion::class; + return $type === \Docker\API\Model\SystemVersionPlatform::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\NodeVersion::class; + return is_object($data) && get_class($data) === \Docker\API\Model\SystemVersionPlatform::class; } /** * @return mixed @@ -87,15 +85,15 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\NodeVersion(); + $object = new \Docker\API\Model\SystemVersionPlatform(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Index', $data) && $data['Index'] !== null) { - $object->setIndex($data['Index']); + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); } - elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { - $object->setIndex(null); + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); } return $object; } @@ -105,14 +103,12 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('index') && null !== $object->getIndex()) { - $data['Index'] = $object->getIndex(); - } + $data['Name'] = $object->getName(); return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\NodeVersion::class => false]; + return [\Docker\API\Model\SystemVersionPlatform::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/TLSInfoNormalizer.php b/generated/Normalizer/TLSInfoNormalizer.php new file mode 100644 index 000000000..7368e6029 --- /dev/null +++ b/generated/Normalizer/TLSInfoNormalizer.php @@ -0,0 +1,154 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TLSInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TLSInfo::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TLSInfo::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TLSInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('TrustRoot', $data) && $data['TrustRoot'] !== null) { + $object->setTrustRoot($data['TrustRoot']); + } + elseif (\array_key_exists('TrustRoot', $data) && $data['TrustRoot'] === null) { + $object->setTrustRoot(null); + } + if (\array_key_exists('CertIssuerSubject', $data) && $data['CertIssuerSubject'] !== null) { + $object->setCertIssuerSubject($data['CertIssuerSubject']); + } + elseif (\array_key_exists('CertIssuerSubject', $data) && $data['CertIssuerSubject'] === null) { + $object->setCertIssuerSubject(null); + } + if (\array_key_exists('CertIssuerPublicKey', $data) && $data['CertIssuerPublicKey'] !== null) { + $object->setCertIssuerPublicKey($data['CertIssuerPublicKey']); + } + elseif (\array_key_exists('CertIssuerPublicKey', $data) && $data['CertIssuerPublicKey'] === null) { + $object->setCertIssuerPublicKey(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('trustRoot') && null !== $object->getTrustRoot()) { + $data['TrustRoot'] = $object->getTrustRoot(); + } + if ($object->isInitialized('certIssuerSubject') && null !== $object->getCertIssuerSubject()) { + $data['CertIssuerSubject'] = $object->getCertIssuerSubject(); + } + if ($object->isInitialized('certIssuerPublicKey') && null !== $object->getCertIssuerPublicKey()) { + $data['CertIssuerPublicKey'] = $object->getCertIssuerPublicKey(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TLSInfo::class => false]; + } + } +} else { + class TLSInfoNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TLSInfo::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TLSInfo::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TLSInfo(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('TrustRoot', $data) && $data['TrustRoot'] !== null) { + $object->setTrustRoot($data['TrustRoot']); + } + elseif (\array_key_exists('TrustRoot', $data) && $data['TrustRoot'] === null) { + $object->setTrustRoot(null); + } + if (\array_key_exists('CertIssuerSubject', $data) && $data['CertIssuerSubject'] !== null) { + $object->setCertIssuerSubject($data['CertIssuerSubject']); + } + elseif (\array_key_exists('CertIssuerSubject', $data) && $data['CertIssuerSubject'] === null) { + $object->setCertIssuerSubject(null); + } + if (\array_key_exists('CertIssuerPublicKey', $data) && $data['CertIssuerPublicKey'] !== null) { + $object->setCertIssuerPublicKey($data['CertIssuerPublicKey']); + } + elseif (\array_key_exists('CertIssuerPublicKey', $data) && $data['CertIssuerPublicKey'] === null) { + $object->setCertIssuerPublicKey(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('trustRoot') && null !== $object->getTrustRoot()) { + $data['TrustRoot'] = $object->getTrustRoot(); + } + if ($object->isInitialized('certIssuerSubject') && null !== $object->getCertIssuerSubject()) { + $data['CertIssuerSubject'] = $object->getCertIssuerSubject(); + } + if ($object->isInitialized('certIssuerPublicKey') && null !== $object->getCertIssuerPublicKey()) { + $data['CertIssuerPublicKey'] = $object->getCertIssuerPublicKey(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TLSInfo::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskNormalizer.php b/generated/Normalizer/TaskNormalizer.php index 55ce9f925..9f96f4307 100644 --- a/generated/Normalizer/TaskNormalizer.php +++ b/generated/Normalizer/TaskNormalizer.php @@ -47,7 +47,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setID(null); } if (\array_key_exists('Version', $data) && $data['Version'] !== null) { - $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\TaskVersion::class, 'json', $context)); + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); } elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { $object->setVersion(null); @@ -104,6 +104,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('NodeID', $data) && $data['NodeID'] === null) { $object->setNodeID(null); } + if (\array_key_exists('AssignedGenericResources', $data) && $data['AssignedGenericResources'] !== null) { + $values_1 = []; + foreach ($data['AssignedGenericResources'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\GenericResourcesItem::class, 'json', $context); + } + $object->setAssignedGenericResources($values_1); + } + elseif (\array_key_exists('AssignedGenericResources', $data) && $data['AssignedGenericResources'] === null) { + $object->setAssignedGenericResources(null); + } if (\array_key_exists('Status', $data) && $data['Status'] !== null) { $object->setStatus($this->denormalizer->denormalize($data['Status'], \Docker\API\Model\TaskStatus::class, 'json', $context)); } @@ -116,6 +126,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('DesiredState', $data) && $data['DesiredState'] === null) { $object->setDesiredState(null); } + if (\array_key_exists('JobIteration', $data) && $data['JobIteration'] !== null) { + $object->setJobIteration($this->denormalizer->denormalize($data['JobIteration'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); + } + elseif (\array_key_exists('JobIteration', $data) && $data['JobIteration'] === null) { + $object->setJobIteration(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -155,12 +171,22 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('nodeID') && null !== $object->getNodeID()) { $data['NodeID'] = $object->getNodeID(); } + if ($object->isInitialized('assignedGenericResources') && null !== $object->getAssignedGenericResources()) { + $values_1 = []; + foreach ($object->getAssignedGenericResources() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['AssignedGenericResources'] = $values_1; + } if ($object->isInitialized('status') && null !== $object->getStatus()) { $data['Status'] = $this->normalizer->normalize($object->getStatus(), 'json', $context); } if ($object->isInitialized('desiredState') && null !== $object->getDesiredState()) { $data['DesiredState'] = $object->getDesiredState(); } + if ($object->isInitialized('jobIteration') && null !== $object->getJobIteration()) { + $data['JobIteration'] = $this->normalizer->normalize($object->getJobIteration(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -205,7 +231,7 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setID(null); } if (\array_key_exists('Version', $data) && $data['Version'] !== null) { - $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\TaskVersion::class, 'json', $context)); + $object->setVersion($this->denormalizer->denormalize($data['Version'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); } elseif (\array_key_exists('Version', $data) && $data['Version'] === null) { $object->setVersion(null); @@ -262,6 +288,16 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('NodeID', $data) && $data['NodeID'] === null) { $object->setNodeID(null); } + if (\array_key_exists('AssignedGenericResources', $data) && $data['AssignedGenericResources'] !== null) { + $values_1 = []; + foreach ($data['AssignedGenericResources'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\GenericResourcesItem::class, 'json', $context); + } + $object->setAssignedGenericResources($values_1); + } + elseif (\array_key_exists('AssignedGenericResources', $data) && $data['AssignedGenericResources'] === null) { + $object->setAssignedGenericResources(null); + } if (\array_key_exists('Status', $data) && $data['Status'] !== null) { $object->setStatus($this->denormalizer->denormalize($data['Status'], \Docker\API\Model\TaskStatus::class, 'json', $context)); } @@ -274,6 +310,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('DesiredState', $data) && $data['DesiredState'] === null) { $object->setDesiredState(null); } + if (\array_key_exists('JobIteration', $data) && $data['JobIteration'] !== null) { + $object->setJobIteration($this->denormalizer->denormalize($data['JobIteration'], \Docker\API\Model\ObjectVersion::class, 'json', $context)); + } + elseif (\array_key_exists('JobIteration', $data) && $data['JobIteration'] === null) { + $object->setJobIteration(null); + } return $object; } /** @@ -316,12 +358,22 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('nodeID') && null !== $object->getNodeID()) { $data['NodeID'] = $object->getNodeID(); } + if ($object->isInitialized('assignedGenericResources') && null !== $object->getAssignedGenericResources()) { + $values_1 = []; + foreach ($object->getAssignedGenericResources() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['AssignedGenericResources'] = $values_1; + } if ($object->isInitialized('status') && null !== $object->getStatus()) { $data['Status'] = $this->normalizer->normalize($object->getStatus(), 'json', $context); } if ($object->isInitialized('desiredState') && null !== $object->getDesiredState()) { $data['DesiredState'] = $object->getDesiredState(); } + if ($object->isInitialized('jobIteration') && null !== $object->getJobIteration()) { + $data['JobIteration'] = $this->normalizer->normalize($object->getJobIteration(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/TaskSpecContainerSpecConfigsItemFileNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecConfigsItemFileNormalizer.php new file mode 100644 index 000000000..f55a59687 --- /dev/null +++ b/generated/Normalizer/TaskSpecContainerSpecConfigsItemFileNormalizer.php @@ -0,0 +1,172 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecContainerSpecConfigsItemFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecConfigsItemFile::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecConfigsItemFile::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecConfigsItemFile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('UID', $data) && $data['UID'] !== null) { + $object->setUID($data['UID']); + } + elseif (\array_key_exists('UID', $data) && $data['UID'] === null) { + $object->setUID(null); + } + if (\array_key_exists('GID', $data) && $data['GID'] !== null) { + $object->setGID($data['GID']); + } + elseif (\array_key_exists('GID', $data) && $data['GID'] === null) { + $object->setGID(null); + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($data['Mode']); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('uID') && null !== $object->getUID()) { + $data['UID'] = $object->getUID(); + } + if ($object->isInitialized('gID') && null !== $object->getGID()) { + $data['GID'] = $object->getGID(); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $object->getMode(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecConfigsItemFile::class => false]; + } + } +} else { + class TaskSpecContainerSpecConfigsItemFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecConfigsItemFile::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecConfigsItemFile::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecConfigsItemFile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('UID', $data) && $data['UID'] !== null) { + $object->setUID($data['UID']); + } + elseif (\array_key_exists('UID', $data) && $data['UID'] === null) { + $object->setUID(null); + } + if (\array_key_exists('GID', $data) && $data['GID'] !== null) { + $object->setGID($data['GID']); + } + elseif (\array_key_exists('GID', $data) && $data['GID'] === null) { + $object->setGID(null); + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($data['Mode']); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('uID') && null !== $object->getUID()) { + $data['UID'] = $object->getUID(); + } + if ($object->isInitialized('gID') && null !== $object->getGID()) { + $data['GID'] = $object->getGID(); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $object->getMode(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecConfigsItemFile::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecContainerSpecConfigsItemNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecConfigsItemNormalizer.php new file mode 100644 index 000000000..12cc1c62e --- /dev/null +++ b/generated/Normalizer/TaskSpecContainerSpecConfigsItemNormalizer.php @@ -0,0 +1,172 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecContainerSpecConfigsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecConfigsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecConfigsItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecConfigsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('File', $data) && $data['File'] !== null) { + $object->setFile($this->denormalizer->denormalize($data['File'], \Docker\API\Model\TaskSpecContainerSpecConfigsItemFile::class, 'json', $context)); + } + elseif (\array_key_exists('File', $data) && $data['File'] === null) { + $object->setFile(null); + } + if (\array_key_exists('Runtime', $data) && $data['Runtime'] !== null) { + $object->setRuntime($data['Runtime']); + } + elseif (\array_key_exists('Runtime', $data) && $data['Runtime'] === null) { + $object->setRuntime(null); + } + if (\array_key_exists('ConfigID', $data) && $data['ConfigID'] !== null) { + $object->setConfigID($data['ConfigID']); + } + elseif (\array_key_exists('ConfigID', $data) && $data['ConfigID'] === null) { + $object->setConfigID(null); + } + if (\array_key_exists('ConfigName', $data) && $data['ConfigName'] !== null) { + $object->setConfigName($data['ConfigName']); + } + elseif (\array_key_exists('ConfigName', $data) && $data['ConfigName'] === null) { + $object->setConfigName(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('file') && null !== $object->getFile()) { + $data['File'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + } + if ($object->isInitialized('runtime') && null !== $object->getRuntime()) { + $data['Runtime'] = $object->getRuntime(); + } + if ($object->isInitialized('configID') && null !== $object->getConfigID()) { + $data['ConfigID'] = $object->getConfigID(); + } + if ($object->isInitialized('configName') && null !== $object->getConfigName()) { + $data['ConfigName'] = $object->getConfigName(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecConfigsItem::class => false]; + } + } +} else { + class TaskSpecContainerSpecConfigsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecConfigsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecConfigsItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecConfigsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('File', $data) && $data['File'] !== null) { + $object->setFile($this->denormalizer->denormalize($data['File'], \Docker\API\Model\TaskSpecContainerSpecConfigsItemFile::class, 'json', $context)); + } + elseif (\array_key_exists('File', $data) && $data['File'] === null) { + $object->setFile(null); + } + if (\array_key_exists('Runtime', $data) && $data['Runtime'] !== null) { + $object->setRuntime($data['Runtime']); + } + elseif (\array_key_exists('Runtime', $data) && $data['Runtime'] === null) { + $object->setRuntime(null); + } + if (\array_key_exists('ConfigID', $data) && $data['ConfigID'] !== null) { + $object->setConfigID($data['ConfigID']); + } + elseif (\array_key_exists('ConfigID', $data) && $data['ConfigID'] === null) { + $object->setConfigID(null); + } + if (\array_key_exists('ConfigName', $data) && $data['ConfigName'] !== null) { + $object->setConfigName($data['ConfigName']); + } + elseif (\array_key_exists('ConfigName', $data) && $data['ConfigName'] === null) { + $object->setConfigName(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('file') && null !== $object->getFile()) { + $data['File'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + } + if ($object->isInitialized('runtime') && null !== $object->getRuntime()) { + $data['Runtime'] = $object->getRuntime(); + } + if ($object->isInitialized('configID') && null !== $object->getConfigID()) { + $data['ConfigID'] = $object->getConfigID(); + } + if ($object->isInitialized('configName') && null !== $object->getConfigName()) { + $data['ConfigName'] = $object->getConfigName(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecConfigsItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecContainerSpecNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecNormalizer.php index 49dac86b8..2662308bd 100644 --- a/generated/Normalizer/TaskSpecContainerSpecNormalizer.php +++ b/generated/Normalizer/TaskSpecContainerSpecNormalizer.php @@ -46,32 +46,48 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { $object->setImage(null); } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } if (\array_key_exists('Command', $data) && $data['Command'] !== null) { - $values = []; - foreach ($data['Command'] as $value) { - $values[] = $value; + $values_1 = []; + foreach ($data['Command'] as $value_1) { + $values_1[] = $value_1; } - $object->setCommand($values); + $object->setCommand($values_1); } elseif (\array_key_exists('Command', $data) && $data['Command'] === null) { $object->setCommand(null); } if (\array_key_exists('Args', $data) && $data['Args'] !== null) { - $values_1 = []; - foreach ($data['Args'] as $value_1) { - $values_1[] = $value_1; + $values_2 = []; + foreach ($data['Args'] as $value_2) { + $values_2[] = $value_2; } - $object->setArgs($values_1); + $object->setArgs($values_2); } elseif (\array_key_exists('Args', $data) && $data['Args'] === null) { $object->setArgs(null); } + if (\array_key_exists('Hostname', $data) && $data['Hostname'] !== null) { + $object->setHostname($data['Hostname']); + } + elseif (\array_key_exists('Hostname', $data) && $data['Hostname'] === null) { + $object->setHostname(null); + } if (\array_key_exists('Env', $data) && $data['Env'] !== null) { - $values_2 = []; - foreach ($data['Env'] as $value_2) { - $values_2[] = $value_2; + $values_3 = []; + foreach ($data['Env'] as $value_3) { + $values_3[] = $value_3; } - $object->setEnv($values_2); + $object->setEnv($values_3); } elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { $object->setEnv(null); @@ -88,15 +104,21 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('User', $data) && $data['User'] === null) { $object->setUser(null); } - if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { - $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Labels'] as $key => $value_3) { - $values_3[$key] = $value_3; + if (\array_key_exists('Groups', $data) && $data['Groups'] !== null) { + $values_4 = []; + foreach ($data['Groups'] as $value_4) { + $values_4[] = $value_4; } - $object->setLabels($values_3); + $object->setGroups($values_4); } - elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { - $object->setLabels(null); + elseif (\array_key_exists('Groups', $data) && $data['Groups'] === null) { + $object->setGroups(null); + } + if (\array_key_exists('Privileges', $data) && $data['Privileges'] !== null) { + $object->setPrivileges($this->denormalizer->denormalize($data['Privileges'], \Docker\API\Model\TaskSpecContainerSpecPrivileges::class, 'json', $context)); + } + elseif (\array_key_exists('Privileges', $data) && $data['Privileges'] === null) { + $object->setPrivileges(null); } if (\array_key_exists('TTY', $data) && $data['TTY'] !== null) { $object->setTTY($data['TTY']); @@ -104,28 +126,140 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('TTY', $data) && $data['TTY'] === null) { $object->setTTY(null); } + if (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] !== null) { + $object->setOpenStdin($data['OpenStdin']); + } + elseif (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] === null) { + $object->setOpenStdin(null); + } + if (\array_key_exists('ReadOnly', $data) && $data['ReadOnly'] !== null) { + $object->setReadOnly($data['ReadOnly']); + } + elseif (\array_key_exists('ReadOnly', $data) && $data['ReadOnly'] === null) { + $object->setReadOnly(null); + } if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { - $values_4 = []; - foreach ($data['Mounts'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \Docker\API\Model\Mount::class, 'json', $context); + $values_5 = []; + foreach ($data['Mounts'] as $value_5) { + $values_5[] = $this->denormalizer->denormalize($value_5, \Docker\API\Model\Mount::class, 'json', $context); } - $object->setMounts($values_4); + $object->setMounts($values_5); } elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { $object->setMounts(null); } + if (\array_key_exists('StopSignal', $data) && $data['StopSignal'] !== null) { + $object->setStopSignal($data['StopSignal']); + } + elseif (\array_key_exists('StopSignal', $data) && $data['StopSignal'] === null) { + $object->setStopSignal(null); + } if (\array_key_exists('StopGracePeriod', $data) && $data['StopGracePeriod'] !== null) { $object->setStopGracePeriod($data['StopGracePeriod']); } elseif (\array_key_exists('StopGracePeriod', $data) && $data['StopGracePeriod'] === null) { $object->setStopGracePeriod(null); } + if (\array_key_exists('HealthCheck', $data) && $data['HealthCheck'] !== null) { + $object->setHealthCheck($this->denormalizer->denormalize($data['HealthCheck'], \Docker\API\Model\HealthConfig::class, 'json', $context)); + } + elseif (\array_key_exists('HealthCheck', $data) && $data['HealthCheck'] === null) { + $object->setHealthCheck(null); + } + if (\array_key_exists('Hosts', $data) && $data['Hosts'] !== null) { + $values_6 = []; + foreach ($data['Hosts'] as $value_6) { + $values_6[] = $value_6; + } + $object->setHosts($values_6); + } + elseif (\array_key_exists('Hosts', $data) && $data['Hosts'] === null) { + $object->setHosts(null); + } if (\array_key_exists('DNSConfig', $data) && $data['DNSConfig'] !== null) { $object->setDNSConfig($this->denormalizer->denormalize($data['DNSConfig'], \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class, 'json', $context)); } elseif (\array_key_exists('DNSConfig', $data) && $data['DNSConfig'] === null) { $object->setDNSConfig(null); } + if (\array_key_exists('Secrets', $data) && $data['Secrets'] !== null) { + $values_7 = []; + foreach ($data['Secrets'] as $value_7) { + $values_7[] = $this->denormalizer->denormalize($value_7, \Docker\API\Model\TaskSpecContainerSpecSecretsItem::class, 'json', $context); + } + $object->setSecrets($values_7); + } + elseif (\array_key_exists('Secrets', $data) && $data['Secrets'] === null) { + $object->setSecrets(null); + } + if (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] !== null) { + $object->setOomScoreAdj($data['OomScoreAdj']); + } + elseif (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] === null) { + $object->setOomScoreAdj(null); + } + if (\array_key_exists('Configs', $data) && $data['Configs'] !== null) { + $values_8 = []; + foreach ($data['Configs'] as $value_8) { + $values_8[] = $this->denormalizer->denormalize($value_8, \Docker\API\Model\TaskSpecContainerSpecConfigsItem::class, 'json', $context); + } + $object->setConfigs($values_8); + } + elseif (\array_key_exists('Configs', $data) && $data['Configs'] === null) { + $object->setConfigs(null); + } + if (\array_key_exists('Isolation', $data) && $data['Isolation'] !== null) { + $object->setIsolation($data['Isolation']); + } + elseif (\array_key_exists('Isolation', $data) && $data['Isolation'] === null) { + $object->setIsolation(null); + } + if (\array_key_exists('Init', $data) && $data['Init'] !== null) { + $object->setInit($data['Init']); + } + elseif (\array_key_exists('Init', $data) && $data['Init'] === null) { + $object->setInit(null); + } + if (\array_key_exists('Sysctls', $data) && $data['Sysctls'] !== null) { + $values_9 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Sysctls'] as $key_1 => $value_9) { + $values_9[$key_1] = $value_9; + } + $object->setSysctls($values_9); + } + elseif (\array_key_exists('Sysctls', $data) && $data['Sysctls'] === null) { + $object->setSysctls(null); + } + if (\array_key_exists('CapabilityAdd', $data) && $data['CapabilityAdd'] !== null) { + $values_10 = []; + foreach ($data['CapabilityAdd'] as $value_10) { + $values_10[] = $value_10; + } + $object->setCapabilityAdd($values_10); + } + elseif (\array_key_exists('CapabilityAdd', $data) && $data['CapabilityAdd'] === null) { + $object->setCapabilityAdd(null); + } + if (\array_key_exists('CapabilityDrop', $data) && $data['CapabilityDrop'] !== null) { + $values_11 = []; + foreach ($data['CapabilityDrop'] as $value_11) { + $values_11[] = $value_11; + } + $object->setCapabilityDrop($values_11); + } + elseif (\array_key_exists('CapabilityDrop', $data) && $data['CapabilityDrop'] === null) { + $object->setCapabilityDrop(null); + } + if (\array_key_exists('Ulimits', $data) && $data['Ulimits'] !== null) { + $values_12 = []; + foreach ($data['Ulimits'] as $value_12) { + $values_12[] = $this->denormalizer->denormalize($value_12, \Docker\API\Model\TaskSpecContainerSpecUlimitsItem::class, 'json', $context); + } + $object->setUlimits($values_12); + } + elseif (\array_key_exists('Ulimits', $data) && $data['Ulimits'] === null) { + $object->setUlimits(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -134,26 +268,36 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('image') && null !== $object->getImage()) { $data['Image'] = $object->getImage(); } - if ($object->isInitialized('command') && null !== $object->getCommand()) { + if ($object->isInitialized('labels') && null !== $object->getLabels()) { $values = []; - foreach ($object->getCommand() as $value) { - $values[] = $value; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; } - $data['Command'] = $values; + $data['Labels'] = $values; } - if ($object->isInitialized('args') && null !== $object->getArgs()) { + if ($object->isInitialized('command') && null !== $object->getCommand()) { $values_1 = []; - foreach ($object->getArgs() as $value_1) { + foreach ($object->getCommand() as $value_1) { $values_1[] = $value_1; } - $data['Args'] = $values_1; + $data['Command'] = $values_1; } - if ($object->isInitialized('env') && null !== $object->getEnv()) { + if ($object->isInitialized('args') && null !== $object->getArgs()) { $values_2 = []; - foreach ($object->getEnv() as $value_2) { + foreach ($object->getArgs() as $value_2) { $values_2[] = $value_2; } - $data['Env'] = $values_2; + $data['Args'] = $values_2; + } + if ($object->isInitialized('hostname') && null !== $object->getHostname()) { + $data['Hostname'] = $object->getHostname(); + } + if ($object->isInitialized('env') && null !== $object->getEnv()) { + $values_3 = []; + foreach ($object->getEnv() as $value_3) { + $values_3[] = $value_3; + } + $data['Env'] = $values_3; } if ($object->isInitialized('dir') && null !== $object->getDir()) { $data['Dir'] = $object->getDir(); @@ -161,29 +305,102 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('user') && null !== $object->getUser()) { $data['User'] = $object->getUser(); } - if ($object->isInitialized('labels') && null !== $object->getLabels()) { - $values_3 = []; - foreach ($object->getLabels() as $key => $value_3) { - $values_3[$key] = $value_3; + if ($object->isInitialized('groups') && null !== $object->getGroups()) { + $values_4 = []; + foreach ($object->getGroups() as $value_4) { + $values_4[] = $value_4; } - $data['Labels'] = $values_3; + $data['Groups'] = $values_4; + } + if ($object->isInitialized('privileges') && null !== $object->getPrivileges()) { + $data['Privileges'] = $this->normalizer->normalize($object->getPrivileges(), 'json', $context); } if ($object->isInitialized('tTY') && null !== $object->getTTY()) { $data['TTY'] = $object->getTTY(); } + if ($object->isInitialized('openStdin') && null !== $object->getOpenStdin()) { + $data['OpenStdin'] = $object->getOpenStdin(); + } + if ($object->isInitialized('readOnly') && null !== $object->getReadOnly()) { + $data['ReadOnly'] = $object->getReadOnly(); + } if ($object->isInitialized('mounts') && null !== $object->getMounts()) { - $values_4 = []; - foreach ($object->getMounts() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + $values_5 = []; + foreach ($object->getMounts() as $value_5) { + $values_5[] = $this->normalizer->normalize($value_5, 'json', $context); } - $data['Mounts'] = $values_4; + $data['Mounts'] = $values_5; + } + if ($object->isInitialized('stopSignal') && null !== $object->getStopSignal()) { + $data['StopSignal'] = $object->getStopSignal(); } if ($object->isInitialized('stopGracePeriod') && null !== $object->getStopGracePeriod()) { $data['StopGracePeriod'] = $object->getStopGracePeriod(); } + if ($object->isInitialized('healthCheck') && null !== $object->getHealthCheck()) { + $data['HealthCheck'] = $this->normalizer->normalize($object->getHealthCheck(), 'json', $context); + } + if ($object->isInitialized('hosts') && null !== $object->getHosts()) { + $values_6 = []; + foreach ($object->getHosts() as $value_6) { + $values_6[] = $value_6; + } + $data['Hosts'] = $values_6; + } if ($object->isInitialized('dNSConfig') && null !== $object->getDNSConfig()) { $data['DNSConfig'] = $this->normalizer->normalize($object->getDNSConfig(), 'json', $context); } + if ($object->isInitialized('secrets') && null !== $object->getSecrets()) { + $values_7 = []; + foreach ($object->getSecrets() as $value_7) { + $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); + } + $data['Secrets'] = $values_7; + } + if ($object->isInitialized('oomScoreAdj') && null !== $object->getOomScoreAdj()) { + $data['OomScoreAdj'] = $object->getOomScoreAdj(); + } + if ($object->isInitialized('configs') && null !== $object->getConfigs()) { + $values_8 = []; + foreach ($object->getConfigs() as $value_8) { + $values_8[] = $this->normalizer->normalize($value_8, 'json', $context); + } + $data['Configs'] = $values_8; + } + if ($object->isInitialized('isolation') && null !== $object->getIsolation()) { + $data['Isolation'] = $object->getIsolation(); + } + if ($object->isInitialized('init') && null !== $object->getInit()) { + $data['Init'] = $object->getInit(); + } + if ($object->isInitialized('sysctls') && null !== $object->getSysctls()) { + $values_9 = []; + foreach ($object->getSysctls() as $key_1 => $value_9) { + $values_9[$key_1] = $value_9; + } + $data['Sysctls'] = $values_9; + } + if ($object->isInitialized('capabilityAdd') && null !== $object->getCapabilityAdd()) { + $values_10 = []; + foreach ($object->getCapabilityAdd() as $value_10) { + $values_10[] = $value_10; + } + $data['CapabilityAdd'] = $values_10; + } + if ($object->isInitialized('capabilityDrop') && null !== $object->getCapabilityDrop()) { + $values_11 = []; + foreach ($object->getCapabilityDrop() as $value_11) { + $values_11[] = $value_11; + } + $data['CapabilityDrop'] = $values_11; + } + if ($object->isInitialized('ulimits') && null !== $object->getUlimits()) { + $values_12 = []; + foreach ($object->getUlimits() as $value_12) { + $values_12[] = $this->normalizer->normalize($value_12, 'json', $context); + } + $data['Ulimits'] = $values_12; + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -227,32 +444,48 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Image', $data) && $data['Image'] === null) { $object->setImage(null); } + if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { + $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Labels'] as $key => $value) { + $values[$key] = $value; + } + $object->setLabels($values); + } + elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { + $object->setLabels(null); + } if (\array_key_exists('Command', $data) && $data['Command'] !== null) { - $values = []; - foreach ($data['Command'] as $value) { - $values[] = $value; + $values_1 = []; + foreach ($data['Command'] as $value_1) { + $values_1[] = $value_1; } - $object->setCommand($values); + $object->setCommand($values_1); } elseif (\array_key_exists('Command', $data) && $data['Command'] === null) { $object->setCommand(null); } if (\array_key_exists('Args', $data) && $data['Args'] !== null) { - $values_1 = []; - foreach ($data['Args'] as $value_1) { - $values_1[] = $value_1; + $values_2 = []; + foreach ($data['Args'] as $value_2) { + $values_2[] = $value_2; } - $object->setArgs($values_1); + $object->setArgs($values_2); } elseif (\array_key_exists('Args', $data) && $data['Args'] === null) { $object->setArgs(null); } + if (\array_key_exists('Hostname', $data) && $data['Hostname'] !== null) { + $object->setHostname($data['Hostname']); + } + elseif (\array_key_exists('Hostname', $data) && $data['Hostname'] === null) { + $object->setHostname(null); + } if (\array_key_exists('Env', $data) && $data['Env'] !== null) { - $values_2 = []; - foreach ($data['Env'] as $value_2) { - $values_2[] = $value_2; + $values_3 = []; + foreach ($data['Env'] as $value_3) { + $values_3[] = $value_3; } - $object->setEnv($values_2); + $object->setEnv($values_3); } elseif (\array_key_exists('Env', $data) && $data['Env'] === null) { $object->setEnv(null); @@ -269,15 +502,21 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('User', $data) && $data['User'] === null) { $object->setUser(null); } - if (\array_key_exists('Labels', $data) && $data['Labels'] !== null) { - $values_3 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); - foreach ($data['Labels'] as $key => $value_3) { - $values_3[$key] = $value_3; + if (\array_key_exists('Groups', $data) && $data['Groups'] !== null) { + $values_4 = []; + foreach ($data['Groups'] as $value_4) { + $values_4[] = $value_4; } - $object->setLabels($values_3); + $object->setGroups($values_4); } - elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { - $object->setLabels(null); + elseif (\array_key_exists('Groups', $data) && $data['Groups'] === null) { + $object->setGroups(null); + } + if (\array_key_exists('Privileges', $data) && $data['Privileges'] !== null) { + $object->setPrivileges($this->denormalizer->denormalize($data['Privileges'], \Docker\API\Model\TaskSpecContainerSpecPrivileges::class, 'json', $context)); + } + elseif (\array_key_exists('Privileges', $data) && $data['Privileges'] === null) { + $object->setPrivileges(null); } if (\array_key_exists('TTY', $data) && $data['TTY'] !== null) { $object->setTTY($data['TTY']); @@ -285,28 +524,140 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('TTY', $data) && $data['TTY'] === null) { $object->setTTY(null); } + if (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] !== null) { + $object->setOpenStdin($data['OpenStdin']); + } + elseif (\array_key_exists('OpenStdin', $data) && $data['OpenStdin'] === null) { + $object->setOpenStdin(null); + } + if (\array_key_exists('ReadOnly', $data) && $data['ReadOnly'] !== null) { + $object->setReadOnly($data['ReadOnly']); + } + elseif (\array_key_exists('ReadOnly', $data) && $data['ReadOnly'] === null) { + $object->setReadOnly(null); + } if (\array_key_exists('Mounts', $data) && $data['Mounts'] !== null) { - $values_4 = []; - foreach ($data['Mounts'] as $value_4) { - $values_4[] = $this->denormalizer->denormalize($value_4, \Docker\API\Model\Mount::class, 'json', $context); + $values_5 = []; + foreach ($data['Mounts'] as $value_5) { + $values_5[] = $this->denormalizer->denormalize($value_5, \Docker\API\Model\Mount::class, 'json', $context); } - $object->setMounts($values_4); + $object->setMounts($values_5); } elseif (\array_key_exists('Mounts', $data) && $data['Mounts'] === null) { $object->setMounts(null); } + if (\array_key_exists('StopSignal', $data) && $data['StopSignal'] !== null) { + $object->setStopSignal($data['StopSignal']); + } + elseif (\array_key_exists('StopSignal', $data) && $data['StopSignal'] === null) { + $object->setStopSignal(null); + } if (\array_key_exists('StopGracePeriod', $data) && $data['StopGracePeriod'] !== null) { $object->setStopGracePeriod($data['StopGracePeriod']); } elseif (\array_key_exists('StopGracePeriod', $data) && $data['StopGracePeriod'] === null) { $object->setStopGracePeriod(null); } + if (\array_key_exists('HealthCheck', $data) && $data['HealthCheck'] !== null) { + $object->setHealthCheck($this->denormalizer->denormalize($data['HealthCheck'], \Docker\API\Model\HealthConfig::class, 'json', $context)); + } + elseif (\array_key_exists('HealthCheck', $data) && $data['HealthCheck'] === null) { + $object->setHealthCheck(null); + } + if (\array_key_exists('Hosts', $data) && $data['Hosts'] !== null) { + $values_6 = []; + foreach ($data['Hosts'] as $value_6) { + $values_6[] = $value_6; + } + $object->setHosts($values_6); + } + elseif (\array_key_exists('Hosts', $data) && $data['Hosts'] === null) { + $object->setHosts(null); + } if (\array_key_exists('DNSConfig', $data) && $data['DNSConfig'] !== null) { $object->setDNSConfig($this->denormalizer->denormalize($data['DNSConfig'], \Docker\API\Model\TaskSpecContainerSpecDNSConfig::class, 'json', $context)); } elseif (\array_key_exists('DNSConfig', $data) && $data['DNSConfig'] === null) { $object->setDNSConfig(null); } + if (\array_key_exists('Secrets', $data) && $data['Secrets'] !== null) { + $values_7 = []; + foreach ($data['Secrets'] as $value_7) { + $values_7[] = $this->denormalizer->denormalize($value_7, \Docker\API\Model\TaskSpecContainerSpecSecretsItem::class, 'json', $context); + } + $object->setSecrets($values_7); + } + elseif (\array_key_exists('Secrets', $data) && $data['Secrets'] === null) { + $object->setSecrets(null); + } + if (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] !== null) { + $object->setOomScoreAdj($data['OomScoreAdj']); + } + elseif (\array_key_exists('OomScoreAdj', $data) && $data['OomScoreAdj'] === null) { + $object->setOomScoreAdj(null); + } + if (\array_key_exists('Configs', $data) && $data['Configs'] !== null) { + $values_8 = []; + foreach ($data['Configs'] as $value_8) { + $values_8[] = $this->denormalizer->denormalize($value_8, \Docker\API\Model\TaskSpecContainerSpecConfigsItem::class, 'json', $context); + } + $object->setConfigs($values_8); + } + elseif (\array_key_exists('Configs', $data) && $data['Configs'] === null) { + $object->setConfigs(null); + } + if (\array_key_exists('Isolation', $data) && $data['Isolation'] !== null) { + $object->setIsolation($data['Isolation']); + } + elseif (\array_key_exists('Isolation', $data) && $data['Isolation'] === null) { + $object->setIsolation(null); + } + if (\array_key_exists('Init', $data) && $data['Init'] !== null) { + $object->setInit($data['Init']); + } + elseif (\array_key_exists('Init', $data) && $data['Init'] === null) { + $object->setInit(null); + } + if (\array_key_exists('Sysctls', $data) && $data['Sysctls'] !== null) { + $values_9 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); + foreach ($data['Sysctls'] as $key_1 => $value_9) { + $values_9[$key_1] = $value_9; + } + $object->setSysctls($values_9); + } + elseif (\array_key_exists('Sysctls', $data) && $data['Sysctls'] === null) { + $object->setSysctls(null); + } + if (\array_key_exists('CapabilityAdd', $data) && $data['CapabilityAdd'] !== null) { + $values_10 = []; + foreach ($data['CapabilityAdd'] as $value_10) { + $values_10[] = $value_10; + } + $object->setCapabilityAdd($values_10); + } + elseif (\array_key_exists('CapabilityAdd', $data) && $data['CapabilityAdd'] === null) { + $object->setCapabilityAdd(null); + } + if (\array_key_exists('CapabilityDrop', $data) && $data['CapabilityDrop'] !== null) { + $values_11 = []; + foreach ($data['CapabilityDrop'] as $value_11) { + $values_11[] = $value_11; + } + $object->setCapabilityDrop($values_11); + } + elseif (\array_key_exists('CapabilityDrop', $data) && $data['CapabilityDrop'] === null) { + $object->setCapabilityDrop(null); + } + if (\array_key_exists('Ulimits', $data) && $data['Ulimits'] !== null) { + $values_12 = []; + foreach ($data['Ulimits'] as $value_12) { + $values_12[] = $this->denormalizer->denormalize($value_12, \Docker\API\Model\TaskSpecContainerSpecUlimitsItem::class, 'json', $context); + } + $object->setUlimits($values_12); + } + elseif (\array_key_exists('Ulimits', $data) && $data['Ulimits'] === null) { + $object->setUlimits(null); + } return $object; } /** @@ -318,26 +669,36 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('image') && null !== $object->getImage()) { $data['Image'] = $object->getImage(); } - if ($object->isInitialized('command') && null !== $object->getCommand()) { + if ($object->isInitialized('labels') && null !== $object->getLabels()) { $values = []; - foreach ($object->getCommand() as $value) { - $values[] = $value; + foreach ($object->getLabels() as $key => $value) { + $values[$key] = $value; } - $data['Command'] = $values; + $data['Labels'] = $values; } - if ($object->isInitialized('args') && null !== $object->getArgs()) { + if ($object->isInitialized('command') && null !== $object->getCommand()) { $values_1 = []; - foreach ($object->getArgs() as $value_1) { + foreach ($object->getCommand() as $value_1) { $values_1[] = $value_1; } - $data['Args'] = $values_1; + $data['Command'] = $values_1; } - if ($object->isInitialized('env') && null !== $object->getEnv()) { + if ($object->isInitialized('args') && null !== $object->getArgs()) { $values_2 = []; - foreach ($object->getEnv() as $value_2) { + foreach ($object->getArgs() as $value_2) { $values_2[] = $value_2; } - $data['Env'] = $values_2; + $data['Args'] = $values_2; + } + if ($object->isInitialized('hostname') && null !== $object->getHostname()) { + $data['Hostname'] = $object->getHostname(); + } + if ($object->isInitialized('env') && null !== $object->getEnv()) { + $values_3 = []; + foreach ($object->getEnv() as $value_3) { + $values_3[] = $value_3; + } + $data['Env'] = $values_3; } if ($object->isInitialized('dir') && null !== $object->getDir()) { $data['Dir'] = $object->getDir(); @@ -345,29 +706,102 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('user') && null !== $object->getUser()) { $data['User'] = $object->getUser(); } - if ($object->isInitialized('labels') && null !== $object->getLabels()) { - $values_3 = []; - foreach ($object->getLabels() as $key => $value_3) { - $values_3[$key] = $value_3; + if ($object->isInitialized('groups') && null !== $object->getGroups()) { + $values_4 = []; + foreach ($object->getGroups() as $value_4) { + $values_4[] = $value_4; } - $data['Labels'] = $values_3; + $data['Groups'] = $values_4; + } + if ($object->isInitialized('privileges') && null !== $object->getPrivileges()) { + $data['Privileges'] = $this->normalizer->normalize($object->getPrivileges(), 'json', $context); } if ($object->isInitialized('tTY') && null !== $object->getTTY()) { $data['TTY'] = $object->getTTY(); } + if ($object->isInitialized('openStdin') && null !== $object->getOpenStdin()) { + $data['OpenStdin'] = $object->getOpenStdin(); + } + if ($object->isInitialized('readOnly') && null !== $object->getReadOnly()) { + $data['ReadOnly'] = $object->getReadOnly(); + } if ($object->isInitialized('mounts') && null !== $object->getMounts()) { - $values_4 = []; - foreach ($object->getMounts() as $value_4) { - $values_4[] = $this->normalizer->normalize($value_4, 'json', $context); + $values_5 = []; + foreach ($object->getMounts() as $value_5) { + $values_5[] = $this->normalizer->normalize($value_5, 'json', $context); } - $data['Mounts'] = $values_4; + $data['Mounts'] = $values_5; + } + if ($object->isInitialized('stopSignal') && null !== $object->getStopSignal()) { + $data['StopSignal'] = $object->getStopSignal(); } if ($object->isInitialized('stopGracePeriod') && null !== $object->getStopGracePeriod()) { $data['StopGracePeriod'] = $object->getStopGracePeriod(); } + if ($object->isInitialized('healthCheck') && null !== $object->getHealthCheck()) { + $data['HealthCheck'] = $this->normalizer->normalize($object->getHealthCheck(), 'json', $context); + } + if ($object->isInitialized('hosts') && null !== $object->getHosts()) { + $values_6 = []; + foreach ($object->getHosts() as $value_6) { + $values_6[] = $value_6; + } + $data['Hosts'] = $values_6; + } if ($object->isInitialized('dNSConfig') && null !== $object->getDNSConfig()) { $data['DNSConfig'] = $this->normalizer->normalize($object->getDNSConfig(), 'json', $context); } + if ($object->isInitialized('secrets') && null !== $object->getSecrets()) { + $values_7 = []; + foreach ($object->getSecrets() as $value_7) { + $values_7[] = $this->normalizer->normalize($value_7, 'json', $context); + } + $data['Secrets'] = $values_7; + } + if ($object->isInitialized('oomScoreAdj') && null !== $object->getOomScoreAdj()) { + $data['OomScoreAdj'] = $object->getOomScoreAdj(); + } + if ($object->isInitialized('configs') && null !== $object->getConfigs()) { + $values_8 = []; + foreach ($object->getConfigs() as $value_8) { + $values_8[] = $this->normalizer->normalize($value_8, 'json', $context); + } + $data['Configs'] = $values_8; + } + if ($object->isInitialized('isolation') && null !== $object->getIsolation()) { + $data['Isolation'] = $object->getIsolation(); + } + if ($object->isInitialized('init') && null !== $object->getInit()) { + $data['Init'] = $object->getInit(); + } + if ($object->isInitialized('sysctls') && null !== $object->getSysctls()) { + $values_9 = []; + foreach ($object->getSysctls() as $key_1 => $value_9) { + $values_9[$key_1] = $value_9; + } + $data['Sysctls'] = $values_9; + } + if ($object->isInitialized('capabilityAdd') && null !== $object->getCapabilityAdd()) { + $values_10 = []; + foreach ($object->getCapabilityAdd() as $value_10) { + $values_10[] = $value_10; + } + $data['CapabilityAdd'] = $values_10; + } + if ($object->isInitialized('capabilityDrop') && null !== $object->getCapabilityDrop()) { + $values_11 = []; + foreach ($object->getCapabilityDrop() as $value_11) { + $values_11[] = $value_11; + } + $data['CapabilityDrop'] = $values_11; + } + if ($object->isInitialized('ulimits') && null !== $object->getUlimits()) { + $values_12 = []; + foreach ($object->getUlimits() as $value_12) { + $values_12[] = $this->normalizer->normalize($value_12, 'json', $context); + } + $data['Ulimits'] = $values_12; + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/TaskSpecContainerSpecPrivilegesAppArmorNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecPrivilegesAppArmorNormalizer.php new file mode 100644 index 000000000..eba7f7481 --- /dev/null +++ b/generated/Normalizer/TaskSpecContainerSpecPrivilegesAppArmorNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecContainerSpecPrivilegesAppArmorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecPrivilegesAppArmor::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecPrivilegesAppArmor::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecPrivilegesAppArmor(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($data['Mode']); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $object->getMode(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecPrivilegesAppArmor::class => false]; + } + } +} else { + class TaskSpecContainerSpecPrivilegesAppArmorNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecPrivilegesAppArmor::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecPrivilegesAppArmor::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecPrivilegesAppArmor(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($data['Mode']); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $object->getMode(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecPrivilegesAppArmor::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecContainerSpecPrivilegesCredentialSpecNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecPrivilegesCredentialSpecNormalizer.php new file mode 100644 index 000000000..17e775b21 --- /dev/null +++ b/generated/Normalizer/TaskSpecContainerSpecPrivilegesCredentialSpecNormalizer.php @@ -0,0 +1,154 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecContainerSpecPrivilegesCredentialSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecPrivilegesCredentialSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecPrivilegesCredentialSpec::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecPrivilegesCredentialSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Config', $data) && $data['Config'] !== null) { + $object->setConfig($data['Config']); + } + elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { + $object->setConfig(null); + } + if (\array_key_exists('File', $data) && $data['File'] !== null) { + $object->setFile($data['File']); + } + elseif (\array_key_exists('File', $data) && $data['File'] === null) { + $object->setFile(null); + } + if (\array_key_exists('Registry', $data) && $data['Registry'] !== null) { + $object->setRegistry($data['Registry']); + } + elseif (\array_key_exists('Registry', $data) && $data['Registry'] === null) { + $object->setRegistry(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('config') && null !== $object->getConfig()) { + $data['Config'] = $object->getConfig(); + } + if ($object->isInitialized('file') && null !== $object->getFile()) { + $data['File'] = $object->getFile(); + } + if ($object->isInitialized('registry') && null !== $object->getRegistry()) { + $data['Registry'] = $object->getRegistry(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecPrivilegesCredentialSpec::class => false]; + } + } +} else { + class TaskSpecContainerSpecPrivilegesCredentialSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecPrivilegesCredentialSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecPrivilegesCredentialSpec::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecPrivilegesCredentialSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Config', $data) && $data['Config'] !== null) { + $object->setConfig($data['Config']); + } + elseif (\array_key_exists('Config', $data) && $data['Config'] === null) { + $object->setConfig(null); + } + if (\array_key_exists('File', $data) && $data['File'] !== null) { + $object->setFile($data['File']); + } + elseif (\array_key_exists('File', $data) && $data['File'] === null) { + $object->setFile(null); + } + if (\array_key_exists('Registry', $data) && $data['Registry'] !== null) { + $object->setRegistry($data['Registry']); + } + elseif (\array_key_exists('Registry', $data) && $data['Registry'] === null) { + $object->setRegistry(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('config') && null !== $object->getConfig()) { + $data['Config'] = $object->getConfig(); + } + if ($object->isInitialized('file') && null !== $object->getFile()) { + $data['File'] = $object->getFile(); + } + if ($object->isInitialized('registry') && null !== $object->getRegistry()) { + $data['Registry'] = $object->getRegistry(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecPrivilegesCredentialSpec::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecContainerSpecPrivilegesNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecPrivilegesNormalizer.php new file mode 100644 index 000000000..4f03ae033 --- /dev/null +++ b/generated/Normalizer/TaskSpecContainerSpecPrivilegesNormalizer.php @@ -0,0 +1,190 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecContainerSpecPrivilegesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecPrivileges::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecPrivileges::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecPrivileges(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('CredentialSpec', $data) && $data['CredentialSpec'] !== null) { + $object->setCredentialSpec($this->denormalizer->denormalize($data['CredentialSpec'], \Docker\API\Model\TaskSpecContainerSpecPrivilegesCredentialSpec::class, 'json', $context)); + } + elseif (\array_key_exists('CredentialSpec', $data) && $data['CredentialSpec'] === null) { + $object->setCredentialSpec(null); + } + if (\array_key_exists('SELinuxContext', $data) && $data['SELinuxContext'] !== null) { + $object->setSELinuxContext($this->denormalizer->denormalize($data['SELinuxContext'], \Docker\API\Model\TaskSpecContainerSpecPrivilegesSELinuxContext::class, 'json', $context)); + } + elseif (\array_key_exists('SELinuxContext', $data) && $data['SELinuxContext'] === null) { + $object->setSELinuxContext(null); + } + if (\array_key_exists('Seccomp', $data) && $data['Seccomp'] !== null) { + $object->setSeccomp($this->denormalizer->denormalize($data['Seccomp'], \Docker\API\Model\TaskSpecContainerSpecPrivilegesSeccomp::class, 'json', $context)); + } + elseif (\array_key_exists('Seccomp', $data) && $data['Seccomp'] === null) { + $object->setSeccomp(null); + } + if (\array_key_exists('AppArmor', $data) && $data['AppArmor'] !== null) { + $object->setAppArmor($this->denormalizer->denormalize($data['AppArmor'], \Docker\API\Model\TaskSpecContainerSpecPrivilegesAppArmor::class, 'json', $context)); + } + elseif (\array_key_exists('AppArmor', $data) && $data['AppArmor'] === null) { + $object->setAppArmor(null); + } + if (\array_key_exists('NoNewPrivileges', $data) && $data['NoNewPrivileges'] !== null) { + $object->setNoNewPrivileges($data['NoNewPrivileges']); + } + elseif (\array_key_exists('NoNewPrivileges', $data) && $data['NoNewPrivileges'] === null) { + $object->setNoNewPrivileges(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('credentialSpec') && null !== $object->getCredentialSpec()) { + $data['CredentialSpec'] = $this->normalizer->normalize($object->getCredentialSpec(), 'json', $context); + } + if ($object->isInitialized('sELinuxContext') && null !== $object->getSELinuxContext()) { + $data['SELinuxContext'] = $this->normalizer->normalize($object->getSELinuxContext(), 'json', $context); + } + if ($object->isInitialized('seccomp') && null !== $object->getSeccomp()) { + $data['Seccomp'] = $this->normalizer->normalize($object->getSeccomp(), 'json', $context); + } + if ($object->isInitialized('appArmor') && null !== $object->getAppArmor()) { + $data['AppArmor'] = $this->normalizer->normalize($object->getAppArmor(), 'json', $context); + } + if ($object->isInitialized('noNewPrivileges') && null !== $object->getNoNewPrivileges()) { + $data['NoNewPrivileges'] = $object->getNoNewPrivileges(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecPrivileges::class => false]; + } + } +} else { + class TaskSpecContainerSpecPrivilegesNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecPrivileges::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecPrivileges::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecPrivileges(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('CredentialSpec', $data) && $data['CredentialSpec'] !== null) { + $object->setCredentialSpec($this->denormalizer->denormalize($data['CredentialSpec'], \Docker\API\Model\TaskSpecContainerSpecPrivilegesCredentialSpec::class, 'json', $context)); + } + elseif (\array_key_exists('CredentialSpec', $data) && $data['CredentialSpec'] === null) { + $object->setCredentialSpec(null); + } + if (\array_key_exists('SELinuxContext', $data) && $data['SELinuxContext'] !== null) { + $object->setSELinuxContext($this->denormalizer->denormalize($data['SELinuxContext'], \Docker\API\Model\TaskSpecContainerSpecPrivilegesSELinuxContext::class, 'json', $context)); + } + elseif (\array_key_exists('SELinuxContext', $data) && $data['SELinuxContext'] === null) { + $object->setSELinuxContext(null); + } + if (\array_key_exists('Seccomp', $data) && $data['Seccomp'] !== null) { + $object->setSeccomp($this->denormalizer->denormalize($data['Seccomp'], \Docker\API\Model\TaskSpecContainerSpecPrivilegesSeccomp::class, 'json', $context)); + } + elseif (\array_key_exists('Seccomp', $data) && $data['Seccomp'] === null) { + $object->setSeccomp(null); + } + if (\array_key_exists('AppArmor', $data) && $data['AppArmor'] !== null) { + $object->setAppArmor($this->denormalizer->denormalize($data['AppArmor'], \Docker\API\Model\TaskSpecContainerSpecPrivilegesAppArmor::class, 'json', $context)); + } + elseif (\array_key_exists('AppArmor', $data) && $data['AppArmor'] === null) { + $object->setAppArmor(null); + } + if (\array_key_exists('NoNewPrivileges', $data) && $data['NoNewPrivileges'] !== null) { + $object->setNoNewPrivileges($data['NoNewPrivileges']); + } + elseif (\array_key_exists('NoNewPrivileges', $data) && $data['NoNewPrivileges'] === null) { + $object->setNoNewPrivileges(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('credentialSpec') && null !== $object->getCredentialSpec()) { + $data['CredentialSpec'] = $this->normalizer->normalize($object->getCredentialSpec(), 'json', $context); + } + if ($object->isInitialized('sELinuxContext') && null !== $object->getSELinuxContext()) { + $data['SELinuxContext'] = $this->normalizer->normalize($object->getSELinuxContext(), 'json', $context); + } + if ($object->isInitialized('seccomp') && null !== $object->getSeccomp()) { + $data['Seccomp'] = $this->normalizer->normalize($object->getSeccomp(), 'json', $context); + } + if ($object->isInitialized('appArmor') && null !== $object->getAppArmor()) { + $data['AppArmor'] = $this->normalizer->normalize($object->getAppArmor(), 'json', $context); + } + if ($object->isInitialized('noNewPrivileges') && null !== $object->getNoNewPrivileges()) { + $data['NoNewPrivileges'] = $object->getNoNewPrivileges(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecPrivileges::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecContainerSpecPrivilegesSELinuxContextNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecPrivilegesSELinuxContextNormalizer.php new file mode 100644 index 000000000..1ae8af5a1 --- /dev/null +++ b/generated/Normalizer/TaskSpecContainerSpecPrivilegesSELinuxContextNormalizer.php @@ -0,0 +1,190 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecContainerSpecPrivilegesSELinuxContextNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecPrivilegesSELinuxContext::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecPrivilegesSELinuxContext::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecPrivilegesSELinuxContext(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Disable', $data) && $data['Disable'] !== null) { + $object->setDisable($data['Disable']); + } + elseif (\array_key_exists('Disable', $data) && $data['Disable'] === null) { + $object->setDisable(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($data['User']); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + if (\array_key_exists('Role', $data) && $data['Role'] !== null) { + $object->setRole($data['Role']); + } + elseif (\array_key_exists('Role', $data) && $data['Role'] === null) { + $object->setRole(null); + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Level', $data) && $data['Level'] !== null) { + $object->setLevel($data['Level']); + } + elseif (\array_key_exists('Level', $data) && $data['Level'] === null) { + $object->setLevel(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('disable') && null !== $object->getDisable()) { + $data['Disable'] = $object->getDisable(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $object->getUser(); + } + if ($object->isInitialized('role') && null !== $object->getRole()) { + $data['Role'] = $object->getRole(); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('level') && null !== $object->getLevel()) { + $data['Level'] = $object->getLevel(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecPrivilegesSELinuxContext::class => false]; + } + } +} else { + class TaskSpecContainerSpecPrivilegesSELinuxContextNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecPrivilegesSELinuxContext::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecPrivilegesSELinuxContext::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecPrivilegesSELinuxContext(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Disable', $data) && $data['Disable'] !== null) { + $object->setDisable($data['Disable']); + } + elseif (\array_key_exists('Disable', $data) && $data['Disable'] === null) { + $object->setDisable(null); + } + if (\array_key_exists('User', $data) && $data['User'] !== null) { + $object->setUser($data['User']); + } + elseif (\array_key_exists('User', $data) && $data['User'] === null) { + $object->setUser(null); + } + if (\array_key_exists('Role', $data) && $data['Role'] !== null) { + $object->setRole($data['Role']); + } + elseif (\array_key_exists('Role', $data) && $data['Role'] === null) { + $object->setRole(null); + } + if (\array_key_exists('Type', $data) && $data['Type'] !== null) { + $object->setType($data['Type']); + } + elseif (\array_key_exists('Type', $data) && $data['Type'] === null) { + $object->setType(null); + } + if (\array_key_exists('Level', $data) && $data['Level'] !== null) { + $object->setLevel($data['Level']); + } + elseif (\array_key_exists('Level', $data) && $data['Level'] === null) { + $object->setLevel(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('disable') && null !== $object->getDisable()) { + $data['Disable'] = $object->getDisable(); + } + if ($object->isInitialized('user') && null !== $object->getUser()) { + $data['User'] = $object->getUser(); + } + if ($object->isInitialized('role') && null !== $object->getRole()) { + $data['Role'] = $object->getRole(); + } + if ($object->isInitialized('type') && null !== $object->getType()) { + $data['Type'] = $object->getType(); + } + if ($object->isInitialized('level') && null !== $object->getLevel()) { + $data['Level'] = $object->getLevel(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecPrivilegesSELinuxContext::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecContainerSpecPrivilegesSeccompNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecPrivilegesSeccompNormalizer.php new file mode 100644 index 000000000..d4d5657bd --- /dev/null +++ b/generated/Normalizer/TaskSpecContainerSpecPrivilegesSeccompNormalizer.php @@ -0,0 +1,136 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecContainerSpecPrivilegesSeccompNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecPrivilegesSeccomp::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecPrivilegesSeccomp::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecPrivilegesSeccomp(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($data['Mode']); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + if (\array_key_exists('Profile', $data) && $data['Profile'] !== null) { + $object->setProfile($data['Profile']); + } + elseif (\array_key_exists('Profile', $data) && $data['Profile'] === null) { + $object->setProfile(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $object->getMode(); + } + if ($object->isInitialized('profile') && null !== $object->getProfile()) { + $data['Profile'] = $object->getProfile(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecPrivilegesSeccomp::class => false]; + } + } +} else { + class TaskSpecContainerSpecPrivilegesSeccompNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecPrivilegesSeccomp::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecPrivilegesSeccomp::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecPrivilegesSeccomp(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($data['Mode']); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + if (\array_key_exists('Profile', $data) && $data['Profile'] !== null) { + $object->setProfile($data['Profile']); + } + elseif (\array_key_exists('Profile', $data) && $data['Profile'] === null) { + $object->setProfile(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $object->getMode(); + } + if ($object->isInitialized('profile') && null !== $object->getProfile()) { + $data['Profile'] = $object->getProfile(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecPrivilegesSeccomp::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecContainerSpecSecretsItemFileNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecSecretsItemFileNormalizer.php new file mode 100644 index 000000000..d6d3b3b22 --- /dev/null +++ b/generated/Normalizer/TaskSpecContainerSpecSecretsItemFileNormalizer.php @@ -0,0 +1,172 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecContainerSpecSecretsItemFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecSecretsItemFile::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecSecretsItemFile::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecSecretsItemFile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('UID', $data) && $data['UID'] !== null) { + $object->setUID($data['UID']); + } + elseif (\array_key_exists('UID', $data) && $data['UID'] === null) { + $object->setUID(null); + } + if (\array_key_exists('GID', $data) && $data['GID'] !== null) { + $object->setGID($data['GID']); + } + elseif (\array_key_exists('GID', $data) && $data['GID'] === null) { + $object->setGID(null); + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($data['Mode']); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('uID') && null !== $object->getUID()) { + $data['UID'] = $object->getUID(); + } + if ($object->isInitialized('gID') && null !== $object->getGID()) { + $data['GID'] = $object->getGID(); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $object->getMode(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecSecretsItemFile::class => false]; + } + } +} else { + class TaskSpecContainerSpecSecretsItemFileNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecSecretsItemFile::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecSecretsItemFile::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecSecretsItemFile(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('UID', $data) && $data['UID'] !== null) { + $object->setUID($data['UID']); + } + elseif (\array_key_exists('UID', $data) && $data['UID'] === null) { + $object->setUID(null); + } + if (\array_key_exists('GID', $data) && $data['GID'] !== null) { + $object->setGID($data['GID']); + } + elseif (\array_key_exists('GID', $data) && $data['GID'] === null) { + $object->setGID(null); + } + if (\array_key_exists('Mode', $data) && $data['Mode'] !== null) { + $object->setMode($data['Mode']); + } + elseif (\array_key_exists('Mode', $data) && $data['Mode'] === null) { + $object->setMode(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('uID') && null !== $object->getUID()) { + $data['UID'] = $object->getUID(); + } + if ($object->isInitialized('gID') && null !== $object->getGID()) { + $data['GID'] = $object->getGID(); + } + if ($object->isInitialized('mode') && null !== $object->getMode()) { + $data['Mode'] = $object->getMode(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecSecretsItemFile::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecContainerSpecSecretsItemNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecSecretsItemNormalizer.php new file mode 100644 index 000000000..53d61e780 --- /dev/null +++ b/generated/Normalizer/TaskSpecContainerSpecSecretsItemNormalizer.php @@ -0,0 +1,154 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecContainerSpecSecretsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecSecretsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecSecretsItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecSecretsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('File', $data) && $data['File'] !== null) { + $object->setFile($this->denormalizer->denormalize($data['File'], \Docker\API\Model\TaskSpecContainerSpecSecretsItemFile::class, 'json', $context)); + } + elseif (\array_key_exists('File', $data) && $data['File'] === null) { + $object->setFile(null); + } + if (\array_key_exists('SecretID', $data) && $data['SecretID'] !== null) { + $object->setSecretID($data['SecretID']); + } + elseif (\array_key_exists('SecretID', $data) && $data['SecretID'] === null) { + $object->setSecretID(null); + } + if (\array_key_exists('SecretName', $data) && $data['SecretName'] !== null) { + $object->setSecretName($data['SecretName']); + } + elseif (\array_key_exists('SecretName', $data) && $data['SecretName'] === null) { + $object->setSecretName(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('file') && null !== $object->getFile()) { + $data['File'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + } + if ($object->isInitialized('secretID') && null !== $object->getSecretID()) { + $data['SecretID'] = $object->getSecretID(); + } + if ($object->isInitialized('secretName') && null !== $object->getSecretName()) { + $data['SecretName'] = $object->getSecretName(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecSecretsItem::class => false]; + } + } +} else { + class TaskSpecContainerSpecSecretsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecContainerSpecSecretsItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecSecretsItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecContainerSpecSecretsItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('File', $data) && $data['File'] !== null) { + $object->setFile($this->denormalizer->denormalize($data['File'], \Docker\API\Model\TaskSpecContainerSpecSecretsItemFile::class, 'json', $context)); + } + elseif (\array_key_exists('File', $data) && $data['File'] === null) { + $object->setFile(null); + } + if (\array_key_exists('SecretID', $data) && $data['SecretID'] !== null) { + $object->setSecretID($data['SecretID']); + } + elseif (\array_key_exists('SecretID', $data) && $data['SecretID'] === null) { + $object->setSecretID(null); + } + if (\array_key_exists('SecretName', $data) && $data['SecretName'] !== null) { + $object->setSecretName($data['SecretName']); + } + elseif (\array_key_exists('SecretName', $data) && $data['SecretName'] === null) { + $object->setSecretName(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('file') && null !== $object->getFile()) { + $data['File'] = $this->normalizer->normalize($object->getFile(), 'json', $context); + } + if ($object->isInitialized('secretID') && null !== $object->getSecretID()) { + $data['SecretID'] = $object->getSecretID(); + } + if ($object->isInitialized('secretName') && null !== $object->getSecretName()) { + $data['SecretName'] = $object->getSecretName(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecContainerSpecSecretsItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/PluginsPrivilegesGetResponse200ItemNormalizer.php b/generated/Normalizer/TaskSpecContainerSpecUlimitsItemNormalizer.php similarity index 58% rename from generated/Normalizer/PluginsPrivilegesGetResponse200ItemNormalizer.php rename to generated/Normalizer/TaskSpecContainerSpecUlimitsItemNormalizer.php index 105bd0f29..601d04e9b 100644 --- a/generated/Normalizer/PluginsPrivilegesGetResponse200ItemNormalizer.php +++ b/generated/Normalizer/TaskSpecContainerSpecUlimitsItemNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class PluginsPrivilegesGetResponse200ItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class TaskSpecContainerSpecUlimitsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class PluginsPrivilegesGetResponse200ItemNormalizer implements DenormalizerInter use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class; + return $type === \Docker\API\Model\TaskSpecContainerSpecUlimitsItem::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class; + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecUlimitsItem::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\PluginsPrivilegesGetResponse200Item(); + $object = new \Docker\API\Model\TaskSpecContainerSpecUlimitsItem(); if (null === $data || false === \is_array($data)) { return $object; } @@ -46,21 +46,17 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { $object->setName(null); } - if (\array_key_exists('Description', $data) && $data['Description'] !== null) { - $object->setDescription($data['Description']); + if (\array_key_exists('Soft', $data) && $data['Soft'] !== null) { + $object->setSoft($data['Soft']); } - elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { - $object->setDescription(null); + elseif (\array_key_exists('Soft', $data) && $data['Soft'] === null) { + $object->setSoft(null); } - if (\array_key_exists('Value', $data) && $data['Value'] !== null) { - $values = []; - foreach ($data['Value'] as $value) { - $values[] = $value; - } - $object->setValue($values); + if (\array_key_exists('Hard', $data) && $data['Hard'] !== null) { + $object->setHard($data['Hard']); } - elseif (\array_key_exists('Value', $data) && $data['Value'] === null) { - $object->setValue(null); + elseif (\array_key_exists('Hard', $data) && $data['Hard'] === null) { + $object->setHard(null); } return $object; } @@ -70,25 +66,21 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('name') && null !== $object->getName()) { $data['Name'] = $object->getName(); } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['Description'] = $object->getDescription(); + if ($object->isInitialized('soft') && null !== $object->getSoft()) { + $data['Soft'] = $object->getSoft(); } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $values = []; - foreach ($object->getValue() as $value) { - $values[] = $value; - } - $data['Value'] = $values; + if ($object->isInitialized('hard') && null !== $object->getHard()) { + $data['Hard'] = $object->getHard(); } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\PluginsPrivilegesGetResponse200Item::class => false]; + return [\Docker\API\Model\TaskSpecContainerSpecUlimitsItem::class => false]; } } } else { - class PluginsPrivilegesGetResponse200ItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class TaskSpecContainerSpecUlimitsItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -96,11 +88,11 @@ class PluginsPrivilegesGetResponse200ItemNormalizer implements DenormalizerInter use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class; + return $type === \Docker\API\Model\TaskSpecContainerSpecUlimitsItem::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\PluginsPrivilegesGetResponse200Item::class; + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecContainerSpecUlimitsItem::class; } /** * @return mixed @@ -113,7 +105,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\PluginsPrivilegesGetResponse200Item(); + $object = new \Docker\API\Model\TaskSpecContainerSpecUlimitsItem(); if (null === $data || false === \is_array($data)) { return $object; } @@ -123,21 +115,17 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { $object->setName(null); } - if (\array_key_exists('Description', $data) && $data['Description'] !== null) { - $object->setDescription($data['Description']); + if (\array_key_exists('Soft', $data) && $data['Soft'] !== null) { + $object->setSoft($data['Soft']); } - elseif (\array_key_exists('Description', $data) && $data['Description'] === null) { - $object->setDescription(null); + elseif (\array_key_exists('Soft', $data) && $data['Soft'] === null) { + $object->setSoft(null); } - if (\array_key_exists('Value', $data) && $data['Value'] !== null) { - $values = []; - foreach ($data['Value'] as $value) { - $values[] = $value; - } - $object->setValue($values); + if (\array_key_exists('Hard', $data) && $data['Hard'] !== null) { + $object->setHard($data['Hard']); } - elseif (\array_key_exists('Value', $data) && $data['Value'] === null) { - $object->setValue(null); + elseif (\array_key_exists('Hard', $data) && $data['Hard'] === null) { + $object->setHard(null); } return $object; } @@ -150,21 +138,17 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('name') && null !== $object->getName()) { $data['Name'] = $object->getName(); } - if ($object->isInitialized('description') && null !== $object->getDescription()) { - $data['Description'] = $object->getDescription(); + if ($object->isInitialized('soft') && null !== $object->getSoft()) { + $data['Soft'] = $object->getSoft(); } - if ($object->isInitialized('value') && null !== $object->getValue()) { - $values = []; - foreach ($object->getValue() as $value) { - $values[] = $value; - } - $data['Value'] = $values; + if ($object->isInitialized('hard') && null !== $object->getHard()) { + $data['Hard'] = $object->getHard(); } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\PluginsPrivilegesGetResponse200Item::class => false]; + return [\Docker\API\Model\TaskSpecContainerSpecUlimitsItem::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecNetworkAttachmentSpecNormalizer.php b/generated/Normalizer/TaskSpecNetworkAttachmentSpecNormalizer.php new file mode 100644 index 000000000..16aa37fe6 --- /dev/null +++ b/generated/Normalizer/TaskSpecNetworkAttachmentSpecNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecNetworkAttachmentSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecNetworkAttachmentSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecNetworkAttachmentSpec::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecNetworkAttachmentSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ContainerID', $data) && $data['ContainerID'] !== null) { + $object->setContainerID($data['ContainerID']); + } + elseif (\array_key_exists('ContainerID', $data) && $data['ContainerID'] === null) { + $object->setContainerID(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('containerID') && null !== $object->getContainerID()) { + $data['ContainerID'] = $object->getContainerID(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecNetworkAttachmentSpec::class => false]; + } + } +} else { + class TaskSpecNetworkAttachmentSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecNetworkAttachmentSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecNetworkAttachmentSpec::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecNetworkAttachmentSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('ContainerID', $data) && $data['ContainerID'] !== null) { + $object->setContainerID($data['ContainerID']); + } + elseif (\array_key_exists('ContainerID', $data) && $data['ContainerID'] === null) { + $object->setContainerID(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('containerID') && null !== $object->getContainerID()) { + $data['ContainerID'] = $object->getContainerID(); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecNetworkAttachmentSpec::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecNormalizer.php b/generated/Normalizer/TaskSpecNormalizer.php index 2aa2bf0f6..f7fc05a53 100644 --- a/generated/Normalizer/TaskSpecNormalizer.php +++ b/generated/Normalizer/TaskSpecNormalizer.php @@ -40,12 +40,24 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (null === $data || false === \is_array($data)) { return $object; } + if (\array_key_exists('PluginSpec', $data) && $data['PluginSpec'] !== null) { + $object->setPluginSpec($this->denormalizer->denormalize($data['PluginSpec'], \Docker\API\Model\TaskSpecPluginSpec::class, 'json', $context)); + } + elseif (\array_key_exists('PluginSpec', $data) && $data['PluginSpec'] === null) { + $object->setPluginSpec(null); + } if (\array_key_exists('ContainerSpec', $data) && $data['ContainerSpec'] !== null) { $object->setContainerSpec($this->denormalizer->denormalize($data['ContainerSpec'], \Docker\API\Model\TaskSpecContainerSpec::class, 'json', $context)); } elseif (\array_key_exists('ContainerSpec', $data) && $data['ContainerSpec'] === null) { $object->setContainerSpec(null); } + if (\array_key_exists('NetworkAttachmentSpec', $data) && $data['NetworkAttachmentSpec'] !== null) { + $object->setNetworkAttachmentSpec($this->denormalizer->denormalize($data['NetworkAttachmentSpec'], \Docker\API\Model\TaskSpecNetworkAttachmentSpec::class, 'json', $context)); + } + elseif (\array_key_exists('NetworkAttachmentSpec', $data) && $data['NetworkAttachmentSpec'] === null) { + $object->setNetworkAttachmentSpec(null); + } if (\array_key_exists('Resources', $data) && $data['Resources'] !== null) { $object->setResources($this->denormalizer->denormalize($data['Resources'], \Docker\API\Model\TaskSpecResources::class, 'json', $context)); } @@ -70,10 +82,16 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('ForceUpdate', $data) && $data['ForceUpdate'] === null) { $object->setForceUpdate(null); } + if (\array_key_exists('Runtime', $data) && $data['Runtime'] !== null) { + $object->setRuntime($data['Runtime']); + } + elseif (\array_key_exists('Runtime', $data) && $data['Runtime'] === null) { + $object->setRuntime(null); + } if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { $values = []; foreach ($data['Networks'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\TaskSpecNetworksItem::class, 'json', $context); + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\NetworkAttachmentConfig::class, 'json', $context); } $object->setNetworks($values); } @@ -91,9 +109,15 @@ public function denormalize(mixed $data, string $type, string $format = null, ar public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; + if ($object->isInitialized('pluginSpec') && null !== $object->getPluginSpec()) { + $data['PluginSpec'] = $this->normalizer->normalize($object->getPluginSpec(), 'json', $context); + } if ($object->isInitialized('containerSpec') && null !== $object->getContainerSpec()) { $data['ContainerSpec'] = $this->normalizer->normalize($object->getContainerSpec(), 'json', $context); } + if ($object->isInitialized('networkAttachmentSpec') && null !== $object->getNetworkAttachmentSpec()) { + $data['NetworkAttachmentSpec'] = $this->normalizer->normalize($object->getNetworkAttachmentSpec(), 'json', $context); + } if ($object->isInitialized('resources') && null !== $object->getResources()) { $data['Resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); } @@ -106,6 +130,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('forceUpdate') && null !== $object->getForceUpdate()) { $data['ForceUpdate'] = $object->getForceUpdate(); } + if ($object->isInitialized('runtime') && null !== $object->getRuntime()) { + $data['Runtime'] = $object->getRuntime(); + } if ($object->isInitialized('networks') && null !== $object->getNetworks()) { $values = []; foreach ($object->getNetworks() as $value) { @@ -153,12 +180,24 @@ public function denormalize($data, $type, $format = null, array $context = []) if (null === $data || false === \is_array($data)) { return $object; } + if (\array_key_exists('PluginSpec', $data) && $data['PluginSpec'] !== null) { + $object->setPluginSpec($this->denormalizer->denormalize($data['PluginSpec'], \Docker\API\Model\TaskSpecPluginSpec::class, 'json', $context)); + } + elseif (\array_key_exists('PluginSpec', $data) && $data['PluginSpec'] === null) { + $object->setPluginSpec(null); + } if (\array_key_exists('ContainerSpec', $data) && $data['ContainerSpec'] !== null) { $object->setContainerSpec($this->denormalizer->denormalize($data['ContainerSpec'], \Docker\API\Model\TaskSpecContainerSpec::class, 'json', $context)); } elseif (\array_key_exists('ContainerSpec', $data) && $data['ContainerSpec'] === null) { $object->setContainerSpec(null); } + if (\array_key_exists('NetworkAttachmentSpec', $data) && $data['NetworkAttachmentSpec'] !== null) { + $object->setNetworkAttachmentSpec($this->denormalizer->denormalize($data['NetworkAttachmentSpec'], \Docker\API\Model\TaskSpecNetworkAttachmentSpec::class, 'json', $context)); + } + elseif (\array_key_exists('NetworkAttachmentSpec', $data) && $data['NetworkAttachmentSpec'] === null) { + $object->setNetworkAttachmentSpec(null); + } if (\array_key_exists('Resources', $data) && $data['Resources'] !== null) { $object->setResources($this->denormalizer->denormalize($data['Resources'], \Docker\API\Model\TaskSpecResources::class, 'json', $context)); } @@ -183,10 +222,16 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('ForceUpdate', $data) && $data['ForceUpdate'] === null) { $object->setForceUpdate(null); } + if (\array_key_exists('Runtime', $data) && $data['Runtime'] !== null) { + $object->setRuntime($data['Runtime']); + } + elseif (\array_key_exists('Runtime', $data) && $data['Runtime'] === null) { + $object->setRuntime(null); + } if (\array_key_exists('Networks', $data) && $data['Networks'] !== null) { $values = []; foreach ($data['Networks'] as $value) { - $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\TaskSpecNetworksItem::class, 'json', $context); + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\NetworkAttachmentConfig::class, 'json', $context); } $object->setNetworks($values); } @@ -207,9 +252,15 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; + if ($object->isInitialized('pluginSpec') && null !== $object->getPluginSpec()) { + $data['PluginSpec'] = $this->normalizer->normalize($object->getPluginSpec(), 'json', $context); + } if ($object->isInitialized('containerSpec') && null !== $object->getContainerSpec()) { $data['ContainerSpec'] = $this->normalizer->normalize($object->getContainerSpec(), 'json', $context); } + if ($object->isInitialized('networkAttachmentSpec') && null !== $object->getNetworkAttachmentSpec()) { + $data['NetworkAttachmentSpec'] = $this->normalizer->normalize($object->getNetworkAttachmentSpec(), 'json', $context); + } if ($object->isInitialized('resources') && null !== $object->getResources()) { $data['Resources'] = $this->normalizer->normalize($object->getResources(), 'json', $context); } @@ -222,6 +273,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('forceUpdate') && null !== $object->getForceUpdate()) { $data['ForceUpdate'] = $object->getForceUpdate(); } + if ($object->isInitialized('runtime') && null !== $object->getRuntime()) { + $data['Runtime'] = $object->getRuntime(); + } if ($object->isInitialized('networks') && null !== $object->getNetworks()) { $values = []; foreach ($object->getNetworks() as $value) { diff --git a/generated/Normalizer/TaskSpecPlacementNormalizer.php b/generated/Normalizer/TaskSpecPlacementNormalizer.php index 59c56729e..34647ff95 100644 --- a/generated/Normalizer/TaskSpecPlacementNormalizer.php +++ b/generated/Normalizer/TaskSpecPlacementNormalizer.php @@ -50,6 +50,32 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Constraints', $data) && $data['Constraints'] === null) { $object->setConstraints(null); } + if (\array_key_exists('Preferences', $data) && $data['Preferences'] !== null) { + $values_1 = []; + foreach ($data['Preferences'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\TaskSpecPlacementPreferencesItem::class, 'json', $context); + } + $object->setPreferences($values_1); + } + elseif (\array_key_exists('Preferences', $data) && $data['Preferences'] === null) { + $object->setPreferences(null); + } + if (\array_key_exists('MaxReplicas', $data) && $data['MaxReplicas'] !== null) { + $object->setMaxReplicas($data['MaxReplicas']); + } + elseif (\array_key_exists('MaxReplicas', $data) && $data['MaxReplicas'] === null) { + $object->setMaxReplicas(null); + } + if (\array_key_exists('Platforms', $data) && $data['Platforms'] !== null) { + $values_2 = []; + foreach ($data['Platforms'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\Platform::class, 'json', $context); + } + $object->setPlatforms($values_2); + } + elseif (\array_key_exists('Platforms', $data) && $data['Platforms'] === null) { + $object->setPlatforms(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -62,6 +88,23 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['Constraints'] = $values; } + if ($object->isInitialized('preferences') && null !== $object->getPreferences()) { + $values_1 = []; + foreach ($object->getPreferences() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Preferences'] = $values_1; + } + if ($object->isInitialized('maxReplicas') && null !== $object->getMaxReplicas()) { + $data['MaxReplicas'] = $object->getMaxReplicas(); + } + if ($object->isInitialized('platforms') && null !== $object->getPlatforms()) { + $values_2 = []; + foreach ($object->getPlatforms() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['Platforms'] = $values_2; + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -109,6 +152,32 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Constraints', $data) && $data['Constraints'] === null) { $object->setConstraints(null); } + if (\array_key_exists('Preferences', $data) && $data['Preferences'] !== null) { + $values_1 = []; + foreach ($data['Preferences'] as $value_1) { + $values_1[] = $this->denormalizer->denormalize($value_1, \Docker\API\Model\TaskSpecPlacementPreferencesItem::class, 'json', $context); + } + $object->setPreferences($values_1); + } + elseif (\array_key_exists('Preferences', $data) && $data['Preferences'] === null) { + $object->setPreferences(null); + } + if (\array_key_exists('MaxReplicas', $data) && $data['MaxReplicas'] !== null) { + $object->setMaxReplicas($data['MaxReplicas']); + } + elseif (\array_key_exists('MaxReplicas', $data) && $data['MaxReplicas'] === null) { + $object->setMaxReplicas(null); + } + if (\array_key_exists('Platforms', $data) && $data['Platforms'] !== null) { + $values_2 = []; + foreach ($data['Platforms'] as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, \Docker\API\Model\Platform::class, 'json', $context); + } + $object->setPlatforms($values_2); + } + elseif (\array_key_exists('Platforms', $data) && $data['Platforms'] === null) { + $object->setPlatforms(null); + } return $object; } /** @@ -124,6 +193,23 @@ public function normalize($object, $format = null, array $context = []) } $data['Constraints'] = $values; } + if ($object->isInitialized('preferences') && null !== $object->getPreferences()) { + $values_1 = []; + foreach ($object->getPreferences() as $value_1) { + $values_1[] = $this->normalizer->normalize($value_1, 'json', $context); + } + $data['Preferences'] = $values_1; + } + if ($object->isInitialized('maxReplicas') && null !== $object->getMaxReplicas()) { + $data['MaxReplicas'] = $object->getMaxReplicas(); + } + if ($object->isInitialized('platforms') && null !== $object->getPlatforms()) { + $values_2 = []; + foreach ($object->getPlatforms() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data['Platforms'] = $values_2; + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/TaskSpecPlacementPreferencesItemNormalizer.php b/generated/Normalizer/TaskSpecPlacementPreferencesItemNormalizer.php new file mode 100644 index 000000000..e21b020e7 --- /dev/null +++ b/generated/Normalizer/TaskSpecPlacementPreferencesItemNormalizer.php @@ -0,0 +1,118 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecPlacementPreferencesItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecPlacementPreferencesItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecPlacementPreferencesItem::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecPlacementPreferencesItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Spread', $data) && $data['Spread'] !== null) { + $object->setSpread($this->denormalizer->denormalize($data['Spread'], \Docker\API\Model\TaskSpecPlacementPreferencesItemSpread::class, 'json', $context)); + } + elseif (\array_key_exists('Spread', $data) && $data['Spread'] === null) { + $object->setSpread(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('spread') && null !== $object->getSpread()) { + $data['Spread'] = $this->normalizer->normalize($object->getSpread(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecPlacementPreferencesItem::class => false]; + } + } +} else { + class TaskSpecPlacementPreferencesItemNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecPlacementPreferencesItem::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecPlacementPreferencesItem::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecPlacementPreferencesItem(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Spread', $data) && $data['Spread'] !== null) { + $object->setSpread($this->denormalizer->denormalize($data['Spread'], \Docker\API\Model\TaskSpecPlacementPreferencesItemSpread::class, 'json', $context)); + } + elseif (\array_key_exists('Spread', $data) && $data['Spread'] === null) { + $object->setSpread(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('spread') && null !== $object->getSpread()) { + $data['Spread'] = $this->normalizer->normalize($object->getSpread(), 'json', $context); + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecPlacementPreferencesItem::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/ContainerSummaryItemHostConfigNormalizer.php b/generated/Normalizer/TaskSpecPlacementPreferencesItemSpreadNormalizer.php similarity index 64% rename from generated/Normalizer/ContainerSummaryItemHostConfigNormalizer.php rename to generated/Normalizer/TaskSpecPlacementPreferencesItemSpreadNormalizer.php index 7facec1e5..377ef48d8 100644 --- a/generated/Normalizer/ContainerSummaryItemHostConfigNormalizer.php +++ b/generated/Normalizer/TaskSpecPlacementPreferencesItemSpreadNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ContainerSummaryItemHostConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class TaskSpecPlacementPreferencesItemSpreadNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ContainerSummaryItemHostConfigNormalizer implements DenormalizerInterface, use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainerSummaryItemHostConfig::class; + return $type === \Docker\API\Model\TaskSpecPlacementPreferencesItemSpread::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryItemHostConfig::class; + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecPlacementPreferencesItemSpread::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,33 +36,33 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainerSummaryItemHostConfig(); + $object = new \Docker\API\Model\TaskSpecPlacementPreferencesItemSpread(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] !== null) { - $object->setNetworkMode($data['NetworkMode']); + if (\array_key_exists('SpreadDescriptor', $data) && $data['SpreadDescriptor'] !== null) { + $object->setSpreadDescriptor($data['SpreadDescriptor']); } - elseif (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] === null) { - $object->setNetworkMode(null); + elseif (\array_key_exists('SpreadDescriptor', $data) && $data['SpreadDescriptor'] === null) { + $object->setSpreadDescriptor(null); } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('networkMode') && null !== $object->getNetworkMode()) { - $data['NetworkMode'] = $object->getNetworkMode(); + if ($object->isInitialized('spreadDescriptor') && null !== $object->getSpreadDescriptor()) { + $data['SpreadDescriptor'] = $object->getSpreadDescriptor(); } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainerSummaryItemHostConfig::class => false]; + return [\Docker\API\Model\TaskSpecPlacementPreferencesItemSpread::class => false]; } } } else { - class ContainerSummaryItemHostConfigNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class TaskSpecPlacementPreferencesItemSpreadNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -70,11 +70,11 @@ class ContainerSummaryItemHostConfigNormalizer implements DenormalizerInterface, use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ContainerSummaryItemHostConfig::class; + return $type === \Docker\API\Model\TaskSpecPlacementPreferencesItemSpread::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ContainerSummaryItemHostConfig::class; + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecPlacementPreferencesItemSpread::class; } /** * @return mixed @@ -87,15 +87,15 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ContainerSummaryItemHostConfig(); + $object = new \Docker\API\Model\TaskSpecPlacementPreferencesItemSpread(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] !== null) { - $object->setNetworkMode($data['NetworkMode']); + if (\array_key_exists('SpreadDescriptor', $data) && $data['SpreadDescriptor'] !== null) { + $object->setSpreadDescriptor($data['SpreadDescriptor']); } - elseif (\array_key_exists('NetworkMode', $data) && $data['NetworkMode'] === null) { - $object->setNetworkMode(null); + elseif (\array_key_exists('SpreadDescriptor', $data) && $data['SpreadDescriptor'] === null) { + $object->setSpreadDescriptor(null); } return $object; } @@ -105,14 +105,14 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('networkMode') && null !== $object->getNetworkMode()) { - $data['NetworkMode'] = $object->getNetworkMode(); + if ($object->isInitialized('spreadDescriptor') && null !== $object->getSpreadDescriptor()) { + $data['SpreadDescriptor'] = $object->getSpreadDescriptor(); } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ContainerSummaryItemHostConfig::class => false]; + return [\Docker\API\Model\TaskSpecPlacementPreferencesItemSpread::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecPluginSpecNormalizer.php b/generated/Normalizer/TaskSpecPluginSpecNormalizer.php new file mode 100644 index 000000000..45c06e4a6 --- /dev/null +++ b/generated/Normalizer/TaskSpecPluginSpecNormalizer.php @@ -0,0 +1,188 @@ += 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { + class TaskSpecPluginSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecPluginSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecPluginSpec::class; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecPluginSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Remote', $data) && $data['Remote'] !== null) { + $object->setRemote($data['Remote']); + } + elseif (\array_key_exists('Remote', $data) && $data['Remote'] === null) { + $object->setRemote(null); + } + if (\array_key_exists('Disabled', $data) && $data['Disabled'] !== null) { + $object->setDisabled($data['Disabled']); + } + elseif (\array_key_exists('Disabled', $data) && $data['Disabled'] === null) { + $object->setDisabled(null); + } + if (\array_key_exists('PluginPrivilege', $data) && $data['PluginPrivilege'] !== null) { + $values = []; + foreach ($data['PluginPrivilege'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\PluginPrivilege::class, 'json', $context); + } + $object->setPluginPrivilege($values); + } + elseif (\array_key_exists('PluginPrivilege', $data) && $data['PluginPrivilege'] === null) { + $object->setPluginPrivilege(null); + } + return $object; + } + public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('remote') && null !== $object->getRemote()) { + $data['Remote'] = $object->getRemote(); + } + if ($object->isInitialized('disabled') && null !== $object->getDisabled()) { + $data['Disabled'] = $object->getDisabled(); + } + if ($object->isInitialized('pluginPrivilege') && null !== $object->getPluginPrivilege()) { + $values = []; + foreach ($object->getPluginPrivilege() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['PluginPrivilege'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecPluginSpec::class => false]; + } + } +} else { + class TaskSpecPluginSpecNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + { + use DenormalizerAwareTrait; + use NormalizerAwareTrait; + use CheckArray; + use ValidatorTrait; + public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool + { + return $type === \Docker\API\Model\TaskSpecPluginSpec::class; + } + public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool + { + return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecPluginSpec::class; + } + /** + * @return mixed + */ + public function denormalize($data, $type, $format = null, array $context = []) + { + if (isset($data['$ref'])) { + return new Reference($data['$ref'], $context['document-origin']); + } + if (isset($data['$recursiveRef'])) { + return new Reference($data['$recursiveRef'], $context['document-origin']); + } + $object = new \Docker\API\Model\TaskSpecPluginSpec(); + if (null === $data || false === \is_array($data)) { + return $object; + } + if (\array_key_exists('Name', $data) && $data['Name'] !== null) { + $object->setName($data['Name']); + } + elseif (\array_key_exists('Name', $data) && $data['Name'] === null) { + $object->setName(null); + } + if (\array_key_exists('Remote', $data) && $data['Remote'] !== null) { + $object->setRemote($data['Remote']); + } + elseif (\array_key_exists('Remote', $data) && $data['Remote'] === null) { + $object->setRemote(null); + } + if (\array_key_exists('Disabled', $data) && $data['Disabled'] !== null) { + $object->setDisabled($data['Disabled']); + } + elseif (\array_key_exists('Disabled', $data) && $data['Disabled'] === null) { + $object->setDisabled(null); + } + if (\array_key_exists('PluginPrivilege', $data) && $data['PluginPrivilege'] !== null) { + $values = []; + foreach ($data['PluginPrivilege'] as $value) { + $values[] = $this->denormalizer->denormalize($value, \Docker\API\Model\PluginPrivilege::class, 'json', $context); + } + $object->setPluginPrivilege($values); + } + elseif (\array_key_exists('PluginPrivilege', $data) && $data['PluginPrivilege'] === null) { + $object->setPluginPrivilege(null); + } + return $object; + } + /** + * @return array|string|int|float|bool|\ArrayObject|null + */ + public function normalize($object, $format = null, array $context = []) + { + $data = []; + if ($object->isInitialized('name') && null !== $object->getName()) { + $data['Name'] = $object->getName(); + } + if ($object->isInitialized('remote') && null !== $object->getRemote()) { + $data['Remote'] = $object->getRemote(); + } + if ($object->isInitialized('disabled') && null !== $object->getDisabled()) { + $data['Disabled'] = $object->getDisabled(); + } + if ($object->isInitialized('pluginPrivilege') && null !== $object->getPluginPrivilege()) { + $values = []; + foreach ($object->getPluginPrivilege() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['PluginPrivilege'] = $values; + } + return $data; + } + public function getSupportedTypes(?string $format = null): array + { + return [\Docker\API\Model\TaskSpecPluginSpec::class => false]; + } + } +} \ No newline at end of file diff --git a/generated/Normalizer/TaskSpecResourcesNormalizer.php b/generated/Normalizer/TaskSpecResourcesNormalizer.php index f47cc6035..b5341b769 100644 --- a/generated/Normalizer/TaskSpecResourcesNormalizer.php +++ b/generated/Normalizer/TaskSpecResourcesNormalizer.php @@ -41,13 +41,13 @@ public function denormalize(mixed $data, string $type, string $format = null, ar return $object; } if (\array_key_exists('Limits', $data) && $data['Limits'] !== null) { - $object->setLimits($this->denormalizer->denormalize($data['Limits'], \Docker\API\Model\TaskSpecResourcesLimits::class, 'json', $context)); + $object->setLimits($this->denormalizer->denormalize($data['Limits'], \Docker\API\Model\Limit::class, 'json', $context)); } elseif (\array_key_exists('Limits', $data) && $data['Limits'] === null) { $object->setLimits(null); } if (\array_key_exists('Reservations', $data) && $data['Reservations'] !== null) { - $object->setReservations($this->denormalizer->denormalize($data['Reservations'], \Docker\API\Model\TaskSpecResourcesReservations::class, 'json', $context)); + $object->setReservations($this->denormalizer->denormalize($data['Reservations'], \Docker\API\Model\ResourceObject::class, 'json', $context)); } elseif (\array_key_exists('Reservations', $data) && $data['Reservations'] === null) { $object->setReservations(null); @@ -101,13 +101,13 @@ public function denormalize($data, $type, $format = null, array $context = []) return $object; } if (\array_key_exists('Limits', $data) && $data['Limits'] !== null) { - $object->setLimits($this->denormalizer->denormalize($data['Limits'], \Docker\API\Model\TaskSpecResourcesLimits::class, 'json', $context)); + $object->setLimits($this->denormalizer->denormalize($data['Limits'], \Docker\API\Model\Limit::class, 'json', $context)); } elseif (\array_key_exists('Limits', $data) && $data['Limits'] === null) { $object->setLimits(null); } if (\array_key_exists('Reservations', $data) && $data['Reservations'] !== null) { - $object->setReservations($this->denormalizer->denormalize($data['Reservations'], \Docker\API\Model\TaskSpecResourcesReservations::class, 'json', $context)); + $object->setReservations($this->denormalizer->denormalize($data['Reservations'], \Docker\API\Model\ResourceObject::class, 'json', $context)); } elseif (\array_key_exists('Reservations', $data) && $data['Reservations'] === null) { $object->setReservations(null); diff --git a/generated/Normalizer/TaskSpecResourcesReservationsNormalizer.php b/generated/Normalizer/TaskSpecResourcesReservationsNormalizer.php deleted file mode 100644 index 2cb3932a8..000000000 --- a/generated/Normalizer/TaskSpecResourcesReservationsNormalizer.php +++ /dev/null @@ -1,136 +0,0 @@ -= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class TaskSpecResourcesReservationsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool - { - return $type === \Docker\API\Model\TaskSpecResourcesReservations::class; - } - public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool - { - return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecResourcesReservations::class; - } - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \Docker\API\Model\TaskSpecResourcesReservations(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] !== null) { - $object->setNanoCPUs($data['NanoCPUs']); - } - elseif (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] === null) { - $object->setNanoCPUs(null); - } - if (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] !== null) { - $object->setMemoryBytes($data['MemoryBytes']); - } - elseif (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] === null) { - $object->setMemoryBytes(null); - } - return $object; - } - public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null - { - $data = []; - if ($object->isInitialized('nanoCPUs') && null !== $object->getNanoCPUs()) { - $data['NanoCPUs'] = $object->getNanoCPUs(); - } - if ($object->isInitialized('memoryBytes') && null !== $object->getMemoryBytes()) { - $data['MemoryBytes'] = $object->getMemoryBytes(); - } - return $data; - } - public function getSupportedTypes(?string $format = null): array - { - return [\Docker\API\Model\TaskSpecResourcesReservations::class => false]; - } - } -} else { - class TaskSpecResourcesReservationsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface - { - use DenormalizerAwareTrait; - use NormalizerAwareTrait; - use CheckArray; - use ValidatorTrait; - public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool - { - return $type === \Docker\API\Model\TaskSpecResourcesReservations::class; - } - public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool - { - return is_object($data) && get_class($data) === \Docker\API\Model\TaskSpecResourcesReservations::class; - } - /** - * @return mixed - */ - public function denormalize($data, $type, $format = null, array $context = []) - { - if (isset($data['$ref'])) { - return new Reference($data['$ref'], $context['document-origin']); - } - if (isset($data['$recursiveRef'])) { - return new Reference($data['$recursiveRef'], $context['document-origin']); - } - $object = new \Docker\API\Model\TaskSpecResourcesReservations(); - if (null === $data || false === \is_array($data)) { - return $object; - } - if (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] !== null) { - $object->setNanoCPUs($data['NanoCPUs']); - } - elseif (\array_key_exists('NanoCPUs', $data) && $data['NanoCPUs'] === null) { - $object->setNanoCPUs(null); - } - if (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] !== null) { - $object->setMemoryBytes($data['MemoryBytes']); - } - elseif (\array_key_exists('MemoryBytes', $data) && $data['MemoryBytes'] === null) { - $object->setMemoryBytes(null); - } - return $object; - } - /** - * @return array|string|int|float|bool|\ArrayObject|null - */ - public function normalize($object, $format = null, array $context = []) - { - $data = []; - if ($object->isInitialized('nanoCPUs') && null !== $object->getNanoCPUs()) { - $data['NanoCPUs'] = $object->getNanoCPUs(); - } - if ($object->isInitialized('memoryBytes') && null !== $object->getMemoryBytes()) { - $data['MemoryBytes'] = $object->getMemoryBytes(); - } - return $data; - } - public function getSupportedTypes(?string $format = null): array - { - return [\Docker\API\Model\TaskSpecResourcesReservations::class => false]; - } - } -} \ No newline at end of file diff --git a/generated/Normalizer/TaskStatusNormalizer.php b/generated/Normalizer/TaskStatusNormalizer.php index fc0827494..2b45589ad 100644 --- a/generated/Normalizer/TaskStatusNormalizer.php +++ b/generated/Normalizer/TaskStatusNormalizer.php @@ -65,11 +65,17 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $object->setErr(null); } if (\array_key_exists('ContainerStatus', $data) && $data['ContainerStatus'] !== null) { - $object->setContainerStatus($this->denormalizer->denormalize($data['ContainerStatus'], \Docker\API\Model\TaskStatusContainerStatus::class, 'json', $context)); + $object->setContainerStatus($this->denormalizer->denormalize($data['ContainerStatus'], \Docker\API\Model\ContainerStatus::class, 'json', $context)); } elseif (\array_key_exists('ContainerStatus', $data) && $data['ContainerStatus'] === null) { $object->setContainerStatus(null); } + if (\array_key_exists('PortStatus', $data) && $data['PortStatus'] !== null) { + $object->setPortStatus($this->denormalizer->denormalize($data['PortStatus'], \Docker\API\Model\PortStatus::class, 'json', $context)); + } + elseif (\array_key_exists('PortStatus', $data) && $data['PortStatus'] === null) { + $object->setPortStatus(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -90,6 +96,9 @@ public function normalize(mixed $object, string $format = null, array $context = if ($object->isInitialized('containerStatus') && null !== $object->getContainerStatus()) { $data['ContainerStatus'] = $this->normalizer->normalize($object->getContainerStatus(), 'json', $context); } + if ($object->isInitialized('portStatus') && null !== $object->getPortStatus()) { + $data['PortStatus'] = $this->normalizer->normalize($object->getPortStatus(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array @@ -152,11 +161,17 @@ public function denormalize($data, $type, $format = null, array $context = []) $object->setErr(null); } if (\array_key_exists('ContainerStatus', $data) && $data['ContainerStatus'] !== null) { - $object->setContainerStatus($this->denormalizer->denormalize($data['ContainerStatus'], \Docker\API\Model\TaskStatusContainerStatus::class, 'json', $context)); + $object->setContainerStatus($this->denormalizer->denormalize($data['ContainerStatus'], \Docker\API\Model\ContainerStatus::class, 'json', $context)); } elseif (\array_key_exists('ContainerStatus', $data) && $data['ContainerStatus'] === null) { $object->setContainerStatus(null); } + if (\array_key_exists('PortStatus', $data) && $data['PortStatus'] !== null) { + $object->setPortStatus($this->denormalizer->denormalize($data['PortStatus'], \Docker\API\Model\PortStatus::class, 'json', $context)); + } + elseif (\array_key_exists('PortStatus', $data) && $data['PortStatus'] === null) { + $object->setPortStatus(null); + } return $object; } /** @@ -180,6 +195,9 @@ public function normalize($object, $format = null, array $context = []) if ($object->isInitialized('containerStatus') && null !== $object->getContainerStatus()) { $data['ContainerStatus'] = $this->normalizer->normalize($object->getContainerStatus(), 'json', $context); } + if ($object->isInitialized('portStatus') && null !== $object->getPortStatus()) { + $data['PortStatus'] = $this->normalizer->normalize($object->getPortStatus(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array diff --git a/generated/Normalizer/VolumesCreatePostBodyNormalizer.php b/generated/Normalizer/VolumeCreateOptionsNormalizer.php similarity index 79% rename from generated/Normalizer/VolumesCreatePostBodyNormalizer.php rename to generated/Normalizer/VolumeCreateOptionsNormalizer.php index 08acdd70c..1579ee195 100644 --- a/generated/Normalizer/VolumesCreatePostBodyNormalizer.php +++ b/generated/Normalizer/VolumeCreateOptionsNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class VolumesCreatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class VolumeCreateOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class VolumesCreatePostBodyNormalizer implements DenormalizerInterface, Normaliz use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\VolumesCreatePostBody::class; + return $type === \Docker\API\Model\VolumeCreateOptions::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\VolumesCreatePostBody::class; + return is_object($data) && get_class($data) === \Docker\API\Model\VolumeCreateOptions::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\VolumesCreatePostBody(); + $object = new \Docker\API\Model\VolumeCreateOptions(); if (null === $data || false === \is_array($data)) { return $object; } @@ -72,6 +72,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { $object->setLabels(null); } + if (\array_key_exists('ClusterVolumeSpec', $data) && $data['ClusterVolumeSpec'] !== null) { + $object->setClusterVolumeSpec($this->denormalizer->denormalize($data['ClusterVolumeSpec'], \Docker\API\Model\ClusterVolumeSpec::class, 'json', $context)); + } + elseif (\array_key_exists('ClusterVolumeSpec', $data) && $data['ClusterVolumeSpec'] === null) { + $object->setClusterVolumeSpec(null); + } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null @@ -97,15 +103,18 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['Labels'] = $values_1; } + if ($object->isInitialized('clusterVolumeSpec') && null !== $object->getClusterVolumeSpec()) { + $data['ClusterVolumeSpec'] = $this->normalizer->normalize($object->getClusterVolumeSpec(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\VolumesCreatePostBody::class => false]; + return [\Docker\API\Model\VolumeCreateOptions::class => false]; } } } else { - class VolumesCreatePostBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class VolumeCreateOptionsNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -113,11 +122,11 @@ class VolumesCreatePostBodyNormalizer implements DenormalizerInterface, Normaliz use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\VolumesCreatePostBody::class; + return $type === \Docker\API\Model\VolumeCreateOptions::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\VolumesCreatePostBody::class; + return is_object($data) && get_class($data) === \Docker\API\Model\VolumeCreateOptions::class; } /** * @return mixed @@ -130,7 +139,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\VolumesCreatePostBody(); + $object = new \Docker\API\Model\VolumeCreateOptions(); if (null === $data || false === \is_array($data)) { return $object; } @@ -166,6 +175,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Labels', $data) && $data['Labels'] === null) { $object->setLabels(null); } + if (\array_key_exists('ClusterVolumeSpec', $data) && $data['ClusterVolumeSpec'] !== null) { + $object->setClusterVolumeSpec($this->denormalizer->denormalize($data['ClusterVolumeSpec'], \Docker\API\Model\ClusterVolumeSpec::class, 'json', $context)); + } + elseif (\array_key_exists('ClusterVolumeSpec', $data) && $data['ClusterVolumeSpec'] === null) { + $object->setClusterVolumeSpec(null); + } return $object; } /** @@ -194,11 +209,14 @@ public function normalize($object, $format = null, array $context = []) } $data['Labels'] = $values_1; } + if ($object->isInitialized('clusterVolumeSpec') && null !== $object->getClusterVolumeSpec()) { + $data['ClusterVolumeSpec'] = $this->normalizer->normalize($object->getClusterVolumeSpec(), 'json', $context); + } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\VolumesCreatePostBody::class => false]; + return [\Docker\API\Model\VolumeCreateOptions::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/VolumesGetResponse200Normalizer.php b/generated/Normalizer/VolumeListResponseNormalizer.php similarity index 73% rename from generated/Normalizer/VolumesGetResponse200Normalizer.php rename to generated/Normalizer/VolumeListResponseNormalizer.php index 2ae7446dc..093999933 100644 --- a/generated/Normalizer/VolumesGetResponse200Normalizer.php +++ b/generated/Normalizer/VolumeListResponseNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class VolumesGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class VolumeListResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class VolumesGetResponse200Normalizer implements DenormalizerInterface, Normaliz use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\VolumesGetResponse200::class; + return $type === \Docker\API\Model\VolumeListResponse::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\VolumesGetResponse200::class; + return is_object($data) && get_class($data) === \Docker\API\Model\VolumeListResponse::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,7 +36,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\VolumesGetResponse200(); + $object = new \Docker\API\Model\VolumeListResponse(); if (null === $data || false === \is_array($data)) { return $object; } @@ -65,25 +65,29 @@ public function denormalize(mixed $data, string $type, string $format = null, ar public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - $values = []; - foreach ($object->getVolumes() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { + $values = []; + foreach ($object->getVolumes() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Volumes'] = $values; } - $data['Volumes'] = $values; - $values_1 = []; - foreach ($object->getWarnings() as $value_1) { - $values_1[] = $value_1; + if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { + $values_1 = []; + foreach ($object->getWarnings() as $value_1) { + $values_1[] = $value_1; + } + $data['Warnings'] = $values_1; } - $data['Warnings'] = $values_1; return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\VolumesGetResponse200::class => false]; + return [\Docker\API\Model\VolumeListResponse::class => false]; } } } else { - class VolumesGetResponse200Normalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class VolumeListResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -91,11 +95,11 @@ class VolumesGetResponse200Normalizer implements DenormalizerInterface, Normaliz use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\VolumesGetResponse200::class; + return $type === \Docker\API\Model\VolumeListResponse::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\VolumesGetResponse200::class; + return is_object($data) && get_class($data) === \Docker\API\Model\VolumeListResponse::class; } /** * @return mixed @@ -108,7 +112,7 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\VolumesGetResponse200(); + $object = new \Docker\API\Model\VolumeListResponse(); if (null === $data || false === \is_array($data)) { return $object; } @@ -140,21 +144,25 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - $values = []; - foreach ($object->getVolumes() as $value) { - $values[] = $this->normalizer->normalize($value, 'json', $context); + if ($object->isInitialized('volumes') && null !== $object->getVolumes()) { + $values = []; + foreach ($object->getVolumes() as $value) { + $values[] = $this->normalizer->normalize($value, 'json', $context); + } + $data['Volumes'] = $values; } - $data['Volumes'] = $values; - $values_1 = []; - foreach ($object->getWarnings() as $value_1) { - $values_1[] = $value_1; + if ($object->isInitialized('warnings') && null !== $object->getWarnings()) { + $values_1 = []; + foreach ($object->getWarnings() as $value_1) { + $values_1[] = $value_1; + } + $data['Warnings'] = $values_1; } - $data['Warnings'] = $values_1; return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\VolumesGetResponse200::class => false]; + return [\Docker\API\Model\VolumeListResponse::class => false]; } } } \ No newline at end of file diff --git a/generated/Normalizer/VolumeNormalizer.php b/generated/Normalizer/VolumeNormalizer.php index 0b308d1b9..3d42709cc 100644 --- a/generated/Normalizer/VolumeNormalizer.php +++ b/generated/Normalizer/VolumeNormalizer.php @@ -58,6 +58,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Mountpoint', $data) && $data['Mountpoint'] === null) { $object->setMountpoint(null); } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } if (\array_key_exists('Status', $data) && $data['Status'] !== null) { $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); foreach ($data['Status'] as $key => $value) { @@ -84,6 +90,12 @@ public function denormalize(mixed $data, string $type, string $format = null, ar elseif (\array_key_exists('Scope', $data) && $data['Scope'] === null) { $object->setScope(null); } + if (\array_key_exists('ClusterVolume', $data) && $data['ClusterVolume'] !== null) { + $object->setClusterVolume($this->denormalizer->denormalize($data['ClusterVolume'], \Docker\API\Model\ClusterVolume::class, 'json', $context)); + } + elseif (\array_key_exists('ClusterVolume', $data) && $data['ClusterVolume'] === null) { + $object->setClusterVolume(null); + } if (\array_key_exists('Options', $data) && $data['Options'] !== null) { $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); foreach ($data['Options'] as $key_2 => $value_2) { @@ -108,6 +120,9 @@ public function normalize(mixed $object, string $format = null, array $context = $data['Name'] = $object->getName(); $data['Driver'] = $object->getDriver(); $data['Mountpoint'] = $object->getMountpoint(); + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } if ($object->isInitialized('status') && null !== $object->getStatus()) { $values = []; foreach ($object->getStatus() as $key => $value) { @@ -121,6 +136,9 @@ public function normalize(mixed $object, string $format = null, array $context = } $data['Labels'] = $values_1; $data['Scope'] = $object->getScope(); + if ($object->isInitialized('clusterVolume') && null !== $object->getClusterVolume()) { + $data['ClusterVolume'] = $this->normalizer->normalize($object->getClusterVolume(), 'json', $context); + } $values_2 = []; foreach ($object->getOptions() as $key_2 => $value_2) { $values_2[$key_2] = $value_2; @@ -184,6 +202,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Mountpoint', $data) && $data['Mountpoint'] === null) { $object->setMountpoint(null); } + if (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] !== null) { + $object->setCreatedAt($data['CreatedAt']); + } + elseif (\array_key_exists('CreatedAt', $data) && $data['CreatedAt'] === null) { + $object->setCreatedAt(null); + } if (\array_key_exists('Status', $data) && $data['Status'] !== null) { $values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); foreach ($data['Status'] as $key => $value) { @@ -210,6 +234,12 @@ public function denormalize($data, $type, $format = null, array $context = []) elseif (\array_key_exists('Scope', $data) && $data['Scope'] === null) { $object->setScope(null); } + if (\array_key_exists('ClusterVolume', $data) && $data['ClusterVolume'] !== null) { + $object->setClusterVolume($this->denormalizer->denormalize($data['ClusterVolume'], \Docker\API\Model\ClusterVolume::class, 'json', $context)); + } + elseif (\array_key_exists('ClusterVolume', $data) && $data['ClusterVolume'] === null) { + $object->setClusterVolume(null); + } if (\array_key_exists('Options', $data) && $data['Options'] !== null) { $values_2 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); foreach ($data['Options'] as $key_2 => $value_2) { @@ -237,6 +267,9 @@ public function normalize($object, $format = null, array $context = []) $data['Name'] = $object->getName(); $data['Driver'] = $object->getDriver(); $data['Mountpoint'] = $object->getMountpoint(); + if ($object->isInitialized('createdAt') && null !== $object->getCreatedAt()) { + $data['CreatedAt'] = $object->getCreatedAt(); + } if ($object->isInitialized('status') && null !== $object->getStatus()) { $values = []; foreach ($object->getStatus() as $key => $value) { @@ -250,6 +283,9 @@ public function normalize($object, $format = null, array $context = []) } $data['Labels'] = $values_1; $data['Scope'] = $object->getScope(); + if ($object->isInitialized('clusterVolume') && null !== $object->getClusterVolume()) { + $data['ClusterVolume'] = $this->normalizer->normalize($object->getClusterVolume(), 'json', $context); + } $values_2 = []; foreach ($object->getOptions() as $key_2 => $value_2) { $values_2[$key_2] = $value_2; diff --git a/generated/Normalizer/ClusterInfoVersionNormalizer.php b/generated/Normalizer/VolumesNamePutBodyNormalizer.php similarity index 69% rename from generated/Normalizer/ClusterInfoVersionNormalizer.php rename to generated/Normalizer/VolumesNamePutBodyNormalizer.php index 22ce890aa..3774ce797 100644 --- a/generated/Normalizer/ClusterInfoVersionNormalizer.php +++ b/generated/Normalizer/VolumesNamePutBodyNormalizer.php @@ -14,7 +14,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\HttpKernel\Kernel; if (!class_exists(Kernel::class) or (Kernel::MAJOR_VERSION >= 7 or Kernel::MAJOR_VERSION === 6 and Kernel::MINOR_VERSION === 4)) { - class ClusterInfoVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class VolumesNamePutBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -22,11 +22,11 @@ class ClusterInfoVersionNormalizer implements DenormalizerInterface, NormalizerI use ValidatorTrait; public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ClusterInfoVersion::class; + return $type === \Docker\API\Model\VolumesNamePutBody::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ClusterInfoVersion::class; + return is_object($data) && get_class($data) === \Docker\API\Model\VolumesNamePutBody::class; } public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -36,33 +36,33 @@ public function denormalize(mixed $data, string $type, string $format = null, ar if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ClusterInfoVersion(); + $object = new \Docker\API\Model\VolumesNamePutBody(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Index', $data) && $data['Index'] !== null) { - $object->setIndex($data['Index']); + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\ClusterVolumeSpec::class, 'json', $context)); } - elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { - $object->setIndex(null); + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); } return $object; } public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null { $data = []; - if ($object->isInitialized('index') && null !== $object->getIndex()) { - $data['Index'] = $object->getIndex(); + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ClusterInfoVersion::class => false]; + return [\Docker\API\Model\VolumesNamePutBody::class => false]; } } } else { - class ClusterInfoVersionNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface + class VolumesNamePutBodyNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; use NormalizerAwareTrait; @@ -70,11 +70,11 @@ class ClusterInfoVersionNormalizer implements DenormalizerInterface, NormalizerI use ValidatorTrait; public function supportsDenormalization($data, $type, string $format = null, array $context = []): bool { - return $type === \Docker\API\Model\ClusterInfoVersion::class; + return $type === \Docker\API\Model\VolumesNamePutBody::class; } public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool { - return is_object($data) && get_class($data) === \Docker\API\Model\ClusterInfoVersion::class; + return is_object($data) && get_class($data) === \Docker\API\Model\VolumesNamePutBody::class; } /** * @return mixed @@ -87,15 +87,15 @@ public function denormalize($data, $type, $format = null, array $context = []) if (isset($data['$recursiveRef'])) { return new Reference($data['$recursiveRef'], $context['document-origin']); } - $object = new \Docker\API\Model\ClusterInfoVersion(); + $object = new \Docker\API\Model\VolumesNamePutBody(); if (null === $data || false === \is_array($data)) { return $object; } - if (\array_key_exists('Index', $data) && $data['Index'] !== null) { - $object->setIndex($data['Index']); + if (\array_key_exists('Spec', $data) && $data['Spec'] !== null) { + $object->setSpec($this->denormalizer->denormalize($data['Spec'], \Docker\API\Model\ClusterVolumeSpec::class, 'json', $context)); } - elseif (\array_key_exists('Index', $data) && $data['Index'] === null) { - $object->setIndex(null); + elseif (\array_key_exists('Spec', $data) && $data['Spec'] === null) { + $object->setSpec(null); } return $object; } @@ -105,14 +105,14 @@ public function denormalize($data, $type, $format = null, array $context = []) public function normalize($object, $format = null, array $context = []) { $data = []; - if ($object->isInitialized('index') && null !== $object->getIndex()) { - $data['Index'] = $object->getIndex(); + if ($object->isInitialized('spec') && null !== $object->getSpec()) { + $data['Spec'] = $this->normalizer->normalize($object->getSpec(), 'json', $context); } return $data; } public function getSupportedTypes(?string $format = null): array { - return [\Docker\API\Model\ClusterInfoVersion::class => false]; + return [\Docker\API\Model\VolumesNamePutBody::class => false]; } } } \ No newline at end of file diff --git a/src/Manager/ContainerManager.php b/src/Manager/ContainerManager.php index 3b1be9775..5651f820b 100644 --- a/src/Manager/ContainerManager.php +++ b/src/Manager/ContainerManager.php @@ -203,7 +203,7 @@ public function unpause($id, $parameters = [], $fetch = self::FETCH_OBJECT) public function wait($id, $parameters = [], $fetch = self::FETCH_OBJECT) { - return $this->api->containerWait(urlencode($id), $fetch); + return $this->api->containerWait(urlencode($id), $parameters, $fetch); } public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) @@ -213,16 +213,16 @@ public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) public function getArchive($id, $parameters = [], $fetch = self::FETCH_OBJECT) { - return $this->api->containerGetArchive(urlencode($id), $parameters, $fetch); + return $this->api->containerArchive(urlencode($id), $parameters, $fetch); } public function getArchiveInformation($id, $parameters = [], $fetch = self::FETCH_OBJECT) { - return $this->api->containerArchiveHead(urlencode($id), $parameters, $fetch); + return $this->api->containerArchiveInfo(urlencode($id), $parameters, $fetch); } public function putArchive($id, $inputStream, $parameters = [], $fetch = self::FETCH_OBJECT) { - return $this->api->containerPutArchive(urlencode($id), $inputStream, $parameters, $fetch); + return $this->api->putContainerArchive(urlencode($id), $inputStream, $parameters, $fetch); } } diff --git a/src/Manager/ImageManager.php b/src/Manager/ImageManager.php index 980765dca..31e86a63c 100644 --- a/src/Manager/ImageManager.php +++ b/src/Manager/ImageManager.php @@ -169,7 +169,7 @@ public function search($parameters = [], $fetch = self::FETCH_OBJECT) return $this->api->imageSearch($parameters, $fetch); } - public function commit(\Docker\API\Model\Config $containerConfig, $parameters = [], $fetch = self::FETCH_OBJECT) + public function commit(\Docker\API\Model\ContainerConfig $containerConfig, $parameters = [], $fetch = self::FETCH_OBJECT) { return $this->api->imageCommit($containerConfig, $parameters, $fetch); } diff --git a/src/Manager/MiscManager.php b/src/Manager/MiscManager.php index 74df8ef22..f01a0596d 100644 --- a/src/Manager/MiscManager.php +++ b/src/Manager/MiscManager.php @@ -2,7 +2,7 @@ namespace Docker\Manager; -use Docker\API\Model\EventsGetResponse200; +use Docker\API\Model\EventMessage; use Docker\Stream\EventStream; class MiscManager extends BaseManager @@ -31,7 +31,7 @@ public function getEvents($parameters = [], $fetch = self::FETCH_OBJECT): EventS $eventList = []; $stream = new EventStream($response->getBody(), $this->serializer); - $stream->onFrame(function (EventsGetResponse200 $event) use (&$eventList) { + $stream->onFrame(function (EventMessage $event) use (&$eventList) { $eventList[] = $event; }); $stream->wait(); diff --git a/src/Manager/NetworkManager.php b/src/Manager/NetworkManager.php index fb3e25520..a26fc293f 100644 --- a/src/Manager/NetworkManager.php +++ b/src/Manager/NetworkManager.php @@ -16,7 +16,7 @@ public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) { - return $this->api->networkInspect(urlencode($id), $fetch); + return $this->api->networkInspect(urlencode($id), $parameters, $fetch); } public function create(\Docker\API\Model\NetworksCreatePostBody $networkConfig, $parameters = [], $fetch = self::FETCH_OBJECT) diff --git a/src/Manager/ServiceManager.php b/src/Manager/ServiceManager.php index e54248b4e..740a2109c 100644 --- a/src/Manager/ServiceManager.php +++ b/src/Manager/ServiceManager.php @@ -24,7 +24,7 @@ public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) public function find($id, $parameters = [], $fetch = self::FETCH_OBJECT) { - return $this->api->serviceInspect(urlencode($id), $fetch); + return $this->api->serviceInspect(urlencode($id), $parameters, $fetch); } public function update($id, \Docker\API\Model\ServicesIdUpdatePostBody $serviceSpec, $parameters = [], $fetch = self::FETCH_OBJECT) diff --git a/src/Manager/VolumeManager.php b/src/Manager/VolumeManager.php index 822431596..5b1f53c71 100644 --- a/src/Manager/VolumeManager.php +++ b/src/Manager/VolumeManager.php @@ -9,7 +9,7 @@ public function findAll($parameters = [], $fetch = self::FETCH_OBJECT) return $this->api->volumeList($parameters, $fetch); } - public function create(\Docker\API\Model\VolumesCreatePostBody $volumeConfig, $parameters = [], $fetch = self::FETCH_OBJECT) + public function create(\Docker\API\Model\VolumeCreateOptions $volumeConfig, $parameters = [], $fetch = self::FETCH_OBJECT) { return $this->api->volumeCreate($volumeConfig, $fetch); } diff --git a/src/Stream/EventStream.php b/src/Stream/EventStream.php index f57039489..137addb68 100644 --- a/src/Stream/EventStream.php +++ b/src/Stream/EventStream.php @@ -14,6 +14,6 @@ class EventStream extends MultiJsonStream */ protected function getDecodeClass(): string { - return \Docker\API\Model\EventsGetResponse200::class; + return \Docker\API\Model\EventMessage::class; } } diff --git a/tests/Manager/MiscManagerTest.php b/tests/Manager/MiscManagerTest.php index 43027c705..29bafcb08 100644 --- a/tests/Manager/MiscManagerTest.php +++ b/tests/Manager/MiscManagerTest.php @@ -2,7 +2,7 @@ namespace Docker\Tests\Manager; -use Docker\API\Model\EventsGetResponse200; +use Docker\API\Model\EventMessage; use Docker\Manager\MiscManager; use Docker\Tests\TestCase; @@ -26,7 +26,7 @@ public function testGetEventsStream() ], MiscManager::FETCH_STREAM); $lastEvent = null; - $stream->onFrame(function (EventsGetResponse200 $event) use (&$lastEvent) { + $stream->onFrame(function (EventMessage $event) use (&$lastEvent) { $lastEvent = $event; }); @@ -35,7 +35,7 @@ public function testGetEventsStream() ]); $stream->wait(); - $this->assertInstanceOf(EventsGetResponse200::class, $lastEvent); + $this->assertInstanceOf(EventMessage::class, $lastEvent); } public function testGetEventsObject() @@ -46,6 +46,6 @@ public function testGetEventsObject() ], MiscManager::FETCH_OBJECT); $this->assertIsArray($events); - $this->assertInstanceOf(EventsGetResponse200::class, $events[0]); + $this->assertInstanceOf(EventMessage::class, $events[0]); } } diff --git a/v1.25.yaml b/v1.25.yaml deleted file mode 100644 index 75e401aa9..000000000 --- a/v1.25.yaml +++ /dev/null @@ -1,7710 +0,0 @@ -# A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API. -# -# This is used for generating API documentation and the types used by the -# client/server. See api/README.md for more information. -# -# Some style notes: -# - This file is used by ReDoc, which allows GitHub Flavored Markdown in -# descriptions. -# - There is no maximum line length, for ease of editing and pretty diffs. -# - operationIds are in the format "NounVerb", with a singular noun. - -swagger: "2.0" -schemes: - - "http" - - "https" -produces: - - "application/json" - - "text/plain" -consumes: - - "application/json" - - "text/plain" -basePath: "/v1.25" -info: - title: "Docker Engine API" - version: "1.25" - x-logo: - url: "https://docs.docker.com/assets/images/logo-docker-main.png" - description: | - The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. - - Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. - - # Errors - - The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: - - ``` - { - "message": "page not found" - } - ``` - - # Versioning - - The API is usually changed in each release of Docker, so API calls are versioned to ensure that clients don't break. - - For Docker Engine 1.13, the API version is 1.25. To lock to this version, you prefix the URL with `/v1.25`. For example, calling `/info` is the same as calling `/v1.25/info`. - - Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. - - In previous versions of Docker, it was possible to access the API without providing a version. This behaviour is now deprecated will be removed in a future version of Docker. - - The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer Docker daemons. - - # Authentication - - Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a Base64 encoded (JSON) string with the following structure: - - ``` - { - "username": "string", - "password": "string", - "email": "string", - "serveraddress": "string" - } - ``` - - The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. - - If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: - - ``` - { - "identitytoken": "9cbaf023786cd7..." - } - ``` - -# The tags on paths define the menu sections in the ReDoc documentation, so -# the usage of tags must make sense for that: -# - They should be singular, not plural. -# - There should not be too many tags, or the menu becomes unwieldy. For -# example, it is preferable to add a path to the "System" tag instead of -# creating a tag with a single path in it. -# - The order of tags in this list defines the order in the menu. -tags: - # Primary objects - - name: "Container" - x-displayName: "Containers" - description: | - Create and manage containers. - - name: "Image" - x-displayName: "Images" - - name: "Network" - x-displayName: "Networks" - description: | - Networks are user-defined networks that containers can be attached to. See the [networking documentation](https://docs.docker.com/network/) for more information. - - name: "Volume" - x-displayName: "Volumes" - description: | - Create and manage persistent storage that can be attached to containers. - - name: "Exec" - x-displayName: "Exec" - description: | - Run new commands inside running containers. See the [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/) for more information. - - To exec a command in a container, you first need to create an exec instance, then start it. These two API endpoints are wrapped up in a single command-line command, `docker exec`. - - name: "Secret" - x-displayName: "Secrets" - # Swarm things - - name: "Swarm" - x-displayName: "Swarm" - description: | - Engines can be clustered together in a swarm. See [the swarm mode documentation](https://docs.docker.com/engine/swarm/) for more information. - - name: "Node" - x-displayName: "Nodes" - description: | - Nodes are instances of the Engine participating in a swarm. Swarm mode must be enabled for these endpoints to work. - - name: "Service" - x-displayName: "Services" - description: | - Services are the definitions of tasks to run on a swarm. Swarm mode must be enabled for these endpoints to work. - - name: "Task" - x-displayName: "Tasks" - description: | - A task is a container running on a swarm. It is the atomic scheduling unit of swarm. Swarm mode must be enabled for these endpoints to work. - # System things - - name: "Plugin" - x-displayName: "Plugins" - - name: "System" - x-displayName: "System" - -definitions: - Port: - type: "object" - description: "An open port on a container" - required: [PrivatePort, Type] - properties: - IP: - type: "string" - format: "ip-address" - PrivatePort: - type: "integer" - format: "uint16" - x-nullable: false - description: "Port on the container" - PublicPort: - type: "integer" - format: "uint16" - description: "Port exposed on the host" - Type: - type: "string" - x-nullable: false - enum: ["tcp", "udp"] - example: - PrivatePort: 8080 - PublicPort: 80 - Type: "tcp" - - MountPoint: - type: "object" - description: | - MountPoint represents a mount point configuration inside the container. - This is used for reporting the mountpoints in use by a container. - properties: - Type: - description: | - The mount type: - - - `bind` a mount of a file or directory from the host into the container. - - `volume` a docker volume with the given `Name`. - - `tmpfs` a `tmpfs`. - type: "string" - enum: - - "bind" - - "volume" - - "tmpfs" - example: "volume" - Name: - description: | - Name is the name reference to the underlying data defined by `Source` - e.g., the volume name. - type: "string" - example: "myvolume" - Source: - description: | - Source location of the mount. - - For volumes, this contains the storage location of the volume (within - `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains - the source (host) part of the bind-mount. For `tmpfs` mount points, this - field is empty. - type: "string" - example: "/var/lib/docker/volumes/myvolume/_data" - Destination: - description: | - Destination is the path relative to the container root (`/`) where - the `Source` is mounted inside the container. - type: "string" - example: "/usr/share/nginx/html/" - Driver: - description: | - Driver is the volume driver used to create the volume (if it is a volume). - type: "string" - example: "local" - Mode: - description: | - Mode is a comma separated list of options supplied by the user when - creating the bind/volume mount. - - The default is platform-specific (`"z"` on Linux, empty on Windows). - type: "string" - example: "z" - RW: - description: | - Whether the mount is mounted writable (read-write). - type: "boolean" - example: true - Propagation: - description: | - Propagation describes how mounts are propagated from the host into the - mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) - for details. This field is not used on Windows. - type: "string" - example: "" - - DeviceMapping: - type: "object" - description: "A device mapping between the host and container" - properties: - PathOnHost: - type: "string" - PathInContainer: - type: "string" - CgroupPermissions: - type: "string" - example: - PathOnHost: "/dev/deviceName" - PathInContainer: "/dev/deviceName" - CgroupPermissions: "mrw" - - ThrottleDevice: - type: "object" - properties: - Path: - description: "Device path" - type: "string" - Rate: - description: "Rate" - type: "integer" - format: "int64" - minimum: 0 - - Mount: - type: "object" - properties: - Target: - description: "Container path." - type: "string" - Source: - description: "Mount source (e.g. a volume name, a host path)." - Type: - description: | - The mount type. Available types: - - - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. - - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. - - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. - type: "string" - enum: - - "bind" - - "volume" - - "tmpfs" - ReadOnly: - description: "Whether the mount should be read-only." - type: "boolean" - BindOptions: - description: "Optional configuration for the `bind` type." - type: "object" - properties: - Propagation: - description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`." - enum: - - "private" - - "rprivate" - - "shared" - - "rshared" - - "slave" - - "rslave" - VolumeOptions: - description: "Optional configuration for the `volume` type." - type: "object" - properties: - NoCopy: - description: "Populate volume with data from the target." - type: "boolean" - default: false - Labels: - description: "User-defined key/value metadata." - type: "object" - additionalProperties: - type: "string" - DriverConfig: - description: "Map of driver specific options" - type: "object" - properties: - Name: - description: "Name of the driver to use to create the volume." - type: "string" - Options: - description: "key/value map of driver specific options." - type: "object" - additionalProperties: - type: "string" - TmpfsOptions: - description: "Optional configuration for the `tmpfs` type." - type: "object" - properties: - SizeBytes: - description: "The size for the tmpfs mount in bytes." - type: "integer" - format: "int64" - Mode: - description: "The permission mode for the tmpfs mount in an integer." - type: "integer" - RestartPolicy: - description: | - The behavior to apply when the container exits. The default is not to restart. - - An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. - type: "object" - properties: - Name: - type: "string" - description: | - - `always` Always restart - - `unless-stopped` Restart always except when the user has manually stopped the container - - `on-failure` Restart only when the container exit code is non-zero - enum: - - "always" - - "unless-stopped" - - "on-failure" - MaximumRetryCount: - type: "integer" - description: "If `on-failure` is used, the number of times to retry before giving up" - default: {} - - Resources: - description: "A container's resources (cgroups config, ulimits, etc)" - type: "object" - properties: - # Applicable to all platforms - CpuShares: - description: "An integer value representing this container's relative CPU weight versus other containers." - type: "integer" - Memory: - description: "Memory limit in bytes." - type: "integer" - default: 0 - # Applicable to UNIX platforms - CgroupParent: - description: "Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist." - type: "string" - BlkioWeight: - description: "Block IO weight (relative weight)." - type: "integer" - minimum: 0 - maximum: 1000 - BlkioWeightDevice: - description: | - Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`. - type: "array" - items: - type: "object" - properties: - Path: - type: "string" - Weight: - type: "integer" - minimum: 0 - BlkioDeviceReadBps: - description: | - Limit read rate (bytes per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - type: "array" - items: - $ref: "#/definitions/ThrottleDevice" - BlkioDeviceWriteBps: - description: | - Limit write rate (bytes per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - type: "array" - items: - $ref: "#/definitions/ThrottleDevice" - BlkioDeviceReadIOps: - description: | - Limit read rate (IO per second) from a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - type: "array" - items: - $ref: "#/definitions/ThrottleDevice" - BlkioDeviceWriteIOps: - description: | - Limit write rate (IO per second) to a device, in the form `[{"Path": "device_path", "Rate": rate}]`. - type: "array" - items: - $ref: "#/definitions/ThrottleDevice" - CpuPeriod: - description: "The length of a CPU period in microseconds." - type: "integer" - format: "int64" - CpuQuota: - description: "Microseconds of CPU time that the container can get in a CPU period." - type: "integer" - format: "int64" - CpuRealtimePeriod: - description: "The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks." - type: "integer" - format: "int64" - CpuRealtimeRuntime: - description: "The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks." - type: "integer" - format: "int64" - CpusetCpus: - description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)" - type: "string" - CpusetMems: - description: "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems." - type: "string" - Devices: - description: "A list of devices to add to the container." - type: "array" - items: - $ref: "#/definitions/DeviceMapping" - DiskQuota: - description: "Disk limit (in bytes)." - type: "integer" - format: "int64" - KernelMemory: - description: "Kernel memory limit in bytes." - type: "integer" - format: "int64" - MemoryReservation: - description: "Memory soft limit in bytes." - type: "integer" - format: "int64" - MemorySwap: - description: "Total memory limit (memory + swap). Set as `-1` to enable unlimited swap." - type: "integer" - format: "int64" - MemorySwappiness: - description: "Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100." - type: "integer" - format: "int64" - minimum: 0 - maximum: 100 - NanoCpus: - description: "CPU quota in units of 10-9 CPUs." - type: "integer" - format: "int64" - OomKillDisable: - description: "Disable OOM Killer for the container." - type: "boolean" - PidsLimit: - description: "Tune a container's pids limit. Set -1 for unlimited." - type: "integer" - format: "int64" - Ulimits: - description: | - A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" - type: "array" - items: - type: "object" - properties: - Name: - description: "Name of ulimit" - type: "string" - Soft: - description: "Soft limit" - type: "integer" - Hard: - description: "Hard limit" - type: "integer" - # Applicable to Windows - CpuCount: - description: | - The number of usable CPUs (Windows only). - - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. - type: "integer" - format: "int64" - CpuPercent: - description: | - The usable percentage of the available CPUs (Windows only). - - On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. - type: "integer" - format: "int64" - IOMaximumIOps: - description: "Maximum IOps for the container system drive (Windows only)" - type: "integer" - format: "int64" - IOMaximumBandwidth: - description: "Maximum IO in bytes per second for the container system drive (Windows only)" - type: "integer" - format: "int64" - - HostConfig: - description: "Container configuration that depends on the host we are running on" - allOf: - - $ref: "#/definitions/Resources" - - type: "object" - properties: - # Applicable to all platforms - Binds: - type: "array" - description: | - A list of volume bindings for this container. Each volume binding is a string in one of these forms: - - - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - - `host-src:container-dest:ro` to make the bind-mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. - - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path. - items: - type: "string" - ContainerIDFile: - type: "string" - description: "Path to a file where the container ID is written" - LogConfig: - type: "object" - description: "The logging configuration for this container" - properties: - Type: - type: "string" - enum: - - "json-file" - - "syslog" - - "journald" - - "gelf" - - "fluentd" - - "awslogs" - - "splunk" - - "etwlogs" - - "none" - Config: - type: "object" - additionalProperties: - type: "string" - NetworkMode: - type: "string" - description: "Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken - as a custom network's name to which this container should connect to." - PortBindings: - type: "object" - description: "A map of exposed container ports and the host port they should map to." - additionalProperties: - type: "object" - properties: - HostIp: - type: "string" - description: "The host IP address" - HostPort: - type: "string" - description: "The host port number, as a string" - RestartPolicy: - $ref: "#/definitions/RestartPolicy" - AutoRemove: - type: "boolean" - description: "Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set." - VolumeDriver: - type: "string" - description: "Driver that this container uses to mount volumes." - VolumesFrom: - type: "array" - description: "A list of volumes to inherit from another container, specified in the form `[:]`." - items: - type: "string" - Mounts: - description: "Specification for mounts to be added to the container." - type: "array" - items: - $ref: "#/definitions/Mount" - - # Applicable to UNIX platforms - CapAdd: - type: "array" - description: "A list of kernel capabilities to add to the container." - items: - type: "string" - CapDrop: - type: "array" - description: "A list of kernel capabilities to drop from the container." - items: - type: "string" - Dns: - type: "array" - description: "A list of DNS servers for the container to use." - items: - type: "string" - DnsOptions: - type: "array" - description: "A list of DNS options." - items: - type: "string" - DnsSearch: - type: "array" - description: "A list of DNS search domains." - items: - type: "string" - ExtraHosts: - type: "array" - description: | - A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`. - items: - type: "string" - GroupAdd: - type: "array" - description: "A list of additional groups that the container process will run as." - items: - type: "string" - IpcMode: - type: "string" - description: "IPC namespace to use for the container." - Cgroup: - type: "string" - description: "Cgroup to use for the container." - Links: - type: "array" - description: "A list of links for the container in the form `container_name:alias`." - items: - type: "string" - OomScoreAdj: - type: "integer" - description: "An integer value containing the score given to the container in order to tune OOM killer preferences." - PidMode: - type: "string" - description: | - Set the PID (Process) Namespace mode for the container. It can be either: - - - `"container:"`: joins another container's PID namespace - - `"host"`: use the host's PID namespace inside the container - Privileged: - type: "boolean" - description: "Gives the container full access to the host." - PublishAllPorts: - type: "boolean" - description: "Allocates a random host port for all of a container's exposed ports." - ReadonlyRootfs: - type: "boolean" - description: "Mount the container's root filesystem as read only." - SecurityOpt: - type: "array" - description: "A list of string values to customize labels for MLS - systems, such as SELinux." - items: - type: "string" - StorageOpt: - type: "object" - description: | - Storage driver options for this container, in the form `{"size": "120G"}`. - additionalProperties: - type: "string" - Tmpfs: - type: "object" - description: | - A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ "/run": "rw,noexec,nosuid,size=65536k" }`. - additionalProperties: - type: "string" - UTSMode: - type: "string" - description: "UTS namespace to use for the container." - UsernsMode: - type: "string" - description: "Sets the usernamespace mode for the container when usernamespace remapping option is enabled." - ShmSize: - type: "integer" - description: "Size of `/dev/shm` in bytes. If omitted, the system uses 64MB." - minimum: 0 - Sysctls: - type: "object" - description: | - A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}` - additionalProperties: - type: "string" - Runtime: - type: "string" - description: "Runtime to use with this container." - # Applicable to Windows - ConsoleSize: - type: "array" - description: "Initial console size, as an `[height, width]` array. (Windows only)" - minItems: 2 - maxItems: 2 - items: - type: "integer" - minimum: 0 - Isolation: - type: "string" - description: "Isolation technology of the container. (Windows only)" - enum: - - "default" - - "process" - - "hyperv" - - Config: - description: "Configuration for a container that is portable between hosts" - type: "object" - properties: - Hostname: - description: "The hostname to use for the container, as a valid RFC 1123 hostname." - type: "string" - Domainname: - description: "The domain name to use for the container." - type: "string" - User: - description: "The user that commands are run as inside the container." - type: "string" - AttachStdin: - description: "Whether to attach to `stdin`." - type: "boolean" - default: false - AttachStdout: - description: "Whether to attach to `stdout`." - type: "boolean" - default: true - AttachStderr: - description: "Whether to attach to `stderr`." - type: "boolean" - default: true - ExposedPorts: - description: | - An object mapping ports to an empty object in the form: - - `{"/": {}}` - type: "object" - additionalProperties: - type: "object" - enum: - - {} - default: {} - Tty: - description: "Attach standard streams to a TTY, including `stdin` if it is not closed." - type: "boolean" - default: false - OpenStdin: - description: "Open `stdin`" - type: "boolean" - default: false - StdinOnce: - description: "Close `stdin` after one attached client disconnects" - type: "boolean" - default: false - Env: - description: | - A list of environment variables to set inside the container in the form `["VAR=value", ...]` - type: "array" - items: - type: "string" - Cmd: - description: "Command to run specified as a string or an array of strings." - type: - - "array" - - "string" - items: - type: "string" - Healthcheck: - description: "A test to perform to check that the container is healthy." - type: "object" - properties: - Test: - description: | - The test to perform. Possible values are: - - - `{}` inherit healthcheck from image or parent image - - `{"NONE"}` disable healthcheck - - `{"CMD", args...}` exec arguments directly - - `{"CMD-SHELL", command}` run command with system's default shell - type: "array" - items: - type: "string" - Interval: - description: "The time to wait between checks in nanoseconds. 0 means inherit." - type: "integer" - Timeout: - description: "The time to wait before considering the check to have hung. 0 means inherit." - type: "integer" - Retries: - description: "The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit." - type: "integer" - ArgsEscaped: - description: "Command is already escaped (Windows only)" - type: "boolean" - Image: - description: "The name of the image to use when creating the container" - type: "string" - Volumes: - description: "An object mapping mount point paths inside the container to empty objects." - type: "object" - properties: - additionalProperties: - type: "object" - enum: - - {} - default: {} - WorkingDir: - description: "The working directory for commands to run in." - type: "string" - Entrypoint: - description: | - The entry point for the container as a string or an array of strings. - - If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). - type: - - "array" - - "string" - items: - type: "string" - NetworkDisabled: - description: "Disable networking for the container." - type: "boolean" - MacAddress: - description: "MAC address of the container." - type: "string" - OnBuild: - description: "`ONBUILD` metadata that were defined in the image's `Dockerfile`." - type: "array" - items: - type: "string" - Labels: - description: "User-defined key/value metadata." - type: "object" - additionalProperties: - type: "string" - StopSignal: - description: "Signal to stop a container as a string or unsigned integer." - type: "string" - default: "SIGTERM" - StopTimeout: - description: "Timeout to stop a container in seconds." - type: "integer" - default: 10 - Shell: - description: "Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell." - type: "array" - items: - type: "string" - - NetworkConfig: - description: "TODO: check is correct" - type: "object" - properties: - Bridge: - type: "string" - Gateway: - type: "string" - Address: - type: "string" - IPPrefixLen: - type: "integer" - MacAddress: - type: "string" - PortMapping: - type: "string" - Ports: - type: "array" - items: - $ref: "#/definitions/Port" - - GraphDriver: - description: "Information about this container's graph driver." - type: "object" - properties: - Name: - type: "string" - Data: - type: "object" - additionalProperties: - type: "string" - - Image: - type: "object" - properties: - Id: - type: "string" - RepoTags: - type: "array" - items: - type: "string" - RepoDigests: - type: "array" - items: - type: "string" - Parent: - type: "string" - Comment: - type: "string" - Created: - type: "string" - Container: - type: "string" - ContainerConfig: - $ref: "#/definitions/Config" - DockerVersion: - type: "string" - Author: - type: "string" - Config: - $ref: "#/definitions/Config" - Architecture: - type: "string" - Os: - type: "string" - Size: - type: "integer" - format: "int64" - VirtualSize: - type: "integer" - format: "int64" - GraphDriver: - $ref: "#/definitions/GraphDriver" - RootFS: - type: "object" - properties: - Type: - type: "string" - Layers: - type: "array" - items: - type: "string" - - ImageSummary: - type: "object" - required: - - Id - - ParentId - - RepoTags - - RepoDigests - - Created - - Size - - SharedSize - - VirtualSize - - Labels - - Containers - properties: - Id: - type: "string" - x-nullable: false - ParentId: - type: "string" - x-nullable: false - RepoTags: - type: "array" - x-nullable: false - items: - type: "string" - RepoDigests: - type: "array" - x-nullable: false - items: - type: "string" - Created: - type: "integer" - x-nullable: false - Size: - type: "integer" - x-nullable: false - SharedSize: - type: "integer" - x-nullable: false - VirtualSize: - type: "integer" - x-nullable: false - Labels: - type: "object" - x-nullable: false - additionalProperties: - type: "string" - Containers: - x-nullable: false - type: "integer" - - AuthConfig: - type: "object" - properties: - username: - type: "string" - password: - type: "string" - email: - type: "string" - serveraddress: - type: "string" - example: - username: "hannibal" - password: "xxxx" - serveraddress: "https://index.docker.io/v1/" - - ProcessConfig: - type: "object" - properties: - privileged: - type: "boolean" - user: - type: "string" - tty: - type: "boolean" - entrypoint: - type: "string" - arguments: - type: "array" - items: - type: "string" - - Volume: - type: "object" - required: [Name, Driver, Mountpoint, Labels, Scope, Options] - properties: - Name: - type: "string" - description: "Name of the volume." - x-nullable: false - Driver: - type: "string" - description: "Name of the volume driver used by the volume." - x-nullable: false - Mountpoint: - type: "string" - description: "Mount path of the volume on the host." - x-nullable: false - Status: - type: "object" - description: | - Low-level details about the volume, provided by the volume driver. - Details are returned as a map with key/value pairs: - `{"key":"value","key2":"value2"}`. - - The `Status` field is optional, and is omitted if the volume driver - does not support this feature. - additionalProperties: - type: "object" - Labels: - type: "object" - description: "User-defined key/value metadata." - x-nullable: false - additionalProperties: - type: "string" - Scope: - type: "string" - description: "The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level." - default: "local" - x-nullable: false - enum: ["local", "global"] - Options: - type: "object" - description: "The driver specific options used when creating the volume." - additionalProperties: - type: "string" - UsageData: - type: "object" - required: [Size, RefCount] - properties: - Size: - type: "integer" - description: "The disk space used by the volume (local driver only)" - default: -1 - x-nullable: false - RefCount: - type: "integer" - default: -1 - description: "The number of containers referencing this volume." - x-nullable: false - - example: - Name: "tardis" - Driver: "custom" - Mountpoint: "/var/lib/docker/volumes/tardis" - Status: - hello: "world" - Labels: - com.example.some-label: "some-value" - com.example.some-other-label: "some-other-value" - Scope: "local" - - Network: - type: "object" - properties: - Name: - type: "string" - Id: - type: "string" - Created: - type: "string" - format: "dateTime" - Scope: - type: "string" - Driver: - type: "string" - EnableIPv6: - type: "boolean" - IPAM: - $ref: "#/definitions/IPAM" - Internal: - type: "boolean" - Containers: - type: "object" - additionalProperties: - $ref: "#/definitions/NetworkContainer" - Options: - type: "object" - additionalProperties: - type: "string" - Labels: - type: "object" - additionalProperties: - type: "string" - example: - Name: "net01" - Id: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99" - Created: "2016-10-19T04:33:30.360899459Z" - Scope: "local" - Driver: "bridge" - EnableIPv6: false - IPAM: - Driver: "default" - Config: - - Subnet: "172.19.0.0/16" - Gateway: "172.19.0.1" - Options: - foo: "bar" - Internal: false - Containers: - 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c: - Name: "test" - EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a" - MacAddress: "02:42:ac:13:00:02" - IPv4Address: "172.19.0.2/16" - IPv6Address: "" - Options: - com.docker.network.bridge.default_bridge: "true" - com.docker.network.bridge.enable_icc: "true" - com.docker.network.bridge.enable_ip_masquerade: "true" - com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" - com.docker.network.bridge.name: "docker0" - com.docker.network.driver.mtu: "1500" - Labels: - com.example.some-label: "some-value" - com.example.some-other-label: "some-other-value" - IPAM: - type: "object" - properties: - Driver: - description: "Name of the IPAM driver to use." - type: "string" - default: "default" - Config: - description: "List of IPAM configuration options, specified as a map: `{\"Subnet\": , \"IPRange\": , \"Gateway\": , \"AuxAddress\": }`" - type: "array" - items: - type: "object" - additionalProperties: - type: "string" - Options: - description: "Driver-specific options, specified as a map." - type: "array" - items: - type: "object" - additionalProperties: - type: "string" - NetworkContainer: - type: "object" - properties: - EndpointID: - type: "string" - MacAddress: - type: "string" - IPv4Address: - type: "string" - IPv6Address: - type: "string" - - BuildInfo: - type: "object" - properties: - id: - type: "string" - stream: - type: "string" - error: - type: "string" - errorDetail: - $ref: "#/definitions/ErrorDetail" - status: - type: "string" - progress: - type: "string" - progressDetail: - $ref: "#/definitions/ProgressDetail" - - CreateImageInfo: - type: "object" - properties: - error: - type: "string" - status: - type: "string" - progress: - type: "string" - progressDetail: - $ref: "#/definitions/ProgressDetail" - - PushImageInfo: - type: "object" - properties: - error: - type: "string" - status: - type: "string" - progress: - type: "string" - progressDetail: - $ref: "#/definitions/ProgressDetail" - ErrorDetail: - type: "object" - properties: - code: - type: "integer" - message: - type: "string" - ProgressDetail: - type: "object" - properties: - code: - type: "integer" - message: - type: "integer" - - ErrorResponse: - description: "Represents an error." - type: "object" - required: ["message"] - properties: - message: - description: "The error message." - type: "string" - x-nullable: false - example: - message: "Something went wrong." - - IdResponse: - description: "Response to an API call that returns just an Id" - type: "object" - required: ["Id"] - properties: - Id: - description: "The id of the newly created object." - type: "string" - x-nullable: false - - EndpointSettings: - description: "Configuration for a network endpoint." - type: "object" - properties: - IPAMConfig: - description: "IPAM configurations for the endpoint" - type: "object" - properties: - IPv4Address: - type: "string" - IPv6Address: - type: "string" - LinkLocalIPs: - type: "array" - items: - type: "string" - Links: - type: "array" - items: - type: "string" - Aliases: - type: "array" - items: - type: "string" - NetworkID: - type: "string" - EndpointID: - type: "string" - Gateway: - type: "string" - IPAddress: - type: "string" - IPPrefixLen: - type: "integer" - IPv6Gateway: - type: "string" - GlobalIPv6Address: - type: "string" - GlobalIPv6PrefixLen: - type: "integer" - format: "int64" - MacAddress: - type: "string" - - PluginMount: - type: "object" - x-nullable: false - required: [Name, Description, Settable, Source, Destination, Type, Options] - properties: - Name: - type: "string" - x-nullable: false - Description: - type: "string" - x-nullable: false - Settable: - type: "array" - items: - type: "string" - Source: - type: "string" - Destination: - type: "string" - x-nullable: false - Type: - type: "string" - x-nullable: false - Options: - type: "array" - items: - type: "string" - - PluginDevice: - type: "object" - required: [Name, Description, Settable, Path] - x-nullable: false - properties: - Name: - type: "string" - x-nullable: false - Description: - type: "string" - x-nullable: false - Settable: - type: "array" - items: - type: "string" - Path: - type: "string" - - PluginEnv: - type: "object" - x-nullable: false - required: [Name, Description, Settable, Value] - properties: - Name: - x-nullable: false - type: "string" - Description: - x-nullable: false - type: "string" - Settable: - type: "array" - items: - type: "string" - Value: - type: "string" - - PluginInterfaceType: - type: "object" - x-nullable: false - required: [Prefix, Capability, Version] - properties: - Prefix: - type: "string" - x-nullable: false - Capability: - type: "string" - x-nullable: false - Version: - type: "string" - x-nullable: false - - Plugin: - description: "A plugin for the Engine API" - type: "object" - required: [Settings, Enabled, Config, Name] - properties: - Id: - type: "string" - Name: - type: "string" - x-nullable: false - Enabled: - description: "True when the plugin is running. False when the plugin is not running, only installed." - type: "boolean" - x-nullable: false - Settings: - description: "Settings that can be modified by users." - type: "object" - x-nullable: false - required: [Args, Devices, Env, Mounts] - properties: - Mounts: - type: "array" - items: - $ref: "#/definitions/PluginMount" - Env: - type: "array" - items: - type: "string" - Args: - type: "array" - items: - type: "string" - Devices: - type: "array" - items: - $ref: "#/definitions/PluginDevice" - Config: - description: "The config of a plugin." - type: "object" - x-nullable: false - required: - - Description - - Documentation - - Interface - - Entrypoint - - WorkDir - - Network - - Linux - - PropagatedMount - - Mounts - - Env - - Args - properties: - Description: - type: "string" - x-nullable: false - Documentation: - type: "string" - x-nullable: false - Interface: - description: "The interface between Docker and the plugin" - x-nullable: false - type: "object" - required: [Types, Socket] - properties: - Types: - type: "array" - items: - $ref: "#/definitions/PluginInterfaceType" - Socket: - type: "string" - x-nullable: false - Entrypoint: - type: "array" - items: - type: "string" - WorkDir: - type: "string" - x-nullable: false - User: - type: "object" - x-nullable: false - properties: - UID: - type: "integer" - format: "uint32" - GID: - type: "integer" - format: "uint32" - Network: - type: "object" - x-nullable: false - required: [Type] - properties: - Type: - x-nullable: false - type: "string" - Linux: - type: "object" - x-nullable: false - required: [Capabilities, AllowAllDevices, Devices] - properties: - Capabilities: - type: "array" - items: - type: "string" - AllowAllDevices: - type: "boolean" - x-nullable: false - Devices: - type: "array" - items: - $ref: "#/definitions/PluginDevice" - PropagatedMount: - type: "string" - x-nullable: false - Mounts: - type: "array" - items: - $ref: "#/definitions/PluginMount" - Env: - type: "array" - items: - $ref: "#/definitions/PluginEnv" - Args: - type: "object" - x-nullable: false - required: [Name, Description, Settable, Value] - properties: - Name: - x-nullable: false - type: "string" - Description: - x-nullable: false - type: "string" - Settable: - type: "array" - items: - type: "string" - Value: - type: "array" - items: - type: "string" - rootfs: - type: "object" - properties: - type: - type: "string" - diff_ids: - type: "array" - items: - type: "string" - example: - Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" - Name: "tiborvass/sample-volume-plugin" - Tag: "latest" - Active: true - Settings: - Env: - - "DEBUG=0" - Args: null - Devices: null - Config: - Description: "A sample volume plugin for Docker" - Documentation: "https://docs.docker.com/engine/extend/plugins/" - Interface: - Types: - - "docker.volumedriver/1.0" - Socket: "plugins.sock" - Entrypoint: - - "/usr/bin/sample-volume-plugin" - - "/data" - WorkDir: "" - User: {} - Network: - Type: "" - Linux: - Capabilities: null - AllowAllDevices: false - Devices: null - Mounts: null - PropagatedMount: "/data" - Env: - - Name: "DEBUG" - Description: "If set, prints debug messages" - Settable: null - Value: "0" - Args: - Name: "args" - Description: "command line arguments" - Settable: null - Value: [] - - NodeSpec: - type: "object" - properties: - Name: - description: "Name for the node." - type: "string" - Labels: - description: "User-defined key/value metadata." - type: "object" - additionalProperties: - type: "string" - Role: - description: "Role of the node." - type: "string" - enum: - - "worker" - - "manager" - Availability: - description: "Availability of the node." - type: "string" - enum: - - "active" - - "pause" - - "drain" - example: - Availability: "active" - Name: "node-name" - Role: "manager" - Labels: - foo: "bar" - Node: - type: "object" - properties: - ID: - type: "string" - Version: - type: "object" - properties: - Index: - type: "integer" - format: "int64" - CreatedAt: - type: "string" - format: "dateTime" - UpdatedAt: - type: "string" - format: "dateTime" - Spec: - $ref: "#/definitions/NodeSpec" - Description: - type: "object" - properties: - Hostname: - type: "string" - Platform: - type: "object" - properties: - Architecture: - type: "string" - OS: - type: "string" - Resources: - type: "object" - properties: - NanoCPUs: - type: "integer" - format: "int64" - MemoryBytes: - type: "integer" - format: "int64" - Engine: - type: "object" - properties: - EngineVersion: - type: "string" - Labels: - type: "object" - additionalProperties: - type: "string" - Plugins: - type: "array" - items: - type: "object" - properties: - Type: - type: "string" - Name: - type: "string" - example: - ID: "24ifsmvkjbyhk" - Version: - Index: 8 - CreatedAt: "2016-06-07T20:31:11.853781916Z" - UpdatedAt: "2016-06-07T20:31:11.999868824Z" - Spec: - Name: "my-node" - Role: "manager" - Availability: "active" - Labels: - foo: "bar" - Description: - Hostname: "bf3067039e47" - Platform: - Architecture: "x86_64" - OS: "linux" - Resources: - NanoCPUs: 4000000000 - MemoryBytes: 8272408576 - Engine: - EngineVersion: "1.13.0" - Labels: - foo: "bar" - Plugins: - - Type: "Volume" - Name: "local" - - Type: "Network" - Name: "bridge" - - Type: "Network" - Name: "null" - - Type: "Network" - Name: "overlay" - Status: - State: "ready" - Addr: "172.17.0.2" - ManagerStatus: - Leader: true - Reachability: "reachable" - Addr: "172.17.0.2:2377" - SwarmSpec: - description: "User modifiable swarm configuration." - type: "object" - properties: - Name: - description: "Name of the swarm." - type: "string" - Labels: - description: "User-defined key/value metadata." - type: "object" - additionalProperties: - type: "string" - Orchestration: - description: "Orchestration configuration." - type: "object" - properties: - TaskHistoryRetentionLimit: - description: "The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks." - type: "integer" - format: "int64" - Raft: - description: "Raft configuration." - type: "object" - properties: - SnapshotInterval: - description: "The number of log entries between snapshots." - type: "integer" - format: "int64" - KeepOldSnapshots: - description: "The number of snapshots to keep beyond the current snapshot." - type: "integer" - format: "int64" - LogEntriesForSlowFollowers: - description: "The number of log entries to keep around to sync up slow followers after a snapshot is created." - type: "integer" - format: "int64" - ElectionTick: - description: | - The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`. - - A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. - type: "integer" - HeartbeatTick: - description: | - The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. - - A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. - type: "integer" - Dispatcher: - description: "Dispatcher configuration." - type: "object" - properties: - HeartbeatPeriod: - description: "The delay for an agent to send a heartbeat to the dispatcher." - type: "integer" - format: "int64" - CAConfig: - description: "CA configuration." - type: "object" - properties: - NodeCertExpiry: - description: "The duration node certificates are issued for." - type: "integer" - format: "int64" - ExternalCAs: - description: "Configuration for forwarding signing requests to an external certificate authority." - type: "array" - items: - type: "object" - properties: - Protocol: - description: "Protocol for communication with the external CA (currently only `cfssl` is supported)." - type: "string" - enum: - - "cfssl" - default: "cfssl" - URL: - description: "URL where certificate signing requests should be sent." - type: "string" - Options: - description: "An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver." - type: "object" - additionalProperties: - type: "string" - EncryptionConfig: - description: "Parameters related to encryption-at-rest." - type: "object" - properties: - AutoLockManagers: - description: "If set, generate a key and use it to lock data stored on the managers." - type: "boolean" - TaskDefaults: - description: "Defaults for creating tasks in this cluster." - type: "object" - properties: - LogDriver: - description: | - The log driver to use for tasks created in the orchestrator if unspecified by a service. - - Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated. - type: "object" - properties: - Name: - type: "string" - Options: - type: "object" - additionalProperties: - type: "string" - example: - Name: "default" - Orchestration: - TaskHistoryRetentionLimit: 10 - Raft: - SnapshotInterval: 10000 - LogEntriesForSlowFollowers: 500 - HeartbeatTick: 1 - ElectionTick: 3 - Dispatcher: - HeartbeatPeriod: 5000000000 - CAConfig: - NodeCertExpiry: 7776000000000000 - JoinTokens: - Worker: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx" - Manager: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" - EncryptionConfig: - AutoLockManagers: false - # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but - # without `JoinTokens`. - ClusterInfo: - type: "object" - properties: - ID: - description: "The ID of the swarm." - type: "string" - Version: - type: "object" - properties: - Index: - type: "integer" - format: "int64" - CreatedAt: - type: "string" - format: "dateTime" - UpdatedAt: - type: "string" - format: "dateTime" - Spec: - $ref: "#/definitions/SwarmSpec" - TaskSpec: - description: "User modifiable task configuration." - type: "object" - properties: - ContainerSpec: - type: "object" - properties: - Image: - description: "The image name to use for the container." - type: "string" - Command: - description: "The command to be run in the image." - type: "array" - items: - type: "string" - Args: - description: "Arguments to the command." - type: "array" - items: - type: "string" - Env: - description: "A list of environment variables in the form `VAR=value`." - type: "array" - items: - type: "string" - Dir: - description: "The working directory for commands to run in." - type: "string" - User: - description: "The user inside the container." - type: "string" - Labels: - description: "User-defined key/value data." - type: "object" - additionalProperties: - type: "string" - TTY: - description: "Whether a pseudo-TTY should be allocated." - type: "boolean" - Mounts: - description: "Specification for mounts to be added to containers created as part of the service." - type: "array" - items: - $ref: "#/definitions/Mount" - StopGracePeriod: - description: "Amount of time to wait for the container to terminate before forcefully killing it." - type: "integer" - format: "int64" - DNSConfig: - description: "Specification for DNS related configurations in resolver configuration file (`resolv.conf`)." - type: "object" - properties: - Nameservers: - description: "The IP addresses of the name servers." - type: "array" - items: - type: "string" - Search: - description: "A search list for host-name lookup." - type: "array" - items: - type: "string" - Options: - description: "A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.)." - type: "array" - items: - type: "string" - Resources: - description: "Resource requirements which apply to each individual container created as part of the service." - type: "object" - properties: - Limits: - description: "Define resources limits." - type: "object" - properties: - NanoCPUs: - description: "CPU limit in units of 10-9 CPU shares." - type: "integer" - format: "int64" - MemoryBytes: - description: "Memory limit in Bytes." - type: "integer" - format: "int64" - Reservations: - description: "Define resources reservation." - properties: - NanoCPUs: - description: "CPU reservation in units of 10-9 CPU shares." - type: "integer" - format: "int64" - MemoryBytes: - description: "Memory reservation in Bytes." - type: "integer" - format: "int64" - RestartPolicy: - description: "Specification for the restart policy which applies to containers created as part of this service." - type: "object" - properties: - Condition: - description: "Condition for restart." - type: "string" - enum: - - "none" - - "on-failure" - - "any" - Delay: - description: "Delay between restart attempts." - type: "integer" - format: "int64" - MaxAttempts: - description: "Maximum attempts to restart a given container before giving up (default value is 0, which is ignored)." - type: "integer" - format: "int64" - default: 0 - Window: - description: "Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded)." - type: "integer" - format: "int64" - default: 0 - Placement: - type: "object" - properties: - Constraints: - description: "An array of constraints." - type: "array" - items: - type: "string" - ForceUpdate: - description: "A counter that triggers an update even if no relevant parameters have been changed." - type: "integer" - Networks: - type: "array" - items: - type: "object" - properties: - Target: - type: "string" - Aliases: - type: "array" - items: - type: "string" - LogDriver: - description: "Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified." - type: "object" - properties: - Name: - type: "string" - Options: - type: "object" - additionalProperties: - type: "string" - TaskState: - type: "string" - enum: - - "new" - - "allocated" - - "pending" - - "assigned" - - "accepted" - - "preparing" - - "ready" - - "starting" - - "running" - - "complete" - - "shutdown" - - "failed" - - "rejected" - Task: - type: "object" - properties: - ID: - description: "The ID of the task." - type: "string" - Version: - type: "object" - properties: - Index: - type: "integer" - format: "int64" - CreatedAt: - type: "string" - format: "dateTime" - UpdatedAt: - type: "string" - format: "dateTime" - Name: - description: "Name of the task." - type: "string" - Labels: - description: "User-defined key/value metadata." - type: "object" - additionalProperties: - type: "string" - Spec: - $ref: "#/definitions/TaskSpec" - ServiceID: - description: "The ID of the service this task is part of." - type: "string" - Slot: - type: "integer" - NodeID: - description: "The ID of the node that this task is on." - type: "string" - Status: - type: "object" - properties: - Timestamp: - type: "string" - format: "dateTime" - State: - $ref: "#/definitions/TaskState" - Message: - type: "string" - Err: - type: "string" - ContainerStatus: - type: "object" - properties: - ContainerID: - type: "string" - PID: - type: "integer" - ExitCode: - type: "integer" - DesiredState: - $ref: "#/definitions/TaskState" - example: - ID: "0kzzo1i0y4jz6027t0k7aezc7" - Version: - Index: 71 - CreatedAt: "2016-06-07T21:07:31.171892745Z" - UpdatedAt: "2016-06-07T21:07:31.376370513Z" - Spec: - ContainerSpec: - Image: "redis" - Resources: - Limits: {} - Reservations: {} - RestartPolicy: - Condition: "any" - MaxAttempts: 0 - Placement: {} - ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" - Slot: 1 - NodeID: "60gvrl6tm78dmak4yl7srz94v" - Status: - Timestamp: "2016-06-07T21:07:31.290032978Z" - State: "running" - Message: "started" - ContainerStatus: - ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" - PID: 677 - DesiredState: "running" - NetworksAttachments: - - Network: - ID: "4qvuz4ko70xaltuqbt8956gd1" - Version: - Index: 18 - CreatedAt: "2016-06-07T20:31:11.912919752Z" - UpdatedAt: "2016-06-07T21:07:29.955277358Z" - Spec: - Name: "ingress" - Labels: - com.docker.swarm.internal: "true" - DriverConfiguration: {} - IPAMOptions: - Driver: {} - Configs: - - Subnet: "10.255.0.0/16" - Gateway: "10.255.0.1" - DriverState: - Name: "overlay" - Options: - com.docker.network.driver.overlay.vxlanid_list: "256" - IPAMOptions: - Driver: - Name: "default" - Configs: - - Subnet: "10.255.0.0/16" - Gateway: "10.255.0.1" - Addresses: - - "10.255.0.10/16" - ServiceSpec: - description: "User modifiable configuration for a service." - type: object - properties: - Name: - description: "Name of the service." - type: "string" - Labels: - description: "User-defined key/value metadata." - type: "object" - additionalProperties: - type: "string" - TaskTemplate: - $ref: "#/definitions/TaskSpec" - Mode: - description: "Scheduling mode for the service." - type: "object" - properties: - Replicated: - type: "object" - properties: - Replicas: - type: "integer" - format: "int64" - Global: - type: "object" - UpdateConfig: - description: "Specification for the update strategy of the service." - type: "object" - properties: - Parallelism: - description: "Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism)." - type: "integer" - format: "int64" - Delay: - description: "Amount of time between updates, in nanoseconds." - type: "integer" - format: "int64" - FailureAction: - description: "Action to take if an updated task fails to run, or stops running during the update." - type: "string" - enum: - - "continue" - - "pause" - Monitor: - description: "Amount of time to monitor each updated task for failures, in nanoseconds." - type: "integer" - format: "int64" - MaxFailureRatio: - description: "The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1." - type: "number" - default: 0 - Networks: - description: "Array of network names or IDs to attach the service to." - type: "array" - items: - type: "object" - properties: - Target: - type: "string" - Aliases: - type: "array" - items: - type: "string" - EndpointSpec: - $ref: "#/definitions/EndpointSpec" - EndpointPortConfig: - type: "object" - properties: - Name: - type: "string" - Protocol: - type: "string" - enum: - - "tcp" - - "udp" - TargetPort: - description: "The port inside the container." - type: "integer" - PublishedPort: - description: "The port on the swarm hosts." - type: "integer" - EndpointSpec: - description: "Properties that can be configured to access and load balance a service." - type: "object" - properties: - Mode: - description: "The mode of resolution to use for internal load balancing between tasks." - type: "string" - enum: - - "vip" - - "dnsrr" - default: "vip" - Ports: - description: "List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used." - type: "array" - items: - $ref: "#/definitions/EndpointPortConfig" - Service: - type: "object" - properties: - ID: - type: "string" - Version: - type: "object" - properties: - Index: - type: "integer" - format: "int64" - CreatedAt: - type: "string" - format: "dateTime" - UpdatedAt: - type: "string" - format: "dateTime" - Spec: - $ref: "#/definitions/ServiceSpec" - Endpoint: - type: "object" - properties: - Spec: - $ref: "#/definitions/EndpointSpec" - Ports: - type: "array" - items: - $ref: "#/definitions/EndpointPortConfig" - VirtualIPs: - type: "array" - items: - type: "object" - properties: - NetworkID: - type: "string" - Addr: - type: "string" - UpdateStatus: - description: "The status of a service update." - type: "object" - properties: - State: - type: "string" - enum: - - "updating" - - "paused" - - "completed" - StartedAt: - type: "string" - format: "dateTime" - CompletedAt: - type: "string" - format: "dateTime" - Message: - type: "string" - example: - ID: "9mnpnzenvg8p8tdbtq4wvbkcz" - Version: - Index: 19 - CreatedAt: "2016-06-07T21:05:51.880065305Z" - UpdatedAt: "2016-06-07T21:07:29.962229872Z" - Spec: - Name: "hopeful_cori" - TaskTemplate: - ContainerSpec: - Image: "redis" - Resources: - Limits: {} - Reservations: {} - RestartPolicy: - Condition: "any" - MaxAttempts: 0 - Placement: {} - ForceUpdate: 0 - Mode: - Replicated: - Replicas: 1 - UpdateConfig: - Parallelism: 1 - FailureAction: "pause" - Monitor: 15000000000 - MaxFailureRatio: 0.15 - EndpointSpec: - Mode: "vip" - Ports: - - - Protocol: "tcp" - TargetPort: 6379 - PublishedPort: 30001 - Endpoint: - Spec: - Mode: "vip" - Ports: - - - Protocol: "tcp" - TargetPort: 6379 - PublishedPort: 30001 - Ports: - - - Protocol: "tcp" - TargetPort: 6379 - PublishedPort: 30001 - VirtualIPs: - - - NetworkID: "4qvuz4ko70xaltuqbt8956gd1" - Addr: "10.255.0.2/16" - - - NetworkID: "4qvuz4ko70xaltuqbt8956gd1" - Addr: "10.255.0.3/16" - ImageDeleteResponse: - type: "object" - properties: - Untagged: - description: "The image ID of an image that was untagged" - type: "string" - Deleted: - description: "The image ID of an image that was deleted" - type: "string" - ServiceUpdateResponse: - type: "object" - properties: - Warnings: - description: "Optional warning messages" - type: "array" - items: - type: "string" - example: - Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" - ContainerSummary: - type: "array" - items: - type: "object" - properties: - Id: - description: "The ID of this container" - type: "string" - x-go-name: "ID" - Names: - description: "The names that this container has been given" - type: "array" - items: - type: "string" - Image: - description: "The name of the image used when creating this container" - type: "string" - ImageID: - description: "The ID of the image that this container was created from" - type: "string" - Command: - description: "Command to run when starting the container" - type: "string" - Created: - description: "When the container was created" - type: "integer" - format: "int64" - Ports: - description: "The ports exposed by this container" - type: "array" - items: - $ref: "#/definitions/Port" - SizeRw: - description: "The size of files that have been created or changed by this container" - type: "integer" - format: "int64" - SizeRootFs: - description: "The total size of all the files in this container" - type: "integer" - format: "int64" - Labels: - description: "User-defined key/value metadata." - type: "object" - additionalProperties: - type: "string" - State: - description: "The state of this container (e.g. `Exited`)" - type: "string" - Status: - description: "Additional human-readable status of this container (e.g. `Exit 0`)" - type: "string" - HostConfig: - type: "object" - properties: - NetworkMode: - type: "string" - NetworkSettings: - description: "A summary of the container's network settings" - type: "object" - properties: - Networks: - type: "object" - additionalProperties: - $ref: "#/definitions/EndpointSettings" - Mounts: - type: "array" - items: - $ref: "#/definitions/MountPoint" - SecretSpec: - type: "object" - properties: - Name: - description: "User-defined name of the secret." - type: "string" - Labels: - description: "User-defined key/value metadata." - type: "object" - additionalProperties: - type: "string" - Data: - description: "Base64-url-safe-encoded secret data" - type: "array" - items: - type: "string" - Secret: - type: "object" - properties: - ID: - type: "string" - Version: - type: "object" - properties: - Index: - type: "integer" - format: "int64" - CreatedAt: - type: "string" - format: "dateTime" - UpdatedAt: - type: "string" - format: "dateTime" - Spec: - $ref: "#/definitions/ServiceSpec" -paths: - /containers/json: - get: - summary: "List containers" - operationId: "ContainerList" - produces: - - "application/json" - parameters: - - name: "all" - in: "query" - description: "Return all containers. By default, only running containers are shown" - type: "boolean" - default: false - - name: "limit" - in: "query" - description: "Return this number of most recently created containers, including non-running ones." - type: "integer" - - name: "size" - in: "query" - description: "Return the size of container as fields `SizeRw` and `SizeRootFs`." - type: "boolean" - default: false - - name: "filters" - in: "query" - description: | - Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{"status": ["paused"]}` will only return paused containers. - - Available filters: - - `exited=` containers with exit code of `` - - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) - - `label=key` or `label="key=value"` of a container label - - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) - - `id=` a container's ID - - `name=` a container's name - - `is-task=`(`true`|`false`) - - `ancestor`=(`[:]`, ``, or ``) - - `before`=(`` or ``) - - `since`=(`` or ``) - - `volume`=(`` or ``) - - `network`=(`` or ``) - - `health`=(`starting`|`healthy`|`unhealthy`|`none`) - type: "string" - responses: - 200: - description: "no error" - schema: - $ref: "#/definitions/ContainerSummary" - examples: - application/json: - - Id: "8dfafdbc3a40" - Names: - - "/boring_feynman" - Image: "ubuntu:latest" - ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" - Command: "echo 1" - Created: 1367854155 - State: "Exited" - Status: "Exit 0" - Ports: - - PrivatePort: 2222 - PublicPort: 3333 - Type: "tcp" - Labels: - com.example.vendor: "Acme" - com.example.license: "GPL" - com.example.version: "1.0" - SizeRw: 12288 - SizeRootFs: 0 - HostConfig: - NetworkMode: "default" - NetworkSettings: - Networks: - bridge: - NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" - EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f" - Gateway: "172.17.0.1" - IPAddress: "172.17.0.2" - IPPrefixLen: 16 - IPv6Gateway: "" - GlobalIPv6Address: "" - GlobalIPv6PrefixLen: 0 - MacAddress: "02:42:ac:11:00:02" - Mounts: - - Name: "fac362...80535" - Source: "/data" - Destination: "/data" - Driver: "local" - Mode: "ro,Z" - RW: false - Propagation: "" - - Id: "9cd87474be90" - Names: - - "/coolName" - Image: "ubuntu:latest" - ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" - Command: "echo 222222" - Created: 1367854155 - State: "Exited" - Status: "Exit 0" - Ports: [] - Labels: {} - SizeRw: 12288 - SizeRootFs: 0 - HostConfig: - NetworkMode: "default" - NetworkSettings: - Networks: - bridge: - NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" - EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a" - Gateway: "172.17.0.1" - IPAddress: "172.17.0.8" - IPPrefixLen: 16 - IPv6Gateway: "" - GlobalIPv6Address: "" - GlobalIPv6PrefixLen: 0 - MacAddress: "02:42:ac:11:00:08" - Mounts: [] - - Id: "3176a2479c92" - Names: - - "/sleepy_dog" - Image: "ubuntu:latest" - ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" - Command: "echo 3333333333333333" - Created: 1367854154 - State: "Exited" - Status: "Exit 0" - Ports: [] - Labels: {} - SizeRw: 12288 - SizeRootFs: 0 - HostConfig: - NetworkMode: "default" - NetworkSettings: - Networks: - bridge: - NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" - EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d" - Gateway: "172.17.0.1" - IPAddress: "172.17.0.6" - IPPrefixLen: 16 - IPv6Gateway: "" - GlobalIPv6Address: "" - GlobalIPv6PrefixLen: 0 - MacAddress: "02:42:ac:11:00:06" - Mounts: [] - - Id: "4cb07b47f9fb" - Names: - - "/running_cat" - Image: "ubuntu:latest" - ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" - Command: "echo 444444444444444444444444444444444" - Created: 1367854152 - State: "Exited" - Status: "Exit 0" - Ports: [] - Labels: {} - SizeRw: 12288 - SizeRootFs: 0 - HostConfig: - NetworkMode: "default" - NetworkSettings: - Networks: - bridge: - NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" - EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9" - Gateway: "172.17.0.1" - IPAddress: "172.17.0.5" - IPPrefixLen: 16 - IPv6Gateway: "" - GlobalIPv6Address: "" - GlobalIPv6PrefixLen: 0 - MacAddress: "02:42:ac:11:00:05" - Mounts: [] - 400: - description: "bad parameter" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["Container"] - /containers/create: - post: - summary: "Create a container" - operationId: "ContainerCreate" - consumes: - - "application/json" - - "application/octet-stream" - produces: - - "application/json" - parameters: - - name: "name" - in: "query" - description: "Assign the specified name to the container. Must match `/?[a-zA-Z0-9_-]+`." - type: "string" - pattern: "/?[a-zA-Z0-9_-]+" - - name: "body" - in: "body" - description: "Container to create" - schema: - allOf: - - $ref: "#/definitions/Config" - - type: "object" - properties: - HostConfig: - $ref: "#/definitions/HostConfig" - NetworkingConfig: - description: "This container's networking configuration." - type: "object" - properties: - EndpointsConfig: - description: "A mapping of network name to endpoint configuration for that network." - type: "object" - additionalProperties: - $ref: "#/definitions/EndpointSettings" - example: - Hostname: "" - Domainname: "" - User: "" - AttachStdin: false - AttachStdout: true - AttachStderr: true - Tty: false - OpenStdin: false - StdinOnce: false - Env: - - "FOO=bar" - - "BAZ=quux" - Cmd: - - "date" - Entrypoint: "" - Image: "ubuntu" - Labels: - com.example.vendor: "Acme" - com.example.license: "GPL" - com.example.version: "1.0" - Volumes: - /volumes/data: {} - WorkingDir: "" - NetworkDisabled: false - MacAddress: "12:34:56:78:9a:bc" - ExposedPorts: - 22/tcp: {} - StopSignal: "SIGTERM" - StopTimeout: 10 - HostConfig: - Binds: - - "/tmp:/tmp" - Links: - - "redis3:redis" - Memory: 0 - MemorySwap: 0 - MemoryReservation: 0 - KernelMemory: 0 - NanoCpus: 500000 - CpuPercent: 80 - CpuShares: 512 - CpuPeriod: 100000 - CpuRealtimePeriod: 1000000 - CpuRealtimeRuntime: 10000 - CpuQuota: 50000 - CpusetCpus: "0,1" - CpusetMems: "0,1" - MaximumIOps: 0 - MaximumIOBps: 0 - BlkioWeight: 300 - BlkioWeightDevice: - - {} - BlkioDeviceReadBps: - - {} - BlkioDeviceReadIOps: - - {} - BlkioDeviceWriteBps: - - {} - BlkioDeviceWriteIOps: - - {} - MemorySwappiness: 60 - OomKillDisable: false - OomScoreAdj: 500 - PidMode: "" - PidsLimit: -1 - PortBindings: - 22/tcp: - - HostPort: "11022" - PublishAllPorts: false - Privileged: false - ReadonlyRootfs: false - Dns: - - "8.8.8.8" - DnsOptions: - - "" - DnsSearch: - - "" - VolumesFrom: - - "parent" - - "other:ro" - CapAdd: - - "NET_ADMIN" - CapDrop: - - "MKNOD" - GroupAdd: - - "newgroup" - RestartPolicy: - Name: "" - MaximumRetryCount: 0 - AutoRemove: true - NetworkMode: "bridge" - Devices: [] - Ulimits: - - {} - LogConfig: - Type: "json-file" - Config: {} - SecurityOpt: [] - StorageOpt: {} - CgroupParent: "" - VolumeDriver: "" - ShmSize: 67108864 - NetworkingConfig: - EndpointsConfig: - isolated_nw: - IPAMConfig: - IPv4Address: "172.20.30.33" - IPv6Address: "2001:db8:abcd::3033" - LinkLocalIPs: - - "169.254.34.68" - - "fe80::3468" - Links: - - "container_1" - - "container_2" - Aliases: - - "server_x" - - "server_y" - - required: true - responses: - 201: - description: "Container created successfully" - schema: - type: "object" - required: [Id, Warnings] - properties: - Id: - description: "The ID of the created container" - type: "string" - x-nullable: false - Warnings: - description: "Warnings encountered when creating the container" - type: "array" - x-nullable: false - items: - type: "string" - examples: - application/json: - Id: "e90e34656806" - Warnings: [] - 400: - description: "bad parameter" - schema: - $ref: "#/definitions/ErrorResponse" - 404: - description: "no such image" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such image: c2ada9df5af8" - 406: - description: "impossible to attach" - schema: - $ref: "#/definitions/ErrorResponse" - 409: - description: "conflict" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["Container"] - /containers/{id}/json: - get: - summary: "Inspect a container" - description: "Return low-level information about a container." - operationId: "ContainerInspect" - produces: - - "application/json" - responses: - 200: - description: "no error" - schema: - type: "object" - properties: - Id: - description: "The ID of the container" - type: "string" - Created: - description: "The time the container was created" - type: "string" - Path: - description: "The path to the command being run" - type: "string" - Args: - description: "The arguments to the command being run" - type: "array" - items: - type: "string" - State: - description: "The state of the container." - type: "object" - properties: - Status: - description: "The status of the container. For example, `running` or `exited`." - type: "string" - Running: - description: "Whether this container is running." - type: "boolean" - Paused: - description: "Whether this container is paused." - type: "boolean" - Restarting: - description: "Whether this container is restarting." - type: "boolean" - OOMKilled: - description: "Whether this container has been killed because it ran out of memory." - type: "boolean" - Dead: - type: "boolean" - Pid: - description: "The process ID of this container" - type: "integer" - ExitCode: - description: "The last exit code of this container" - type: "integer" - Error: - type: "string" - StartedAt: - description: "The time when this container was last started." - type: "string" - FinishedAt: - description: "The time when this container last exited." - type: "string" - Image: - description: "The container's image" - type: "string" - ResolvConfPath: - type: "string" - HostnamePath: - type: "string" - HostsPath: - type: "string" - LogPath: - type: "string" - Node: - description: "TODO" - type: "object" - Name: - type: "string" - RestartCount: - type: "integer" - Driver: - type: "string" - MountLabel: - type: "string" - ProcessLabel: - type: "string" - AppArmorProfile: - type: "string" - ExecIDs: - type: "string" - HostConfig: - $ref: "#/definitions/HostConfig" - GraphDriver: - $ref: "#/definitions/GraphDriver" - SizeRw: - description: "The size of files that have been created or changed by this container." - type: "integer" - format: "int64" - SizeRootFs: - description: "The total size of all the files in this container." - type: "integer" - format: "int64" - Mounts: - type: "array" - items: - $ref: "#/definitions/MountPoint" - Config: - $ref: "#/definitions/Config" - NetworkSettings: - $ref: "#/definitions/NetworkConfig" - examples: - application/json: - AppArmorProfile: "" - Args: - - "-c" - - "exit 9" - Config: - AttachStderr: true - AttachStdin: false - AttachStdout: true - Cmd: - - "/bin/sh" - - "-c" - - "exit 9" - Domainname: "" - Env: - - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - Hostname: "ba033ac44011" - Image: "ubuntu" - Labels: - com.example.vendor: "Acme" - com.example.license: "GPL" - com.example.version: "1.0" - MacAddress: "" - NetworkDisabled: false - OpenStdin: false - StdinOnce: false - Tty: false - User: "" - Volumes: - /volumes/data: {} - WorkingDir: "" - StopSignal: "SIGTERM" - StopTimeout: 10 - Created: "2015-01-06T15:47:31.485331387Z" - Driver: "overlay2" - HostConfig: - MaximumIOps: 0 - MaximumIOBps: 0 - BlkioWeight: 0 - BlkioWeightDevice: - - {} - BlkioDeviceReadBps: - - {} - BlkioDeviceWriteBps: - - {} - BlkioDeviceReadIOps: - - {} - BlkioDeviceWriteIOps: - - {} - ContainerIDFile: "" - CpusetCpus: "" - CpusetMems: "" - CpuPercent: 80 - CpuShares: 0 - CpuPeriod: 100000 - CpuRealtimePeriod: 1000000 - CpuRealtimeRuntime: 10000 - Devices: [] - IpcMode: "" - Memory: 0 - MemorySwap: 0 - MemoryReservation: 0 - KernelMemory: 0 - OomKillDisable: false - OomScoreAdj: 500 - NetworkMode: "bridge" - PidMode: "" - PortBindings: {} - Privileged: false - ReadonlyRootfs: false - PublishAllPorts: false - RestartPolicy: - MaximumRetryCount: 2 - Name: "on-failure" - LogConfig: - Type: "json-file" - Sysctls: - net.ipv4.ip_forward: "1" - Ulimits: - - {} - VolumeDriver: "" - ShmSize: 67108864 - HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname" - HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts" - LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log" - Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39" - Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2" - MountLabel: "" - Name: "/boring_euclid" - NetworkSettings: - Bridge: "" - SandboxID: "" - HairpinMode: false - LinkLocalIPv6Address: "" - LinkLocalIPv6PrefixLen: 0 - SandboxKey: "" - SecondaryIPAddresses: null - SecondaryIPv6Addresses: null - EndpointID: "" - Gateway: "" - GlobalIPv6Address: "" - GlobalIPv6PrefixLen: 0 - IPAddress: "" - IPPrefixLen: 0 - IPv6Gateway: "" - MacAddress: "" - Networks: - bridge: - NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" - EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d" - Gateway: "172.17.0.1" - IPAddress: "172.17.0.2" - IPPrefixLen: 16 - IPv6Gateway: "" - GlobalIPv6Address: "" - GlobalIPv6PrefixLen: 0 - MacAddress: "02:42:ac:12:00:02" - Path: "/bin/sh" - ProcessLabel: "" - ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf" - RestartCount: 1 - State: - Error: "" - ExitCode: 9 - FinishedAt: "2015-01-06T15:47:32.080254511Z" - OOMKilled: false - Dead: false - Paused: false - Pid: 0 - Restarting: false - Running: true - StartedAt: "2015-01-06T15:47:32.072697474Z" - Status: "running" - Mounts: - - Name: "fac362...80535" - Source: "/data" - Destination: "/data" - Driver: "local" - Mode: "ro,Z" - RW: false - Propagation: "" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "size" - in: "query" - type: "boolean" - default: false - description: "Return the size of container as fields `SizeRw` and `SizeRootFs`" - tags: ["Container"] - /containers/{id}/top: - get: - summary: "List processes running inside a container" - description: "On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows." - operationId: "ContainerTop" - responses: - 200: - description: "no error" - schema: - type: "object" - properties: - Titles: - description: "The ps column titles" - type: "array" - items: - type: "string" - Processes: - description: "Each process running in the container, where each is process is an array of values corresponding to the titles" - type: "array" - items: - type: "array" - items: - type: "string" - examples: - application/json: - Titles: - - "UID" - - "PID" - - "PPID" - - "C" - - "STIME" - - "TTY" - - "TIME" - - "CMD" - Processes: - - - - "root" - - "13642" - - "882" - - "0" - - "17:03" - - "pts/0" - - "00:00:00" - - "/bin/bash" - - - - "root" - - "13735" - - "13642" - - "0" - - "17:06" - - "pts/0" - - "00:00:00" - - "sleep 10" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "ps_args" - in: "query" - description: "The arguments to pass to `ps`. For example, `aux`" - type: "string" - default: "-ef" - tags: ["Container"] - /containers/{id}/logs: - get: - summary: "Get container logs" - description: | - Get `stdout` and `stderr` logs from a container. - - Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. - operationId: "ContainerLogs" - responses: - 101: - description: "logs returned as a stream" - schema: - type: "string" - format: "binary" - 200: - description: "logs returned as a string in response body" - schema: - type: "string" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "follow" - in: "query" - description: | - Return the logs as a stream. - - This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). - type: "boolean" - default: false - - name: "stdout" - in: "query" - description: "Return logs from `stdout`" - type: "boolean" - default: false - - name: "stderr" - in: "query" - description: "Return logs from `stderr`" - type: "boolean" - default: false - - name: "since" - in: "query" - description: "Only return logs since this time, as a UNIX timestamp" - type: "integer" - default: 0 - - name: "timestamps" - in: "query" - description: "Add timestamps to every log line" - type: "boolean" - default: false - - name: "tail" - in: "query" - description: "Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines." - type: "string" - default: "all" - tags: ["Container"] - /containers/{id}/changes: - get: - summary: "Get changes on a container’s filesystem" - description: | - Returns which files in a container's filesystem have been added, deleted, or modified. The `Kind` of modification can be one of: - - - `0`: Modified - - `1`: Added - - `2`: Deleted - operationId: "ContainerChanges" - produces: - - "application/json" - responses: - 200: - description: "no error" - schema: - type: "array" - items: - type: "object" - properties: - Path: - description: "Path to file that has changed" - type: "string" - Kind: - description: "Kind of change" - type: "integer" - enum: - - 0 - - 1 - - 2 - examples: - application/json: - - Path: "/dev" - Kind: 0 - - Path: "/dev/kmsg" - Kind: 1 - - Path: "/test" - Kind: 1 - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - tags: ["Container"] - /containers/{id}/export: - get: - summary: "Export a container" - description: "Export the contents of a container as a tarball." - operationId: "ContainerExport" - produces: - - "application/octet-stream" - responses: - 200: - description: "no error" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - tags: ["Container"] - /containers/{id}/stats: - get: - summary: "Get container stats based on resource usage" - description: | - This endpoint returns a live stream of a container’s resource usage statistics. - - The `precpu_stats` is the CPU statistic of last read, which is used for calculating the CPU usage percentage. It is not the same as the `cpu_stats` field. - operationId: "ContainerStats" - produces: - - "application/json" - responses: - 200: - description: "no error" - schema: - type: "object" - examples: - application/json: - read: "2015-01-08T22:57:31.547920715Z" - pids_stats: - current: 3 - networks: - eth0: - rx_bytes: 5338 - rx_dropped: 0 - rx_errors: 0 - rx_packets: 36 - tx_bytes: 648 - tx_dropped: 0 - tx_errors: 0 - tx_packets: 8 - eth5: - rx_bytes: 4641 - rx_dropped: 0 - rx_errors: 0 - rx_packets: 26 - tx_bytes: 690 - tx_dropped: 0 - tx_errors: 0 - tx_packets: 9 - memory_stats: - stats: - total_pgmajfault: 0 - cache: 0 - mapped_file: 0 - total_inactive_file: 0 - pgpgout: 414 - rss: 6537216 - total_mapped_file: 0 - writeback: 0 - unevictable: 0 - pgpgin: 477 - total_unevictable: 0 - pgmajfault: 0 - total_rss: 6537216 - total_rss_huge: 6291456 - total_writeback: 0 - total_inactive_anon: 0 - rss_huge: 6291456 - hierarchical_memory_limit: 67108864 - total_pgfault: 964 - total_active_file: 0 - active_anon: 6537216 - total_active_anon: 6537216 - total_pgpgout: 414 - total_cache: 0 - inactive_anon: 0 - active_file: 0 - pgfault: 964 - inactive_file: 0 - total_pgpgin: 477 - max_usage: 6651904 - usage: 6537216 - failcnt: 0 - limit: 67108864 - blkio_stats: {} - cpu_stats: - cpu_usage: - percpu_usage: - - 8646879 - - 24472255 - - 36438778 - - 30657443 - usage_in_usermode: 50000000 - total_usage: 100215355 - usage_in_kernelmode: 30000000 - system_cpu_usage: 739306590000000 - throttling_data: - periods: 0 - throttled_periods: 0 - throttled_time: 0 - precpu_stats: - cpu_usage: - percpu_usage: - - 8646879 - - 24350896 - - 36438778 - - 30657443 - usage_in_usermode: 50000000 - total_usage: 100093996 - usage_in_kernelmode: 30000000 - system_cpu_usage: 9492140000000 - throttling_data: - periods: 0 - throttled_periods: 0 - throttled_time: 0 - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "stream" - in: "query" - description: "Stream the output. If false, the stats will be output once and then it will disconnect." - type: "boolean" - default: true - tags: ["Container"] - /containers/{id}/resize: - post: - summary: "Resize a container TTY" - description: "Resize the TTY for a container. You must restart the container for the resize to take effect." - operationId: "ContainerResize" - consumes: - - "application/octet-stream" - produces: - - "text/plain" - responses: - 200: - description: "no error" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "cannot resize container" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "h" - in: "query" - required: true - description: "Height of the tty session in characters" - type: "integer" - - name: "w" - in: "query" - required: true - description: "Width of the tty session in characters" - type: "integer" - tags: ["Container"] - /containers/{id}/start: - post: - summary: "Start a container" - operationId: "ContainerStart" - responses: - 204: - description: "no error" - 304: - description: "container already started" - schema: - $ref: "#/definitions/ErrorResponse" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "detachKeys" - in: "query" - description: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`." - type: "string" - tags: ["Container"] - /containers/{id}/stop: - post: - summary: "Stop a container" - operationId: "ContainerStop" - responses: - 204: - description: "no error" - 304: - description: "container already stopped" - schema: - $ref: "#/definitions/ErrorResponse" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "t" - in: "query" - description: "Number of seconds to wait before killing the container" - type: "integer" - tags: ["Container"] - /containers/{id}/restart: - post: - summary: "Restart a container" - operationId: "ContainerRestart" - responses: - 204: - description: "no error" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "t" - in: "query" - description: "Number of seconds to wait before killing the container" - type: "integer" - tags: ["Container"] - /containers/{id}/kill: - post: - summary: "Kill a container" - description: "Send a POSIX signal to a container, defaulting to killing to the container." - operationId: "ContainerKill" - responses: - 204: - description: "no error" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "signal" - in: "query" - description: "Signal to send to the container as an integer or string (e.g. `SIGINT`)" - type: "string" - default: "SIGKILL" - tags: ["Container"] - /containers/{id}/update: - post: - summary: "Update a container" - description: "Change various configuration options of a container without having to recreate it." - operationId: "ContainerUpdate" - consumes: ["application/json"] - produces: ["application/json"] - responses: - 200: - description: "The container has been updated." - schema: - type: "object" - properties: - Warnings: - type: "array" - items: - type: "string" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "update" - in: "body" - required: true - schema: - allOf: - - $ref: "#/definitions/Resources" - - type: "object" - properties: - RestartPolicy: - $ref: "#/definitions/RestartPolicy" - example: - BlkioWeight: 300 - CpuShares: 512 - CpuPeriod: 100000 - CpuQuota: 50000 - CpuRealtimePeriod: 1000000 - CpuRealtimeRuntime: 10000 - CpusetCpus: "0,1" - CpusetMems: "0" - Memory: 314572800 - MemorySwap: 514288000 - MemoryReservation: 209715200 - KernelMemory: 52428800 - RestartPolicy: - MaximumRetryCount: 4 - Name: "on-failure" - tags: ["Container"] - /containers/{id}/rename: - post: - summary: "Rename a container" - operationId: "ContainerRename" - responses: - 204: - description: "no error" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 409: - description: "name already in use" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "name" - in: "query" - required: true - description: "New name for the container" - type: "string" - tags: ["Container"] - /containers/{id}/pause: - post: - summary: "Pause a container" - description: | - Use the cgroups freezer to suspend all processes in a container. - - Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. - operationId: "ContainerPause" - responses: - 204: - description: "no error" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - tags: ["Container"] - /containers/{id}/unpause: - post: - summary: "Unpause a container" - description: "Resume a container which has been paused." - operationId: "ContainerUnpause" - responses: - 204: - description: "no error" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - tags: ["Container"] - /containers/{id}/attach: - post: - summary: "Attach to a container" - description: | - Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached. - - Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything. - - See [the documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details. - - ### Hijacking - - This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket. - - This is the response from the daemon for an attach request: - - ``` - HTTP/1.1 200 OK - Content-Type: application/vnd.docker.raw-stream - - [STREAM] - ``` - - After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server. - - To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers. - - For example, the client sends this request to upgrade the connection: - - ``` - POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 - Upgrade: tcp - Connection: Upgrade - ``` - - The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream: - - ``` - HTTP/1.1 101 UPGRADED - Content-Type: application/vnd.docker.raw-stream - Connection: Upgrade - Upgrade: tcp - - [STREAM] - ``` - - ### Stream format - - When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload. - - The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`). - - It is encoded on the first eight bytes like this: - - ```go - header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} - ``` - - `STREAM_TYPE` can be: - - - 0: `stdin` (is written on `stdout`) - - 1: `stdout` - - 2: `stderr` - - `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian. - - Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`. - - The simplest way to implement this protocol is the following: - - 1. Read 8 bytes. - 2. Choose `stdout` or `stderr` depending on the first byte. - 3. Extract the frame size from the last four bytes. - 4. Read the extracted size and output it on the correct output. - 5. Goto 1. - - ### Stream format when using a TTY - - When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`. - - operationId: "ContainerAttach" - produces: - - "application/vnd.docker.raw-stream" - responses: - 101: - description: "no error, hints proxy about hijacking" - 200: - description: "no error, no upgrade header found" - 400: - description: "bad parameter" - schema: - $ref: "#/definitions/ErrorResponse" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "detachKeys" - in: "query" - description: "Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`." - type: "string" - - name: "logs" - in: "query" - description: | - Replay previous logs from the container. - - This is useful for attaching to a container that has started and you want to output everything since the container started. - - If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output. - type: "boolean" - default: false - - name: "stream" - in: "query" - description: "Stream attached streams from the time the request was made onwards" - type: "boolean" - default: false - - name: "stdin" - in: "query" - description: "Attach to `stdin`" - type: "boolean" - default: false - - name: "stdout" - in: "query" - description: "Attach to `stdout`" - type: "boolean" - default: false - - name: "stderr" - in: "query" - description: "Attach to `stderr`" - type: "boolean" - default: false - tags: ["Container"] - /containers/{id}/attach/ws: - get: - summary: "Attach to a container via a websocket" - operationId: "ContainerAttachWebsocket" - responses: - 101: - description: "no error, hints proxy about hijacking" - 200: - description: "no error, no upgrade header found" - 400: - description: "bad parameter" - schema: - $ref: "#/definitions/ErrorResponse" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "detachKeys" - in: "query" - description: "Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`." - type: "string" - - name: "logs" - in: "query" - description: "Return logs" - type: "boolean" - default: false - - name: "stream" - in: "query" - description: "Return stream" - type: "boolean" - default: false - tags: ["Container"] - /containers/{id}/wait: - post: - summary: "Wait for a container" - description: "Block until a container stops, then returns the exit code." - operationId: "ContainerWait" - produces: ["application/json"] - responses: - 200: - description: "The container has exit." - schema: - type: "object" - required: [StatusCode] - properties: - StatusCode: - description: "Exit code of the container" - type: "integer" - x-nullable: false - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - tags: ["Container"] - /containers/{id}: - delete: - summary: "Remove a container" - operationId: "ContainerDelete" - responses: - 204: - description: "no error" - 400: - description: "bad parameter" - schema: - $ref: "#/definitions/ErrorResponse" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "v" - in: "query" - description: "Remove anonymous volumes associated with the container." - type: "boolean" - default: false - - name: "force" - in: "query" - description: "If the container is running, kill it before removing it." - type: "boolean" - default: false - tags: ["Container"] - /containers/{id}/archive: - head: - summary: "Get information about files in a container" - description: "A response header `X-Docker-Container-Path-Stat` is return containing a base64 - encoded JSON object with some filesystem header information about the path." - operationId: "ContainerArchiveHead" - responses: - 200: - description: "no error" - headers: - X-Docker-Container-Path-Stat: - type: "string" - description: "TODO" - 400: - description: "Bad parameter" - schema: - $ref: "#/definitions/ErrorResponse" - 404: - description: "Container or path does not exist" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "path" - in: "query" - required: true - description: "Resource in the container’s filesystem to archive." - type: "string" - tags: ["Container"] - get: - summary: "Get an archive of a filesystem resource in a container" - description: "Get an tar archive of a resource in the filesystem of container id." - operationId: "ContainerGetArchive" - produces: - - "application/x-tar" - responses: - 200: - description: "no error" - 400: - description: "Bad parameter" - schema: - $ref: "#/definitions/ErrorResponse" - 404: - description: "Container or path does not exist" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "path" - in: "query" - required: true - description: "Resource in the container’s filesystem to archive." - type: "string" - tags: ["Container"] - put: - summary: "Extract an archive of files or folders to a directory in a container" - description: | - Upload a tar archive to be extracted to a path in the filesystem of container id. - `path` parameter is asserted to be a directory. If it exists as a file, 400 error - will be returned with message "not a directory". - operationId: "ContainerPutArchive" - consumes: - - "application/x-tar" - - "application/octet-stream" - responses: - 200: - description: "The content was extracted successfully" - 400: - description: "Bad parameter" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "not a directory" - 403: - description: "Permission denied, the volume or container rootfs is marked as read-only." - schema: - $ref: "#/definitions/ErrorResponse" - 404: - description: "No such container or path does not exist inside the container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "path" - in: "query" - required: true - description: "Path to a directory in the container to extract the archive’s contents into. " - type: "string" - - name: "noOverwriteDirNonDir" - in: "query" - description: "If “1”, “true”, or “True” then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa." - type: "string" - - name: "inputStream" - in: "body" - required: true - description: "The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." - schema: - type: "string" - tags: ["Container"] - /containers/prune: - post: - summary: "Delete stopped containers" - produces: - - "application/json" - operationId: "ContainerPrune" - parameters: - - name: "filters" - in: "query" - description: | - Filters to process on the prune list, encoded as JSON (a `map[string][]string`). - - Available filters: - type: "string" - responses: - 200: - description: "No error" - schema: - type: "object" - properties: - ContainersDeleted: - description: "Container IDs that were deleted" - type: "array" - items: - type: "string" - SpaceReclaimed: - description: "Disk space reclaimed in bytes" - type: "integer" - format: "int64" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["Container"] - /images/json: - get: - summary: "List Images" - description: "Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image." - operationId: "ImageList" - produces: - - "application/json" - responses: - 200: - description: "Summary image data for the images matching the query" - schema: - type: "array" - items: - $ref: "#/definitions/ImageSummary" - examples: - application/json: - - Id: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8" - ParentId: "" - RepoTags: - - "ubuntu:12.04" - - "ubuntu:precise" - RepoDigests: - - "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787" - Created: 1474925151 - Size: 103579269 - VirtualSize: 103579269 - SharedSize: 0 - Labels: {} - Containers: 2 - - Id: "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175" - ParentId: "" - RepoTags: - - "ubuntu:12.10" - - "ubuntu:quantal" - RepoDigests: - - "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7" - - "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3" - Created: 1403128455 - Size: 172064416 - VirtualSize: 172064416 - SharedSize: 0 - Labels: {} - Containers: 5 - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "all" - in: "query" - description: "Show all images. Only images from a final layer (no children) are shown by default." - type: "boolean" - default: false - - name: "filters" - in: "query" - description: | - A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. - - Available filters: - - `dangling=true` - - `label=key` or `label="key=value"` of an image label - - `before`=(`[:]`, `` or ``) - - `since`=(`[:]`, `` or ``) - - `reference`=(`[:]`) - type: "string" - - name: "digests" - in: "query" - description: "Show digest information as a `RepoDigests` field on each image." - type: "boolean" - default: false - tags: ["Image"] - /build: - post: - summary: "Build an image" - description: | - Build an image from a tar archive with a `Dockerfile` in it. - - The `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/). - - The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output. - - The build is canceled if the client drops the connection by quitting or being killed. - operationId: "ImageBuild" - consumes: - - "application/octet-stream" - produces: - - "application/json" - parameters: - - name: "inputStream" - in: "body" - description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." - schema: - type: "string" - format: "binary" - - name: "dockerfile" - in: "query" - description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`." - type: "string" - default: "Dockerfile" - - name: "t" - in: "query" - description: "A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters." - type: "string" - - name: "remote" - in: "query" - description: "A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball." - type: "string" - - name: "q" - in: "query" - description: "Suppress verbose build output." - type: "boolean" - default: false - - name: "nocache" - in: "query" - description: "Do not use the cache when building the image." - type: "boolean" - default: false - - name: "cachefrom" - in: "query" - description: "JSON array of images used for build cache resolution." - type: "string" - - name: "pull" - in: "query" - description: "Attempt to pull the image even if an older image exists locally." - type: "string" - - name: "rm" - in: "query" - description: "Remove intermediate containers after a successful build." - type: "boolean" - default: true - - name: "forcerm" - in: "query" - description: "Always remove intermediate containers, even upon failure." - type: "boolean" - default: false - - name: "memory" - in: "query" - description: "Set memory limit for build." - type: "integer" - - name: "memswap" - in: "query" - description: "Total memory (memory + swap). Set as `-1` to disable swap." - type: "integer" - - name: "cpushares" - in: "query" - description: "CPU shares (relative weight)." - type: "integer" - - name: "cpusetcpus" - in: "query" - description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)." - type: "string" - - name: "cpuperiod" - in: "query" - description: "The length of a CPU period in microseconds." - type: "integer" - - name: "cpuquota" - in: "query" - description: "Microseconds of CPU time that the container can get in a CPU period." - type: "integer" - - name: "buildargs" - in: "query" - description: "JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg)" - type: "integer" - - name: "shmsize" - in: "query" - description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." - type: "integer" - - name: "squash" - in: "query" - description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*" - type: "boolean" - - name: "labels" - in: "query" - description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs." - type: "string" - - name: "networkmode" - in: "query" - description: "Sets the networking mode for the run commands during build. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name to which this container should connect to." - type: "string" - - name: "Content-type" - in: "header" - type: "string" - enum: - - "application/tar" - default: "application/tar" - - name: "X-Registry-Config" - in: "header" - description: | - This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. - - The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: - - ``` - { - "docker.example.com": { - "username": "janedoe", - "password": "hunter2" - }, - "https://index.docker.io/v1/": { - "username": "mobydock", - "password": "conta1n3rize14" - } - } - ``` - - Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API. - type: "string" - responses: - 200: - description: "no error" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["Image"] - /images/create: - post: - summary: "Create an image" - description: "Create an image by either pulling it from a registry or importing it." - operationId: "ImageCreate" - consumes: - - "text/plain" - - "application/octet-stream" - produces: - - "application/json" - responses: - 200: - description: "no error" - 404: - description: "repository does not exist or no read access" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "fromImage" - in: "query" - description: "Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed." - type: "string" - - name: "fromSrc" - in: "query" - description: "Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image." - type: "string" - - name: "repo" - in: "query" - description: "Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image." - type: "string" - - name: "tag" - in: "query" - description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled." - type: "string" - - name: "inputImage" - in: "body" - description: "Image content if the value `-` has been specified in fromSrc query parameter" - schema: - type: "string" - required: false - - name: "X-Registry-Auth" - in: "header" - description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)" - type: "string" - tags: ["Image"] - /images/{name}/json: - get: - summary: "Inspect an image" - description: "Return low-level information about an image." - operationId: "ImageInspect" - produces: - - "application/json" - responses: - 200: - description: "No error" - schema: - $ref: "#/definitions/Image" - examples: - application/json: - Id: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" - Container: "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a" - Comment: "" - Os: "linux" - Architecture: "amd64" - Parent: "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" - ContainerConfig: - Tty: false - Hostname: "e611e15f9c9d" - Domainname: "" - AttachStdout: false - PublishService: "" - AttachStdin: false - OpenStdin: false - StdinOnce: false - NetworkDisabled: false - OnBuild: [] - Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" - User: "" - WorkingDir: "" - MacAddress: "" - AttachStderr: false - Labels: - com.example.license: "GPL" - com.example.version: "1.0" - com.example.vendor: "Acme" - Env: - - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - Cmd: - - "/bin/sh" - - "-c" - - "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0" - DockerVersion: "1.9.0-dev" - VirtualSize: 188359297 - Size: 0 - Author: "" - Created: "2015-09-10T08:30:53.26995814Z" - GraphDriver: - Name: "aufs" - RepoDigests: - - "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf" - RepoTags: - - "example:1.0" - - "example:latest" - - "example:stable" - Config: - Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" - NetworkDisabled: false - OnBuild: [] - StdinOnce: false - PublishService: "" - AttachStdin: false - OpenStdin: false - Domainname: "" - AttachStdout: false - Tty: false - Hostname: "e611e15f9c9d" - Cmd: - - "/bin/bash" - Env: - - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - Labels: - com.example.vendor: "Acme" - com.example.version: "1.0" - com.example.license: "GPL" - MacAddress: "" - AttachStderr: false - WorkingDir: "" - User: "" - RootFS: - Type: "layers" - Layers: - - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6" - - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" - 404: - description: "No such image" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such image: someimage (tag: latest)" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "name" - in: "path" - description: "Image name or id" - type: "string" - required: true - tags: ["Image"] - /images/{name}/history: - get: - summary: "Get the history of an image" - description: "Return parent layers of an image." - operationId: "ImageHistory" - produces: - - "application/json" - responses: - 200: - description: "No error" - schema: - type: "array" - items: - type: "object" - properties: - Id: - type: "string" - Created: - type: "integer" - format: "int64" - CreatedBy: - type: "string" - Tags: - type: "array" - items: - type: "string" - Size: - type: "integer" - format: "int64" - Comment: - type: "string" - examples: - application/json: - - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710" - Created: 1398108230 - CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /" - Tags: - - "ubuntu:lucid" - - "ubuntu:10.04" - Size: 182964289 - Comment: "" - - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8" - Created: 1398108222 - CreatedBy: "/bin/sh -c #(nop) MAINTAINER Tianon Gravi - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http://archive.ubuntu.com/ubuntu/" - Tags: [] - Size: 0 - Comment: "" - - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" - Created: 1371157430 - CreatedBy: "" - Tags: - - "scratch12:latest" - - "scratch:latest" - Size: 0 - Comment: "Imported from -" - 404: - description: "No such image" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "name" - in: "path" - description: "Image name or ID" - type: "string" - required: true - tags: ["Image"] - /images/{name}/push: - post: - summary: "Push an image" - description: | - Push an image to a registry. - - If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, `registry.example.com/myimage:latest`. - - The push is cancelled if the HTTP connection is closed. - operationId: "ImagePush" - consumes: - - "application/octet-stream" - responses: - 200: - description: "No error" - 404: - description: "No such image" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "name" - in: "path" - description: | - Name of the image to push. For example, `registry.example.com/myimage`. - The image must be present in the local image store with the same name. - - The name should be provided without tag; if a tag is provided, it - is ignored. For example, `registry.example.com/myimage:latest` is - considered equivalent to `registry.example.com/myimage`. - - Use the `tag` parameter to specify the tag to push. - type: "string" - required: true - - name: "tag" - in: "query" - description: | - Tag of the image to push. For example, `latest`. If no tag is provided, - all tags of the given image that are present in the local image store - are pushed. - type: "string" - - name: "X-Registry-Auth" - in: "header" - description: "A base64-encoded auth configuration. [See the authentication section for details.](#section/Authentication)" - type: "string" - required: true - tags: ["Image"] - /images/{name}/tag: - post: - summary: "Tag an image" - description: "Tag an image so that it becomes part of a repository." - operationId: "ImageTag" - responses: - 201: - description: "No error" - 400: - description: "Bad parameter" - schema: - $ref: "#/definitions/ErrorResponse" - 404: - description: "No such image" - schema: - $ref: "#/definitions/ErrorResponse" - 409: - description: "Conflict" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "name" - in: "path" - description: "Image name or ID to tag." - type: "string" - required: true - - name: "repo" - in: "query" - description: "The repository to tag in. For example, `someuser/someimage`." - type: "string" - - name: "tag" - in: "query" - description: "The name of the new tag." - type: "string" - tags: ["Image"] - /images/{name}: - delete: - summary: "Remove an image" - description: | - Remove an image, along with any untagged parent images that were referenced by that image. - - Images can't be removed if they have descendant images, are being used by a running container or are being used by a build. - operationId: "ImageDelete" - produces: - - "application/json" - responses: - 200: - description: "No error" - schema: - type: "array" - items: - $ref: "#/definitions/ImageDeleteResponse" - examples: - application/json: - - Untagged: "3e2f21a89f" - - Deleted: "3e2f21a89f" - - Deleted: "53b4f83ac9" - 404: - description: "No such image" - schema: - $ref: "#/definitions/ErrorResponse" - 409: - description: "Conflict" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "name" - in: "path" - description: "Image name or ID" - type: "string" - required: true - - name: "force" - in: "query" - description: "Remove the image even if it is being used by stopped containers or has other tags" - type: "boolean" - default: false - - name: "noprune" - in: "query" - description: "Do not delete untagged parent images" - type: "boolean" - default: false - tags: ["Image"] - /images/search: - get: - summary: "Search images" - description: "Search for an image on Docker Hub." - operationId: "ImageSearch" - produces: - - "application/json" - responses: - 200: - description: "No error" - schema: - type: "array" - items: - type: "object" - properties: - description: - type: "string" - is_official: - type: "boolean" - is_automated: - type: "boolean" - name: - type: "string" - star_count: - type: "integer" - examples: - application/json: - - description: "" - is_official: false - is_automated: false - name: "wma55/u1210sshd" - star_count: 0 - - description: "" - is_official: false - is_automated: false - name: "jdswinbank/sshd" - star_count: 0 - - description: "" - is_official: false - is_automated: false - name: "vgauthier/sshd" - star_count: 0 - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "term" - in: "query" - description: "Term to search" - type: "string" - required: true - - name: "limit" - in: "query" - description: "Maximum number of results to return" - type: "integer" - - name: "filters" - in: "query" - description: | - A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - - - `stars=` - - `is-automated=(true|false)` - - `is-official=(true|false)` - type: "string" - tags: ["Image"] - /images/prune: - post: - summary: "Delete unused images" - produces: - - "application/json" - operationId: "ImagePrune" - parameters: - - name: "filters" - in: "query" - description: | - Filters to process on the prune list, encoded as JSON (a `map[string][]string`). - - Available filters: - - `dangling=` When set to `true` (or `1`), prune only - unused *and* untagged images. When set to `false` - (or `0`), all unused images are pruned. - type: "string" - responses: - 200: - description: "No error" - schema: - type: "object" - properties: - ImagesDeleted: - description: "Images that were deleted" - type: "array" - items: - $ref: "#/definitions/ImageDeleteResponse" - SpaceReclaimed: - description: "Disk space reclaimed in bytes" - type: "integer" - format: "int64" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["Image"] - /auth: - post: - summary: "Check auth configuration" - description: "Validate credentials for a registry and, if available, get an identity token for accessing the registry without password." - operationId: "SystemAuth" - consumes: ["application/json"] - produces: ["application/json"] - responses: - 200: - description: "An identity token was generated successfully." - schema: - type: "object" - required: [Status] - properties: - Status: - description: "The status of the authentication" - type: "string" - x-nullable: false - IdentityToken: - description: "An opaque token used to authenticate a user after a successful login" - type: "string" - x-nullable: false - examples: - application/json: - Status: "Login Succeeded" - IdentityToken: "9cbaf023786cd7..." - 204: - description: "No error" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "authConfig" - in: "body" - description: "Authentication to check" - schema: - $ref: "#/definitions/AuthConfig" - tags: ["System"] - /info: - get: - summary: "Get system information" - operationId: "SystemInfo" - produces: - - "application/json" - responses: - 200: - description: "No error" - schema: - type: "object" - properties: - Architecture: - type: "string" - Containers: - type: "integer" - ContainersRunning: - type: "integer" - ContainersStopped: - type: "integer" - ContainersPaused: - type: "integer" - CpuCfsPeriod: - type: "boolean" - CpuCfsQuota: - type: "boolean" - Debug: - type: "boolean" - DiscoveryBackend: - type: "string" - DockerRootDir: - type: "string" - Driver: - type: "string" - DriverStatus: - type: "array" - items: - type: "array" - items: - type: "string" - SystemStatus: - type: "array" - items: - type: "array" - items: - type: "string" - Plugins: - type: "object" - properties: - Volume: - type: "array" - items: - type: "string" - Network: - type: "array" - items: - type: "string" - ExperimentalBuild: - type: "boolean" - HttpProxy: - type: "string" - HttpsProxy: - type: "string" - ID: - type: "string" - IPv4Forwarding: - type: "boolean" - Images: - type: "integer" - IndexServerAddress: - type: "string" - InitPath: - type: "string" - InitSha1: - type: "string" - KernelVersion: - type: "string" - Labels: - type: "array" - items: - type: "string" - MemTotal: - type: "integer" - MemoryLimit: - type: "boolean" - NCPU: - type: "integer" - NEventsListener: - type: "integer" - NFd: - type: "integer" - NGoroutines: - type: "integer" - Name: - type: "string" - NoProxy: - type: "string" - OomKillDisable: - type: "boolean" - OSType: - type: "string" - OomScoreAdj: - type: "integer" - OperatingSystem: - type: "string" - RegistryConfig: - type: "object" - properties: - IndexConfigs: - type: "object" - additionalProperties: - type: "object" - properties: - Mirrors: - type: "array" - items: - type: "string" - Name: - type: "string" - Official: - type: "boolean" - Secure: - type: "boolean" - InsecureRegistryCIDRs: - type: "array" - items: - type: "string" - SwapLimit: - type: "boolean" - SystemTime: - type: "string" - ServerVersion: - type: "string" - examples: - application/json: - Architecture: "x86_64" - ClusterStore: "etcd://localhost:2379" - CgroupDriver: "cgroupfs" - Containers: 11 - ContainersRunning: 7 - ContainersStopped: 3 - ContainersPaused: 1 - CpuCfsPeriod: true - CpuCfsQuota: true - Debug: false - DockerRootDir: "/var/lib/docker" - Driver: "btrfs" - DriverStatus: - - - - "" - ExperimentalBuild: false - HttpProxy: "http://test:test@localhost:8080" - HttpsProxy: "https://test:test@localhost:8080" - ID: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS" - IPv4Forwarding: true - Images: 16 - IndexServerAddress: "https://index.docker.io/v1/" - InitPath: "/usr/bin/docker" - InitSha1: "" - KernelMemory: true - KernelVersion: "3.12.0-1-amd64" - Labels: - - "storage=ssd" - MemTotal: 2099236864 - MemoryLimit: true - NCPU: 1 - NEventsListener: 0 - NFd: 11 - NGoroutines: 21 - Name: "prod-server-42" - NoProxy: "9.81.1.160" - OomKillDisable: true - OSType: "linux" - OperatingSystem: "Boot2Docker" - Plugins: - Volume: - - "local" - Network: - - "null" - - "host" - - "bridge" - RegistryConfig: - IndexConfigs: - docker.io: - Name: "docker.io" - Official: true - Secure: true - InsecureRegistryCIDRs: - - "127.0.0.0/8" - SecurityOptions: - - Key: "Name" - Value: "seccomp" - - Key: "Profile" - Value: "default" - - Key: "Name" - Value: "apparmor" - - Key: "Name" - Value: "selinux" - - Key: "Name" - Value: "userns" - ServerVersion: "1.9.0" - SwapLimit: false - SystemStatus: - - - - "State" - - "Healthy" - SystemTime: "2015-03-10T11:11:23.730591467-07:00" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["System"] - /version: - get: - summary: "Get version" - description: "Returns the version of Docker that is running and various information about the system that Docker is running on." - operationId: "SystemVersion" - produces: - - "application/json" - responses: - 200: - description: "no error" - schema: - type: "object" - properties: - Version: - type: "string" - ApiVersion: - type: "string" - MinAPIVersion: - type: "string" - GitCommit: - type: "string" - GoVersion: - type: "string" - Os: - type: "string" - Arch: - type: "string" - KernelVersion: - type: "string" - Experimental: - type: "boolean" - BuildTime: - type: "string" - examples: - application/json: - Version: "1.13.0" - Os: "linux" - KernelVersion: "3.19.0-23-generic" - GoVersion: "go1.6.3" - GitCommit: "deadbee" - Arch: "amd64" - ApiVersion: "1.25" - MinAPIVersion: "1.12" - BuildTime: "2016-06-14T07:09:13.444803460+00:00" - Experimental: true - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["System"] - /_ping: - get: - summary: "Ping" - description: "This is a dummy endpoint you can use to test if the server is accessible." - operationId: "SystemPing" - produces: - - "text/plain" - responses: - 200: - description: "no error" - schema: - type: "string" - example: "OK" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["System"] - /commit: - post: - summary: "Create a new image from a container" - operationId: "ImageCommit" - consumes: - - "application/json" - produces: - - "application/json" - responses: - 201: - description: "no error" - schema: - $ref: "#/definitions/IdResponse" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "containerConfig" - in: "body" - description: "The container configuration" - schema: - $ref: "#/definitions/Config" - - name: "container" - in: "query" - description: "The ID or name of the container to commit" - type: "string" - - name: "repo" - in: "query" - description: "Repository name for the created image" - type: "string" - - name: "tag" - in: "query" - description: "Tag name for the create image" - type: "string" - - name: "comment" - in: "query" - description: "Commit message" - type: "string" - - name: "author" - in: "query" - description: "Author of the image (e.g., `John Hannibal Smith `)" - type: "string" - - name: "pause" - in: "query" - description: "Whether to pause the container before committing" - type: "boolean" - default: true - - name: "changes" - in: "query" - description: "`Dockerfile` instructions to apply while committing" - type: "string" - tags: ["Image"] - /events: - get: - summary: "Monitor events" - description: | - Stream real-time events from the server. - - Various objects within Docker report events when something happens to them. - - Containers report these events: `attach, commit, copy, create, destroy, detach, die, exec_create, exec_detach, exec_start, export, kill, oom, pause, rename, resize, restart, start, stop, top, unpause, update` - - Images report these events: `delete, import, load, pull, push, save, tag, untag` - - Volumes report these events: `create, mount, unmount, destroy` - - Networks report these events: `create, connect, disconnect, destroy` - - The Docker daemon reports these events: `reload` - - operationId: "SystemEvents" - produces: - - "application/json" - responses: - 200: - description: "no error" - schema: - type: "object" - properties: - Type: - description: "The type of object emitting the event" - type: "string" - Action: - description: "The type of event" - type: "string" - Actor: - type: "object" - properties: - ID: - description: "The ID of the object emitting the event" - type: "string" - Attributes: - description: "Various key/value attributes of the object, depending on its type" - type: "object" - additionalProperties: - type: "string" - time: - description: "Timestamp of event" - type: "integer" - timeNano: - description: "Timestamp of event, with nanosecond accuracy" - type: "integer" - format: "int64" - examples: - application/json: - Type: "container" - Action: "create" - Actor: - ID: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" - Attributes: - com.example.some-label: "some-label-value" - image: "alpine" - name: "my-container" - time: 1461943101 - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "since" - in: "query" - description: "Show events created since this timestamp then stream new events." - type: "string" - - name: "until" - in: "query" - description: "Show events created until this timestamp then stop streaming." - type: "string" - - name: "filters" - in: "query" - description: | - A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: - - - `container=` container name or ID - - `event=` event type - - `image=` image name or ID - - `label=` image or container label - - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, or `daemon` - - `volume=` volume name or ID - - `network=` network name or ID - - `daemon=` daemon name or ID - type: "string" - tags: ["System"] - /system/df: - get: - summary: "Get data usage information" - operationId: "SystemDataUsage" - responses: - 200: - description: "no error" - schema: - type: "object" - properties: - LayersSize: - type: "integer" - format: "int64" - Images: - type: "array" - items: - $ref: "#/definitions/ImageSummary" - Containers: - type: "array" - items: - $ref: "#/definitions/ContainerSummary" - Volumes: - type: "array" - items: - $ref: "#/definitions/Volume" - example: - LayersSize: 1092588 - Images: - - - Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" - ParentId: "" - RepoTags: - - "busybox:latest" - RepoDigests: - - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6" - Created: 1466724217 - Size: 1092588 - SharedSize: 0 - VirtualSize: 1092588 - Labels: {} - Containers: 1 - Containers: - - - Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148" - Names: - - "/top" - Image: "busybox" - ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" - Command: "top" - Created: 1472592424 - Ports: [] - SizeRootFs: 1092588 - Labels: {} - State: "exited" - Status: "Exited (0) 56 minutes ago" - HostConfig: - NetworkMode: "default" - NetworkSettings: - Networks: - bridge: - IPAMConfig: null - Links: null - Aliases: null - NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92" - EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a" - Gateway: "172.18.0.1" - IPAddress: "172.18.0.2" - IPPrefixLen: 16 - IPv6Gateway: "" - GlobalIPv6Address: "" - GlobalIPv6PrefixLen: 0 - MacAddress: "02:42:ac:12:00:02" - Mounts: [] - Volumes: - - - Name: "my-volume" - Driver: "local" - Mountpoint: "" - Labels: null - Scope: "" - Options: null - UsageData: - Size: 0 - RefCount: 0 - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["System"] - /images/{name}/get: - get: - summary: "Export an image" - description: | - Get a tarball containing all images and metadata for a repository. - - If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced. - - ### Image tarball format - - An image tarball contains one directory per image layer (named using its long ID), each containing these files: - - - `VERSION`: currently `1.0` - the file format version - - `json`: detailed layer information, similar to `docker inspect layer_id` - - `layer.tar`: A tarfile containing the filesystem changes in this layer - - The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. - - If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs. - - ```json - { - "hello-world": { - "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" - } - } - ``` - operationId: "ImageGet" - produces: - - "application/x-tar" - responses: - 200: - description: "no error" - schema: - type: "string" - format: "binary" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "name" - in: "path" - description: "Image name or ID" - type: "string" - required: true - tags: ["Image"] - /images/get: - get: - summary: "Export several images" - description: | - Get a tarball containing all images and metadata for several image repositories. - - For each value of the `names` parameter: if it is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID. - - For details on the format, see [the export image endpoint](#operation/ImageGet). - operationId: "ImageGetAll" - produces: - - "application/x-tar" - responses: - 200: - description: "no error" - schema: - type: "string" - format: "binary" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "names" - in: "query" - description: "Image names to filter by" - type: "array" - items: - type: "string" - tags: ["Image"] - /images/load: - post: - summary: "Import images" - description: | - Load a set of images and tags into a repository. - - For details on the format, see [the export image endpoint](#operation/ImageGet). - operationId: "ImageLoad" - consumes: - - "application/x-tar" - produces: - - "application/json" - responses: - 200: - description: "no error" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "imagesTarball" - in: "body" - description: "Tar archive containing images" - schema: - type: "string" - format: "binary" - - name: "quiet" - in: "query" - description: "Suppress progress details during load." - type: "boolean" - default: false - tags: ["Image"] - /containers/{id}/exec: - post: - summary: "Create an exec instance" - description: "Run a command inside a running container." - operationId: "ContainerExec" - consumes: - - "application/json" - produces: - - "application/json" - responses: - 201: - description: "no error" - schema: - $ref: "#/definitions/IdResponse" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 409: - description: "container is paused" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "execConfig" - in: "body" - description: "Exec configuration" - schema: - type: "object" - properties: - AttachStdin: - type: "boolean" - description: "Attach to `stdin` of the exec command." - AttachStdout: - type: "boolean" - description: "Attach to `stdout` of the exec command." - AttachStderr: - type: "boolean" - description: "Attach to `stderr` of the exec command." - DetachKeys: - type: "string" - description: "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`." - Tty: - type: "boolean" - description: "Allocate a pseudo-TTY." - Env: - description: "A list of environment variables in the form `[\"VAR=value\", ...]`." - type: "array" - items: - type: "string" - Cmd: - type: "array" - description: "Command to run, as a string or array of strings." - items: - type: "string" - Privileged: - type: "boolean" - description: "Runs the exec process with extended privileges." - default: false - User: - type: "string" - description: "The user, and optionally, group to run the exec process inside the container. Format is one of: `user`, `user:group`, `uid`, or `uid:gid`." - example: - AttachStdin: false - AttachStdout: true - AttachStderr: true - DetachKeys: "ctrl-p,ctrl-q" - Tty: false - Cmd: - - "date" - Env: - - "FOO=bar" - - "BAZ=quux" - required: true - - name: "id" - in: "path" - description: "ID or name of container" - type: "string" - required: true - tags: ["Exec"] - /exec/{id}/start: - post: - summary: "Start an exec instance" - description: "Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command." - operationId: "ExecStart" - consumes: - - "application/json" - produces: - - "application/vnd.docker.raw-stream" - responses: - 200: - description: "No error" - 404: - description: "No such exec instance" - schema: - $ref: "#/definitions/ErrorResponse" - 409: - description: "Container is stopped or paused" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "execStartConfig" - in: "body" - schema: - type: "object" - properties: - Detach: - type: "boolean" - description: "Detach from the command." - Tty: - type: "boolean" - description: "Allocate a pseudo-TTY." - example: - Detach: false - Tty: false - - name: "id" - in: "path" - description: "Exec instance ID" - required: true - type: "string" - tags: ["Exec"] - /exec/{id}/resize: - post: - summary: "Resize an exec instance" - description: "Resize the TTY session used by an exec instance. This endpoint only works if `tty` was specified as part of creating and starting the exec instance." - operationId: "ExecResize" - responses: - 200: - description: "No error" - 400: - description: "bad parameter" - schema: - $ref: "#/definitions/ErrorResponse" - 404: - description: "No such exec instance" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - description: "Exec instance ID" - required: true - type: "string" - - name: "h" - in: "query" - required: true - description: "Height of the TTY session in characters" - type: "integer" - - name: "w" - in: "query" - required: true - description: "Width of the TTY session in characters" - type: "integer" - tags: ["Exec"] - /exec/{id}/json: - get: - summary: "Inspect an exec instance" - description: "Return low-level information about an exec instance." - operationId: "ExecInspect" - produces: - - "application/json" - responses: - 200: - description: "No error" - schema: - type: "object" - properties: - ID: - type: "string" - Running: - type: "boolean" - ExitCode: - type: "integer" - ProcessConfig: - $ref: "#/definitions/ProcessConfig" - OpenStdin: - type: "boolean" - OpenStderr: - type: "boolean" - OpenStdout: - type: "boolean" - ContainerID: - type: "string" - Pid: - type: "integer" - description: "The system process ID for the exec process." - examples: - application/json: - CanRemove: false - ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126" - DetachKeys: "" - ExitCode: 2 - ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b" - OpenStderr: true - OpenStdin: true - OpenStdout: true - ProcessConfig: - arguments: - - "-c" - - "exit 2" - entrypoint: "sh" - privileged: false - tty: true - user: "1000" - Running: false - Pid: 42000 - 404: - description: "No such exec instance" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - description: "Exec instance ID" - required: true - type: "string" - tags: ["Exec"] - - /volumes: - get: - summary: "List volumes" - operationId: "VolumeList" - produces: ["application/json"] - responses: - 200: - description: "Summary volume data that matches the query" - schema: - type: "object" - required: [Volumes, Warnings] - properties: - Volumes: - type: "array" - x-nullable: false - description: "List of volumes" - items: - $ref: "#/definitions/Volume" - Warnings: - type: "array" - x-nullable: false - description: "Warnings that occurred when fetching the list of volumes" - items: - type: "string" - - examples: - application/json: - Volumes: - - Name: "tardis" - Driver: "local" - Mountpoint: "/var/lib/docker/volumes/tardis" - Labels: - com.example.some-label: "some-value" - com.example.some-other-label: "some-other-value" - Scope: "local" - Options: - device: "tmpfs" - o: "size=100m,uid=1000" - type: "tmpfs" - Warnings: [] - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "filters" - in: "query" - description: | - JSON encoded value of the filters (a `map[string][]string`) to - process on the volumes list. Available filters: - - - `name=` Matches all or part of a volume name. - - `dangling=` When set to `true` (or `1`), returns all - volumes that are not in use by a container. When set to `false` - (or `0`), only volumes that are in use by one or more - containers are returned. - - `driver=` Matches all or part of a volume - driver name. - type: "string" - format: "json" - tags: ["Volume"] - - /volumes/create: - post: - summary: "Create a volume" - operationId: "VolumeCreate" - consumes: ["application/json"] - produces: ["application/json"] - responses: - 201: - description: "The volume was created successfully" - schema: - $ref: "#/definitions/Volume" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "volumeConfig" - in: "body" - required: true - description: "Volume configuration" - schema: - type: "object" - properties: - Name: - description: "The new volume's name. If not specified, Docker generates a name." - type: "string" - x-nullable: false - Driver: - description: "Name of the volume driver to use." - type: "string" - default: "local" - x-nullable: false - DriverOpts: - description: "A mapping of driver options and values. These options are passed directly to the driver and are driver specific." - type: "object" - additionalProperties: - type: "string" - Labels: - description: "User-defined key/value metadata." - type: "object" - additionalProperties: - type: "string" - example: - Name: "tardis" - Labels: - com.example.some-label: "some-value" - com.example.some-other-label: "some-other-value" - Driver: "custom" - tags: ["Volume"] - - /volumes/{name}: - get: - summary: "Inspect a volume" - operationId: "VolumeInspect" - produces: ["application/json"] - responses: - 200: - description: "No error" - schema: - $ref: "#/definitions/Volume" - 404: - description: "No such volume" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "name" - in: "path" - required: true - description: "Volume name or ID" - type: "string" - tags: ["Volume"] - - delete: - summary: "Remove a volume" - description: "Instruct the driver to remove the volume." - operationId: "VolumeDelete" - responses: - 204: - description: "The volume was removed" - 404: - description: "No such volume or volume driver" - schema: - $ref: "#/definitions/ErrorResponse" - 409: - description: "Volume is in use and cannot be removed" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "name" - in: "path" - required: true - description: "Volume name or ID" - type: "string" - - name: "force" - in: "query" - description: "Force the removal of the volume" - type: "boolean" - default: false - tags: ["Volume"] - /volumes/prune: - post: - summary: "Delete unused volumes" - produces: - - "application/json" - operationId: "VolumePrune" - parameters: - - name: "filters" - in: "query" - description: | - Filters to process on the prune list, encoded as JSON (a `map[string][]string`). - - Available filters: - type: "string" - responses: - 200: - description: "No error" - schema: - type: "object" - properties: - VolumesDeleted: - description: "Volumes that were deleted" - type: "array" - items: - type: "string" - SpaceReclaimed: - description: "Disk space reclaimed in bytes" - type: "integer" - format: "int64" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["Volume"] - /networks: - get: - summary: "List networks" - operationId: "NetworkList" - produces: - - "application/json" - responses: - 200: - description: "No error" - schema: - type: "array" - items: - $ref: "#/definitions/Network" - examples: - application/json: - - Name: "bridge" - Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566" - Created: "2016-10-19T06:21:00.416543526Z" - Scope: "local" - Driver: "bridge" - EnableIPv6: false - Internal: false - IPAM: - Driver: "default" - Config: - - - Subnet: "172.17.0.0/16" - Containers: - 39b69226f9d79f5634485fb236a23b2fe4e96a0a94128390a7fbbcc167065867: - EndpointID: "ed2419a97c1d9954d05b46e462e7002ea552f216e9b136b80a7db8d98b442eda" - MacAddress: "02:42:ac:11:00:02" - IPv4Address: "172.17.0.2/16" - IPv6Address: "" - Options: - com.docker.network.bridge.default_bridge: "true" - com.docker.network.bridge.enable_icc: "true" - com.docker.network.bridge.enable_ip_masquerade: "true" - com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" - com.docker.network.bridge.name: "docker0" - com.docker.network.driver.mtu: "1500" - - Name: "none" - Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794" - Created: "0001-01-01T00:00:00Z" - Scope: "local" - Driver: "null" - EnableIPv6: false - Internal: false - IPAM: - Driver: "default" - Config: [] - Containers: {} - Options: {} - - Name: "host" - Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e" - Created: "0001-01-01T00:00:00Z" - Scope: "local" - Driver: "host" - EnableIPv6: false - Internal: false - IPAM: - Driver: "default" - Config: [] - Containers: {} - Options: {} - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "filters" - in: "query" - description: | - JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters: - - - `driver=` Matches a network's driver. - - `id=` Matches all or part of a network ID. - - `label=` or `label==` of a network label. - - `name=` Matches all or part of a network name. - - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. - type: "string" - tags: ["Network"] - - /networks/{id}: - get: - summary: "Inspect a network" - operationId: "NetworkInspect" - produces: - - "application/json" - responses: - 200: - description: "No error" - schema: - $ref: "#/definitions/Network" - 404: - description: "Network not found" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - description: "Network ID or name" - required: true - type: "string" - tags: ["Network"] - - delete: - summary: "Remove a network" - operationId: "NetworkDelete" - responses: - 204: - description: "No error" - 404: - description: "no such network" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - description: "Network ID or name" - required: true - type: "string" - tags: ["Network"] - - /networks/create: - post: - summary: "Create a network" - operationId: "NetworkCreate" - consumes: - - "application/json" - produces: - - "application/json" - responses: - 201: - description: "No error" - schema: - type: "object" - properties: - Id: - description: "The ID of the created network." - type: "string" - Warning: - type: "string" - example: - Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30" - Warning: "" - 400: - description: "bad parameter" - schema: - $ref: "#/definitions/ErrorResponse" - 403: - description: "operation not supported for pre-defined networks" - schema: - $ref: "#/definitions/ErrorResponse" - 404: - description: "plugin not found" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "networkConfig" - in: "body" - description: "Network configuration" - required: true - schema: - type: "object" - required: ["Name"] - properties: - Name: - description: "The network's name." - type: "string" - CheckDuplicate: - description: "Check for networks with duplicate names." - type: "boolean" - Driver: - description: "Name of the network driver plugin to use." - type: "string" - default: "bridge" - Internal: - description: "Restrict external access to the network." - type: "boolean" - IPAM: - description: "Optional custom IP scheme for the network." - $ref: "#/definitions/IPAM" - EnableIPv6: - description: "Enable IPv6 on the network." - type: "boolean" - Options: - description: "Network specific options to be used by the drivers." - type: "object" - additionalProperties: - type: "string" - Labels: - description: "User-defined key/value metadata." - type: "object" - additionalProperties: - type: "string" - example: - Name: "isolated_nw" - CheckDuplicate: false - Driver: "bridge" - EnableIPv6: true - IPAM: - Driver: "default" - Config: - - Subnet: "172.20.0.0/16" - IPRange: "172.20.10.0/24" - Gateway: "172.20.10.11" - - Subnet: "2001:db8:abcd::/64" - Gateway: "2001:db8:abcd::1011" - Options: - foo: "bar" - Internal: true - Options: - com.docker.network.bridge.default_bridge: "true" - com.docker.network.bridge.enable_icc: "true" - com.docker.network.bridge.enable_ip_masquerade: "true" - com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" - com.docker.network.bridge.name: "docker0" - com.docker.network.driver.mtu: "1500" - Labels: - com.example.some-label: "some-value" - com.example.some-other-label: "some-other-value" - tags: ["Network"] - - /networks/{id}/connect: - post: - summary: "Connect a container to a network" - operationId: "NetworkConnect" - consumes: - - "application/octet-stream" - responses: - 200: - description: "No error" - 403: - description: "Operation not supported for swarm scoped networks" - schema: - $ref: "#/definitions/ErrorResponse" - 404: - description: "Network or container not found" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - description: "Network ID or name" - required: true - type: "string" - - name: "container" - in: "body" - required: true - schema: - type: "object" - properties: - Container: - type: "string" - description: "The ID or name of the container to connect to the network." - EndpointConfig: - $ref: "#/definitions/EndpointSettings" - example: - Container: "3613f73ba0e4" - EndpointConfig: - IPAMConfig: - IPv4Address: "172.24.56.89" - IPv6Address: "2001:db8::5689" - tags: ["Network"] - - /networks/{id}/disconnect: - post: - summary: "Disconnect a container from a network" - operationId: "NetworkDisconnect" - consumes: - - "application/json" - responses: - 200: - description: "No error" - 403: - description: "Operation not supported for swarm scoped networks" - schema: - $ref: "#/definitions/ErrorResponse" - 404: - description: "Network or container not found" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - description: "Network ID or name" - required: true - type: "string" - - name: "container" - in: "body" - required: true - schema: - type: "object" - properties: - Container: - type: "string" - description: "The ID or name of the container to disconnect from the network." - Force: - type: "boolean" - description: "Force the container to disconnect from the network." - tags: ["Network"] - /networks/prune: - post: - summary: "Delete unused networks" - consumes: - - "application/json" - produces: - - "application/json" - operationId: "NetworkPrune" - parameters: - - name: "filters" - in: "query" - description: | - Filters to process on the prune list, encoded as JSON (a `map[string][]string`). - - Available filters: - type: "string" - responses: - 200: - description: "No error" - schema: - type: "object" - properties: - VolumesDeleted: - description: "Networks that were deleted" - type: "array" - items: - type: "string" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["Network"] - /plugins: - get: - summary: "List plugins" - operationId: "PluginList" - description: "Returns information about installed plugins." - produces: ["application/json"] - responses: - 200: - description: "No error" - schema: - type: "array" - items: - $ref: "#/definitions/Plugin" - example: - - Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" - Name: "tiborvass/sample-volume-plugin" - Tag: "latest" - Active: true - Settings: - Env: - - "DEBUG=0" - Args: null - Devices: null - Config: - Description: "A sample volume plugin for Docker" - Documentation: "https://docs.docker.com/engine/extend/plugins/" - Interface: - Types: - - "docker.volumedriver/1.0" - Socket: "plugins.sock" - Entrypoint: - - "/usr/bin/sample-volume-plugin" - - "/data" - WorkDir: "" - User: {} - Network: - Type: "" - Linux: - Capabilities: null - AllowAllDevices: false - Devices: null - Mounts: null - PropagatedMount: "/data" - Env: - - Name: "DEBUG" - Description: "If set, prints debug messages" - Settable: null - Value: "0" - Args: - Name: "args" - Description: "command line arguments" - Settable: null - Value: [] - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["Plugin"] - - /plugins/privileges: - get: - summary: "Get plugin privileges" - operationId: "GetPluginPrivileges" - responses: - 200: - description: "no error" - schema: - type: "array" - items: - description: "Describes a permission the user has to accept upon installing the plugin." - type: "object" - properties: - Name: - type: "string" - Description: - type: "string" - Value: - type: "array" - items: - type: "string" - example: - - Name: "network" - Description: "" - Value: - - "host" - - Name: "mount" - Description: "" - Value: - - "/data" - - Name: "device" - Description: "" - Value: - - "/dev/cpu_dma_latency" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "name" - in: "query" - description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." - required: true - type: "string" - tags: - - "Plugin" - - /plugins/pull: - post: - summary: "Install a plugin" - operationId: "PluginPull" - description: | - Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). - produces: - - "application/json" - responses: - 204: - description: "no error" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "remote" - in: "query" - description: | - Remote reference for plugin to install. - - The `:latest` tag is optional, and is used as the default if omitted. - required: true - type: "string" - - name: "name" - in: "query" - description: | - Local name for the pulled plugin. - - The `:latest` tag is optional, and is used as the default if omitted. - required: false - type: "string" - - name: "X-Registry-Auth" - in: "header" - description: "A base64-encoded auth configuration to use when pulling a plugin from a registry. [See the authentication section for details.](#section/Authentication)" - type: "string" - - name: "body" - in: "body" - schema: - type: "array" - items: - description: "Describes a permission accepted by the user upon installing the plugin." - type: "object" - properties: - Name: - type: "string" - Description: - type: "string" - Value: - type: "array" - items: - type: "string" - example: - - Name: "network" - Description: "" - Value: - - "host" - - Name: "mount" - Description: "" - Value: - - "/data" - - Name: "device" - Description: "" - Value: - - "/dev/cpu_dma_latency" - tags: ["Plugin"] - /plugins/{name}/json: - get: - summary: "Inspect a plugin" - operationId: "PluginInspect" - responses: - 200: - description: "no error" - schema: - $ref: "#/definitions/Plugin" - 404: - description: "plugin is not installed" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "name" - in: "path" - description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." - required: true - type: "string" - tags: ["Plugin"] - /plugins/{name}: - delete: - summary: "Remove a plugin" - operationId: "PluginDelete" - responses: - 200: - description: "no error" - schema: - $ref: "#/definitions/Plugin" - 404: - description: "plugin is not installed" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "name" - in: "path" - description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." - required: true - type: "string" - - name: "force" - in: "query" - description: "Disable the plugin before removing. This may result in issues if the plugin is in use by a container." - type: "boolean" - default: false - tags: ["Plugin"] - /plugins/{name}/enable: - post: - summary: "Enable a plugin" - operationId: "PluginEnable" - responses: - 200: - description: "no error" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "name" - in: "path" - description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." - required: true - type: "string" - - name: "timeout" - in: "query" - description: "Set the HTTP client timeout (in seconds)" - type: "integer" - default: 0 - tags: ["Plugin"] - /plugins/{name}/disable: - post: - summary: "Disable a plugin" - operationId: "PluginDisable" - responses: - 200: - description: "no error" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "name" - in: "path" - description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." - required: true - type: "string" - tags: ["Plugin"] - /plugins/create: - post: - summary: "Create a plugin" - operationId: "PluginCreate" - consumes: - - "application/x-tar" - responses: - 204: - description: "no error" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "name" - in: "query" - description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." - required: true - type: "string" - - name: "tarContext" - in: "body" - description: "Path to tar containing plugin rootfs and manifest" - schema: - type: "string" - format: "binary" - tags: ["Plugin"] - /plugins/{name}/push: - post: - summary: "Push a plugin" - operationId: "PluginPush" - description: | - Push a plugin to the registry. - parameters: - - name: "name" - in: "path" - description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." - required: true - type: "string" - responses: - 200: - description: "no error" - 404: - description: "plugin not installed" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["Plugin"] - /plugins/{name}/set: - post: - summary: "Configure a plugin" - operationId: "PluginSet" - consumes: - - "application/json" - parameters: - - name: "name" - in: "path" - description: "The name of the plugin. The `:latest` tag is optional, and is the default if omitted." - required: true - type: "string" - - name: "body" - in: "body" - schema: - type: "array" - items: - type: "string" - example: ["DEBUG=1"] - responses: - 204: - description: "No error" - 404: - description: "Plugin not installed" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "Server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["Plugin"] - /nodes: - get: - summary: "List nodes" - operationId: "NodeList" - responses: - 200: - description: "no error" - schema: - type: "array" - items: - $ref: "#/definitions/Node" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "filters" - in: "query" - description: | - Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). - - Available filters: - - `id=` - - `label=` - - `membership=`(`accepted`|`pending`)` - - `name=` - - `role=`(`manager`|`worker`)` - type: "string" - tags: ["Node"] - /nodes/{id}: - get: - summary: "Inspect a node" - operationId: "NodeInspect" - responses: - 200: - description: "no error" - schema: - $ref: "#/definitions/Node" - 404: - description: "no such node" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - description: "The ID or name of the node" - type: "string" - required: true - tags: ["Node"] - delete: - summary: "Delete a node" - operationId: "NodeDelete" - responses: - 200: - description: "no error" - 404: - description: "no such node" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - description: "The ID or name of the node" - type: "string" - required: true - - name: "force" - in: "query" - description: "Force remove a node from the swarm" - default: false - type: "boolean" - tags: ["Node"] - /nodes/{id}/update: - post: - summary: "Update a node" - operationId: "NodeUpdate" - responses: - 200: - description: "no error" - 404: - description: "no such node" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - description: "The ID of the node" - type: "string" - required: true - - name: "body" - in: "body" - schema: - $ref: "#/definitions/NodeSpec" - - name: "version" - in: "query" - description: "The version number of the node object being updated. This is required to avoid conflicting writes." - type: "integer" - format: "int64" - required: true - tags: ["Node"] - /swarm: - get: - summary: "Inspect swarm" - operationId: "SwarmInspect" - responses: - 200: - description: "no error" - schema: - allOf: - - $ref: "#/definitions/ClusterInfo" - - type: "object" - properties: - JoinTokens: - description: "The tokens workers and managers need to join the swarm." - type: "object" - properties: - Worker: - description: "The token workers can use to join the swarm." - type: "string" - Manager: - description: "The token managers can use to join the swarm." - type: "string" - example: - CreatedAt: "2016-08-15T16:00:20.349727406Z" - Spec: - Dispatcher: - HeartbeatPeriod: 5000000000 - Orchestration: - TaskHistoryRetentionLimit: 10 - CAConfig: - NodeCertExpiry: 7776000000000000 - Raft: - LogEntriesForSlowFollowers: 500 - HeartbeatTick: 1 - SnapshotInterval: 10000 - ElectionTick: 3 - TaskDefaults: {} - EncryptionConfig: - AutoLockManagers: false - Name: "default" - JoinTokens: - Worker: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-6qmn92w6bu3jdvnglku58u11a" - Manager: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-8llk83c4wm9lwioey2s316r9l" - ID: "70ilmkj2f6sp2137c753w2nmt" - UpdatedAt: "2016-08-15T16:32:09.623207604Z" - Version: - Index: 51 - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["Swarm"] - /swarm/init: - post: - summary: "Initialize a new swarm" - operationId: "SwarmInit" - produces: - - "application/json" - - "text/plain" - responses: - 200: - description: "no error" - schema: - description: "The node ID" - type: "string" - example: "7v2t30z9blmxuhnyo6s4cpenp" - 400: - description: "bad parameter" - schema: - $ref: "#/definitions/ErrorResponse" - 406: - description: "node is already part of a swarm" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "body" - in: "body" - required: true - schema: - type: "object" - properties: - ListenAddr: - description: "Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used." - type: "string" - AdvertiseAddr: - description: "Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible." - type: "string" - ForceNewCluster: - description: "Force creation of a new swarm." - type: "boolean" - Spec: - $ref: "#/definitions/SwarmSpec" - example: - ListenAddr: "0.0.0.0:2377" - AdvertiseAddr: "192.168.1.1:2377" - ForceNewCluster: false - Spec: - Orchestration: {} - Raft: {} - Dispatcher: {} - CAConfig: {} - EncryptionConfig: - AutoLockManagers: false - tags: ["Swarm"] - /swarm/join: - post: - summary: "Join an existing swarm" - operationId: "SwarmJoin" - responses: - 200: - description: "no error" - 400: - description: "bad parameter" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - 503: - description: "node is already part of a swarm" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "body" - in: "body" - required: true - schema: - type: "object" - properties: - ListenAddr: - description: "Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP)." - type: "string" - AdvertiseAddr: - description: "Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible." - type: "string" - RemoteAddrs: - description: "Addresses of manager nodes already participating in the swarm." - type: "string" - JoinToken: - description: "Secret token for joining this swarm." - type: "string" - example: - ListenAddr: "0.0.0.0:2377" - AdvertiseAddr: "192.168.1.1:2377" - RemoteAddrs: - - "node1:2377" - JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" - tags: ["Swarm"] - /swarm/leave: - post: - summary: "Leave a swarm" - operationId: "SwarmLeave" - responses: - 200: - description: "no error" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - 503: - description: "node is not part of a swarm" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "force" - description: "Force leave swarm, even if this is the last manager or that it will break the cluster." - in: "query" - type: "boolean" - default: false - tags: ["Swarm"] - /swarm/update: - post: - summary: "Update a swarm" - operationId: "SwarmUpdate" - responses: - 200: - description: "no error" - 400: - description: "bad parameter" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - 503: - description: "node is not part of a swarm" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "body" - in: "body" - required: true - schema: - $ref: "#/definitions/SwarmSpec" - - name: "version" - in: "query" - description: "The version number of the swarm object being updated. This is required to avoid conflicting writes." - type: "integer" - format: "int64" - required: true - - name: "rotateWorkerToken" - in: "query" - description: "Rotate the worker join token." - type: "boolean" - default: false - - name: "rotateManagerToken" - in: "query" - description: "Rotate the manager join token." - type: "boolean" - default: false - - name: "rotateManagerUnlockKey" - in: "query" - description: "Rotate the manager unlock key." - type: "boolean" - default: false - tags: ["Swarm"] - /swarm/unlockkey: - get: - summary: "Get the unlock key" - operationId: "SwarmUnlockkey" - consumes: - - "application/json" - responses: - 200: - description: "no error" - schema: - type: "object" - properties: - UnlockKey: - description: "The swarm's unlock key." - type: "string" - example: - UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["Swarm"] - /swarm/unlock: - post: - summary: "Unlock a locked manager" - operationId: "SwarmUnlock" - consumes: - - "application/json" - produces: - - "application/json" - parameters: - - name: "body" - in: "body" - required: true - schema: - type: "object" - properties: - UnlockKey: - description: "The swarm's unlock key." - type: "string" - example: - UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" - responses: - 200: - description: "no error" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - tags: ["Swarm"] - /services: - get: - summary: "List services" - operationId: "ServiceList" - responses: - 200: - description: "no error" - schema: - type: "array" - items: - $ref: "#/definitions/Service" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "filters" - in: "query" - type: "string" - description: | - A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters: - - - `id=` - - `name=` - - `label=` - tags: ["Service"] - /services/create: - post: - summary: "Create a service" - operationId: "ServiceCreate" - consumes: - - "application/json" - produces: - - "application/json" - responses: - 201: - description: "no error" - schema: - type: "object" - properties: - ID: - description: "The ID of the created service." - type: "string" - Warning: - description: "Optional warning message" - type: "string" - example: - ID: "ak7w3gjqoa3kuz8xcpnyy0pvl" - Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" - 403: - description: "network is not eligible for services" - schema: - $ref: "#/definitions/ErrorResponse" - 409: - description: "name conflicts with an existing service" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - 503: - description: "server error or node is not part of a swarm" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "body" - in: "body" - required: true - schema: - allOf: - - $ref: "#/definitions/ServiceSpec" - - type: "object" - example: - Name: "web" - TaskTemplate: - ContainerSpec: - Image: "nginx:alpine" - Mounts: - - - ReadOnly: true - Source: "web-data" - Target: "/usr/share/nginx/html" - Type: "volume" - VolumeOptions: - DriverConfig: {} - Labels: - com.example.something: "something-value" - User: "33" - DNSConfig: - Nameservers: ["8.8.8.8"] - Search: ["example.org"] - Options: ["timeout:3"] - LogDriver: - Name: "json-file" - Options: - max-file: "3" - max-size: "10M" - Placement: {} - Resources: - Limits: - MemoryBytes: 104857600 - Reservations: {} - RestartPolicy: - Condition: "on-failure" - Delay: 10000000000 - MaxAttempts: 10 - Mode: - Replicated: - Replicas: 4 - UpdateConfig: - Delay: 30000000000 - Parallelism: 2 - FailureAction: "pause" - EndpointSpec: - Ports: - - - Protocol: "tcp" - PublishedPort: 8080 - TargetPort: 80 - Labels: - foo: "bar" - - name: "X-Registry-Auth" - in: "header" - description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)" - type: "string" - tags: ["Service"] - /services/{id}: - get: - summary: "Inspect a service" - operationId: "ServiceInspect" - responses: - 200: - description: "no error" - schema: - $ref: "#/definitions/Service" - 404: - description: "no such service" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - description: "ID or name of service." - required: true - type: "string" - tags: ["Service"] - delete: - summary: "Delete a service" - operationId: "ServiceDelete" - responses: - 200: - description: "no error" - 404: - description: "no such service" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - description: "ID or name of service." - required: true - type: "string" - tags: ["Service"] - /services/{id}/update: - post: - summary: "Update a service" - operationId: "ServiceUpdate" - consumes: ["application/json"] - produces: ["application/json"] - responses: - 200: - description: "no error" - schema: - $ref: "#/definitions/ImageDeleteResponse" - 404: - description: "no such service" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - description: "ID or name of service." - required: true - type: "string" - - name: "body" - in: "body" - required: true - schema: - allOf: - - $ref: "#/definitions/ServiceSpec" - - type: "object" - example: - Name: "top" - TaskTemplate: - ContainerSpec: - Image: "busybox" - Args: - - "top" - Resources: - Limits: {} - Reservations: {} - RestartPolicy: - Condition: "any" - MaxAttempts: 0 - Placement: {} - ForceUpdate: 0 - Mode: - Replicated: - Replicas: 1 - UpdateConfig: - Parallelism: 1 - Monitor: 15000000000 - MaxFailureRatio: 0.15 - EndpointSpec: - Mode: "vip" - - - name: "version" - in: "query" - description: "The version number of the service object being updated. This is required to avoid conflicting writes." - required: true - type: "integer" - - name: "registryAuthFrom" - in: "query" - type: "string" - description: "If the X-Registry-Auth header is not specified, this parameter indicates where to find registry authorization credentials. The valid values are `spec` and `previous-spec`." - default: "spec" - - name: "X-Registry-Auth" - in: "header" - description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)" - type: "string" - - tags: ["Service"] - /services/{id}/logs: - get: - summary: "Get service logs" - description: | - Get `stdout` and `stderr` logs from a service. - - **Note**: This endpoint works only for services with the `json-file` or `journald` logging drivers. - operationId: "ServiceLogs" - produces: - - "application/vnd.docker.raw-stream" - - "application/json" - responses: - 101: - description: "logs returned as a stream" - schema: - type: "string" - format: "binary" - 200: - description: "logs returned as a string in response body" - schema: - type: "string" - 404: - description: "no such container" - schema: - $ref: "#/definitions/ErrorResponse" - examples: - application/json: - message: "No such container: c2ada9df5af8" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - description: "ID or name of the container" - type: "string" - - name: "details" - in: "query" - description: "Show extra details provided to logs." - type: "boolean" - default: false - - name: "follow" - in: "query" - description: | - Return the logs as a stream. - - This will return a `101` HTTP response with a `Connection: upgrade` header, then hijack the HTTP connection to send raw output. For more information about hijacking and the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). - type: "boolean" - default: false - - name: "stdout" - in: "query" - description: "Return logs from `stdout`" - type: "boolean" - default: false - - name: "stderr" - in: "query" - description: "Return logs from `stderr`" - type: "boolean" - default: false - - name: "since" - in: "query" - description: "Only return logs since this time, as a UNIX timestamp" - type: "integer" - default: 0 - - name: "timestamps" - in: "query" - description: "Add timestamps to every log line" - type: "boolean" - default: false - - name: "tail" - in: "query" - description: "Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines." - type: "string" - default: "all" - tags: ["Service"] - /tasks: - get: - summary: "List tasks" - operationId: "TaskList" - produces: - - "application/json" - responses: - 200: - description: "no error" - schema: - type: "array" - items: - $ref: "#/definitions/Task" - example: - - ID: "0kzzo1i0y4jz6027t0k7aezc7" - Version: - Index: 71 - CreatedAt: "2016-06-07T21:07:31.171892745Z" - UpdatedAt: "2016-06-07T21:07:31.376370513Z" - Spec: - ContainerSpec: - Image: "redis" - Resources: - Limits: {} - Reservations: {} - RestartPolicy: - Condition: "any" - MaxAttempts: 0 - Placement: {} - ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" - Slot: 1 - NodeID: "60gvrl6tm78dmak4yl7srz94v" - Status: - Timestamp: "2016-06-07T21:07:31.290032978Z" - State: "running" - Message: "started" - ContainerStatus: - ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" - PID: 677 - DesiredState: "running" - NetworksAttachments: - - Network: - ID: "4qvuz4ko70xaltuqbt8956gd1" - Version: - Index: 18 - CreatedAt: "2016-06-07T20:31:11.912919752Z" - UpdatedAt: "2016-06-07T21:07:29.955277358Z" - Spec: - Name: "ingress" - Labels: - com.docker.swarm.internal: "true" - DriverConfiguration: {} - IPAMOptions: - Driver: {} - Configs: - - Subnet: "10.255.0.0/16" - Gateway: "10.255.0.1" - DriverState: - Name: "overlay" - Options: - com.docker.network.driver.overlay.vxlanid_list: "256" - IPAMOptions: - Driver: - Name: "default" - Configs: - - Subnet: "10.255.0.0/16" - Gateway: "10.255.0.1" - Addresses: - - "10.255.0.10/16" - - ID: "1yljwbmlr8er2waf8orvqpwms" - Version: - Index: 30 - CreatedAt: "2016-06-07T21:07:30.019104782Z" - UpdatedAt: "2016-06-07T21:07:30.231958098Z" - Name: "hopeful_cori" - Spec: - ContainerSpec: - Image: "redis" - Resources: - Limits: {} - Reservations: {} - RestartPolicy: - Condition: "any" - MaxAttempts: 0 - Placement: {} - ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" - Slot: 1 - NodeID: "60gvrl6tm78dmak4yl7srz94v" - Status: - Timestamp: "2016-06-07T21:07:30.202183143Z" - State: "shutdown" - Message: "shutdown" - ContainerStatus: - ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213" - DesiredState: "shutdown" - NetworksAttachments: - - Network: - ID: "4qvuz4ko70xaltuqbt8956gd1" - Version: - Index: 18 - CreatedAt: "2016-06-07T20:31:11.912919752Z" - UpdatedAt: "2016-06-07T21:07:29.955277358Z" - Spec: - Name: "ingress" - Labels: - com.docker.swarm.internal: "true" - DriverConfiguration: {} - IPAMOptions: - Driver: {} - Configs: - - Subnet: "10.255.0.0/16" - Gateway: "10.255.0.1" - DriverState: - Name: "overlay" - Options: - com.docker.network.driver.overlay.vxlanid_list: "256" - IPAMOptions: - Driver: - Name: "default" - Configs: - - Subnet: "10.255.0.0/16" - Gateway: "10.255.0.1" - Addresses: - - "10.255.0.5/16" - - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "filters" - in: "query" - type: "string" - description: | - A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters: - - - `id=` - - `name=` - - `service=` - - `node=` - - `label=key` or `label="key=value"` - - `desired-state=(running | shutdown | accepted)` - tags: ["Task"] - /tasks/{id}: - get: - summary: "Inspect a task" - operationId: "TaskInspect" - produces: - - "application/json" - responses: - 200: - description: "no error" - schema: - $ref: "#/definitions/Task" - 404: - description: "no such task" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - description: "ID of the task" - required: true - type: "string" - tags: ["Task"] - /secrets: - get: - summary: "List secrets" - operationId: "SecretList" - produces: - - "application/json" - responses: - 200: - description: "no error" - schema: - type: "array" - items: - $ref: "#/definitions/Secret" - example: - - ID: "ktnbjxoalbkvbvedmg1urrz8h" - Version: - Index: 11 - CreatedAt: "2016-11-05T01:20:17.327670065Z" - UpdatedAt: "2016-11-05T01:20:17.327670065Z" - Spec: - Name: "app-dev.crt" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "filters" - in: "query" - type: "string" - description: | - A JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Available filters: - - - `names=` - tags: ["Secret"] - /secrets/create: - post: - summary: "Create a secret" - operationId: "SecretCreate" - consumes: - - "application/json" - produces: - - "application/json" - responses: - 201: - description: "no error" - schema: - type: "object" - properties: - ID: - description: "The ID of the created secret." - type: "string" - example: - ID: "ktnbjxoalbkvbvedmg1urrz8h" - 406: - description: "server error or node is not part of a swarm" - schema: - $ref: "#/definitions/ErrorResponse" - 409: - description: "name conflicts with an existing object" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "body" - in: "body" - schema: - allOf: - - $ref: "#/definitions/SecretSpec" - - type: "object" - example: - Name: "app-key.crt" - Labels: - foo: "bar" - Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" - tags: ["Secret"] - /secrets/{id}: - get: - summary: "Inspect a secret" - operationId: "SecretInspect" - produces: - - "application/json" - responses: - 200: - description: "no error" - schema: - $ref: "#/definitions/Secret" - example: - ID: "ktnbjxoalbkvbvedmg1urrz8h" - Version: - Index: 11 - CreatedAt: "2016-11-05T01:20:17.327670065Z" - UpdatedAt: "2016-11-05T01:20:17.327670065Z" - Spec: - Name: "app-dev.crt" - 404: - description: "secret not found" - schema: - $ref: "#/definitions/ErrorResponse" - 406: - description: "node is not part of a swarm" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - type: "string" - description: "ID of the secret" - tags: ["Secret"] - delete: - summary: "Delete a secret" - operationId: "SecretDelete" - produces: - - "application/json" - responses: - 204: - description: "no error" - 404: - description: "secret not found" - schema: - $ref: "#/definitions/ErrorResponse" - 500: - description: "server error" - schema: - $ref: "#/definitions/ErrorResponse" - parameters: - - name: "id" - in: "path" - required: true - type: "string" - description: "ID of the secret" - tags: ["Secret"] diff --git a/v1.47.yaml b/v1.47.yaml new file mode 100644 index 000000000..a4b63a183 --- /dev/null +++ b/v1.47.yaml @@ -0,0 +1,12939 @@ +# A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API. +# +# This is used for generating API documentation and the types used by the +# client/server. See api/README.md for more information. +# +# Some style notes: +# - This file is used by ReDoc, which allows GitHub Flavored Markdown in +# descriptions. +# - There is no maximum line length, for ease of editing and pretty diffs. +# - operationIds are in the format "NounVerb", with a singular noun. + +swagger: "2.0" +schemes: + - "http" + - "https" +produces: + - "application/json" + - "text/plain" +consumes: + - "application/json" + - "text/plain" +basePath: "/v1.47" +info: + title: "Docker Engine API" + version: "1.47" + x-logo: + url: "https://docs.docker.com/assets/images/logo-docker-main.png" + description: | + The Engine API is an HTTP API served by Docker Engine. It is the API the + Docker client uses to communicate with the Engine, so everything the Docker + client can do can be done with the API. + + Most of the client's commands map directly to API endpoints (e.g. `docker ps` + is `GET /containers/json`). The notable exception is running containers, + which consists of several API calls. + + # Errors + + The API uses standard HTTP status codes to indicate the success or failure + of the API call. The body of the response will be JSON in the following + format: + + ``` + { + "message": "page not found" + } + ``` + + # Versioning + + The API is usually changed in each release, so API calls are versioned to + ensure that clients don't break. To lock to a specific version of the API, + you prefix the URL with its version, for example, call `/v1.30/info` to use + the v1.30 version of the `/info` endpoint. If the API version specified in + the URL is not supported by the daemon, a HTTP `400 Bad Request` error message + is returned. + + If you omit the version-prefix, the current version of the API (v1.47) is used. + For example, calling `/info` is the same as calling `/v1.47/info`. Using the + API without a version-prefix is deprecated and will be removed in a future release. + + Engine releases in the near future should support this version of the API, + so your client will continue to work even if it is talking to a newer Engine. + + The API uses an open schema model, which means server may add extra properties + to responses. Likewise, the server will ignore any extra query parameters and + request body properties. When you write clients, you need to ignore additional + properties in responses to ensure they do not break when talking to newer + daemons. + + + # Authentication + + Authentication for registries is handled client side. The client has to send + authentication details to various endpoints that need to communicate with + registries, such as `POST /images/(name)/push`. These are sent as + `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) + (JSON) string with the following structure: + + ``` + { + "username": "string", + "password": "string", + "email": "string", + "serveraddress": "string" + } + ``` + + The `serveraddress` is a domain/IP without a protocol. Throughout this + structure, double quotes are required. + + If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), + you can just pass this instead of credentials: + + ``` + { + "identitytoken": "9cbaf023786cd7..." + } + ``` + +# The tags on paths define the menu sections in the ReDoc documentation, so +# the usage of tags must make sense for that: +# - They should be singular, not plural. +# - There should not be too many tags, or the menu becomes unwieldy. For +# example, it is preferable to add a path to the "System" tag instead of +# creating a tag with a single path in it. +# - The order of tags in this list defines the order in the menu. +tags: + # Primary objects + - name: "Container" + x-displayName: "Containers" + description: | + Create and manage containers. + - name: "Image" + x-displayName: "Images" + - name: "Network" + x-displayName: "Networks" + description: | + Networks are user-defined networks that containers can be attached to. + See the [networking documentation](https://docs.docker.com/network/) + for more information. + - name: "Volume" + x-displayName: "Volumes" + description: | + Create and manage persistent storage that can be attached to containers. + - name: "Exec" + x-displayName: "Exec" + description: | + Run new commands inside running containers. Refer to the + [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/) + for more information. + + To exec a command in a container, you first need to create an exec instance, + then start it. These two API endpoints are wrapped up in a single command-line + command, `docker exec`. + + # Swarm things + - name: "Swarm" + x-displayName: "Swarm" + description: | + Engines can be clustered together in a swarm. Refer to the + [swarm mode documentation](https://docs.docker.com/engine/swarm/) + for more information. + - name: "Node" + x-displayName: "Nodes" + description: | + Nodes are instances of the Engine participating in a swarm. Swarm mode + must be enabled for these endpoints to work. + - name: "Service" + x-displayName: "Services" + description: | + Services are the definitions of tasks to run on a swarm. Swarm mode must + be enabled for these endpoints to work. + - name: "Task" + x-displayName: "Tasks" + description: | + A task is a container running on a swarm. It is the atomic scheduling unit + of swarm. Swarm mode must be enabled for these endpoints to work. + - name: "Secret" + x-displayName: "Secrets" + description: | + Secrets are sensitive data that can be used by services. Swarm mode must + be enabled for these endpoints to work. + - name: "Config" + x-displayName: "Configs" + description: | + Configs are application configurations that can be used by services. Swarm + mode must be enabled for these endpoints to work. + # System things + - name: "Plugin" + x-displayName: "Plugins" + - name: "System" + x-displayName: "System" + +definitions: + Port: + type: "object" + description: "An open port on a container" + required: [PrivatePort, Type] + properties: + IP: + type: "string" + format: "ip-address" + description: "Host IP address that the container's port is mapped to" + PrivatePort: + type: "integer" + format: "uint16" + x-nullable: false + description: "Port on the container" + PublicPort: + type: "integer" + format: "uint16" + description: "Port exposed on the host" + Type: + type: "string" + x-nullable: false + enum: ["tcp", "udp", "sctp"] + example: + PrivatePort: 8080 + PublicPort: 80 + Type: "tcp" + + MountPoint: + type: "object" + description: | + MountPoint represents a mount point configuration inside the container. + This is used for reporting the mountpoints in use by a container. + properties: + Type: + description: | + The mount type: + + - `bind` a mount of a file or directory from the host into the container. + - `volume` a docker volume with the given `Name`. + - `tmpfs` a `tmpfs`. + - `npipe` a named pipe from the host into the container. + - `cluster` a Swarm cluster volume + type: "string" + enum: + - "bind" + - "volume" + - "tmpfs" + - "npipe" + - "cluster" + example: "volume" + Name: + description: | + Name is the name reference to the underlying data defined by `Source` + e.g., the volume name. + type: "string" + example: "myvolume" + Source: + description: | + Source location of the mount. + + For volumes, this contains the storage location of the volume (within + `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains + the source (host) part of the bind-mount. For `tmpfs` mount points, this + field is empty. + type: "string" + example: "/var/lib/docker/volumes/myvolume/_data" + Destination: + description: | + Destination is the path relative to the container root (`/`) where + the `Source` is mounted inside the container. + type: "string" + example: "/usr/share/nginx/html/" + Driver: + description: | + Driver is the volume driver used to create the volume (if it is a volume). + type: "string" + example: "local" + Mode: + description: | + Mode is a comma separated list of options supplied by the user when + creating the bind/volume mount. + + The default is platform-specific (`"z"` on Linux, empty on Windows). + type: "string" + example: "z" + RW: + description: | + Whether the mount is mounted writable (read-write). + type: "boolean" + example: true + Propagation: + description: | + Propagation describes how mounts are propagated from the host into the + mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) + for details. This field is not used on Windows. + type: "string" + example: "" + + DeviceMapping: + type: "object" + description: "A device mapping between the host and container" + properties: + PathOnHost: + type: "string" + PathInContainer: + type: "string" + CgroupPermissions: + type: "string" + example: + PathOnHost: "/dev/deviceName" + PathInContainer: "/dev/deviceName" + CgroupPermissions: "mrw" + + DeviceRequest: + type: "object" + description: "A request for devices to be sent to device drivers" + properties: + Driver: + type: "string" + example: "nvidia" + Count: + type: "integer" + example: -1 + DeviceIDs: + type: "array" + items: + type: "string" + example: + - "0" + - "1" + - "GPU-fef8089b-4820-abfc-e83e-94318197576e" + Capabilities: + description: | + A list of capabilities; an OR list of AND lists of capabilities. + type: "array" + items: + type: "array" + items: + type: "string" + example: + # gpu AND nvidia AND compute + - ["gpu", "nvidia", "compute"] + Options: + description: | + Driver-specific options, specified as a key/value pairs. These options + are passed directly to the driver. + type: "object" + additionalProperties: + type: "string" + + ThrottleDevice: + type: "object" + properties: + Path: + description: "Device path" + type: "string" + Rate: + description: "Rate" + type: "integer" + format: "int64" + minimum: 0 + + Mount: + type: "object" + properties: + Target: + description: "Container path." + type: "string" + Source: + description: "Mount source (e.g. a volume name, a host path)." + type: "string" + Type: + description: | + The mount type. Available types: + + - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. + - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. + - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. + - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. + - `cluster` a Swarm cluster volume + type: "string" + enum: + - "bind" + - "volume" + - "tmpfs" + - "npipe" + - "cluster" + ReadOnly: + description: "Whether the mount should be read-only." + type: "boolean" + Consistency: + description: "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`." + type: "string" + BindOptions: + description: "Optional configuration for the `bind` type." + type: "object" + properties: + Propagation: + description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`." + type: "string" + enum: + - "private" + - "rprivate" + - "shared" + - "rshared" + - "slave" + - "rslave" + NonRecursive: + description: "Disable recursive bind mount." + type: "boolean" + default: false + CreateMountpoint: + description: "Create mount point on host if missing" + type: "boolean" + default: false + ReadOnlyNonRecursive: + description: | + Make the mount non-recursively read-only, but still leave the mount recursive + (unless NonRecursive is set to `true` in conjunction). + + Added in v1.44, before that version all read-only mounts were + non-recursive by default. To match the previous behaviour this + will default to `true` for clients on versions prior to v1.44. + type: "boolean" + default: false + ReadOnlyForceRecursive: + description: "Raise an error if the mount cannot be made recursively read-only." + type: "boolean" + default: false + VolumeOptions: + description: "Optional configuration for the `volume` type." + type: "object" + properties: + NoCopy: + description: "Populate volume with data from the target." + type: "boolean" + default: false + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + DriverConfig: + description: "Map of driver specific options" + type: "object" + properties: + Name: + description: "Name of the driver to use to create the volume." + type: "string" + Options: + description: "key/value map of driver specific options." + type: "object" + additionalProperties: + type: "string" + Subpath: + description: "Source path inside the volume. Must be relative without any back traversals." + type: "string" + example: "dir-inside-volume/subdirectory" + TmpfsOptions: + description: "Optional configuration for the `tmpfs` type." + type: "object" + properties: + SizeBytes: + description: "The size for the tmpfs mount in bytes." + type: "integer" + format: "int64" + Mode: + description: "The permission mode for the tmpfs mount in an integer." + type: "integer" + Options: + description: | + The options to be passed to the tmpfs mount. An array of arrays. + Flag options should be provided as 1-length arrays. Other types + should be provided as as 2-length arrays, where the first item is + the key and the second the value. + type: "array" + items: + type: "array" + minItems: 1 + maxItems: 2 + items: + type: "string" + example: + [["noexec"]] + + RestartPolicy: + description: | + The behavior to apply when the container exits. The default is not to + restart. + + An ever increasing delay (double the previous delay, starting at 100ms) is + added before each restart to prevent flooding the server. + type: "object" + properties: + Name: + type: "string" + description: | + - Empty string means not to restart + - `no` Do not automatically restart + - `always` Always restart + - `unless-stopped` Restart always except when the user has manually stopped the container + - `on-failure` Restart only when the container exit code is non-zero + enum: + - "" + - "no" + - "always" + - "unless-stopped" + - "on-failure" + MaximumRetryCount: + type: "integer" + description: | + If `on-failure` is used, the number of times to retry before giving up. + + Resources: + description: "A container's resources (cgroups config, ulimits, etc)" + type: "object" + properties: + # Applicable to all platforms + CpuShares: + description: | + An integer value representing this container's relative CPU weight + versus other containers. + type: "integer" + Memory: + description: "Memory limit in bytes." + type: "integer" + format: "int64" + default: 0 + # Applicable to UNIX platforms + CgroupParent: + description: | + Path to `cgroups` under which the container's `cgroup` is created. If + the path is not absolute, the path is considered to be relative to the + `cgroups` path of the init process. Cgroups are created if they do not + already exist. + type: "string" + BlkioWeight: + description: "Block IO weight (relative weight)." + type: "integer" + minimum: 0 + maximum: 1000 + BlkioWeightDevice: + description: | + Block IO weight (relative device weight) in the form: + + ``` + [{"Path": "device_path", "Weight": weight}] + ``` + type: "array" + items: + type: "object" + properties: + Path: + type: "string" + Weight: + type: "integer" + minimum: 0 + BlkioDeviceReadBps: + description: | + Limit read rate (bytes per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceWriteBps: + description: | + Limit write rate (bytes per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceReadIOps: + description: | + Limit read rate (IO per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceWriteIOps: + description: | + Limit write rate (IO per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + CpuPeriod: + description: "The length of a CPU period in microseconds." + type: "integer" + format: "int64" + CpuQuota: + description: | + Microseconds of CPU time that the container can get in a CPU period. + type: "integer" + format: "int64" + CpuRealtimePeriod: + description: | + The length of a CPU real-time period in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + type: "integer" + format: "int64" + CpuRealtimeRuntime: + description: | + The length of a CPU real-time runtime in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + type: "integer" + format: "int64" + CpusetCpus: + description: | + CPUs in which to allow execution (e.g., `0-3`, `0,1`). + type: "string" + example: "0-3" + CpusetMems: + description: | + Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + effective on NUMA systems. + type: "string" + Devices: + description: "A list of devices to add to the container." + type: "array" + items: + $ref: "#/definitions/DeviceMapping" + DeviceCgroupRules: + description: "a list of cgroup rules to apply to the container" + type: "array" + items: + type: "string" + example: "c 13:* rwm" + DeviceRequests: + description: | + A list of requests for devices to be sent to device drivers. + type: "array" + items: + $ref: "#/definitions/DeviceRequest" + KernelMemoryTCP: + description: | + Hard limit for kernel TCP buffer memory (in bytes). Depending on the + OCI runtime in use, this option may be ignored. It is no longer supported + by the default (runc) runtime. + + This field is omitted when empty. + type: "integer" + format: "int64" + MemoryReservation: + description: "Memory soft limit in bytes." + type: "integer" + format: "int64" + MemorySwap: + description: | + Total memory limit (memory + swap). Set as `-1` to enable unlimited + swap. + type: "integer" + format: "int64" + MemorySwappiness: + description: | + Tune a container's memory swappiness behavior. Accepts an integer + between 0 and 100. + type: "integer" + format: "int64" + minimum: 0 + maximum: 100 + NanoCpus: + description: "CPU quota in units of 10-9 CPUs." + type: "integer" + format: "int64" + OomKillDisable: + description: "Disable OOM Killer for the container." + type: "boolean" + Init: + description: | + Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + type: "boolean" + x-nullable: true + PidsLimit: + description: | + Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + to not change. + type: "integer" + format: "int64" + x-nullable: true + Ulimits: + description: | + A list of resource limits to set in the container. For example: + + ``` + {"Name": "nofile", "Soft": 1024, "Hard": 2048} + ``` + type: "array" + items: + type: "object" + properties: + Name: + description: "Name of ulimit" + type: "string" + Soft: + description: "Soft limit" + type: "integer" + Hard: + description: "Hard limit" + type: "integer" + # Applicable to Windows + CpuCount: + description: | + The number of usable CPUs (Windows only). + + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. + type: "integer" + format: "int64" + CpuPercent: + description: | + The usable percentage of the available CPUs (Windows only). + + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. + type: "integer" + format: "int64" + IOMaximumIOps: + description: "Maximum IOps for the container system drive (Windows only)" + type: "integer" + format: "int64" + IOMaximumBandwidth: + description: | + Maximum IO in bytes per second for the container system drive + (Windows only). + type: "integer" + format: "int64" + + Limit: + description: | + An object describing a limit on resources which can be requested by a task. + type: "object" + properties: + NanoCPUs: + type: "integer" + format: "int64" + example: 4000000000 + MemoryBytes: + type: "integer" + format: "int64" + example: 8272408576 + Pids: + description: | + Limits the maximum number of PIDs in the container. Set `0` for unlimited. + type: "integer" + format: "int64" + default: 0 + example: 100 + + ResourceObject: + description: | + An object describing the resources which can be advertised by a node and + requested by a task. + type: "object" + properties: + NanoCPUs: + type: "integer" + format: "int64" + example: 4000000000 + MemoryBytes: + type: "integer" + format: "int64" + example: 8272408576 + GenericResources: + $ref: "#/definitions/GenericResources" + + GenericResources: + description: | + User-defined resources can be either Integer resources (e.g, `SSD=3`) or + String resources (e.g, `GPU=UUID1`). + type: "array" + items: + type: "object" + properties: + NamedResourceSpec: + type: "object" + properties: + Kind: + type: "string" + Value: + type: "string" + DiscreteResourceSpec: + type: "object" + properties: + Kind: + type: "string" + Value: + type: "integer" + format: "int64" + example: + - DiscreteResourceSpec: + Kind: "SSD" + Value: 3 + - NamedResourceSpec: + Kind: "GPU" + Value: "UUID1" + - NamedResourceSpec: + Kind: "GPU" + Value: "UUID2" + + HealthConfig: + description: "A test to perform to check that the container is healthy." + type: "object" + properties: + Test: + description: | + The test to perform. Possible values are: + + - `[]` inherit healthcheck from image or parent image + - `["NONE"]` disable healthcheck + - `["CMD", args...]` exec arguments directly + - `["CMD-SHELL", command]` run command with system's default shell + type: "array" + items: + type: "string" + Interval: + description: | + The time to wait between checks in nanoseconds. It should be 0 or at + least 1000000 (1 ms). 0 means inherit. + type: "integer" + format: "int64" + Timeout: + description: | + The time to wait before considering the check to have hung. It should + be 0 or at least 1000000 (1 ms). 0 means inherit. + type: "integer" + format: "int64" + Retries: + description: | + The number of consecutive failures needed to consider a container as + unhealthy. 0 means inherit. + type: "integer" + StartPeriod: + description: | + Start period for the container to initialize before starting + health-retries countdown in nanoseconds. It should be 0 or at least + 1000000 (1 ms). 0 means inherit. + type: "integer" + format: "int64" + StartInterval: + description: | + The time to wait between checks in nanoseconds during the start period. + It should be 0 or at least 1000000 (1 ms). 0 means inherit. + type: "integer" + format: "int64" + + Health: + description: | + Health stores information about the container's healthcheck results. + type: "object" + x-nullable: true + properties: + Status: + description: | + Status is one of `none`, `starting`, `healthy` or `unhealthy` + + - "none" Indicates there is no healthcheck + - "starting" Starting indicates that the container is not yet ready + - "healthy" Healthy indicates that the container is running correctly + - "unhealthy" Unhealthy indicates that the container has a problem + type: "string" + enum: + - "none" + - "starting" + - "healthy" + - "unhealthy" + example: "healthy" + FailingStreak: + description: "FailingStreak is the number of consecutive failures" + type: "integer" + example: 0 + Log: + type: "array" + description: | + Log contains the last few results (oldest first) + items: + $ref: "#/definitions/HealthcheckResult" + + HealthcheckResult: + description: | + HealthcheckResult stores information about a single run of a healthcheck probe + type: "object" + x-nullable: true + properties: + Start: + description: | + Date and time at which this check started in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "date-time" + example: "2020-01-04T10:44:24.496525531Z" + End: + description: | + Date and time at which this check ended in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2020-01-04T10:45:21.364524523Z" + ExitCode: + description: | + ExitCode meanings: + + - `0` healthy + - `1` unhealthy + - `2` reserved (considered unhealthy) + - other values: error running probe + type: "integer" + example: 0 + Output: + description: "Output from last check" + type: "string" + + HostConfig: + description: "Container configuration that depends on the host we are running on" + allOf: + - $ref: "#/definitions/Resources" + - type: "object" + properties: + # Applicable to all platforms + Binds: + type: "array" + description: | + A list of volume bindings for this container. Each volume binding + is a string in one of these forms: + + - `host-src:container-dest[:options]` to bind-mount a host path + into the container. Both `host-src`, and `container-dest` must + be an _absolute_ path. + - `volume-name:container-dest[:options]` to bind-mount a volume + managed by a volume driver into the container. `container-dest` + must be an _absolute_ path. + + `options` is an optional, comma-delimited list of: + + - `nocopy` disables automatic copying of data from the container + path to the volume. The `nocopy` flag only applies to named volumes. + - `[ro|rw]` mounts a volume read-only or read-write, respectively. + If omitted or set to `rw`, volumes are mounted read-write. + - `[z|Z]` applies SELinux labels to allow or deny multiple containers + to read and write to the same volume. + - `z`: a _shared_ content label is applied to the content. This + label indicates that multiple containers can share the volume + content, for both reading and writing. + - `Z`: a _private unshared_ label is applied to the content. + This label indicates that only the current container can use + a private volume. Labeling systems such as SELinux require + proper labels to be placed on volume content that is mounted + into a container. Without a label, the security system can + prevent a container's processes from using the content. By + default, the labels set by the host operating system are not + modified. + - `[[r]shared|[r]slave|[r]private]` specifies mount + [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). + This only applies to bind-mounted volumes, not internal volumes + or named volumes. Mount propagation requires the source mount + point (the location where the source directory is mounted in the + host operating system) to have the correct propagation properties. + For shared volumes, the source mount point must be set to `shared`. + For slave volumes, the mount must be set to either `shared` or + `slave`. + items: + type: "string" + ContainerIDFile: + type: "string" + description: "Path to a file where the container ID is written" + LogConfig: + type: "object" + description: "The logging configuration for this container" + properties: + Type: + type: "string" + enum: + - "json-file" + - "syslog" + - "journald" + - "gelf" + - "fluentd" + - "awslogs" + - "splunk" + - "etwlogs" + - "none" + Config: + type: "object" + additionalProperties: + type: "string" + NetworkMode: + type: "string" + description: | + Network mode to use for this container. Supported standard values + are: `bridge`, `host`, `none`, and `container:`. Any + other value is taken as a custom network's name to which this + container should connect to. + PortBindings: + $ref: "#/definitions/PortMap" + RestartPolicy: + $ref: "#/definitions/RestartPolicy" + AutoRemove: + type: "boolean" + description: | + Automatically remove the container when the container's process + exits. This has no effect if `RestartPolicy` is set. + VolumeDriver: + type: "string" + description: "Driver that this container uses to mount volumes." + VolumesFrom: + type: "array" + description: | + A list of volumes to inherit from another container, specified in + the form `[:]`. + items: + type: "string" + Mounts: + description: | + Specification for mounts to be added to the container. + type: "array" + items: + $ref: "#/definitions/Mount" + ConsoleSize: + type: "array" + description: | + Initial console size, as an `[height, width]` array. + x-nullable: true + minItems: 2 + maxItems: 2 + items: + type: "integer" + minimum: 0 + Annotations: + type: "object" + description: | + Arbitrary non-identifying metadata attached to container and + provided to the runtime when the container is started. + additionalProperties: + type: "string" + + # Applicable to UNIX platforms + CapAdd: + type: "array" + description: | + A list of kernel capabilities to add to the container. Conflicts + with option 'Capabilities'. + items: + type: "string" + CapDrop: + type: "array" + description: | + A list of kernel capabilities to drop from the container. Conflicts + with option 'Capabilities'. + items: + type: "string" + CgroupnsMode: + type: "string" + enum: + - "private" + - "host" + description: | + cgroup namespace mode for the container. Possible values are: + + - `"private"`: the container runs in its own private cgroup namespace + - `"host"`: use the host system's cgroup namespace + + If not specified, the daemon default is used, which can either be `"private"` + or `"host"`, depending on daemon version, kernel support and configuration. + Dns: + type: "array" + description: "A list of DNS servers for the container to use." + items: + type: "string" + DnsOptions: + type: "array" + description: "A list of DNS options." + items: + type: "string" + DnsSearch: + type: "array" + description: "A list of DNS search domains." + items: + type: "string" + ExtraHosts: + type: "array" + description: | + A list of hostnames/IP mappings to add to the container's `/etc/hosts` + file. Specified in the form `["hostname:IP"]`. + items: + type: "string" + GroupAdd: + type: "array" + description: | + A list of additional groups that the container process will run as. + items: + type: "string" + IpcMode: + type: "string" + description: | + IPC sharing mode for the container. Possible values are: + + - `"none"`: own private IPC namespace, with /dev/shm not mounted + - `"private"`: own private IPC namespace + - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers + - `"container:"`: join another (shareable) container's IPC namespace + - `"host"`: use the host system's IPC namespace + + If not specified, daemon default is used, which can either be `"private"` + or `"shareable"`, depending on daemon version and configuration. + Cgroup: + type: "string" + description: "Cgroup to use for the container." + Links: + type: "array" + description: | + A list of links for the container in the form `container_name:alias`. + items: + type: "string" + OomScoreAdj: + type: "integer" + description: | + An integer value containing the score given to the container in + order to tune OOM killer preferences. + example: 500 + PidMode: + type: "string" + description: | + Set the PID (Process) Namespace mode for the container. It can be + either: + + - `"container:"`: joins another container's PID namespace + - `"host"`: use the host's PID namespace inside the container + Privileged: + type: "boolean" + description: "Gives the container full access to the host." + PublishAllPorts: + type: "boolean" + description: | + Allocates an ephemeral host port for all of a container's + exposed ports. + + Ports are de-allocated when the container stops and allocated when + the container starts. The allocated port might be changed when + restarting the container. + + The port is selected from the ephemeral port range that depends on + the kernel. For example, on Linux the range is defined by + `/proc/sys/net/ipv4/ip_local_port_range`. + ReadonlyRootfs: + type: "boolean" + description: "Mount the container's root filesystem as read only." + SecurityOpt: + type: "array" + description: | + A list of string values to customize labels for MLS systems, such + as SELinux. + items: + type: "string" + StorageOpt: + type: "object" + description: | + Storage driver options for this container, in the form `{"size": "120G"}`. + additionalProperties: + type: "string" + Tmpfs: + type: "object" + description: | + A map of container directories which should be replaced by tmpfs + mounts, and their corresponding mount options. For example: + + ``` + { "/run": "rw,noexec,nosuid,size=65536k" } + ``` + additionalProperties: + type: "string" + UTSMode: + type: "string" + description: "UTS namespace to use for the container." + UsernsMode: + type: "string" + description: | + Sets the usernamespace mode for the container when usernamespace + remapping option is enabled. + ShmSize: + type: "integer" + format: "int64" + description: | + Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. + minimum: 0 + Sysctls: + type: "object" + description: | + A list of kernel parameters (sysctls) to set in the container. + For example: + + ``` + {"net.ipv4.ip_forward": "1"} + ``` + additionalProperties: + type: "string" + Runtime: + type: "string" + description: "Runtime to use with this container." + # Applicable to Windows + Isolation: + type: "string" + description: | + Isolation technology of the container. (Windows only) + enum: + - "default" + - "process" + - "hyperv" + MaskedPaths: + type: "array" + description: | + The list of paths to be masked inside the container (this overrides + the default set of paths). + items: + type: "string" + ReadonlyPaths: + type: "array" + description: | + The list of paths to be set as read-only inside the container + (this overrides the default set of paths). + items: + type: "string" + + ContainerConfig: + description: | + Configuration for a container that is portable between hosts. + type: "object" + properties: + Hostname: + description: | + The hostname to use for the container, as a valid RFC 1123 hostname. + type: "string" + example: "439f4e91bd1d" + Domainname: + description: | + The domain name to use for the container. + type: "string" + User: + description: "The user that commands are run as inside the container." + type: "string" + AttachStdin: + description: "Whether to attach to `stdin`." + type: "boolean" + default: false + AttachStdout: + description: "Whether to attach to `stdout`." + type: "boolean" + default: true + AttachStderr: + description: "Whether to attach to `stderr`." + type: "boolean" + default: true + ExposedPorts: + description: | + An object mapping ports to an empty object in the form: + + `{"/": {}}` + type: "object" + x-nullable: true + additionalProperties: + type: "object" + enum: + - {} + default: {} + example: { + "80/tcp": {}, + "443/tcp": {} + } + Tty: + description: | + Attach standard streams to a TTY, including `stdin` if it is not closed. + type: "boolean" + default: false + OpenStdin: + description: "Open `stdin`" + type: "boolean" + default: false + StdinOnce: + description: "Close `stdin` after one attached client disconnects" + type: "boolean" + default: false + Env: + description: | + A list of environment variables to set inside the container in the + form `["VAR=value", ...]`. A variable without `=` is removed from the + environment, rather than to have an empty value. + type: "array" + items: + type: "string" + example: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + Cmd: + description: | + Command to run specified as a string or an array of strings. + type: "array" + items: + type: "string" + example: ["/bin/sh"] + Healthcheck: + $ref: "#/definitions/HealthConfig" + ArgsEscaped: + description: "Command is already escaped (Windows only)" + type: "boolean" + default: false + example: false + x-nullable: true + Image: + description: | + The name (or reference) of the image to use when creating the container, + or which was used when the container was created. + type: "string" + example: "example-image:1.0" + Volumes: + description: | + An object mapping mount point paths inside the container to empty + objects. + type: "object" + additionalProperties: + type: "object" + enum: + - {} + default: {} + WorkingDir: + description: "The working directory for commands to run in." + type: "string" + example: "/public/" + Entrypoint: + description: | + The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the + entry point is reset to system default (i.e., the entry point used by + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + type: "array" + items: + type: "string" + example: [] + NetworkDisabled: + description: "Disable networking for the container." + type: "boolean" + x-nullable: true + MacAddress: + description: | + MAC address of the container. + + Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. + type: "string" + x-nullable: true + OnBuild: + description: | + `ONBUILD` metadata that were defined in the image's `Dockerfile`. + type: "array" + x-nullable: true + items: + type: "string" + example: [] + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + StopSignal: + description: | + Signal to stop a container as a string or unsigned integer. + type: "string" + example: "SIGTERM" + x-nullable: true + StopTimeout: + description: "Timeout to stop a container in seconds." + type: "integer" + default: 10 + x-nullable: true + Shell: + description: | + Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + type: "array" + x-nullable: true + items: + type: "string" + example: ["/bin/sh", "-c"] + + ImageConfig: + description: | + Configuration of the image. These fields are used as defaults + when starting a container from the image. + type: "object" + properties: + Hostname: + description: | + The hostname to use for the container, as a valid RFC 1123 hostname. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always empty. It must not be used, and will be removed in API v1.48. + type: "string" + example: "" + Domainname: + description: | + The domain name to use for the container. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always empty. It must not be used, and will be removed in API v1.48. + type: "string" + example: "" + User: + description: "The user that commands are run as inside the container." + type: "string" + example: "web:web" + AttachStdin: + description: | + Whether to attach to `stdin`. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + type: "boolean" + default: false + example: false + AttachStdout: + description: | + Whether to attach to `stdout`. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + type: "boolean" + default: false + example: false + AttachStderr: + description: | + Whether to attach to `stderr`. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + type: "boolean" + default: false + example: false + ExposedPorts: + description: | + An object mapping ports to an empty object in the form: + + `{"/": {}}` + type: "object" + x-nullable: true + additionalProperties: + type: "object" + enum: + - {} + default: {} + example: { + "80/tcp": {}, + "443/tcp": {} + } + Tty: + description: | + Attach standard streams to a TTY, including `stdin` if it is not closed. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + type: "boolean" + default: false + example: false + OpenStdin: + description: | + Open `stdin` + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + type: "boolean" + default: false + example: false + StdinOnce: + description: | + Close `stdin` after one attached client disconnects. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always false. It must not be used, and will be removed in API v1.48. + type: "boolean" + default: false + example: false + Env: + description: | + A list of environment variables to set inside the container in the + form `["VAR=value", ...]`. A variable without `=` is removed from the + environment, rather than to have an empty value. + type: "array" + items: + type: "string" + example: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + Cmd: + description: | + Command to run specified as a string or an array of strings. + type: "array" + items: + type: "string" + example: ["/bin/sh"] + Healthcheck: + $ref: "#/definitions/HealthConfig" + ArgsEscaped: + description: "Command is already escaped (Windows only)" + type: "boolean" + default: false + example: false + x-nullable: true + Image: + description: | + The name (or reference) of the image to use when creating the container, + or which was used when the container was created. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always empty. It must not be used, and will be removed in API v1.48. + type: "string" + default: "" + example: "" + Volumes: + description: | + An object mapping mount point paths inside the container to empty + objects. + type: "object" + additionalProperties: + type: "object" + enum: + - {} + default: {} + example: + "/app/data": {} + "/app/config": {} + WorkingDir: + description: "The working directory for commands to run in." + type: "string" + example: "/public/" + Entrypoint: + description: | + The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the + entry point is reset to system default (i.e., the entry point used by + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + type: "array" + items: + type: "string" + example: [] + NetworkDisabled: + description: | + Disable networking for the container. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always omitted. It must not be used, and will be removed in API v1.48. + type: "boolean" + default: false + example: false + x-nullable: true + MacAddress: + description: | + MAC address of the container. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always omitted. It must not be used, and will be removed in API v1.48. + type: "string" + default: "" + example: "" + x-nullable: true + OnBuild: + description: | + `ONBUILD` metadata that were defined in the image's `Dockerfile`. + type: "array" + x-nullable: true + items: + type: "string" + example: [] + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + StopSignal: + description: | + Signal to stop a container as a string or unsigned integer. + type: "string" + example: "SIGTERM" + x-nullable: true + StopTimeout: + description: | + Timeout to stop a container in seconds. + +


+ + > **Deprecated**: this field is not part of the image specification and is + > always omitted. It must not be used, and will be removed in API v1.48. + type: "integer" + default: 10 + x-nullable: true + Shell: + description: | + Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + type: "array" + x-nullable: true + items: + type: "string" + example: ["/bin/sh", "-c"] + # FIXME(thaJeztah): temporarily using a full example to remove some "omitempty" fields. Remove once the fields are removed. + example: + "Hostname": "" + "Domainname": "" + "User": "web:web" + "AttachStdin": false + "AttachStdout": false + "AttachStderr": false + "ExposedPorts": { + "80/tcp": {}, + "443/tcp": {} + } + "Tty": false + "OpenStdin": false + "StdinOnce": false + "Env": ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"] + "Cmd": ["/bin/sh"] + "Healthcheck": { + "Test": ["string"], + "Interval": 0, + "Timeout": 0, + "Retries": 0, + "StartPeriod": 0, + "StartInterval": 0 + } + "ArgsEscaped": true + "Image": "" + "Volumes": { + "/app/data": {}, + "/app/config": {} + } + "WorkingDir": "/public/" + "Entrypoint": [] + "OnBuild": [] + "Labels": { + "com.example.some-label": "some-value", + "com.example.some-other-label": "some-other-value" + } + "StopSignal": "SIGTERM" + "Shell": ["/bin/sh", "-c"] + + NetworkingConfig: + description: | + NetworkingConfig represents the container's networking configuration for + each of its interfaces. + It is used for the networking configs specified in the `docker create` + and `docker network connect` commands. + type: "object" + properties: + EndpointsConfig: + description: | + A mapping of network name to endpoint configuration for that network. + The endpoint configuration can be left empty to connect to that + network with no particular endpoint configuration. + type: "object" + additionalProperties: + $ref: "#/definitions/EndpointSettings" + example: + # putting an example here, instead of using the example values from + # /definitions/EndpointSettings, because EndpointSettings contains + # operational data returned when inspecting a container that we don't + # accept here. + EndpointsConfig: + isolated_nw: + IPAMConfig: + IPv4Address: "172.20.30.33" + IPv6Address: "2001:db8:abcd::3033" + LinkLocalIPs: + - "169.254.34.68" + - "fe80::3468" + MacAddress: "02:42:ac:12:05:02" + Links: + - "container_1" + - "container_2" + Aliases: + - "server_x" + - "server_y" + database_nw: {} + + NetworkSettings: + description: "NetworkSettings exposes the network settings in the API" + type: "object" + properties: + Bridge: + description: | + Name of the default bridge interface when dockerd's --bridge flag is set. + type: "string" + example: "docker0" + SandboxID: + description: SandboxID uniquely represents a container's network stack. + type: "string" + example: "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3" + HairpinMode: + description: | + Indicates if hairpin NAT should be enabled on the virtual interface. + + Deprecated: This field is never set and will be removed in a future release. + type: "boolean" + example: false + LinkLocalIPv6Address: + description: | + IPv6 unicast address using the link-local prefix. + + Deprecated: This field is never set and will be removed in a future release. + type: "string" + example: "" + LinkLocalIPv6PrefixLen: + description: | + Prefix length of the IPv6 unicast address. + + Deprecated: This field is never set and will be removed in a future release. + type: "integer" + example: "" + Ports: + $ref: "#/definitions/PortMap" + SandboxKey: + description: SandboxKey is the full path of the netns handle + type: "string" + example: "/var/run/docker/netns/8ab54b426c38" + + SecondaryIPAddresses: + description: "Deprecated: This field is never set and will be removed in a future release." + type: "array" + items: + $ref: "#/definitions/Address" + x-nullable: true + + SecondaryIPv6Addresses: + description: "Deprecated: This field is never set and will be removed in a future release." + type: "array" + items: + $ref: "#/definitions/Address" + x-nullable: true + + # TODO properties below are part of DefaultNetworkSettings, which is + # marked as deprecated since Docker 1.9 and to be removed in Docker v17.12 + EndpointID: + description: | + EndpointID uniquely represents a service endpoint in a Sandbox. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b" + Gateway: + description: | + Gateway address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "172.17.0.1" + GlobalIPv6Address: + description: | + Global IPv6 address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "2001:db8::5689" + GlobalIPv6PrefixLen: + description: | + Mask length of the global IPv6 address. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "integer" + example: 64 + IPAddress: + description: | + IPv4 address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "172.17.0.4" + IPPrefixLen: + description: | + Mask length of the IPv4 address. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "integer" + example: 16 + IPv6Gateway: + description: | + IPv6 gateway address for this network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "2001:db8:2::100" + MacAddress: + description: | + MAC address for the container on the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "02:42:ac:11:00:04" + Networks: + description: | + Information about all networks that the container is connected to. + type: "object" + additionalProperties: + $ref: "#/definitions/EndpointSettings" + + Address: + description: Address represents an IPv4 or IPv6 IP address. + type: "object" + properties: + Addr: + description: IP address. + type: "string" + PrefixLen: + description: Mask length of the IP address. + type: "integer" + + PortMap: + description: | + PortMap describes the mapping of container ports to host ports, using the + container's port-number and protocol as key in the format `/`, + for example, `80/udp`. + + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. + type: "object" + additionalProperties: + type: "array" + x-nullable: true + items: + $ref: "#/definitions/PortBinding" + example: + "443/tcp": + - HostIp: "127.0.0.1" + HostPort: "4443" + "80/tcp": + - HostIp: "0.0.0.0" + HostPort: "80" + - HostIp: "0.0.0.0" + HostPort: "8080" + "80/udp": + - HostIp: "0.0.0.0" + HostPort: "80" + "53/udp": + - HostIp: "0.0.0.0" + HostPort: "53" + "2377/tcp": null + + PortBinding: + description: | + PortBinding represents a binding between a host IP address and a host + port. + type: "object" + properties: + HostIp: + description: "Host IP address that the container's port is mapped to." + type: "string" + example: "127.0.0.1" + HostPort: + description: "Host port number that the container's port is mapped to." + type: "string" + example: "4443" + + DriverData: + description: | + Information about the storage driver used to store the container's and + image's filesystem. + type: "object" + required: [Name, Data] + properties: + Name: + description: "Name of the storage driver." + type: "string" + x-nullable: false + example: "overlay2" + Data: + description: | + Low-level storage metadata, provided as key/value pairs. + + This information is driver-specific, and depends on the storage-driver + in use, and should be used for informational purposes only. + type: "object" + x-nullable: false + additionalProperties: + type: "string" + example: { + "MergedDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/merged", + "UpperDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/diff", + "WorkDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/work" + } + + FilesystemChange: + description: | + Change in the container's filesystem. + type: "object" + required: [Path, Kind] + properties: + Path: + description: | + Path to file or directory that has changed. + type: "string" + x-nullable: false + Kind: + $ref: "#/definitions/ChangeType" + + ChangeType: + description: | + Kind of change + + Can be one of: + + - `0`: Modified ("C") + - `1`: Added ("A") + - `2`: Deleted ("D") + type: "integer" + format: "uint8" + enum: [0, 1, 2] + x-nullable: false + + ImageInspect: + description: | + Information about an image in the local image cache. + type: "object" + properties: + Id: + description: | + ID is the content-addressable ID of an image. + + This identifier is a content-addressable digest calculated from the + image's configuration (which includes the digests of layers used by + the image). + + Note that this digest differs from the `RepoDigests` below, which + holds digests of image manifests that reference the image. + type: "string" + x-nullable: false + example: "sha256:ec3f0931a6e6b6855d76b2d7b0be30e81860baccd891b2e243280bf1cd8ad710" + RepoTags: + description: | + List of image names/tags in the local image cache that reference this + image. + + Multiple image tags can refer to the same image, and this list may be + empty if no tags reference the image, in which case the image is + "untagged", in which case it can still be referenced by its ID. + type: "array" + items: + type: "string" + example: + - "example:1.0" + - "example:latest" + - "example:stable" + - "internal.registry.example.com:5000/example:1.0" + RepoDigests: + description: | + List of content-addressable digests of locally available image manifests + that the image is referenced from. Multiple manifests can refer to the + same image. + + These digests are usually only available if the image was either pulled + from a registry, or if the image was pushed to a registry, which is when + the manifest is generated and its digest calculated. + type: "array" + items: + type: "string" + example: + - "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb" + - "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578" + Parent: + description: | + ID of the parent image. + + Depending on how the image was created, this field may be empty and + is only set for images that were built/created locally. This field + is empty if the image was pulled from an image registry. + type: "string" + x-nullable: false + example: "" + Comment: + description: | + Optional message that was set when committing or importing the image. + type: "string" + x-nullable: false + example: "" + Created: + description: | + Date and time at which the image was created, formatted in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + This information is only available if present in the image, + and omitted otherwise. + type: "string" + format: "dateTime" + x-nullable: true + example: "2022-02-04T21:20:12.497794809Z" + DockerVersion: + description: | + The version of Docker that was used to build the image. + + Depending on how the image was created, this field may be empty. + type: "string" + x-nullable: false + example: "27.0.1" + Author: + description: | + Name of the author that was specified when committing the image, or as + specified through MAINTAINER (deprecated) in the Dockerfile. + type: "string" + x-nullable: false + example: "" + Config: + $ref: "#/definitions/ImageConfig" + Architecture: + description: | + Hardware CPU architecture that the image runs on. + type: "string" + x-nullable: false + example: "arm" + Variant: + description: | + CPU architecture variant (presently ARM-only). + type: "string" + x-nullable: true + example: "v7" + Os: + description: | + Operating System the image is built to run on. + type: "string" + x-nullable: false + example: "linux" + OsVersion: + description: | + Operating System version the image is built to run on (especially + for Windows). + type: "string" + example: "" + x-nullable: true + Size: + description: | + Total size of the image including all layers it is composed of. + type: "integer" + format: "int64" + x-nullable: false + example: 1239828 + VirtualSize: + description: | + Total size of the image including all layers it is composed of. + + Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. + type: "integer" + format: "int64" + example: 1239828 + GraphDriver: + $ref: "#/definitions/DriverData" + RootFS: + description: | + Information about the image's RootFS, including the layer IDs. + type: "object" + required: [Type] + properties: + Type: + type: "string" + x-nullable: false + example: "layers" + Layers: + type: "array" + items: + type: "string" + example: + - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6" + - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" + Metadata: + description: | + Additional metadata of the image in the local cache. This information + is local to the daemon, and not part of the image itself. + type: "object" + properties: + LastTagTime: + description: | + Date and time at which the image was last tagged in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + This information is only available if the image was tagged locally, + and omitted otherwise. + type: "string" + format: "dateTime" + example: "2022-02-28T14:40:02.623929178Z" + x-nullable: true + + ImageSummary: + type: "object" + x-go-name: "Summary" + required: + - Id + - ParentId + - RepoTags + - RepoDigests + - Created + - Size + - SharedSize + - Labels + - Containers + properties: + Id: + description: | + ID is the content-addressable ID of an image. + + This identifier is a content-addressable digest calculated from the + image's configuration (which includes the digests of layers used by + the image). + + Note that this digest differs from the `RepoDigests` below, which + holds digests of image manifests that reference the image. + type: "string" + x-nullable: false + example: "sha256:ec3f0931a6e6b6855d76b2d7b0be30e81860baccd891b2e243280bf1cd8ad710" + ParentId: + description: | + ID of the parent image. + + Depending on how the image was created, this field may be empty and + is only set for images that were built/created locally. This field + is empty if the image was pulled from an image registry. + type: "string" + x-nullable: false + example: "" + RepoTags: + description: | + List of image names/tags in the local image cache that reference this + image. + + Multiple image tags can refer to the same image, and this list may be + empty if no tags reference the image, in which case the image is + "untagged", in which case it can still be referenced by its ID. + type: "array" + x-nullable: false + items: + type: "string" + example: + - "example:1.0" + - "example:latest" + - "example:stable" + - "internal.registry.example.com:5000/example:1.0" + RepoDigests: + description: | + List of content-addressable digests of locally available image manifests + that the image is referenced from. Multiple manifests can refer to the + same image. + + These digests are usually only available if the image was either pulled + from a registry, or if the image was pushed to a registry, which is when + the manifest is generated and its digest calculated. + type: "array" + x-nullable: false + items: + type: "string" + example: + - "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb" + - "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578" + Created: + description: | + Date and time at which the image was created as a Unix timestamp + (number of seconds since EPOCH). + type: "integer" + x-nullable: false + example: "1644009612" + Size: + description: | + Total size of the image including all layers it is composed of. + type: "integer" + format: "int64" + x-nullable: false + example: 172064416 + SharedSize: + description: | + Total size of image layers that are shared between this image and other + images. + + This size is not calculated by default. `-1` indicates that the value + has not been set / calculated. + type: "integer" + format: "int64" + x-nullable: false + example: 1239828 + VirtualSize: + description: |- + Total size of the image including all layers it is composed of. + + Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. + type: "integer" + format: "int64" + example: 172064416 + Labels: + description: "User-defined key/value metadata." + type: "object" + x-nullable: false + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Containers: + description: | + Number of containers using this image. Includes both stopped and running + containers. + + This size is not calculated by default, and depends on which API endpoint + is used. `-1` indicates that the value has not been set / calculated. + x-nullable: false + type: "integer" + example: 2 + Manifests: + description: | + Manifests is a list of manifests available in this image. + It provides a more detailed view of the platform-specific image manifests + or other image-attached data like build attestations. + + WARNING: This is experimental and may change at any time without any backward + compatibility. + type: "array" + x-nullable: false + x-omitempty: true + items: + $ref: "#/definitions/ImageManifestSummary" + + AuthConfig: + type: "object" + properties: + username: + type: "string" + password: + type: "string" + email: + type: "string" + serveraddress: + type: "string" + example: + username: "hannibal" + password: "xxxx" + serveraddress: "https://index.docker.io/v1/" + + ProcessConfig: + type: "object" + properties: + privileged: + type: "boolean" + user: + type: "string" + tty: + type: "boolean" + entrypoint: + type: "string" + arguments: + type: "array" + items: + type: "string" + + Volume: + type: "object" + required: [Name, Driver, Mountpoint, Labels, Scope, Options] + properties: + Name: + type: "string" + description: "Name of the volume." + x-nullable: false + example: "tardis" + Driver: + type: "string" + description: "Name of the volume driver used by the volume." + x-nullable: false + example: "custom" + Mountpoint: + type: "string" + description: "Mount path of the volume on the host." + x-nullable: false + example: "/var/lib/docker/volumes/tardis" + CreatedAt: + type: "string" + format: "dateTime" + description: "Date/Time the volume was created." + example: "2016-06-07T20:31:11.853781916Z" + Status: + type: "object" + description: | + Low-level details about the volume, provided by the volume driver. + Details are returned as a map with key/value pairs: + `{"key":"value","key2":"value2"}`. + + The `Status` field is optional, and is omitted if the volume driver + does not support this feature. + additionalProperties: + type: "object" + example: + hello: "world" + Labels: + type: "object" + description: "User-defined key/value metadata." + x-nullable: false + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Scope: + type: "string" + description: | + The level at which the volume exists. Either `global` for cluster-wide, + or `local` for machine level. + default: "local" + x-nullable: false + enum: ["local", "global"] + example: "local" + ClusterVolume: + $ref: "#/definitions/ClusterVolume" + Options: + type: "object" + description: | + The driver specific options used when creating the volume. + additionalProperties: + type: "string" + example: + device: "tmpfs" + o: "size=100m,uid=1000" + type: "tmpfs" + UsageData: + type: "object" + x-nullable: true + x-go-name: "UsageData" + required: [Size, RefCount] + description: | + Usage details about the volume. This information is used by the + `GET /system/df` endpoint, and omitted in other endpoints. + properties: + Size: + type: "integer" + format: "int64" + default: -1 + description: | + Amount of disk space used by the volume (in bytes). This information + is only available for volumes created with the `"local"` volume + driver. For volumes created with other volume drivers, this field + is set to `-1` ("not available") + x-nullable: false + RefCount: + type: "integer" + format: "int64" + default: -1 + description: | + The number of containers referencing this volume. This field + is set to `-1` if the reference-count is not available. + x-nullable: false + + VolumeCreateOptions: + description: "Volume configuration" + type: "object" + title: "VolumeConfig" + x-go-name: "CreateOptions" + properties: + Name: + description: | + The new volume's name. If not specified, Docker generates a name. + type: "string" + x-nullable: false + example: "tardis" + Driver: + description: "Name of the volume driver to use." + type: "string" + default: "local" + x-nullable: false + example: "custom" + DriverOpts: + description: | + A mapping of driver options and values. These options are + passed directly to the driver and are driver specific. + type: "object" + additionalProperties: + type: "string" + example: + device: "tmpfs" + o: "size=100m,uid=1000" + type: "tmpfs" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + ClusterVolumeSpec: + $ref: "#/definitions/ClusterVolumeSpec" + + VolumeListResponse: + type: "object" + title: "VolumeListResponse" + x-go-name: "ListResponse" + description: "Volume list response" + properties: + Volumes: + type: "array" + description: "List of volumes" + items: + $ref: "#/definitions/Volume" + Warnings: + type: "array" + description: | + Warnings that occurred when fetching the list of volumes. + items: + type: "string" + example: [] + + Network: + type: "object" + properties: + Name: + description: | + Name of the network. + type: "string" + example: "my_network" + Id: + description: | + ID that uniquely identifies a network on a single machine. + type: "string" + example: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99" + Created: + description: | + Date and time at which the network was created in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2016-10-19T04:33:30.360899459Z" + Scope: + description: | + The level at which the network exists (e.g. `swarm` for cluster-wide + or `local` for machine level) + type: "string" + example: "local" + Driver: + description: | + The name of the driver used to create the network (e.g. `bridge`, + `overlay`). + type: "string" + example: "overlay" + EnableIPv4: + description: | + Whether the network was created with IPv4 enabled. + type: "boolean" + example: true + EnableIPv6: + description: | + Whether the network was created with IPv6 enabled. + type: "boolean" + example: false + IPAM: + $ref: "#/definitions/IPAM" + Internal: + description: | + Whether the network is created to only allow internal networking + connectivity. + type: "boolean" + default: false + example: false + Attachable: + description: | + Whether a global / swarm scope network is manually attachable by regular + containers from workers in swarm mode. + type: "boolean" + default: false + example: false + Ingress: + description: | + Whether the network is providing the routing-mesh for the swarm cluster. + type: "boolean" + default: false + example: false + ConfigFrom: + $ref: "#/definitions/ConfigReference" + ConfigOnly: + description: | + Whether the network is a config-only network. Config-only networks are + placeholder networks for network configurations to be used by other + networks. Config-only networks cannot be used directly to run containers + or services. + type: "boolean" + default: false + Containers: + description: | + Contains endpoints attached to the network. + type: "object" + additionalProperties: + $ref: "#/definitions/NetworkContainer" + example: + 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c: + Name: "test" + EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a" + MacAddress: "02:42:ac:13:00:02" + IPv4Address: "172.19.0.2/16" + IPv6Address: "" + Options: + description: | + Network-specific options uses when creating the network. + type: "object" + additionalProperties: + type: "string" + example: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Peers: + description: | + List of peer nodes for an overlay network. This field is only present + for overlay networks, and omitted for other network types. + type: "array" + items: + $ref: "#/definitions/PeerInfo" + x-nullable: true + # TODO: Add Services (only present when "verbose" is set). + + ConfigReference: + description: | + The config-only network source to provide the configuration for + this network. + type: "object" + properties: + Network: + description: | + The name of the config-only network that provides the network's + configuration. The specified network must be an existing config-only + network. Only network names are allowed, not network IDs. + type: "string" + example: "config_only_network_01" + + IPAM: + type: "object" + properties: + Driver: + description: "Name of the IPAM driver to use." + type: "string" + default: "default" + example: "default" + Config: + description: | + List of IPAM configuration options, specified as a map: + + ``` + {"Subnet": , "IPRange": , "Gateway": , "AuxAddress": } + ``` + type: "array" + items: + $ref: "#/definitions/IPAMConfig" + Options: + description: "Driver-specific options, specified as a map." + type: "object" + additionalProperties: + type: "string" + example: + foo: "bar" + + IPAMConfig: + type: "object" + properties: + Subnet: + type: "string" + example: "172.20.0.0/16" + IPRange: + type: "string" + example: "172.20.10.0/24" + Gateway: + type: "string" + example: "172.20.10.11" + AuxiliaryAddresses: + type: "object" + additionalProperties: + type: "string" + + NetworkContainer: + type: "object" + properties: + Name: + type: "string" + example: "container_1" + EndpointID: + type: "string" + example: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a" + MacAddress: + type: "string" + example: "02:42:ac:13:00:02" + IPv4Address: + type: "string" + example: "172.19.0.2/16" + IPv6Address: + type: "string" + example: "" + + PeerInfo: + description: | + PeerInfo represents one peer of an overlay network. + type: "object" + properties: + Name: + description: + ID of the peer-node in the Swarm cluster. + type: "string" + example: "6869d7c1732b" + IP: + description: + IP-address of the peer-node in the Swarm cluster. + type: "string" + example: "10.133.77.91" + + NetworkCreateResponse: + description: "OK response to NetworkCreate operation" + type: "object" + title: "NetworkCreateResponse" + x-go-name: "CreateResponse" + required: [Id, Warning] + properties: + Id: + description: "The ID of the created network." + type: "string" + x-nullable: false + example: "b5c4fc71e8022147cd25de22b22173de4e3b170134117172eb595cb91b4e7e5d" + Warning: + description: "Warnings encountered when creating the container" + type: "string" + x-nullable: false + example: "" + + BuildInfo: + type: "object" + properties: + id: + type: "string" + stream: + type: "string" + error: + type: "string" + errorDetail: + $ref: "#/definitions/ErrorDetail" + status: + type: "string" + progress: + type: "string" + progressDetail: + $ref: "#/definitions/ProgressDetail" + aux: + $ref: "#/definitions/ImageID" + + BuildCache: + type: "object" + description: | + BuildCache contains information about a build cache record. + properties: + ID: + type: "string" + description: | + Unique ID of the build cache record. + example: "ndlpt0hhvkqcdfkputsk4cq9c" + Parent: + description: | + ID of the parent build cache record. + + > **Deprecated**: This field is deprecated, and omitted if empty. + type: "string" + x-nullable: true + example: "" + Parents: + description: | + List of parent build cache record IDs. + type: "array" + items: + type: "string" + x-nullable: true + example: ["hw53o5aio51xtltp5xjp8v7fx"] + Type: + type: "string" + description: | + Cache record type. + example: "regular" + # see https://github.com/moby/buildkit/blob/fce4a32258dc9d9664f71a4831d5de10f0670677/client/diskusage.go#L75-L84 + enum: + - "internal" + - "frontend" + - "source.local" + - "source.git.checkout" + - "exec.cachemount" + - "regular" + Description: + type: "string" + description: | + Description of the build-step that produced the build cache. + example: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache" + InUse: + type: "boolean" + description: | + Indicates if the build cache is in use. + example: false + Shared: + type: "boolean" + description: | + Indicates if the build cache is shared. + example: true + Size: + description: | + Amount of disk space used by the build cache (in bytes). + type: "integer" + example: 51 + CreatedAt: + description: | + Date and time at which the build cache was created in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2016-08-18T10:44:24.496525531Z" + LastUsedAt: + description: | + Date and time at which the build cache was last used in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + x-nullable: true + example: "2017-08-09T07:09:37.632105588Z" + UsageCount: + type: "integer" + example: 26 + + ImageID: + type: "object" + description: "Image ID or Digest" + properties: + ID: + type: "string" + example: + ID: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" + + CreateImageInfo: + type: "object" + properties: + id: + type: "string" + error: + type: "string" + errorDetail: + $ref: "#/definitions/ErrorDetail" + status: + type: "string" + progress: + type: "string" + progressDetail: + $ref: "#/definitions/ProgressDetail" + + PushImageInfo: + type: "object" + properties: + error: + type: "string" + status: + type: "string" + progress: + type: "string" + progressDetail: + $ref: "#/definitions/ProgressDetail" + + ErrorDetail: + type: "object" + properties: + code: + type: "integer" + message: + type: "string" + + ProgressDetail: + type: "object" + properties: + current: + type: "integer" + total: + type: "integer" + + ErrorResponse: + description: "Represents an error." + type: "object" + required: ["message"] + properties: + message: + description: "The error message." + type: "string" + x-nullable: false + example: + message: "Something went wrong." + + IdResponse: + description: "Response to an API call that returns just an Id" + type: "object" + required: ["Id"] + properties: + Id: + description: "The id of the newly created object." + type: "string" + x-nullable: false + + EndpointSettings: + description: "Configuration for a network endpoint." + type: "object" + properties: + # Configurations + IPAMConfig: + $ref: "#/definitions/EndpointIPAMConfig" + Links: + type: "array" + items: + type: "string" + example: + - "container_1" + - "container_2" + MacAddress: + description: | + MAC address for the endpoint on this network. The network driver might ignore this parameter. + type: "string" + example: "02:42:ac:11:00:04" + Aliases: + type: "array" + items: + type: "string" + example: + - "server_x" + - "server_y" + DriverOpts: + description: | + DriverOpts is a mapping of driver options and values. These options + are passed directly to the driver and are driver specific. + type: "object" + x-nullable: true + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + + # Operational data + NetworkID: + description: | + Unique ID of the network. + type: "string" + example: "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a" + EndpointID: + description: | + Unique ID for the service endpoint in a Sandbox. + type: "string" + example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b" + Gateway: + description: | + Gateway address for this network. + type: "string" + example: "172.17.0.1" + IPAddress: + description: | + IPv4 address. + type: "string" + example: "172.17.0.4" + IPPrefixLen: + description: | + Mask length of the IPv4 address. + type: "integer" + example: 16 + IPv6Gateway: + description: | + IPv6 gateway address. + type: "string" + example: "2001:db8:2::100" + GlobalIPv6Address: + description: | + Global IPv6 address. + type: "string" + example: "2001:db8::5689" + GlobalIPv6PrefixLen: + description: | + Mask length of the global IPv6 address. + type: "integer" + format: "int64" + example: 64 + DNSNames: + description: | + List of all DNS names an endpoint has on a specific network. This + list is based on the container name, network aliases, container short + ID, and hostname. + + These DNS names are non-fully qualified but can contain several dots. + You can get fully qualified DNS names by appending `.`. + For instance, if container name is `my.ctr` and the network is named + `testnet`, `DNSNames` will contain `my.ctr` and the FQDN will be + `my.ctr.testnet`. + type: array + items: + type: string + example: ["foobar", "server_x", "server_y", "my.ctr"] + + EndpointIPAMConfig: + description: | + EndpointIPAMConfig represents an endpoint's IPAM configuration. + type: "object" + x-nullable: true + properties: + IPv4Address: + type: "string" + example: "172.20.30.33" + IPv6Address: + type: "string" + example: "2001:db8:abcd::3033" + LinkLocalIPs: + type: "array" + items: + type: "string" + example: + - "169.254.34.68" + - "fe80::3468" + + PluginMount: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Source, Destination, Type, Options] + properties: + Name: + type: "string" + x-nullable: false + example: "some-mount" + Description: + type: "string" + x-nullable: false + example: "This is a mount that's used by the plugin." + Settable: + type: "array" + items: + type: "string" + Source: + type: "string" + example: "/var/lib/docker/plugins/" + Destination: + type: "string" + x-nullable: false + example: "/mnt/state" + Type: + type: "string" + x-nullable: false + example: "bind" + Options: + type: "array" + items: + type: "string" + example: + - "rbind" + - "rw" + + PluginDevice: + type: "object" + required: [Name, Description, Settable, Path] + x-nullable: false + properties: + Name: + type: "string" + x-nullable: false + Description: + type: "string" + x-nullable: false + Settable: + type: "array" + items: + type: "string" + Path: + type: "string" + example: "/dev/fuse" + + PluginEnv: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Value] + properties: + Name: + x-nullable: false + type: "string" + Description: + x-nullable: false + type: "string" + Settable: + type: "array" + items: + type: "string" + Value: + type: "string" + + PluginInterfaceType: + type: "object" + x-nullable: false + required: [Prefix, Capability, Version] + properties: + Prefix: + type: "string" + x-nullable: false + Capability: + type: "string" + x-nullable: false + Version: + type: "string" + x-nullable: false + + PluginPrivilege: + description: | + Describes a permission the user has to accept upon installing + the plugin. + type: "object" + x-go-name: "PluginPrivilege" + properties: + Name: + type: "string" + example: "network" + Description: + type: "string" + Value: + type: "array" + items: + type: "string" + example: + - "host" + + Plugin: + description: "A plugin for the Engine API" + type: "object" + required: [Settings, Enabled, Config, Name] + properties: + Id: + type: "string" + example: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" + Name: + type: "string" + x-nullable: false + example: "tiborvass/sample-volume-plugin" + Enabled: + description: + True if the plugin is running. False if the plugin is not running, + only installed. + type: "boolean" + x-nullable: false + example: true + Settings: + description: "Settings that can be modified by users." + type: "object" + x-nullable: false + required: [Args, Devices, Env, Mounts] + properties: + Mounts: + type: "array" + items: + $ref: "#/definitions/PluginMount" + Env: + type: "array" + items: + type: "string" + example: + - "DEBUG=0" + Args: + type: "array" + items: + type: "string" + Devices: + type: "array" + items: + $ref: "#/definitions/PluginDevice" + PluginReference: + description: "plugin remote reference used to push/pull the plugin" + type: "string" + x-nullable: false + example: "localhost:5000/tiborvass/sample-volume-plugin:latest" + Config: + description: "The config of a plugin." + type: "object" + x-nullable: false + required: + - Description + - Documentation + - Interface + - Entrypoint + - WorkDir + - Network + - Linux + - PidHost + - PropagatedMount + - IpcHost + - Mounts + - Env + - Args + properties: + DockerVersion: + description: "Docker Version used to create the plugin" + type: "string" + x-nullable: false + example: "17.06.0-ce" + Description: + type: "string" + x-nullable: false + example: "A sample volume plugin for Docker" + Documentation: + type: "string" + x-nullable: false + example: "https://docs.docker.com/engine/extend/plugins/" + Interface: + description: "The interface between Docker and the plugin" + x-nullable: false + type: "object" + required: [Types, Socket] + properties: + Types: + type: "array" + items: + $ref: "#/definitions/PluginInterfaceType" + example: + - "docker.volumedriver/1.0" + Socket: + type: "string" + x-nullable: false + example: "plugins.sock" + ProtocolScheme: + type: "string" + example: "some.protocol/v1.0" + description: "Protocol to use for clients connecting to the plugin." + enum: + - "" + - "moby.plugins.http/v1" + Entrypoint: + type: "array" + items: + type: "string" + example: + - "/usr/bin/sample-volume-plugin" + - "/data" + WorkDir: + type: "string" + x-nullable: false + example: "/bin/" + User: + type: "object" + x-nullable: false + properties: + UID: + type: "integer" + format: "uint32" + example: 1000 + GID: + type: "integer" + format: "uint32" + example: 1000 + Network: + type: "object" + x-nullable: false + required: [Type] + properties: + Type: + x-nullable: false + type: "string" + example: "host" + Linux: + type: "object" + x-nullable: false + required: [Capabilities, AllowAllDevices, Devices] + properties: + Capabilities: + type: "array" + items: + type: "string" + example: + - "CAP_SYS_ADMIN" + - "CAP_SYSLOG" + AllowAllDevices: + type: "boolean" + x-nullable: false + example: false + Devices: + type: "array" + items: + $ref: "#/definitions/PluginDevice" + PropagatedMount: + type: "string" + x-nullable: false + example: "/mnt/volumes" + IpcHost: + type: "boolean" + x-nullable: false + example: false + PidHost: + type: "boolean" + x-nullable: false + example: false + Mounts: + type: "array" + items: + $ref: "#/definitions/PluginMount" + Env: + type: "array" + items: + $ref: "#/definitions/PluginEnv" + example: + - Name: "DEBUG" + Description: "If set, prints debug messages" + Settable: null + Value: "0" + Args: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Value] + properties: + Name: + x-nullable: false + type: "string" + example: "args" + Description: + x-nullable: false + type: "string" + example: "command line arguments" + Settable: + type: "array" + items: + type: "string" + Value: + type: "array" + items: + type: "string" + rootfs: + type: "object" + properties: + type: + type: "string" + example: "layers" + diff_ids: + type: "array" + items: + type: "string" + example: + - "sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887" + - "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8" + + ObjectVersion: + description: | + The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + type: "object" + properties: + Index: + type: "integer" + format: "uint64" + example: 373531 + + NodeSpec: + type: "object" + properties: + Name: + description: "Name for the node." + type: "string" + example: "my-node" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Role: + description: "Role of the node." + type: "string" + enum: + - "worker" + - "manager" + example: "manager" + Availability: + description: "Availability of the node." + type: "string" + enum: + - "active" + - "pause" + - "drain" + example: "active" + example: + Availability: "active" + Name: "node-name" + Role: "manager" + Labels: + foo: "bar" + + Node: + type: "object" + properties: + ID: + type: "string" + example: "24ifsmvkjbyhk" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + description: | + Date and time at which the node was added to the swarm in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2016-08-18T10:44:24.496525531Z" + UpdatedAt: + description: | + Date and time at which the node was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2017-08-09T07:09:37.632105588Z" + Spec: + $ref: "#/definitions/NodeSpec" + Description: + $ref: "#/definitions/NodeDescription" + Status: + $ref: "#/definitions/NodeStatus" + ManagerStatus: + $ref: "#/definitions/ManagerStatus" + + NodeDescription: + description: | + NodeDescription encapsulates the properties of the Node as reported by the + agent. + type: "object" + properties: + Hostname: + type: "string" + example: "bf3067039e47" + Platform: + $ref: "#/definitions/Platform" + Resources: + $ref: "#/definitions/ResourceObject" + Engine: + $ref: "#/definitions/EngineDescription" + TLSInfo: + $ref: "#/definitions/TLSInfo" + + Platform: + description: | + Platform represents the platform (Arch/OS). + type: "object" + properties: + Architecture: + description: | + Architecture represents the hardware architecture (for example, + `x86_64`). + type: "string" + example: "x86_64" + OS: + description: | + OS represents the Operating System (for example, `linux` or `windows`). + type: "string" + example: "linux" + + EngineDescription: + description: "EngineDescription provides information about an engine." + type: "object" + properties: + EngineVersion: + type: "string" + example: "17.06.0" + Labels: + type: "object" + additionalProperties: + type: "string" + example: + foo: "bar" + Plugins: + type: "array" + items: + type: "object" + properties: + Type: + type: "string" + Name: + type: "string" + example: + - Type: "Log" + Name: "awslogs" + - Type: "Log" + Name: "fluentd" + - Type: "Log" + Name: "gcplogs" + - Type: "Log" + Name: "gelf" + - Type: "Log" + Name: "journald" + - Type: "Log" + Name: "json-file" + - Type: "Log" + Name: "splunk" + - Type: "Log" + Name: "syslog" + - Type: "Network" + Name: "bridge" + - Type: "Network" + Name: "host" + - Type: "Network" + Name: "ipvlan" + - Type: "Network" + Name: "macvlan" + - Type: "Network" + Name: "null" + - Type: "Network" + Name: "overlay" + - Type: "Volume" + Name: "local" + - Type: "Volume" + Name: "localhost:5000/vieux/sshfs:latest" + - Type: "Volume" + Name: "vieux/sshfs:latest" + + TLSInfo: + description: | + Information about the issuer of leaf TLS certificates and the trusted root + CA certificate. + type: "object" + properties: + TrustRoot: + description: | + The root CA certificate(s) that are used to validate leaf TLS + certificates. + type: "string" + CertIssuerSubject: + description: + The base64-url-safe-encoded raw subject bytes of the issuer. + type: "string" + CertIssuerPublicKey: + description: | + The base64-url-safe-encoded raw public key bytes of the issuer. + type: "string" + example: + TrustRoot: | + -----BEGIN CERTIFICATE----- + MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw + EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 + MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH + A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf + 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB + Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO + PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz + pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H + -----END CERTIFICATE----- + CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" + CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" + + NodeStatus: + description: | + NodeStatus represents the status of a node. + + It provides the current status of the node, as seen by the manager. + type: "object" + properties: + State: + $ref: "#/definitions/NodeState" + Message: + type: "string" + example: "" + Addr: + description: "IP address of the node." + type: "string" + example: "172.17.0.2" + + NodeState: + description: "NodeState represents the state of a node." + type: "string" + enum: + - "unknown" + - "down" + - "ready" + - "disconnected" + example: "ready" + + ManagerStatus: + description: | + ManagerStatus represents the status of a manager. + + It provides the current status of a node's manager component, if the node + is a manager. + x-nullable: true + type: "object" + properties: + Leader: + type: "boolean" + default: false + example: true + Reachability: + $ref: "#/definitions/Reachability" + Addr: + description: | + The IP address and port at which the manager is reachable. + type: "string" + example: "10.0.0.46:2377" + + Reachability: + description: "Reachability represents the reachability of a node." + type: "string" + enum: + - "unknown" + - "unreachable" + - "reachable" + example: "reachable" + + SwarmSpec: + description: "User modifiable swarm configuration." + type: "object" + properties: + Name: + description: "Name of the swarm." + type: "string" + example: "default" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.corp.type: "production" + com.example.corp.department: "engineering" + Orchestration: + description: "Orchestration configuration." + type: "object" + x-nullable: true + properties: + TaskHistoryRetentionLimit: + description: | + The number of historic tasks to keep per instance or node. If + negative, never remove completed or failed tasks. + type: "integer" + format: "int64" + example: 10 + Raft: + description: "Raft configuration." + type: "object" + properties: + SnapshotInterval: + description: "The number of log entries between snapshots." + type: "integer" + format: "uint64" + example: 10000 + KeepOldSnapshots: + description: | + The number of snapshots to keep beyond the current snapshot. + type: "integer" + format: "uint64" + LogEntriesForSlowFollowers: + description: | + The number of log entries to keep around to sync up slow followers + after a snapshot is created. + type: "integer" + format: "uint64" + example: 500 + ElectionTick: + description: | + The number of ticks that a follower will wait for a message from + the leader before becoming a candidate and starting an election. + `ElectionTick` must be greater than `HeartbeatTick`. + + A tick currently defaults to one second, so these translate + directly to seconds currently, but this is NOT guaranteed. + type: "integer" + example: 3 + HeartbeatTick: + description: | + The number of ticks between heartbeats. Every HeartbeatTick ticks, + the leader will send a heartbeat to the followers. + + A tick currently defaults to one second, so these translate + directly to seconds currently, but this is NOT guaranteed. + type: "integer" + example: 1 + Dispatcher: + description: "Dispatcher configuration." + type: "object" + x-nullable: true + properties: + HeartbeatPeriod: + description: | + The delay for an agent to send a heartbeat to the dispatcher. + type: "integer" + format: "int64" + example: 5000000000 + CAConfig: + description: "CA configuration." + type: "object" + x-nullable: true + properties: + NodeCertExpiry: + description: "The duration node certificates are issued for." + type: "integer" + format: "int64" + example: 7776000000000000 + ExternalCAs: + description: | + Configuration for forwarding signing requests to an external + certificate authority. + type: "array" + items: + type: "object" + properties: + Protocol: + description: | + Protocol for communication with the external CA (currently + only `cfssl` is supported). + type: "string" + enum: + - "cfssl" + default: "cfssl" + URL: + description: | + URL where certificate signing requests should be sent. + type: "string" + Options: + description: | + An object with key/value pairs that are interpreted as + protocol-specific options for the external CA driver. + type: "object" + additionalProperties: + type: "string" + CACert: + description: | + The root CA certificate (in PEM format) this external CA uses + to issue TLS certificates (assumed to be to the current swarm + root CA certificate if not provided). + type: "string" + SigningCACert: + description: | + The desired signing CA certificate for all swarm node TLS leaf + certificates, in PEM format. + type: "string" + SigningCAKey: + description: | + The desired signing CA key for all swarm node TLS leaf certificates, + in PEM format. + type: "string" + ForceRotate: + description: | + An integer whose purpose is to force swarm to generate a new + signing CA certificate and key, if none have been specified in + `SigningCACert` and `SigningCAKey` + format: "uint64" + type: "integer" + EncryptionConfig: + description: "Parameters related to encryption-at-rest." + type: "object" + properties: + AutoLockManagers: + description: | + If set, generate a key and use it to lock data stored on the + managers. + type: "boolean" + example: false + TaskDefaults: + description: "Defaults for creating tasks in this cluster." + type: "object" + properties: + LogDriver: + description: | + The log driver to use for tasks created in the orchestrator if + unspecified by a service. + + Updating this value only affects new tasks. Existing tasks continue + to use their previously configured log driver until recreated. + type: "object" + properties: + Name: + description: | + The log driver to use as a default for new tasks. + type: "string" + example: "json-file" + Options: + description: | + Driver-specific options for the selected log driver, specified + as key/value pairs. + type: "object" + additionalProperties: + type: "string" + example: + "max-file": "10" + "max-size": "100m" + + # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but + # without `JoinTokens`. + ClusterInfo: + description: | + ClusterInfo represents information about the swarm as is returned by the + "/info" endpoint. Join-tokens are not included. + x-nullable: true + type: "object" + properties: + ID: + description: "The ID of the swarm." + type: "string" + example: "abajmipo7b4xz5ip2nrla6b11" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + description: | + Date and time at which the swarm was initialised in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2016-08-18T10:44:24.496525531Z" + UpdatedAt: + description: | + Date and time at which the swarm was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2017-08-09T07:09:37.632105588Z" + Spec: + $ref: "#/definitions/SwarmSpec" + TLSInfo: + $ref: "#/definitions/TLSInfo" + RootRotationInProgress: + description: | + Whether there is currently a root CA rotation in progress for the swarm + type: "boolean" + example: false + DataPathPort: + description: | + DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + If no port is set or is set to 0, the default port (4789) is used. + type: "integer" + format: "uint32" + default: 4789 + example: 4789 + DefaultAddrPool: + description: | + Default Address Pool specifies default subnet pools for global scope + networks. + type: "array" + items: + type: "string" + format: "CIDR" + example: ["10.10.0.0/16", "20.20.0.0/16"] + SubnetSize: + description: | + SubnetSize specifies the subnet size of the networks created from the + default subnet pool. + type: "integer" + format: "uint32" + maximum: 29 + default: 24 + example: 24 + + JoinTokens: + description: | + JoinTokens contains the tokens workers and managers need to join the swarm. + type: "object" + properties: + Worker: + description: | + The token workers can use to join the swarm. + type: "string" + example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx" + Manager: + description: | + The token managers can use to join the swarm. + type: "string" + example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" + + Swarm: + type: "object" + allOf: + - $ref: "#/definitions/ClusterInfo" + - type: "object" + properties: + JoinTokens: + $ref: "#/definitions/JoinTokens" + + TaskSpec: + description: "User modifiable task configuration." + type: "object" + properties: + PluginSpec: + type: "object" + description: | + Plugin spec for the service. *(Experimental release only.)* + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + properties: + Name: + description: "The name or 'alias' to use for the plugin." + type: "string" + Remote: + description: "The plugin image reference to use." + type: "string" + Disabled: + description: "Disable the plugin once scheduled." + type: "boolean" + PluginPrivilege: + type: "array" + items: + $ref: "#/definitions/PluginPrivilege" + ContainerSpec: + type: "object" + description: | + Container spec for the service. + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + properties: + Image: + description: "The image name to use for the container" + type: "string" + Labels: + description: "User-defined key/value data." + type: "object" + additionalProperties: + type: "string" + Command: + description: "The command to be run in the image." + type: "array" + items: + type: "string" + Args: + description: "Arguments to the command." + type: "array" + items: + type: "string" + Hostname: + description: | + The hostname to use for the container, as a valid + [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. + type: "string" + Env: + description: | + A list of environment variables in the form `VAR=value`. + type: "array" + items: + type: "string" + Dir: + description: "The working directory for commands to run in." + type: "string" + User: + description: "The user inside the container." + type: "string" + Groups: + type: "array" + description: | + A list of additional groups that the container process will run as. + items: + type: "string" + Privileges: + type: "object" + description: "Security options for the container" + properties: + CredentialSpec: + type: "object" + description: "CredentialSpec for managed service account (Windows only)" + properties: + Config: + type: "string" + example: "0bt9dmxjvjiqermk6xrop3ekq" + description: | + Load credential spec from a Swarm Config with the given ID. + The specified config must also be present in the Configs + field with the Runtime property set. + +


+ + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + File: + type: "string" + example: "spec.json" + description: | + Load credential spec from this file. The file is read by + the daemon, and must be present in the `CredentialSpecs` + subdirectory in the docker data directory, which defaults + to `C:\ProgramData\Docker\` on Windows. + + For example, specifying `spec.json` loads + `C:\ProgramData\Docker\CredentialSpecs\spec.json`. + +


+ + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + Registry: + type: "string" + description: | + Load credential spec from this value in the Windows + registry. The specified registry value must be located in: + + `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` + +


+ + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + SELinuxContext: + type: "object" + description: "SELinux labels of the container" + properties: + Disable: + type: "boolean" + description: "Disable SELinux" + User: + type: "string" + description: "SELinux user label" + Role: + type: "string" + description: "SELinux role label" + Type: + type: "string" + description: "SELinux type label" + Level: + type: "string" + description: "SELinux level label" + Seccomp: + type: "object" + description: "Options for configuring seccomp on the container" + properties: + Mode: + type: "string" + enum: + - "default" + - "unconfined" + - "custom" + Profile: + description: "The custom seccomp profile as a json object" + type: "string" + AppArmor: + type: "object" + description: "Options for configuring AppArmor on the container" + properties: + Mode: + type: "string" + enum: + - "default" + - "disabled" + NoNewPrivileges: + type: "boolean" + description: "Configuration of the no_new_privs bit in the container" + + TTY: + description: "Whether a pseudo-TTY should be allocated." + type: "boolean" + OpenStdin: + description: "Open `stdin`" + type: "boolean" + ReadOnly: + description: "Mount the container's root filesystem as read only." + type: "boolean" + Mounts: + description: | + Specification for mounts to be added to containers created as part + of the service. + type: "array" + items: + $ref: "#/definitions/Mount" + StopSignal: + description: "Signal to stop the container." + type: "string" + StopGracePeriod: + description: | + Amount of time to wait for the container to terminate before + forcefully killing it. + type: "integer" + format: "int64" + HealthCheck: + $ref: "#/definitions/HealthConfig" + Hosts: + type: "array" + description: | + A list of hostname/IP mappings to add to the container's `hosts` + file. The format of extra hosts is specified in the + [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) + man page: + + IP_address canonical_hostname [aliases...] + items: + type: "string" + DNSConfig: + description: | + Specification for DNS related configurations in resolver configuration + file (`resolv.conf`). + type: "object" + properties: + Nameservers: + description: "The IP addresses of the name servers." + type: "array" + items: + type: "string" + Search: + description: "A search list for host-name lookup." + type: "array" + items: + type: "string" + Options: + description: | + A list of internal resolver variables to be modified (e.g., + `debug`, `ndots:3`, etc.). + type: "array" + items: + type: "string" + Secrets: + description: | + Secrets contains references to zero or more secrets that will be + exposed to the service. + type: "array" + items: + type: "object" + properties: + File: + description: | + File represents a specific target that is backed by a file. + type: "object" + properties: + Name: + description: | + Name represents the final filename in the filesystem. + type: "string" + UID: + description: "UID represents the file UID." + type: "string" + GID: + description: "GID represents the file GID." + type: "string" + Mode: + description: "Mode represents the FileMode of the file." + type: "integer" + format: "uint32" + SecretID: + description: | + SecretID represents the ID of the specific secret that we're + referencing. + type: "string" + SecretName: + description: | + SecretName is the name of the secret that this references, + but this is just provided for lookup/display purposes. The + secret in the reference will be identified by its ID. + type: "string" + OomScoreAdj: + type: "integer" + format: "int64" + description: | + An integer value containing the score given to the container in + order to tune OOM killer preferences. + example: 0 + Configs: + description: | + Configs contains references to zero or more configs that will be + exposed to the service. + type: "array" + items: + type: "object" + properties: + File: + description: | + File represents a specific target that is backed by a file. + +


+ + > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive + type: "object" + properties: + Name: + description: | + Name represents the final filename in the filesystem. + type: "string" + UID: + description: "UID represents the file UID." + type: "string" + GID: + description: "GID represents the file GID." + type: "string" + Mode: + description: "Mode represents the FileMode of the file." + type: "integer" + format: "uint32" + Runtime: + description: | + Runtime represents a target that is not mounted into the + container but is used by the task + +


+ + > **Note**: `Configs.File` and `Configs.Runtime` are mutually + > exclusive + type: "object" + ConfigID: + description: | + ConfigID represents the ID of the specific config that we're + referencing. + type: "string" + ConfigName: + description: | + ConfigName is the name of the config that this references, + but this is just provided for lookup/display purposes. The + config in the reference will be identified by its ID. + type: "string" + Isolation: + type: "string" + description: | + Isolation technology of the containers running the service. + (Windows only) + enum: + - "default" + - "process" + - "hyperv" + Init: + description: | + Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + type: "boolean" + x-nullable: true + Sysctls: + description: | + Set kernel namedspaced parameters (sysctls) in the container. + The Sysctls option on services accepts the same sysctls as the + are supported on containers. Note that while the same sysctls are + supported, no guarantees or checks are made about their + suitability for a clustered environment, and it's up to the user + to determine whether a given sysctl will work properly in a + Service. + type: "object" + additionalProperties: + type: "string" + # This option is not used by Windows containers + CapabilityAdd: + type: "array" + description: | + A list of kernel capabilities to add to the default set + for the container. + items: + type: "string" + example: + - "CAP_NET_RAW" + - "CAP_SYS_ADMIN" + - "CAP_SYS_CHROOT" + - "CAP_SYSLOG" + CapabilityDrop: + type: "array" + description: | + A list of kernel capabilities to drop from the default set + for the container. + items: + type: "string" + example: + - "CAP_NET_RAW" + Ulimits: + description: | + A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + type: "array" + items: + type: "object" + properties: + Name: + description: "Name of ulimit" + type: "string" + Soft: + description: "Soft limit" + type: "integer" + Hard: + description: "Hard limit" + type: "integer" + NetworkAttachmentSpec: + description: | + Read-only spec type for non-swarm containers attached to swarm overlay + networks. + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + type: "object" + properties: + ContainerID: + description: "ID of the container represented by this task" + type: "string" + Resources: + description: | + Resource requirements which apply to each individual container created + as part of the service. + type: "object" + properties: + Limits: + description: "Define resources limits." + $ref: "#/definitions/Limit" + Reservations: + description: "Define resources reservation." + $ref: "#/definitions/ResourceObject" + RestartPolicy: + description: | + Specification for the restart policy which applies to containers + created as part of this service. + type: "object" + properties: + Condition: + description: "Condition for restart." + type: "string" + enum: + - "none" + - "on-failure" + - "any" + Delay: + description: "Delay between restart attempts." + type: "integer" + format: "int64" + MaxAttempts: + description: | + Maximum attempts to restart a given container before giving up + (default value is 0, which is ignored). + type: "integer" + format: "int64" + default: 0 + Window: + description: | + Windows is the time window used to evaluate the restart policy + (default value is 0, which is unbounded). + type: "integer" + format: "int64" + default: 0 + Placement: + type: "object" + properties: + Constraints: + description: | + An array of constraint expressions to limit the set of nodes where + a task can be scheduled. Constraint expressions can either use a + _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find + nodes that satisfy every expression (AND match). Constraints can + match node or Docker Engine labels as follows: + + node attribute | matches | example + ---------------------|--------------------------------|----------------------------------------------- + `node.id` | Node ID | `node.id==2ivku8v2gvtg4` + `node.hostname` | Node hostname | `node.hostname!=node-2` + `node.role` | Node role (`manager`/`worker`) | `node.role==manager` + `node.platform.os` | Node operating system | `node.platform.os==windows` + `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` + `node.labels` | User-defined node labels | `node.labels.security==high` + `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-24.04` + + `engine.labels` apply to Docker Engine labels like operating system, + drivers, etc. Swarm administrators add `node.labels` for operational + purposes by using the [`node update endpoint`](#operation/NodeUpdate). + + type: "array" + items: + type: "string" + example: + - "node.hostname!=node3.corp.example.com" + - "node.role!=manager" + - "node.labels.type==production" + - "node.platform.os==linux" + - "node.platform.arch==x86_64" + Preferences: + description: | + Preferences provide a way to make the scheduler aware of factors + such as topology. They are provided in order from highest to + lowest precedence. + type: "array" + items: + type: "object" + properties: + Spread: + type: "object" + properties: + SpreadDescriptor: + description: | + label descriptor, such as `engine.labels.az`. + type: "string" + example: + - Spread: + SpreadDescriptor: "node.labels.datacenter" + - Spread: + SpreadDescriptor: "node.labels.rack" + MaxReplicas: + description: | + Maximum number of replicas for per node (default value is 0, which + is unlimited) + type: "integer" + format: "int64" + default: 0 + Platforms: + description: | + Platforms stores all the platforms that the service's image can + run on. This field is used in the platform filter for scheduling. + If empty, then the platform filter is off, meaning there are no + scheduling restrictions. + type: "array" + items: + $ref: "#/definitions/Platform" + ForceUpdate: + description: | + A counter that triggers an update even if no relevant parameters have + been changed. + type: "integer" + Runtime: + description: | + Runtime is the type of runtime specified for the task executor. + type: "string" + Networks: + description: "Specifies which networks the service should attach to." + type: "array" + items: + $ref: "#/definitions/NetworkAttachmentConfig" + LogDriver: + description: | + Specifies the log driver to use for tasks created from this spec. If + not present, the default one for the swarm will be used, finally + falling back to the engine default if not specified. + type: "object" + properties: + Name: + type: "string" + Options: + type: "object" + additionalProperties: + type: "string" + + TaskState: + type: "string" + enum: + - "new" + - "allocated" + - "pending" + - "assigned" + - "accepted" + - "preparing" + - "ready" + - "starting" + - "running" + - "complete" + - "shutdown" + - "failed" + - "rejected" + - "remove" + - "orphaned" + + ContainerStatus: + type: "object" + description: "represents the status of a container." + properties: + ContainerID: + type: "string" + PID: + type: "integer" + ExitCode: + type: "integer" + + PortStatus: + type: "object" + description: "represents the port status of a task's host ports whose service has published host ports" + properties: + Ports: + type: "array" + items: + $ref: "#/definitions/EndpointPortConfig" + + TaskStatus: + type: "object" + description: "represents the status of a task." + properties: + Timestamp: + type: "string" + format: "dateTime" + State: + $ref: "#/definitions/TaskState" + Message: + type: "string" + Err: + type: "string" + ContainerStatus: + $ref: "#/definitions/ContainerStatus" + PortStatus: + $ref: "#/definitions/PortStatus" + + Task: + type: "object" + properties: + ID: + description: "The ID of the task." + type: "string" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Name: + description: "Name of the task." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Spec: + $ref: "#/definitions/TaskSpec" + ServiceID: + description: "The ID of the service this task is part of." + type: "string" + Slot: + type: "integer" + NodeID: + description: "The ID of the node that this task is on." + type: "string" + AssignedGenericResources: + $ref: "#/definitions/GenericResources" + Status: + $ref: "#/definitions/TaskStatus" + DesiredState: + $ref: "#/definitions/TaskState" + JobIteration: + description: | + If the Service this Task belongs to is a job-mode service, contains + the JobIteration of the Service this Task was created for. Absent if + the Task was created for a Replicated or Global Service. + $ref: "#/definitions/ObjectVersion" + example: + ID: "0kzzo1i0y4jz6027t0k7aezc7" + Version: + Index: 71 + CreatedAt: "2016-06-07T21:07:31.171892745Z" + UpdatedAt: "2016-06-07T21:07:31.376370513Z" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:31.290032978Z" + State: "running" + Message: "started" + ContainerStatus: + ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" + PID: 677 + DesiredState: "running" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.10/16" + AssignedGenericResources: + - DiscreteResourceSpec: + Kind: "SSD" + Value: 3 + - NamedResourceSpec: + Kind: "GPU" + Value: "UUID1" + - NamedResourceSpec: + Kind: "GPU" + Value: "UUID2" + + ServiceSpec: + description: "User modifiable configuration for a service." + type: object + properties: + Name: + description: "Name of the service." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + TaskTemplate: + $ref: "#/definitions/TaskSpec" + Mode: + description: "Scheduling mode for the service." + type: "object" + properties: + Replicated: + type: "object" + properties: + Replicas: + type: "integer" + format: "int64" + Global: + type: "object" + ReplicatedJob: + description: | + The mode used for services with a finite number of tasks that run + to a completed state. + type: "object" + properties: + MaxConcurrent: + description: | + The maximum number of replicas to run simultaneously. + type: "integer" + format: "int64" + default: 1 + TotalCompletions: + description: | + The total number of replicas desired to reach the Completed + state. If unset, will default to the value of `MaxConcurrent` + type: "integer" + format: "int64" + GlobalJob: + description: | + The mode used for services which run a task to the completed state + on each valid node. + type: "object" + UpdateConfig: + description: "Specification for the update strategy of the service." + type: "object" + properties: + Parallelism: + description: | + Maximum number of tasks to be updated in one iteration (0 means + unlimited parallelism). + type: "integer" + format: "int64" + Delay: + description: "Amount of time between updates, in nanoseconds." + type: "integer" + format: "int64" + FailureAction: + description: | + Action to take if an updated task fails to run, or stops running + during the update. + type: "string" + enum: + - "continue" + - "pause" + - "rollback" + Monitor: + description: | + Amount of time to monitor each updated task for failures, in + nanoseconds. + type: "integer" + format: "int64" + MaxFailureRatio: + description: | + The fraction of tasks that may fail during an update before the + failure action is invoked, specified as a floating point number + between 0 and 1. + type: "number" + default: 0 + Order: + description: | + The order of operations when rolling out an updated task. Either + the old task is shut down before the new task is started, or the + new task is started before the old task is shut down. + type: "string" + enum: + - "stop-first" + - "start-first" + RollbackConfig: + description: "Specification for the rollback strategy of the service." + type: "object" + properties: + Parallelism: + description: | + Maximum number of tasks to be rolled back in one iteration (0 means + unlimited parallelism). + type: "integer" + format: "int64" + Delay: + description: | + Amount of time between rollback iterations, in nanoseconds. + type: "integer" + format: "int64" + FailureAction: + description: | + Action to take if an rolled back task fails to run, or stops + running during the rollback. + type: "string" + enum: + - "continue" + - "pause" + Monitor: + description: | + Amount of time to monitor each rolled back task for failures, in + nanoseconds. + type: "integer" + format: "int64" + MaxFailureRatio: + description: | + The fraction of tasks that may fail during a rollback before the + failure action is invoked, specified as a floating point number + between 0 and 1. + type: "number" + default: 0 + Order: + description: | + The order of operations when rolling back a task. Either the old + task is shut down before the new task is started, or the new task + is started before the old task is shut down. + type: "string" + enum: + - "stop-first" + - "start-first" + Networks: + description: | + Specifies which networks the service should attach to. + + Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + type: "array" + items: + $ref: "#/definitions/NetworkAttachmentConfig" + + EndpointSpec: + $ref: "#/definitions/EndpointSpec" + + EndpointPortConfig: + type: "object" + properties: + Name: + type: "string" + Protocol: + type: "string" + enum: + - "tcp" + - "udp" + - "sctp" + TargetPort: + description: "The port inside the container." + type: "integer" + PublishedPort: + description: "The port on the swarm hosts." + type: "integer" + PublishMode: + description: | + The mode in which port is published. + +


+ + - "ingress" makes the target port accessible on every node, + regardless of whether there is a task for the service running on + that node or not. + - "host" bypasses the routing mesh and publish the port directly on + the swarm node where that service is running. + + type: "string" + enum: + - "ingress" + - "host" + default: "ingress" + example: "ingress" + + EndpointSpec: + description: "Properties that can be configured to access and load balance a service." + type: "object" + properties: + Mode: + description: | + The mode of resolution to use for internal load balancing between tasks. + type: "string" + enum: + - "vip" + - "dnsrr" + default: "vip" + Ports: + description: | + List of exposed ports that this service is accessible on from the + outside. Ports can only be provided if `vip` resolution mode is used. + type: "array" + items: + $ref: "#/definitions/EndpointPortConfig" + + Service: + type: "object" + properties: + ID: + type: "string" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/ServiceSpec" + Endpoint: + type: "object" + properties: + Spec: + $ref: "#/definitions/EndpointSpec" + Ports: + type: "array" + items: + $ref: "#/definitions/EndpointPortConfig" + VirtualIPs: + type: "array" + items: + type: "object" + properties: + NetworkID: + type: "string" + Addr: + type: "string" + UpdateStatus: + description: "The status of a service update." + type: "object" + properties: + State: + type: "string" + enum: + - "updating" + - "paused" + - "completed" + StartedAt: + type: "string" + format: "dateTime" + CompletedAt: + type: "string" + format: "dateTime" + Message: + type: "string" + ServiceStatus: + description: | + The status of the service's tasks. Provided only when requested as + part of a ServiceList operation. + type: "object" + properties: + RunningTasks: + description: | + The number of tasks for the service currently in the Running state. + type: "integer" + format: "uint64" + example: 7 + DesiredTasks: + description: | + The number of tasks for the service desired to be running. + For replicated services, this is the replica count from the + service spec. For global services, this is computed by taking + count of all tasks for the service with a Desired State other + than Shutdown. + type: "integer" + format: "uint64" + example: 10 + CompletedTasks: + description: | + The number of tasks for a job that are in the Completed state. + This field must be cross-referenced with the service type, as the + value of 0 may mean the service is not in a job mode, or it may + mean the job-mode service has no tasks yet Completed. + type: "integer" + format: "uint64" + JobStatus: + description: | + The status of the service when it is in one of ReplicatedJob or + GlobalJob modes. Absent on Replicated and Global mode services. The + JobIteration is an ObjectVersion, but unlike the Service's version, + does not need to be sent with an update request. + type: "object" + properties: + JobIteration: + description: | + JobIteration is a value increased each time a Job is executed, + successfully or otherwise. "Executed", in this case, means the + job as a whole has been started, not that an individual Task has + been launched. A job is "Executed" when its ServiceSpec is + updated. JobIteration can be used to disambiguate Tasks belonging + to different executions of a job. Though JobIteration will + increase with each subsequent execution, it may not necessarily + increase by 1, and so JobIteration should not be used to + $ref: "#/definitions/ObjectVersion" + LastExecution: + description: | + The last time, as observed by the server, that this job was + started. + type: "string" + format: "dateTime" + example: + ID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Version: + Index: 19 + CreatedAt: "2016-06-07T21:05:51.880065305Z" + UpdatedAt: "2016-06-07T21:07:29.962229872Z" + Spec: + Name: "hopeful_cori" + TaskTemplate: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ForceUpdate: 0 + Mode: + Replicated: + Replicas: 1 + UpdateConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + RollbackConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + EndpointSpec: + Mode: "vip" + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + Endpoint: + Spec: + Mode: "vip" + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + VirtualIPs: + - + NetworkID: "4qvuz4ko70xaltuqbt8956gd1" + Addr: "10.255.0.2/16" + - + NetworkID: "4qvuz4ko70xaltuqbt8956gd1" + Addr: "10.255.0.3/16" + + ImageDeleteResponseItem: + type: "object" + x-go-name: "DeleteResponse" + properties: + Untagged: + description: "The image ID of an image that was untagged" + type: "string" + Deleted: + description: "The image ID of an image that was deleted" + type: "string" + + ServiceCreateResponse: + type: "object" + description: | + contains the information returned to a client on the + creation of a new service. + properties: + ID: + description: "The ID of the created service." + type: "string" + x-nullable: false + example: "ak7w3gjqoa3kuz8xcpnyy0pvl" + Warnings: + description: | + Optional warning message. + + FIXME(thaJeztah): this should have "omitempty" in the generated type. + type: "array" + x-nullable: true + items: + type: "string" + example: + - "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" + + ServiceUpdateResponse: + type: "object" + properties: + Warnings: + description: "Optional warning messages" + type: "array" + items: + type: "string" + example: + Warnings: + - "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" + + ContainerSummary: + type: "object" + properties: + Id: + description: "The ID of this container" + type: "string" + x-go-name: "ID" + Names: + description: "The names that this container has been given" + type: "array" + items: + type: "string" + Image: + description: "The name of the image used when creating this container" + type: "string" + ImageID: + description: "The ID of the image that this container was created from" + type: "string" + Command: + description: "Command to run when starting the container" + type: "string" + Created: + description: "When the container was created" + type: "integer" + format: "int64" + Ports: + description: "The ports exposed by this container" + type: "array" + items: + $ref: "#/definitions/Port" + SizeRw: + description: "The size of files that have been created or changed by this container" + type: "integer" + format: "int64" + SizeRootFs: + description: "The total size of all the files in this container" + type: "integer" + format: "int64" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + State: + description: "The state of this container (e.g. `Exited`)" + type: "string" + Status: + description: "Additional human-readable status of this container (e.g. `Exit 0`)" + type: "string" + HostConfig: + type: "object" + properties: + NetworkMode: + type: "string" + Annotations: + description: "Arbitrary key-value metadata attached to container" + type: "object" + x-nullable: true + additionalProperties: + type: "string" + NetworkSettings: + description: "A summary of the container's network settings" + type: "object" + properties: + Networks: + type: "object" + additionalProperties: + $ref: "#/definitions/EndpointSettings" + Mounts: + type: "array" + items: + $ref: "#/definitions/MountPoint" + + Driver: + description: "Driver represents a driver (network, logging, secrets)." + type: "object" + required: [Name] + properties: + Name: + description: "Name of the driver." + type: "string" + x-nullable: false + example: "some-driver" + Options: + description: "Key/value map of driver-specific options." + type: "object" + x-nullable: false + additionalProperties: + type: "string" + example: + OptionA: "value for driver-specific option A" + OptionB: "value for driver-specific option B" + + SecretSpec: + type: "object" + properties: + Name: + description: "User-defined name of the secret." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Data: + description: | + Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + data to store as secret. + + This field is only used to _create_ a secret, and is not returned by + other endpoints. + type: "string" + example: "" + Driver: + description: | + Name of the secrets driver used to fetch the secret's value from an + external secret store. + $ref: "#/definitions/Driver" + Templating: + description: | + Templating driver, if applicable + + Templating controls whether and how to evaluate the config payload as + a template. If no driver is set, no templating is used. + $ref: "#/definitions/Driver" + + Secret: + type: "object" + properties: + ID: + type: "string" + example: "blt1owaxmitz71s9v5zh81zun" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + type: "string" + format: "dateTime" + example: "2017-07-20T13:55:28.678958722Z" + UpdatedAt: + type: "string" + format: "dateTime" + example: "2017-07-20T13:55:28.678958722Z" + Spec: + $ref: "#/definitions/SecretSpec" + + ConfigSpec: + type: "object" + properties: + Name: + description: "User-defined name of the config." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Data: + description: | + Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + config data. + type: "string" + Templating: + description: | + Templating driver, if applicable + + Templating controls whether and how to evaluate the config payload as + a template. If no driver is set, no templating is used. + $ref: "#/definitions/Driver" + + Config: + type: "object" + properties: + ID: + type: "string" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/ConfigSpec" + + ContainerState: + description: | + ContainerState stores container's running state. It's part of ContainerJSONBase + and will be returned by the "inspect" command. + type: "object" + x-nullable: true + properties: + Status: + description: | + String representation of the container state. Can be one of "created", + "running", "paused", "restarting", "removing", "exited", or "dead". + type: "string" + enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"] + example: "running" + Running: + description: | + Whether this container is running. + + Note that a running container can be _paused_. The `Running` and `Paused` + booleans are not mutually exclusive: + + When pausing a container (on Linux), the freezer cgroup is used to suspend + all processes in the container. Freezing the process requires the process to + be running. As a result, paused containers are both `Running` _and_ `Paused`. + + Use the `Status` field instead to determine if a container's state is "running". + type: "boolean" + example: true + Paused: + description: "Whether this container is paused." + type: "boolean" + example: false + Restarting: + description: "Whether this container is restarting." + type: "boolean" + example: false + OOMKilled: + description: | + Whether a process within this container has been killed because it ran + out of memory since the container was last started. + type: "boolean" + example: false + Dead: + type: "boolean" + example: false + Pid: + description: "The process ID of this container" + type: "integer" + example: 1234 + ExitCode: + description: "The last exit code of this container" + type: "integer" + example: 0 + Error: + type: "string" + StartedAt: + description: "The time when this container was last started." + type: "string" + example: "2020-01-06T09:06:59.461876391Z" + FinishedAt: + description: "The time when this container last exited." + type: "string" + example: "2020-01-06T09:07:59.461876391Z" + Health: + $ref: "#/definitions/Health" + + ContainerCreateResponse: + description: "OK response to ContainerCreate operation" + type: "object" + title: "ContainerCreateResponse" + x-go-name: "CreateResponse" + required: [Id, Warnings] + properties: + Id: + description: "The ID of the created container" + type: "string" + x-nullable: false + example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" + Warnings: + description: "Warnings encountered when creating the container" + type: "array" + x-nullable: false + items: + type: "string" + example: [] + + ContainerWaitResponse: + description: "OK response to ContainerWait operation" + type: "object" + x-go-name: "WaitResponse" + title: "ContainerWaitResponse" + required: [StatusCode] + properties: + StatusCode: + description: "Exit code of the container" + type: "integer" + format: "int64" + x-nullable: false + Error: + $ref: "#/definitions/ContainerWaitExitError" + + ContainerWaitExitError: + description: "container waiting error, if any" + type: "object" + x-go-name: "WaitExitError" + properties: + Message: + description: "Details of an error" + type: "string" + + SystemVersion: + type: "object" + description: | + Response of Engine API: GET "/version" + properties: + Platform: + type: "object" + required: [Name] + properties: + Name: + type: "string" + Components: + type: "array" + description: | + Information about system components + items: + type: "object" + x-go-name: ComponentVersion + required: [Name, Version] + properties: + Name: + description: | + Name of the component + type: "string" + example: "Engine" + Version: + description: | + Version of the component + type: "string" + x-nullable: false + example: "27.0.1" + Details: + description: | + Key/value pairs of strings with additional information about the + component. These values are intended for informational purposes + only, and their content is not defined, and not part of the API + specification. + + These messages can be printed by the client as information to the user. + type: "object" + x-nullable: true + Version: + description: "The version of the daemon" + type: "string" + example: "27.0.1" + ApiVersion: + description: | + The default (and highest) API version that is supported by the daemon + type: "string" + example: "1.47" + MinAPIVersion: + description: | + The minimum API version that is supported by the daemon + type: "string" + example: "1.24" + GitCommit: + description: | + The Git commit of the source code that was used to build the daemon + type: "string" + example: "48a66213fe" + GoVersion: + description: | + The version Go used to compile the daemon, and the version of the Go + runtime in use. + type: "string" + example: "go1.21.13" + Os: + description: | + The operating system that the daemon is running on ("linux" or "windows") + type: "string" + example: "linux" + Arch: + description: | + The architecture that the daemon is running on + type: "string" + example: "amd64" + KernelVersion: + description: | + The kernel version (`uname -r`) that the daemon is running on. + + This field is omitted when empty. + type: "string" + example: "6.8.0-31-generic" + Experimental: + description: | + Indicates if the daemon is started with experimental features enabled. + + This field is omitted when empty / false. + type: "boolean" + example: true + BuildTime: + description: | + The date and time that the daemon was compiled. + type: "string" + example: "2020-06-22T15:49:27.000000000+00:00" + + SystemInfo: + type: "object" + properties: + ID: + description: | + Unique identifier of the daemon. + +


+ + > **Note**: The format of the ID itself is not part of the API, and + > should not be considered stable. + type: "string" + example: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS" + Containers: + description: "Total number of containers on the host." + type: "integer" + example: 14 + ContainersRunning: + description: | + Number of containers with status `"running"`. + type: "integer" + example: 3 + ContainersPaused: + description: | + Number of containers with status `"paused"`. + type: "integer" + example: 1 + ContainersStopped: + description: | + Number of containers with status `"stopped"`. + type: "integer" + example: 10 + Images: + description: | + Total number of images on the host. + + Both _tagged_ and _untagged_ (dangling) images are counted. + type: "integer" + example: 508 + Driver: + description: "Name of the storage driver in use." + type: "string" + example: "overlay2" + DriverStatus: + description: | + Information specific to the storage driver, provided as + "label" / "value" pairs. + + This information is provided by the storage driver, and formatted + in a way consistent with the output of `docker info` on the command + line. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + type: "array" + items: + type: "array" + items: + type: "string" + example: + - ["Backing Filesystem", "extfs"] + - ["Supports d_type", "true"] + - ["Native Overlay Diff", "true"] + DockerRootDir: + description: | + Root directory of persistent Docker state. + + Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` + on Windows. + type: "string" + example: "/var/lib/docker" + Plugins: + $ref: "#/definitions/PluginsInfo" + MemoryLimit: + description: "Indicates if the host has memory limit support enabled." + type: "boolean" + example: true + SwapLimit: + description: "Indicates if the host has memory swap limit support enabled." + type: "boolean" + example: true + KernelMemoryTCP: + description: | + Indicates if the host has kernel memory TCP limit support enabled. This + field is omitted if not supported. + + Kernel memory TCP limits are not supported when using cgroups v2, which + does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. + type: "boolean" + example: true + CpuCfsPeriod: + description: | + Indicates if CPU CFS(Completely Fair Scheduler) period is supported by + the host. + type: "boolean" + example: true + CpuCfsQuota: + description: | + Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by + the host. + type: "boolean" + example: true + CPUShares: + description: | + Indicates if CPU Shares limiting is supported by the host. + type: "boolean" + example: true + CPUSet: + description: | + Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. + + See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) + type: "boolean" + example: true + PidsLimit: + description: "Indicates if the host kernel has PID limit support enabled." + type: "boolean" + example: true + OomKillDisable: + description: "Indicates if OOM killer disable is supported on the host." + type: "boolean" + IPv4Forwarding: + description: "Indicates IPv4 forwarding is enabled." + type: "boolean" + example: true + BridgeNfIptables: + description: "Indicates if `bridge-nf-call-iptables` is available on the host." + type: "boolean" + example: true + BridgeNfIp6tables: + description: "Indicates if `bridge-nf-call-ip6tables` is available on the host." + type: "boolean" + example: true + Debug: + description: | + Indicates if the daemon is running in debug-mode / with debug-level + logging enabled. + type: "boolean" + example: true + NFd: + description: | + The total number of file Descriptors in use by the daemon process. + + This information is only returned if debug-mode is enabled. + type: "integer" + example: 64 + NGoroutines: + description: | + The number of goroutines that currently exist. + + This information is only returned if debug-mode is enabled. + type: "integer" + example: 174 + SystemTime: + description: | + Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + format with nano-seconds. + type: "string" + example: "2017-08-08T20:28:29.06202363Z" + LoggingDriver: + description: | + The logging driver to use as a default for new containers. + type: "string" + CgroupDriver: + description: | + The driver to use for managing cgroups. + type: "string" + enum: ["cgroupfs", "systemd", "none"] + default: "cgroupfs" + example: "cgroupfs" + CgroupVersion: + description: | + The version of the cgroup. + type: "string" + enum: ["1", "2"] + default: "1" + example: "1" + NEventsListener: + description: "Number of event listeners subscribed." + type: "integer" + example: 30 + KernelVersion: + description: | + Kernel version of the host. + + On Linux, this information obtained from `uname`. On Windows this + information is queried from the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ + registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. + type: "string" + example: "6.8.0-31-generic" + OperatingSystem: + description: | + Name of the host's operating system, for example: "Ubuntu 24.04 LTS" + or "Windows Server 2016 Datacenter" + type: "string" + example: "Ubuntu 24.04 LTS" + OSVersion: + description: | + Version of the host's operating system + +


+ + > **Note**: The information returned in this field, including its + > very existence, and the formatting of values, should not be considered + > stable, and may change without notice. + type: "string" + example: "24.04" + OSType: + description: | + Generic type of the operating system of the host, as returned by the + Go runtime (`GOOS`). + + Currently returned values are "linux" and "windows". A full list of + possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + type: "string" + example: "linux" + Architecture: + description: | + Hardware architecture of the host, as returned by the Go runtime + (`GOARCH`). + + A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + type: "string" + example: "x86_64" + NCPU: + description: | + The number of logical CPUs usable by the daemon. + + The number of available CPUs is checked by querying the operating + system when the daemon starts. Changes to operating system CPU + allocation after the daemon is started are not reflected. + type: "integer" + example: 4 + MemTotal: + description: | + Total amount of physical memory available on the host, in bytes. + type: "integer" + format: "int64" + example: 2095882240 + + IndexServerAddress: + description: | + Address / URL of the index server that is used for image search, + and as a default for user authentication for Docker Hub and Docker Cloud. + default: "https://index.docker.io/v1/" + type: "string" + example: "https://index.docker.io/v1/" + RegistryConfig: + $ref: "#/definitions/RegistryServiceConfig" + GenericResources: + $ref: "#/definitions/GenericResources" + HttpProxy: + description: | + HTTP-proxy configured for the daemon. This value is obtained from the + [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + are masked in the API response. + + Containers do not automatically inherit this configuration. + type: "string" + example: "http://xxxxx:xxxxx@proxy.corp.example.com:8080" + HttpsProxy: + description: | + HTTPS-proxy configured for the daemon. This value is obtained from the + [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + are masked in the API response. + + Containers do not automatically inherit this configuration. + type: "string" + example: "https://xxxxx:xxxxx@proxy.corp.example.com:4443" + NoProxy: + description: | + Comma-separated list of domain extensions for which no proxy should be + used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) + environment variable. + + Containers do not automatically inherit this configuration. + type: "string" + example: "*.local, 169.254/16" + Name: + description: "Hostname of the host." + type: "string" + example: "node5.corp.example.com" + Labels: + description: | + User-defined labels (key/value metadata) as set on the daemon. + +


+ + > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, + > set through the daemon configuration, and _node_ labels, set from a + > manager node in the Swarm. Node labels are not included in this + > field. Node labels can be retrieved using the `/nodes/(id)` endpoint + > on a manager node in the Swarm. + type: "array" + items: + type: "string" + example: ["storage=ssd", "production"] + ExperimentalBuild: + description: | + Indicates if experimental features are enabled on the daemon. + type: "boolean" + example: true + ServerVersion: + description: | + Version string of the daemon. + type: "string" + example: "27.0.1" + Runtimes: + description: | + List of [OCI compliant](https://github.com/opencontainers/runtime-spec) + runtimes configured on the daemon. Keys hold the "name" used to + reference the runtime. + + The Docker daemon relies on an OCI compliant runtime (invoked via the + `containerd` daemon) as its interface to the Linux kernel namespaces, + cgroups, and SELinux. + + The default runtime is `runc`, and automatically configured. Additional + runtimes can be configured by the user and will be listed here. + type: "object" + additionalProperties: + $ref: "#/definitions/Runtime" + default: + runc: + path: "runc" + example: + runc: + path: "runc" + runc-master: + path: "/go/bin/runc" + custom: + path: "/usr/local/bin/my-oci-runtime" + runtimeArgs: ["--debug", "--systemd-cgroup=false"] + DefaultRuntime: + description: | + Name of the default OCI runtime that is used when starting containers. + + The default can be overridden per-container at create time. + type: "string" + default: "runc" + example: "runc" + Swarm: + $ref: "#/definitions/SwarmInfo" + LiveRestoreEnabled: + description: | + Indicates if live restore is enabled. + + If enabled, containers are kept running when the daemon is shutdown + or upon daemon start if running containers are detected. + type: "boolean" + default: false + example: false + Isolation: + description: | + Represents the isolation technology to use as a default for containers. + The supported values are platform-specific. + + If no isolation value is specified on daemon start, on Windows client, + the default is `hyperv`, and on Windows server, the default is `process`. + + This option is currently not used on other platforms. + default: "default" + type: "string" + enum: + - "default" + - "hyperv" + - "process" + InitBinary: + description: | + Name and, optional, path of the `docker-init` binary. + + If the path is omitted, the daemon searches the host's `$PATH` for the + binary and uses the first result. + type: "string" + example: "docker-init" + ContainerdCommit: + $ref: "#/definitions/Commit" + RuncCommit: + $ref: "#/definitions/Commit" + InitCommit: + $ref: "#/definitions/Commit" + SecurityOptions: + description: | + List of security features that are enabled on the daemon, such as + apparmor, seccomp, SELinux, user-namespaces (userns), rootless and + no-new-privileges. + + Additional configuration options for each security feature may + be present, and are included as a comma-separated list of key/value + pairs. + type: "array" + items: + type: "string" + example: + - "name=apparmor" + - "name=seccomp,profile=default" + - "name=selinux" + - "name=userns" + - "name=rootless" + ProductLicense: + description: | + Reports a summary of the product license on the daemon. + + If a commercial license has been applied to the daemon, information + such as number of nodes, and expiration are included. + type: "string" + example: "Community Engine" + DefaultAddressPools: + description: | + List of custom default address pools for local networks, which can be + specified in the daemon.json file or dockerd option. + + Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 + 10.10.[0-255].0/24 address pools. + type: "array" + items: + type: "object" + properties: + Base: + description: "The network address in CIDR format" + type: "string" + example: "10.10.0.0/16" + Size: + description: "The network pool size" + type: "integer" + example: "24" + Warnings: + description: | + List of warnings / informational messages about missing features, or + issues related to the daemon configuration. + + These messages can be printed by the client as information to the user. + type: "array" + items: + type: "string" + example: + - "WARNING: No memory limit support" + - "WARNING: bridge-nf-call-iptables is disabled" + - "WARNING: bridge-nf-call-ip6tables is disabled" + CDISpecDirs: + description: | + List of directories where (Container Device Interface) CDI + specifications are located. + + These specifications define vendor-specific modifications to an OCI + runtime specification for a container being created. + + An empty list indicates that CDI device injection is disabled. + + Note that since using CDI device injection requires the daemon to have + experimental enabled. For non-experimental daemons an empty list will + always be returned. + type: "array" + items: + type: "string" + example: + - "/etc/cdi" + - "/var/run/cdi" + Containerd: + $ref: "#/definitions/ContainerdInfo" + + ContainerdInfo: + description: | + Information for connecting to the containerd instance that is used by the daemon. + This is included for debugging purposes only. + type: "object" + x-nullable: true + properties: + Address: + description: "The address of the containerd socket." + type: "string" + example: "/run/containerd/containerd.sock" + Namespaces: + description: | + The namespaces that the daemon uses for running containers and + plugins in containerd. These namespaces can be configured in the + daemon configuration, and are considered to be used exclusively + by the daemon, Tampering with the containerd instance may cause + unexpected behavior. + + As these namespaces are considered to be exclusively accessed + by the daemon, it is not recommended to change these values, + or to change them to a value that is used by other systems, + such as cri-containerd. + type: "object" + properties: + Containers: + description: | + The default containerd namespace used for containers managed + by the daemon. + + The default namespace for containers is "moby", but will be + suffixed with the `.` of the remapped `root` if + user-namespaces are enabled and the containerd image-store + is used. + type: "string" + default: "moby" + example: "moby" + Plugins: + description: | + The default containerd namespace used for plugins managed by + the daemon. + + The default namespace for plugins is "plugins.moby", but will be + suffixed with the `.` of the remapped `root` if + user-namespaces are enabled and the containerd image-store + is used. + type: "string" + default: "plugins.moby" + example: "plugins.moby" + + # PluginsInfo is a temp struct holding Plugins name + # registered with docker daemon. It is used by Info struct + PluginsInfo: + description: | + Available plugins per type. + +


+ + > **Note**: Only unmanaged (V1) plugins are included in this list. + > V1 plugins are "lazily" loaded, and are not returned in this list + > if there is no resource using the plugin. + type: "object" + properties: + Volume: + description: "Names of available volume-drivers, and network-driver plugins." + type: "array" + items: + type: "string" + example: ["local"] + Network: + description: "Names of available network-drivers, and network-driver plugins." + type: "array" + items: + type: "string" + example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"] + Authorization: + description: "Names of available authorization plugins." + type: "array" + items: + type: "string" + example: ["img-authz-plugin", "hbm"] + Log: + description: "Names of available logging-drivers, and logging-driver plugins." + type: "array" + items: + type: "string" + example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "splunk", "syslog"] + + + RegistryServiceConfig: + description: | + RegistryServiceConfig stores daemon registry services configuration. + type: "object" + x-nullable: true + properties: + AllowNondistributableArtifactsCIDRs: + description: | + List of IP ranges to which nondistributable artifacts can be pushed, + using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). + + Some images (for example, Windows base images) contain artifacts + whose distribution is restricted by license. When these images are + pushed to a registry, restricted artifacts are not included. + + This configuration override this behavior, and enables the daemon to + push nondistributable artifacts to all registries whose resolved IP + address is within the subnet described by the CIDR syntax. + + This option is useful when pushing images containing + nondistributable artifacts to a registry on an air-gapped network so + hosts on that network can pull the images without connecting to + another server. + + > **Warning**: Nondistributable artifacts typically have restrictions + > on how and where they can be distributed and shared. Only use this + > feature to push artifacts to private registries and ensure that you + > are in compliance with any terms that cover redistributing + > nondistributable artifacts. + + type: "array" + items: + type: "string" + example: ["::1/128", "127.0.0.0/8"] + AllowNondistributableArtifactsHostnames: + description: | + List of registry hostnames to which nondistributable artifacts can be + pushed, using the format `[:]` or `[:]`. + + Some images (for example, Windows base images) contain artifacts + whose distribution is restricted by license. When these images are + pushed to a registry, restricted artifacts are not included. + + This configuration override this behavior for the specified + registries. + + This option is useful when pushing images containing + nondistributable artifacts to a registry on an air-gapped network so + hosts on that network can pull the images without connecting to + another server. + + > **Warning**: Nondistributable artifacts typically have restrictions + > on how and where they can be distributed and shared. Only use this + > feature to push artifacts to private registries and ensure that you + > are in compliance with any terms that cover redistributing + > nondistributable artifacts. + type: "array" + items: + type: "string" + example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"] + InsecureRegistryCIDRs: + description: | + List of IP ranges of insecure registries, using the CIDR syntax + ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries + accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates + from unknown CAs) communication. + + By default, local registries (`127.0.0.0/8`) are configured as + insecure. All other registries are secure. Communicating with an + insecure registry is not possible if the daemon assumes that registry + is secure. + + This configuration override this behavior, insecure communication with + registries whose resolved IP address is within the subnet described by + the CIDR syntax. + + Registries can also be marked insecure by hostname. Those registries + are listed under `IndexConfigs` and have their `Secure` field set to + `false`. + + > **Warning**: Using this option can be useful when running a local + > registry, but introduces security vulnerabilities. This option + > should therefore ONLY be used for testing purposes. For increased + > security, users should add their CA to their system's list of trusted + > CAs instead of enabling this option. + type: "array" + items: + type: "string" + example: ["::1/128", "127.0.0.0/8"] + IndexConfigs: + type: "object" + additionalProperties: + $ref: "#/definitions/IndexInfo" + example: + "127.0.0.1:5000": + "Name": "127.0.0.1:5000" + "Mirrors": [] + "Secure": false + "Official": false + "[2001:db8:a0b:12f0::1]:80": + "Name": "[2001:db8:a0b:12f0::1]:80" + "Mirrors": [] + "Secure": false + "Official": false + "docker.io": + Name: "docker.io" + Mirrors: ["https://hub-mirror.corp.example.com:5000/"] + Secure: true + Official: true + "registry.internal.corp.example.com:3000": + Name: "registry.internal.corp.example.com:3000" + Mirrors: [] + Secure: false + Official: false + Mirrors: + description: | + List of registry URLs that act as a mirror for the official + (`docker.io`) registry. + + type: "array" + items: + type: "string" + example: + - "https://hub-mirror.corp.example.com:5000/" + - "https://[2001:db8:a0b:12f0::1]/" + + IndexInfo: + description: + IndexInfo contains information about a registry. + type: "object" + x-nullable: true + properties: + Name: + description: | + Name of the registry, such as "docker.io". + type: "string" + example: "docker.io" + Mirrors: + description: | + List of mirrors, expressed as URIs. + type: "array" + items: + type: "string" + example: + - "https://hub-mirror.corp.example.com:5000/" + - "https://registry-2.docker.io/" + - "https://registry-3.docker.io/" + Secure: + description: | + Indicates if the registry is part of the list of insecure + registries. + + If `false`, the registry is insecure. Insecure registries accept + un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from + unknown CAs) communication. + + > **Warning**: Insecure registries can be useful when running a local + > registry. However, because its use creates security vulnerabilities + > it should ONLY be enabled for testing purposes. For increased + > security, users should add their CA to their system's list of + > trusted CAs instead of enabling this option. + type: "boolean" + example: true + Official: + description: | + Indicates whether this is an official registry (i.e., Docker Hub / docker.io) + type: "boolean" + example: true + + Runtime: + description: | + Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) + runtime. + + The runtime is invoked by the daemon via the `containerd` daemon. OCI + runtimes act as an interface to the Linux kernel namespaces, cgroups, + and SELinux. + type: "object" + properties: + path: + description: | + Name and, optional, path, of the OCI executable binary. + + If the path is omitted, the daemon searches the host's `$PATH` for the + binary and uses the first result. + type: "string" + example: "/usr/local/bin/my-oci-runtime" + runtimeArgs: + description: | + List of command-line arguments to pass to the runtime when invoked. + type: "array" + x-nullable: true + items: + type: "string" + example: ["--debug", "--systemd-cgroup=false"] + status: + description: | + Information specific to the runtime. + + While this API specification does not define data provided by runtimes, + the following well-known properties may be provided by runtimes: + + `org.opencontainers.runtime-spec.features`: features structure as defined + in the [OCI Runtime Specification](https://github.com/opencontainers/runtime-spec/blob/main/features.md), + in a JSON string representation. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + type: "object" + x-nullable: true + additionalProperties: + type: "string" + example: + "org.opencontainers.runtime-spec.features": "{\"ociVersionMin\":\"1.0.0\",\"ociVersionMax\":\"1.1.0\",\"...\":\"...\"}" + + Commit: + description: | + Commit holds the Git-commit (SHA1) that a binary was built from, as + reported in the version-string of external tools, such as `containerd`, + or `runC`. + type: "object" + properties: + ID: + description: "Actual commit ID of external tool." + type: "string" + example: "cfb82a876ecc11b5ca0977d1733adbe58599088a" + Expected: + description: | + Commit ID of external tool expected by dockerd as set at build time. + type: "string" + example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4" + + SwarmInfo: + description: | + Represents generic information about swarm. + type: "object" + properties: + NodeID: + description: "Unique identifier of for this node in the swarm." + type: "string" + default: "" + example: "k67qz4598weg5unwwffg6z1m1" + NodeAddr: + description: | + IP address at which this node can be reached by other nodes in the + swarm. + type: "string" + default: "" + example: "10.0.0.46" + LocalNodeState: + $ref: "#/definitions/LocalNodeState" + ControlAvailable: + type: "boolean" + default: false + example: true + Error: + type: "string" + default: "" + RemoteManagers: + description: | + List of ID's and addresses of other managers in the swarm. + type: "array" + default: null + x-nullable: true + items: + $ref: "#/definitions/PeerNode" + example: + - NodeID: "71izy0goik036k48jg985xnds" + Addr: "10.0.0.158:2377" + - NodeID: "79y6h1o4gv8n120drcprv5nmc" + Addr: "10.0.0.159:2377" + - NodeID: "k67qz4598weg5unwwffg6z1m1" + Addr: "10.0.0.46:2377" + Nodes: + description: "Total number of nodes in the swarm." + type: "integer" + x-nullable: true + example: 4 + Managers: + description: "Total number of managers in the swarm." + type: "integer" + x-nullable: true + example: 3 + Cluster: + $ref: "#/definitions/ClusterInfo" + + LocalNodeState: + description: "Current local status of this node." + type: "string" + default: "" + enum: + - "" + - "inactive" + - "pending" + - "active" + - "error" + - "locked" + example: "active" + + PeerNode: + description: "Represents a peer-node in the swarm" + type: "object" + properties: + NodeID: + description: "Unique identifier of for this node in the swarm." + type: "string" + Addr: + description: | + IP address and ports at which this node can be reached. + type: "string" + + NetworkAttachmentConfig: + description: | + Specifies how a service should be attached to a particular network. + type: "object" + properties: + Target: + description: | + The target network for attachment. Must be a network name or ID. + type: "string" + Aliases: + description: | + Discoverable alternate names for the service on this network. + type: "array" + items: + type: "string" + DriverOpts: + description: | + Driver attachment options for the network target. + type: "object" + additionalProperties: + type: "string" + + EventActor: + description: | + Actor describes something that generates events, like a container, network, + or a volume. + type: "object" + properties: + ID: + description: "The ID of the object emitting the event" + type: "string" + example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" + Attributes: + description: | + Various key/value attributes of the object, depending on its type. + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-label-value" + image: "alpine:latest" + name: "my-container" + + EventMessage: + description: | + EventMessage represents the information an event contains. + type: "object" + title: "SystemEventsResponse" + properties: + Type: + description: "The type of object emitting the event" + type: "string" + enum: ["builder", "config", "container", "daemon", "image", "network", "node", "plugin", "secret", "service", "volume"] + example: "container" + Action: + description: "The type of event" + type: "string" + example: "create" + Actor: + $ref: "#/definitions/EventActor" + scope: + description: | + Scope of the event. Engine events are `local` scope. Cluster (Swarm) + events are `swarm` scope. + type: "string" + enum: ["local", "swarm"] + time: + description: "Timestamp of event" + type: "integer" + format: "int64" + example: 1629574695 + timeNano: + description: "Timestamp of event, with nanosecond accuracy" + type: "integer" + format: "int64" + example: 1629574695515050031 + + OCIDescriptor: + type: "object" + x-go-name: Descriptor + description: | + A descriptor struct containing digest, media type, and size, as defined in + the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). + properties: + mediaType: + description: | + The media type of the object this schema refers to. + type: "string" + example: "application/vnd.docker.distribution.manifest.v2+json" + digest: + description: | + The digest of the targeted content. + type: "string" + example: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96" + size: + description: | + The size in bytes of the blob. + type: "integer" + format: "int64" + example: 3987495 + # TODO Not yet including these fields for now, as they are nil / omitted in our response. + # urls: + # description: | + # List of URLs from which this object MAY be downloaded. + # type: "array" + # items: + # type: "string" + # format: "uri" + # annotations: + # description: | + # Arbitrary metadata relating to the targeted content. + # type: "object" + # additionalProperties: + # type: "string" + # platform: + # $ref: "#/definitions/OCIPlatform" + + OCIPlatform: + type: "object" + x-go-name: Platform + description: | + Describes the platform which the image in the manifest runs on, as defined + in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md). + properties: + architecture: + description: | + The CPU architecture, for example `amd64` or `ppc64`. + type: "string" + example: "arm" + os: + description: | + The operating system, for example `linux` or `windows`. + type: "string" + example: "windows" + os.version: + description: | + Optional field specifying the operating system version, for example on + Windows `10.0.19041.1165`. + type: "string" + example: "10.0.19041.1165" + os.features: + description: | + Optional field specifying an array of strings, each listing a required + OS feature (for example on Windows `win32k`). + type: "array" + items: + type: "string" + example: + - "win32k" + variant: + description: | + Optional field specifying a variant of the CPU, for example `v7` to + specify ARMv7 when architecture is `arm`. + type: "string" + example: "v7" + + DistributionInspect: + type: "object" + x-go-name: DistributionInspect + title: "DistributionInspectResponse" + required: [Descriptor, Platforms] + description: | + Describes the result obtained from contacting the registry to retrieve + image metadata. + properties: + Descriptor: + $ref: "#/definitions/OCIDescriptor" + Platforms: + type: "array" + description: | + An array containing all platforms supported by the image. + items: + $ref: "#/definitions/OCIPlatform" + + ClusterVolume: + type: "object" + description: | + Options and information specific to, and only present on, Swarm CSI + cluster volumes. + properties: + ID: + type: "string" + description: | + The Swarm ID of this volume. Because cluster volumes are Swarm + objects, they have an ID, unlike non-cluster volumes. This ID can + be used to refer to the Volume instead of the name. + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/ClusterVolumeSpec" + Info: + type: "object" + description: | + Information about the global status of the volume. + properties: + CapacityBytes: + type: "integer" + format: "int64" + description: | + The capacity of the volume in bytes. A value of 0 indicates that + the capacity is unknown. + VolumeContext: + type: "object" + description: | + A map of strings to strings returned from the storage plugin when + the volume is created. + additionalProperties: + type: "string" + VolumeID: + type: "string" + description: | + The ID of the volume as returned by the CSI storage plugin. This + is distinct from the volume's ID as provided by Docker. This ID + is never used by the user when communicating with Docker to refer + to this volume. If the ID is blank, then the Volume has not been + successfully created in the plugin yet. + AccessibleTopology: + type: "array" + description: | + The topology this volume is actually accessible from. + items: + $ref: "#/definitions/Topology" + PublishStatus: + type: "array" + description: | + The status of the volume as it pertains to its publishing and use on + specific nodes + items: + type: "object" + properties: + NodeID: + type: "string" + description: | + The ID of the Swarm node the volume is published on. + State: + type: "string" + description: | + The published state of the volume. + * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. + * `published` The volume is published successfully to the node. + * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. + * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. + enum: + - "pending-publish" + - "published" + - "pending-node-unpublish" + - "pending-controller-unpublish" + PublishContext: + type: "object" + description: | + A map of strings to strings returned by the CSI controller + plugin when a volume is published. + additionalProperties: + type: "string" + + ClusterVolumeSpec: + type: "object" + description: | + Cluster-specific options used to create the volume. + properties: + Group: + type: "string" + description: | + Group defines the volume group of this volume. Volumes belonging to + the same group can be referred to by group name when creating + Services. Referring to a volume by group instructs Swarm to treat + volumes in that group interchangeably for the purpose of scheduling. + Volumes with an empty string for a group technically all belong to + the same, emptystring group. + AccessMode: + type: "object" + description: | + Defines how the volume is used by tasks. + properties: + Scope: + type: "string" + description: | + The set of nodes this volume can be used on at one time. + - `single` The volume may only be scheduled to one node at a time. + - `multi` the volume may be scheduled to any supported number of nodes at a time. + default: "single" + enum: ["single", "multi"] + x-nullable: false + Sharing: + type: "string" + description: | + The number and way that different tasks can use this volume + at one time. + - `none` The volume may only be used by one task at a time. + - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly + - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. + - `all` The volume may have any number of readers and writers. + default: "none" + enum: ["none", "readonly", "onewriter", "all"] + x-nullable: false + MountVolume: + type: "object" + description: | + Options for using this volume as a Mount-type volume. + + Either MountVolume or BlockVolume, but not both, must be + present. + properties: + FsType: + type: "string" + description: | + Specifies the filesystem type for the mount volume. + Optional. + MountFlags: + type: "array" + description: | + Flags to pass when mounting the volume. Optional. + items: + type: "string" + BlockVolume: + type: "object" + description: | + Options for using this volume as a Block-type volume. + Intentionally empty. + Secrets: + type: "array" + description: | + Swarm Secrets that are passed to the CSI storage plugin when + operating on this volume. + items: + type: "object" + description: | + One cluster volume secret entry. Defines a key-value pair that + is passed to the plugin. + properties: + Key: + type: "string" + description: | + Key is the name of the key of the key-value pair passed to + the plugin. + Secret: + type: "string" + description: | + Secret is the swarm Secret object from which to read data. + This can be a Secret name or ID. The Secret data is + retrieved by swarm and used as the value of the key-value + pair passed to the plugin. + AccessibilityRequirements: + type: "object" + description: | + Requirements for the accessible topology of the volume. These + fields are optional. For an in-depth description of what these + fields mean, see the CSI specification. + properties: + Requisite: + type: "array" + description: | + A list of required topologies, at least one of which the + volume must be accessible from. + items: + $ref: "#/definitions/Topology" + Preferred: + type: "array" + description: | + A list of topologies that the volume should attempt to be + provisioned in. + items: + $ref: "#/definitions/Topology" + CapacityRange: + type: "object" + description: | + The desired capacity that the volume should be created with. If + empty, the plugin will decide the capacity. + properties: + RequiredBytes: + type: "integer" + format: "int64" + description: | + The volume must be at least this big. The value of 0 + indicates an unspecified minimum + LimitBytes: + type: "integer" + format: "int64" + description: | + The volume must not be bigger than this. The value of 0 + indicates an unspecified maximum. + Availability: + type: "string" + description: | + The availability of the volume for use in tasks. + - `active` The volume is fully available for scheduling on the cluster + - `pause` No new workloads should use the volume, but existing workloads are not stopped. + - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started. + default: "active" + x-nullable: false + enum: + - "active" + - "pause" + - "drain" + + Topology: + description: | + A map of topological domains to topological segments. For in depth + details, see documentation for the Topology object in the CSI + specification. + type: "object" + additionalProperties: + type: "string" + + ImageManifestSummary: + x-go-name: "ManifestSummary" + description: | + ImageManifestSummary represents a summary of an image manifest. + type: "object" + required: ["ID", "Descriptor", "Available", "Size", "Kind"] + properties: + ID: + description: | + ID is the content-addressable ID of an image and is the same as the + digest of the image manifest. + type: "string" + example: "sha256:95869fbcf224d947ace8d61d0e931d49e31bb7fc67fffbbe9c3198c33aa8e93f" + Descriptor: + $ref: "#/definitions/OCIDescriptor" + Available: + description: Indicates whether all the child content (image config, layers) is fully available locally. + type: "boolean" + example: true + Size: + type: "object" + x-nullable: false + required: ["Content", "Total"] + properties: + Total: + type: "integer" + format: "int64" + example: 8213251 + description: | + Total is the total size (in bytes) of all the locally present + data (both distributable and non-distributable) that's related to + this manifest and its children. + This equal to the sum of [Content] size AND all the sizes in the + [Size] struct present in the Kind-specific data struct. + For example, for an image kind (Kind == "image") + this would include the size of the image content and unpacked + image snapshots ([Size.Content] + [ImageData.Size.Unpacked]). + Content: + description: | + Content is the size (in bytes) of all the locally present + content in the content store (e.g. image config, layers) + referenced by this manifest and its children. + This only includes blobs in the content store. + type: "integer" + format: "int64" + example: 3987495 + Kind: + type: "string" + example: "image" + enum: + - "image" + - "attestation" + - "unknown" + description: | + The kind of the manifest. + + kind | description + -------------|----------------------------------------------------------- + image | Image manifest that can be used to start a container. + attestation | Attestation manifest produced by the Buildkit builder for a specific image manifest. + ImageData: + description: | + The image data for the image manifest. + This field is only populated when Kind is "image". + type: "object" + x-nullable: true + x-omitempty: true + required: ["Platform", "Containers", "Size", "UnpackedSize"] + properties: + Platform: + $ref: "#/definitions/OCIPlatform" + description: | + OCI platform of the image. This will be the platform specified in the + manifest descriptor from the index/manifest list. + If it's not available, it will be obtained from the image config. + Containers: + description: | + The IDs of the containers that are using this image. + type: "array" + items: + type: "string" + example: ["ede54ee1fda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c7430", "abadbce344c096744d8d6071a90d474d28af8f1034b5ea9fb03c3f4bfc6d005e"] + Size: + type: "object" + x-nullable: false + required: ["Unpacked"] + properties: + Unpacked: + type: "integer" + format: "int64" + example: 3987495 + description: | + Unpacked is the size (in bytes) of the locally unpacked + (uncompressed) image content that's directly usable by the containers + running this image. + It's independent of the distributable content - e.g. + the image might still have an unpacked data that's still used by + some container even when the distributable/compressed content is + already gone. + AttestationData: + description: | + The image data for the attestation manifest. + This field is only populated when Kind is "attestation". + type: "object" + x-nullable: true + x-omitempty: true + required: ["For"] + properties: + For: + description: | + The digest of the image manifest that this attestation is for. + type: "string" + example: "sha256:95869fbcf224d947ace8d61d0e931d49e31bb7fc67fffbbe9c3198c33aa8e93f" + +paths: + /containers/json: + get: + summary: "List containers" + description: | + Returns a list of containers. For details on the format, see the + [inspect endpoint](#operation/ContainerInspect). + + Note that it uses a different, smaller representation of a container + than inspecting a single container. For example, the list of linked + containers is not propagated . + operationId: "ContainerList" + produces: + - "application/json" + parameters: + - name: "all" + in: "query" + description: | + Return all containers. By default, only running containers are shown. + type: "boolean" + default: false + - name: "limit" + in: "query" + description: | + Return this number of most recently created containers, including + non-running ones. + type: "integer" + - name: "size" + in: "query" + description: | + Return the size of container as fields `SizeRw` and `SizeRootFs`. + type: "boolean" + default: false + - name: "filters" + in: "query" + description: | + Filters to process on the container list, encoded as JSON (a + `map[string][]string`). For example, `{"status": ["paused"]}` will + only return paused containers. + + Available filters: + + - `ancestor`=(`[:]`, ``, or ``) + - `before`=(`` or ``) + - `expose`=(`[/]`|`/[]`) + - `exited=` containers with exit code of `` + - `health`=(`starting`|`healthy`|`unhealthy`|`none`) + - `id=` a container's ID + - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) + - `is-task=`(`true`|`false`) + - `label=key` or `label="key=value"` of a container label + - `name=` a container's name + - `network`=(`` or ``) + - `publish`=(`[/]`|`/[]`) + - `since`=(`` or ``) + - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) + - `volume`=(`` or ``) + type: "string" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/ContainerSummary" + examples: + application/json: + - Id: "8dfafdbc3a40" + Names: + - "/boring_feynman" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 1" + Created: 1367854155 + State: "Exited" + Status: "Exit 0" + Ports: + - PrivatePort: 2222 + PublicPort: 3333 + Type: "tcp" + Labels: + com.example.vendor: "Acme" + com.example.license: "GPL" + com.example.version: "1.0" + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + Annotations: + io.kubernetes.docker.type: "container" + NetworkSettings: + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.2" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:02" + Mounts: + - Name: "fac362...80535" + Source: "/data" + Destination: "/data" + Driver: "local" + Mode: "ro,Z" + RW: false + Propagation: "" + - Id: "9cd87474be90" + Names: + - "/coolName" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 222222" + Created: 1367854155 + State: "Exited" + Status: "Exit 0" + Ports: [] + Labels: {} + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + Annotations: + io.kubernetes.docker.type: "container" + io.kubernetes.sandbox.id: "3befe639bed0fd6afdd65fd1fa84506756f59360ec4adc270b0fdac9be22b4d3" + NetworkSettings: + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.8" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:08" + Mounts: [] + - Id: "3176a2479c92" + Names: + - "/sleepy_dog" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 3333333333333333" + Created: 1367854154 + State: "Exited" + Status: "Exit 0" + Ports: [] + Labels: {} + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + Annotations: + io.kubernetes.image.id: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + io.kubernetes.image.name: "ubuntu:latest" + NetworkSettings: + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.6" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:06" + Mounts: [] + - Id: "4cb07b47f9fb" + Names: + - "/running_cat" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 444444444444444444444444444444444" + Created: 1367854152 + State: "Exited" + Status: "Exit 0" + Ports: [] + Labels: {} + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + Annotations: + io.kubernetes.config.source: "api" + NetworkSettings: + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.5" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:05" + Mounts: [] + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Container"] + /containers/create: + post: + summary: "Create a container" + operationId: "ContainerCreate" + consumes: + - "application/json" + - "application/octet-stream" + produces: + - "application/json" + parameters: + - name: "name" + in: "query" + description: | + Assign the specified name to the container. Must match + `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. + type: "string" + pattern: "^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$" + - name: "platform" + in: "query" + description: | + Platform in the format `os[/arch[/variant]]` used for image lookup. + + When specified, the daemon checks if the requested image is present + in the local image cache with the given OS and Architecture, and + otherwise returns a `404` status. + + If the option is not set, the host's native OS and Architecture are + used to look up the image in the image cache. However, if no platform + is passed and the given image does exist in the local image cache, + but its OS or architecture does not match, the container is created + with the available image, and a warning is added to the `Warnings` + field in the response, for example; + + WARNING: The requested image's platform (linux/arm64/v8) does not + match the detected host platform (linux/amd64) and no + specific platform was requested + + type: "string" + default: "" + - name: "body" + in: "body" + description: "Container to create" + schema: + allOf: + - $ref: "#/definitions/ContainerConfig" + - type: "object" + properties: + HostConfig: + $ref: "#/definitions/HostConfig" + NetworkingConfig: + $ref: "#/definitions/NetworkingConfig" + example: + Hostname: "" + Domainname: "" + User: "" + AttachStdin: false + AttachStdout: true + AttachStderr: true + Tty: false + OpenStdin: false + StdinOnce: false + Env: + - "FOO=bar" + - "BAZ=quux" + Cmd: + - "date" + Entrypoint: "" + Image: "ubuntu" + Labels: + com.example.vendor: "Acme" + com.example.license: "GPL" + com.example.version: "1.0" + Volumes: + /volumes/data: {} + WorkingDir: "" + NetworkDisabled: false + MacAddress: "12:34:56:78:9a:bc" + ExposedPorts: + 22/tcp: {} + StopSignal: "SIGTERM" + StopTimeout: 10 + HostConfig: + Binds: + - "/tmp:/tmp" + Links: + - "redis3:redis" + Memory: 0 + MemorySwap: 0 + MemoryReservation: 0 + NanoCpus: 500000 + CpuPercent: 80 + CpuShares: 512 + CpuPeriod: 100000 + CpuRealtimePeriod: 1000000 + CpuRealtimeRuntime: 10000 + CpuQuota: 50000 + CpusetCpus: "0,1" + CpusetMems: "0,1" + MaximumIOps: 0 + MaximumIOBps: 0 + BlkioWeight: 300 + BlkioWeightDevice: + - {} + BlkioDeviceReadBps: + - {} + BlkioDeviceReadIOps: + - {} + BlkioDeviceWriteBps: + - {} + BlkioDeviceWriteIOps: + - {} + DeviceRequests: + - Driver: "nvidia" + Count: -1 + DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"] + Capabilities: [["gpu", "nvidia", "compute"]] + Options: + property1: "string" + property2: "string" + MemorySwappiness: 60 + OomKillDisable: false + OomScoreAdj: 500 + PidMode: "" + PidsLimit: 0 + PortBindings: + 22/tcp: + - HostPort: "11022" + PublishAllPorts: false + Privileged: false + ReadonlyRootfs: false + Dns: + - "8.8.8.8" + DnsOptions: + - "" + DnsSearch: + - "" + VolumesFrom: + - "parent" + - "other:ro" + CapAdd: + - "NET_ADMIN" + CapDrop: + - "MKNOD" + GroupAdd: + - "newgroup" + RestartPolicy: + Name: "" + MaximumRetryCount: 0 + AutoRemove: true + NetworkMode: "bridge" + Devices: [] + Ulimits: + - {} + LogConfig: + Type: "json-file" + Config: {} + SecurityOpt: [] + StorageOpt: {} + CgroupParent: "" + VolumeDriver: "" + ShmSize: 67108864 + NetworkingConfig: + EndpointsConfig: + isolated_nw: + IPAMConfig: + IPv4Address: "172.20.30.33" + IPv6Address: "2001:db8:abcd::3033" + LinkLocalIPs: + - "169.254.34.68" + - "fe80::3468" + Links: + - "container_1" + - "container_2" + Aliases: + - "server_x" + - "server_y" + database_nw: {} + + required: true + responses: + 201: + description: "Container created successfully" + schema: + $ref: "#/definitions/ContainerCreateResponse" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such image" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such image: c2ada9df5af8" + 409: + description: "conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Container"] + /containers/{id}/json: + get: + summary: "Inspect a container" + description: "Return low-level information about a container." + operationId: "ContainerInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + title: "ContainerInspectResponse" + properties: + Id: + description: "The ID of the container" + type: "string" + Created: + description: "The time the container was created" + type: "string" + Path: + description: "The path to the command being run" + type: "string" + Args: + description: "The arguments to the command being run" + type: "array" + items: + type: "string" + State: + $ref: "#/definitions/ContainerState" + Image: + description: "The container's image ID" + type: "string" + ResolvConfPath: + type: "string" + HostnamePath: + type: "string" + HostsPath: + type: "string" + LogPath: + type: "string" + Name: + type: "string" + RestartCount: + type: "integer" + Driver: + type: "string" + Platform: + type: "string" + MountLabel: + type: "string" + ProcessLabel: + type: "string" + AppArmorProfile: + type: "string" + ExecIDs: + description: "IDs of exec instances that are running in the container." + type: "array" + items: + type: "string" + x-nullable: true + HostConfig: + $ref: "#/definitions/HostConfig" + GraphDriver: + $ref: "#/definitions/DriverData" + SizeRw: + description: | + The size of files that have been created or changed by this + container. + type: "integer" + format: "int64" + SizeRootFs: + description: "The total size of all the files in this container." + type: "integer" + format: "int64" + Mounts: + type: "array" + items: + $ref: "#/definitions/MountPoint" + Config: + $ref: "#/definitions/ContainerConfig" + NetworkSettings: + $ref: "#/definitions/NetworkSettings" + examples: + application/json: + AppArmorProfile: "" + Args: + - "-c" + - "exit 9" + Config: + AttachStderr: true + AttachStdin: false + AttachStdout: true + Cmd: + - "/bin/sh" + - "-c" + - "exit 9" + Domainname: "" + Env: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + Healthcheck: + Test: ["CMD-SHELL", "exit 0"] + Hostname: "ba033ac44011" + Image: "ubuntu" + Labels: + com.example.vendor: "Acme" + com.example.license: "GPL" + com.example.version: "1.0" + MacAddress: "" + NetworkDisabled: false + OpenStdin: false + StdinOnce: false + Tty: false + User: "" + Volumes: + /volumes/data: {} + WorkingDir: "" + StopSignal: "SIGTERM" + StopTimeout: 10 + Created: "2015-01-06T15:47:31.485331387Z" + Driver: "overlay2" + ExecIDs: + - "b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca" + - "3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4" + HostConfig: + MaximumIOps: 0 + MaximumIOBps: 0 + BlkioWeight: 0 + BlkioWeightDevice: + - {} + BlkioDeviceReadBps: + - {} + BlkioDeviceWriteBps: + - {} + BlkioDeviceReadIOps: + - {} + BlkioDeviceWriteIOps: + - {} + ContainerIDFile: "" + CpusetCpus: "" + CpusetMems: "" + CpuPercent: 80 + CpuShares: 0 + CpuPeriod: 100000 + CpuRealtimePeriod: 1000000 + CpuRealtimeRuntime: 10000 + Devices: [] + DeviceRequests: + - Driver: "nvidia" + Count: -1 + DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"] + Capabilities: [["gpu", "nvidia", "compute"]] + Options: + property1: "string" + property2: "string" + IpcMode: "" + Memory: 0 + MemorySwap: 0 + MemoryReservation: 0 + OomKillDisable: false + OomScoreAdj: 500 + NetworkMode: "bridge" + PidMode: "" + PortBindings: {} + Privileged: false + ReadonlyRootfs: false + PublishAllPorts: false + RestartPolicy: + MaximumRetryCount: 2 + Name: "on-failure" + LogConfig: + Type: "json-file" + Sysctls: + net.ipv4.ip_forward: "1" + Ulimits: + - {} + VolumeDriver: "" + ShmSize: 67108864 + HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname" + HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts" + LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log" + Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39" + Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2" + MountLabel: "" + Name: "/boring_euclid" + NetworkSettings: + Bridge: "" + SandboxID: "" + HairpinMode: false + LinkLocalIPv6Address: "" + LinkLocalIPv6PrefixLen: 0 + SandboxKey: "" + EndpointID: "" + Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + IPAddress: "" + IPPrefixLen: 0 + IPv6Gateway: "" + MacAddress: "" + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.2" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:12:00:02" + Path: "/bin/sh" + ProcessLabel: "" + ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf" + RestartCount: 1 + State: + Error: "" + ExitCode: 9 + FinishedAt: "2015-01-06T15:47:32.080254511Z" + Health: + Status: "healthy" + FailingStreak: 0 + Log: + - Start: "2019-12-22T10:59:05.6385933Z" + End: "2019-12-22T10:59:05.8078452Z" + ExitCode: 0 + Output: "" + OOMKilled: false + Dead: false + Paused: false + Pid: 0 + Restarting: false + Running: true + StartedAt: "2015-01-06T15:47:32.072697474Z" + Status: "running" + Mounts: + - Name: "fac362...80535" + Source: "/data" + Destination: "/data" + Driver: "local" + Mode: "ro,Z" + RW: false + Propagation: "" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "size" + in: "query" + type: "boolean" + default: false + description: "Return the size of container as fields `SizeRw` and `SizeRootFs`" + tags: ["Container"] + /containers/{id}/top: + get: + summary: "List processes running inside a container" + description: | + On Unix systems, this is done by running the `ps` command. This endpoint + is not supported on Windows. + operationId: "ContainerTop" + responses: + 200: + description: "no error" + schema: + type: "object" + title: "ContainerTopResponse" + description: "OK response to ContainerTop operation" + properties: + Titles: + description: "The ps column titles" + type: "array" + items: + type: "string" + Processes: + description: | + Each process running in the container, where each is process + is an array of values corresponding to the titles. + type: "array" + items: + type: "array" + items: + type: "string" + examples: + application/json: + Titles: + - "UID" + - "PID" + - "PPID" + - "C" + - "STIME" + - "TTY" + - "TIME" + - "CMD" + Processes: + - + - "root" + - "13642" + - "882" + - "0" + - "17:03" + - "pts/0" + - "00:00:00" + - "/bin/bash" + - + - "root" + - "13735" + - "13642" + - "0" + - "17:06" + - "pts/0" + - "00:00:00" + - "sleep 10" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "ps_args" + in: "query" + description: "The arguments to pass to `ps`. For example, `aux`" + type: "string" + default: "-ef" + tags: ["Container"] + /containers/{id}/logs: + get: + summary: "Get container logs" + description: | + Get `stdout` and `stderr` logs from a container. + + Note: This endpoint works only for containers with the `json-file` or + `journald` logging driver. + produces: + - "application/vnd.docker.raw-stream" + - "application/vnd.docker.multiplexed-stream" + operationId: "ContainerLogs" + responses: + 200: + description: | + logs returned as a stream in response body. + For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). + Note that unlike the attach endpoint, the logs endpoint does not + upgrade the connection and does not set Content-Type. + schema: + type: "string" + format: "binary" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "follow" + in: "query" + description: "Keep connection after returning logs." + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Return logs from `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Return logs from `stderr`" + type: "boolean" + default: false + - name: "since" + in: "query" + description: "Only return logs since this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "until" + in: "query" + description: "Only return logs before this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "timestamps" + in: "query" + description: "Add timestamps to every log line" + type: "boolean" + default: false + - name: "tail" + in: "query" + description: | + Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + type: "string" + default: "all" + tags: ["Container"] + /containers/{id}/changes: + get: + summary: "Get changes on a container’s filesystem" + description: | + Returns which files in a container's filesystem have been added, deleted, + or modified. The `Kind` of modification can be one of: + + - `0`: Modified ("C") + - `1`: Added ("A") + - `2`: Deleted ("D") + operationId: "ContainerChanges" + produces: ["application/json"] + responses: + 200: + description: "The list of changes" + schema: + type: "array" + items: + $ref: "#/definitions/FilesystemChange" + examples: + application/json: + - Path: "/dev" + Kind: 0 + - Path: "/dev/kmsg" + Kind: 1 + - Path: "/test" + Kind: 1 + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/export: + get: + summary: "Export a container" + description: "Export the contents of a container as a tarball." + operationId: "ContainerExport" + produces: + - "application/octet-stream" + responses: + 200: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/stats: + get: + summary: "Get container stats based on resource usage" + description: | + This endpoint returns a live stream of a container’s resource usage + statistics. + + The `precpu_stats` is the CPU statistic of the *previous* read, and is + used to calculate the CPU usage percentage. It is not an exact copy + of the `cpu_stats` field. + + If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is + nil then for compatibility with older daemons the length of the + corresponding `cpu_usage.percpu_usage` array should be used. + + On a cgroup v2 host, the following fields are not set + * `blkio_stats`: all fields other than `io_service_bytes_recursive` + * `cpu_stats`: `cpu_usage.percpu_usage` + * `memory_stats`: `max_usage` and `failcnt` + Also, `memory_stats.stats` fields are incompatible with cgroup v1. + + To calculate the values shown by the `stats` command of the docker cli tool + the following formulas can be used: + * used_memory = `memory_stats.usage - memory_stats.stats.cache` + * available_memory = `memory_stats.limit` + * Memory usage % = `(used_memory / available_memory) * 100.0` + * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` + * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` + * number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` + * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` + operationId: "ContainerStats" + produces: ["application/json"] + responses: + 200: + description: "no error" + schema: + type: "object" + examples: + application/json: + read: "2015-01-08T22:57:31.547920715Z" + pids_stats: + current: 3 + networks: + eth0: + rx_bytes: 5338 + rx_dropped: 0 + rx_errors: 0 + rx_packets: 36 + tx_bytes: 648 + tx_dropped: 0 + tx_errors: 0 + tx_packets: 8 + eth5: + rx_bytes: 4641 + rx_dropped: 0 + rx_errors: 0 + rx_packets: 26 + tx_bytes: 690 + tx_dropped: 0 + tx_errors: 0 + tx_packets: 9 + memory_stats: + stats: + total_pgmajfault: 0 + cache: 0 + mapped_file: 0 + total_inactive_file: 0 + pgpgout: 414 + rss: 6537216 + total_mapped_file: 0 + writeback: 0 + unevictable: 0 + pgpgin: 477 + total_unevictable: 0 + pgmajfault: 0 + total_rss: 6537216 + total_rss_huge: 6291456 + total_writeback: 0 + total_inactive_anon: 0 + rss_huge: 6291456 + hierarchical_memory_limit: 67108864 + total_pgfault: 964 + total_active_file: 0 + active_anon: 6537216 + total_active_anon: 6537216 + total_pgpgout: 414 + total_cache: 0 + inactive_anon: 0 + active_file: 0 + pgfault: 964 + inactive_file: 0 + total_pgpgin: 477 + max_usage: 6651904 + usage: 6537216 + failcnt: 0 + limit: 67108864 + blkio_stats: {} + cpu_stats: + cpu_usage: + percpu_usage: + - 8646879 + - 24472255 + - 36438778 + - 30657443 + usage_in_usermode: 50000000 + total_usage: 100215355 + usage_in_kernelmode: 30000000 + system_cpu_usage: 739306590000000 + online_cpus: 4 + throttling_data: + periods: 0 + throttled_periods: 0 + throttled_time: 0 + precpu_stats: + cpu_usage: + percpu_usage: + - 8646879 + - 24350896 + - 36438778 + - 30657443 + usage_in_usermode: 50000000 + total_usage: 100093996 + usage_in_kernelmode: 30000000 + system_cpu_usage: 9492140000000 + online_cpus: 4 + throttling_data: + periods: 0 + throttled_periods: 0 + throttled_time: 0 + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "stream" + in: "query" + description: | + Stream the output. If false, the stats will be output once and then + it will disconnect. + type: "boolean" + default: true + - name: "one-shot" + in: "query" + description: | + Only get a single stat instead of waiting for 2 cycles. Must be used + with `stream=false`. + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/resize: + post: + summary: "Resize a container TTY" + description: "Resize the TTY for a container." + operationId: "ContainerResize" + consumes: + - "application/octet-stream" + produces: + - "text/plain" + responses: + 200: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "cannot resize container" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "h" + in: "query" + required: true + description: "Height of the TTY session in characters" + type: "integer" + - name: "w" + in: "query" + required: true + description: "Width of the TTY session in characters" + type: "integer" + tags: ["Container"] + /containers/{id}/start: + post: + summary: "Start a container" + operationId: "ContainerStart" + responses: + 204: + description: "no error" + 304: + description: "container already started" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: | + Override the key sequence for detaching a container. Format is a + single character `[a-Z]` or `ctrl-` where `` is one + of: `a-z`, `@`, `^`, `[`, `,` or `_`. + type: "string" + tags: ["Container"] + /containers/{id}/stop: + post: + summary: "Stop a container" + operationId: "ContainerStop" + responses: + 204: + description: "no error" + 304: + description: "container already stopped" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "signal" + in: "query" + description: | + Signal to send to the container as an integer or string (e.g. `SIGINT`). + type: "string" + - name: "t" + in: "query" + description: "Number of seconds to wait before killing the container" + type: "integer" + tags: ["Container"] + /containers/{id}/restart: + post: + summary: "Restart a container" + operationId: "ContainerRestart" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "signal" + in: "query" + description: | + Signal to send to the container as an integer or string (e.g. `SIGINT`). + type: "string" + - name: "t" + in: "query" + description: "Number of seconds to wait before killing the container" + type: "integer" + tags: ["Container"] + /containers/{id}/kill: + post: + summary: "Kill a container" + description: | + Send a POSIX signal to a container, defaulting to killing to the + container. + operationId: "ContainerKill" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "container is not running" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "signal" + in: "query" + description: | + Signal to send to the container as an integer or string (e.g. `SIGINT`). + type: "string" + default: "SIGKILL" + tags: ["Container"] + /containers/{id}/update: + post: + summary: "Update a container" + description: | + Change various configuration options of a container without having to + recreate it. + operationId: "ContainerUpdate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "The container has been updated." + schema: + type: "object" + title: "ContainerUpdateResponse" + description: "OK response to ContainerUpdate operation" + properties: + Warnings: + type: "array" + items: + type: "string" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "update" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/Resources" + - type: "object" + properties: + RestartPolicy: + $ref: "#/definitions/RestartPolicy" + example: + BlkioWeight: 300 + CpuShares: 512 + CpuPeriod: 100000 + CpuQuota: 50000 + CpuRealtimePeriod: 1000000 + CpuRealtimeRuntime: 10000 + CpusetCpus: "0,1" + CpusetMems: "0" + Memory: 314572800 + MemorySwap: 514288000 + MemoryReservation: 209715200 + RestartPolicy: + MaximumRetryCount: 4 + Name: "on-failure" + tags: ["Container"] + /containers/{id}/rename: + post: + summary: "Rename a container" + operationId: "ContainerRename" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "name already in use" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "name" + in: "query" + required: true + description: "New name for the container" + type: "string" + tags: ["Container"] + /containers/{id}/pause: + post: + summary: "Pause a container" + description: | + Use the freezer cgroup to suspend all processes in a container. + + Traditionally, when suspending a process the `SIGSTOP` signal is used, + which is observable by the process being suspended. With the freezer + cgroup the process is unaware, and unable to capture, that it is being + suspended, and subsequently resumed. + operationId: "ContainerPause" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/unpause: + post: + summary: "Unpause a container" + description: "Resume a container which has been paused." + operationId: "ContainerUnpause" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/attach: + post: + summary: "Attach to a container" + description: | + Attach to a container to read its output or send it input. You can attach + to the same container multiple times and you can reattach to containers + that have been detached. + + Either the `stream` or `logs` parameter must be `true` for this endpoint + to do anything. + + See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) + for more details. + + ### Hijacking + + This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, + and `stderr` on the same socket. + + This is the response from the daemon for an attach request: + + ``` + HTTP/1.1 200 OK + Content-Type: application/vnd.docker.raw-stream + + [STREAM] + ``` + + After the headers and two new lines, the TCP connection can now be used + for raw, bidirectional communication between the client and server. + + To hint potential proxies about connection hijacking, the Docker client + can also optionally send connection upgrade headers. + + For example, the client sends this request to upgrade the connection: + + ``` + POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 + Upgrade: tcp + Connection: Upgrade + ``` + + The Docker daemon will respond with a `101 UPGRADED` response, and will + similarly follow with the raw stream: + + ``` + HTTP/1.1 101 UPGRADED + Content-Type: application/vnd.docker.raw-stream + Connection: Upgrade + Upgrade: tcp + + [STREAM] + ``` + + ### Stream format + + When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), + the HTTP Content-Type header is set to application/vnd.docker.multiplexed-stream + and the stream over the hijacked connected is multiplexed to separate out + `stdout` and `stderr`. The stream consists of a series of frames, each + containing a header and a payload. + + The header contains the information which the stream writes (`stdout` or + `stderr`). It also contains the size of the associated frame encoded in + the last four bytes (`uint32`). + + It is encoded on the first eight bytes like this: + + ```go + header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} + ``` + + `STREAM_TYPE` can be: + + - 0: `stdin` (is written on `stdout`) + - 1: `stdout` + - 2: `stderr` + + `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size + encoded as big endian. + + Following the header is the payload, which is the specified number of + bytes of `STREAM_TYPE`. + + The simplest way to implement this protocol is the following: + + 1. Read 8 bytes. + 2. Choose `stdout` or `stderr` depending on the first byte. + 3. Extract the frame size from the last four bytes. + 4. Read the extracted size and output it on the correct output. + 5. Goto 1. + + ### Stream format when using a TTY + + When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), + the stream is not multiplexed. The data exchanged over the hijacked + connection is simply the raw data from the process PTY and client's + `stdin`. + + operationId: "ContainerAttach" + produces: + - "application/vnd.docker.raw-stream" + - "application/vnd.docker.multiplexed-stream" + responses: + 101: + description: "no error, hints proxy about hijacking" + 200: + description: "no error, no upgrade header found" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: | + Override the key sequence for detaching a container.Format is a single + character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, + `@`, `^`, `[`, `,` or `_`. + type: "string" + - name: "logs" + in: "query" + description: | + Replay previous logs from the container. + + This is useful for attaching to a container that has started and you + want to output everything since the container started. + + If `stream` is also enabled, once all the previous output has been + returned, it will seamlessly transition into streaming current + output. + type: "boolean" + default: false + - name: "stream" + in: "query" + description: | + Stream attached streams from the time the request was made onwards. + type: "boolean" + default: false + - name: "stdin" + in: "query" + description: "Attach to `stdin`" + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Attach to `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Attach to `stderr`" + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/attach/ws: + get: + summary: "Attach to a container via a websocket" + operationId: "ContainerAttachWebsocket" + responses: + 101: + description: "no error, hints proxy about hijacking" + 200: + description: "no error, no upgrade header found" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: | + Override the key sequence for detaching a container.Format is a single + character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, + `@`, `^`, `[`, `,`, or `_`. + type: "string" + - name: "logs" + in: "query" + description: "Return logs" + type: "boolean" + default: false + - name: "stream" + in: "query" + description: "Return stream" + type: "boolean" + default: false + - name: "stdin" + in: "query" + description: "Attach to `stdin`" + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Attach to `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Attach to `stderr`" + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/wait: + post: + summary: "Wait for a container" + description: "Block until a container stops, then returns the exit code." + operationId: "ContainerWait" + produces: ["application/json"] + responses: + 200: + description: "The container has exit." + schema: + $ref: "#/definitions/ContainerWaitResponse" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "condition" + in: "query" + description: | + Wait until a container state reaches the given condition. + + Defaults to `not-running` if omitted or empty. + type: "string" + enum: + - "not-running" + - "next-exit" + - "removed" + default: "not-running" + tags: ["Container"] + /containers/{id}: + delete: + summary: "Remove a container" + operationId: "ContainerDelete" + responses: + 204: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "conflict" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: | + You cannot remove a running container: c2ada9df5af8. Stop the + container before attempting removal or force remove + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "v" + in: "query" + description: "Remove anonymous volumes associated with the container." + type: "boolean" + default: false + - name: "force" + in: "query" + description: "If the container is running, kill it before removing it." + type: "boolean" + default: false + - name: "link" + in: "query" + description: "Remove the specified link associated with the container." + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/archive: + head: + summary: "Get information about files in a container" + description: | + A response header `X-Docker-Container-Path-Stat` is returned, containing + a base64 - encoded JSON object with some filesystem header information + about the path. + operationId: "ContainerArchiveInfo" + responses: + 200: + description: "no error" + headers: + X-Docker-Container-Path-Stat: + type: "string" + description: | + A base64 - encoded JSON object with some filesystem header + information about the path + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Container or path does not exist" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Resource in the container’s filesystem to archive." + type: "string" + tags: ["Container"] + get: + summary: "Get an archive of a filesystem resource in a container" + description: "Get a tar archive of a resource in the filesystem of container id." + operationId: "ContainerArchive" + produces: ["application/x-tar"] + responses: + 200: + description: "no error" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Container or path does not exist" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Resource in the container’s filesystem to archive." + type: "string" + tags: ["Container"] + put: + summary: "Extract an archive of files or folders to a directory in a container" + description: | + Upload a tar archive to be extracted to a path in the filesystem of container id. + `path` parameter is asserted to be a directory. If it exists as a file, 400 error + will be returned with message "not a directory". + operationId: "PutContainerArchive" + consumes: ["application/x-tar", "application/octet-stream"] + responses: + 200: + description: "The content was extracted successfully" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "not a directory" + 403: + description: "Permission denied, the volume or container rootfs is marked as read-only." + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "No such container or path does not exist inside the container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Path to a directory in the container to extract the archive’s contents into. " + type: "string" + - name: "noOverwriteDirNonDir" + in: "query" + description: | + If `1`, `true`, or `True` then it will be an error if unpacking the + given content would cause an existing directory to be replaced with + a non-directory and vice versa. + type: "string" + - name: "copyUIDGID" + in: "query" + description: | + If `1`, `true`, then it will copy UID/GID maps to the dest file or + dir + type: "string" + - name: "inputStream" + in: "body" + required: true + description: | + The input stream must be a tar archive compressed with one of the + following algorithms: `identity` (no compression), `gzip`, `bzip2`, + or `xz`. + schema: + type: "string" + format: "binary" + tags: ["Container"] + /containers/prune: + post: + summary: "Delete stopped containers" + produces: + - "application/json" + operationId: "ContainerPrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `until=` Prune containers created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune containers with (or without, in case `label!=...` is used) the specified labels. + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "ContainerPruneResponse" + properties: + ContainersDeleted: + description: "Container IDs that were deleted" + type: "array" + items: + type: "string" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Container"] + /images/json: + get: + summary: "List Images" + description: "Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image." + operationId: "ImageList" + produces: + - "application/json" + responses: + 200: + description: "Summary image data for the images matching the query" + schema: + type: "array" + items: + $ref: "#/definitions/ImageSummary" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "all" + in: "query" + description: "Show all images. Only images from a final layer (no children) are shown by default." + type: "boolean" + default: false + - name: "filters" + in: "query" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the images list. + + Available filters: + + - `before`=(`[:]`, `` or ``) + - `dangling=true` + - `label=key` or `label="key=value"` of an image label + - `reference`=(`[:]`) + - `since`=(`[:]`, `` or ``) + - `until=` + type: "string" + - name: "shared-size" + in: "query" + description: "Compute and show shared size as a `SharedSize` field on each image." + type: "boolean" + default: false + - name: "digests" + in: "query" + description: "Show digest information as a `RepoDigests` field on each image." + type: "boolean" + default: false + - name: "manifests" + in: "query" + description: "Include `Manifests` in the image summary." + type: "boolean" + default: false + tags: ["Image"] + /build: + post: + summary: "Build an image" + description: | + Build an image from a tar archive with a `Dockerfile` in it. + + The `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/). + + The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output. + + The build is canceled if the client drops the connection by quitting or being killed. + operationId: "ImageBuild" + consumes: + - "application/octet-stream" + produces: + - "application/json" + parameters: + - name: "inputStream" + in: "body" + description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." + schema: + type: "string" + format: "binary" + - name: "dockerfile" + in: "query" + description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`." + type: "string" + default: "Dockerfile" + - name: "t" + in: "query" + description: "A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters." + type: "string" + - name: "extrahosts" + in: "query" + description: "Extra hosts to add to /etc/hosts" + type: "string" + - name: "remote" + in: "query" + description: "A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball." + type: "string" + - name: "q" + in: "query" + description: "Suppress verbose build output." + type: "boolean" + default: false + - name: "nocache" + in: "query" + description: "Do not use the cache when building the image." + type: "boolean" + default: false + - name: "cachefrom" + in: "query" + description: "JSON array of images used for build cache resolution." + type: "string" + - name: "pull" + in: "query" + description: "Attempt to pull the image even if an older image exists locally." + type: "string" + - name: "rm" + in: "query" + description: "Remove intermediate containers after a successful build." + type: "boolean" + default: true + - name: "forcerm" + in: "query" + description: "Always remove intermediate containers, even upon failure." + type: "boolean" + default: false + - name: "memory" + in: "query" + description: "Set memory limit for build." + type: "integer" + - name: "memswap" + in: "query" + description: "Total memory (memory + swap). Set as `-1` to disable swap." + type: "integer" + - name: "cpushares" + in: "query" + description: "CPU shares (relative weight)." + type: "integer" + - name: "cpusetcpus" + in: "query" + description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)." + type: "string" + - name: "cpuperiod" + in: "query" + description: "The length of a CPU period in microseconds." + type: "integer" + - name: "cpuquota" + in: "query" + description: "Microseconds of CPU time that the container can get in a CPU period." + type: "integer" + - name: "buildargs" + in: "query" + description: > + JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker + uses the buildargs as the environment context for commands run via the `Dockerfile` RUN + instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for + passing secret values. + + + For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the + query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded. + + + [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) + type: "string" + - name: "shmsize" + in: "query" + description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." + type: "integer" + - name: "squash" + in: "query" + description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*" + type: "boolean" + - name: "labels" + in: "query" + description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs." + type: "string" + - name: "networkmode" + in: "query" + description: | + Sets the networking mode for the run commands during build. Supported + standard values are: `bridge`, `host`, `none`, and `container:`. + Any other value is taken as a custom network's name or ID to which this + container should connect to. + type: "string" + - name: "Content-type" + in: "header" + type: "string" + enum: + - "application/x-tar" + default: "application/x-tar" + - name: "X-Registry-Config" + in: "header" + description: | + This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. + + The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: + + ``` + { + "docker.example.com": { + "username": "janedoe", + "password": "hunter2" + }, + "https://index.docker.io/v1/": { + "username": "mobydock", + "password": "conta1n3rize14" + } + } + ``` + + Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API. + type: "string" + - name: "platform" + in: "query" + description: "Platform in the format os[/arch[/variant]]" + type: "string" + default: "" + - name: "target" + in: "query" + description: "Target build stage" + type: "string" + default: "" + - name: "outputs" + in: "query" + description: "BuildKit output configuration" + type: "string" + default: "" + - name: "version" + in: "query" + type: "string" + default: "1" + enum: ["1", "2"] + description: | + Version of the builder backend to use. + + - `1` is the first generation classic (deprecated) builder in the Docker daemon (default) + - `2` is [BuildKit](https://github.com/moby/buildkit) + responses: + 200: + description: "no error" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Image"] + /build/prune: + post: + summary: "Delete builder cache" + produces: + - "application/json" + operationId: "BuildPrune" + parameters: + - name: "keep-storage" + in: "query" + description: "Amount of disk space in bytes to keep for cache" + type: "integer" + format: "int64" + - name: "all" + in: "query" + type: "boolean" + description: "Remove all types of build cache" + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the list of build cache objects. + + Available filters: + + - `until=` remove cache older than ``. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon's local time. + - `id=` + - `parent=` + - `type=` + - `description=` + - `inuse` + - `shared` + - `private` + responses: + 200: + description: "No error" + schema: + type: "object" + title: "BuildPruneResponse" + properties: + CachesDeleted: + type: "array" + items: + description: "ID of build cache object" + type: "string" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Image"] + /images/create: + post: + summary: "Create an image" + description: "Pull or import an image." + operationId: "ImageCreate" + consumes: + - "text/plain" + - "application/octet-stream" + produces: + - "application/json" + responses: + 200: + description: "no error" + 404: + description: "repository does not exist or no read access" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "fromImage" + in: "query" + description: "Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed." + type: "string" + - name: "fromSrc" + in: "query" + description: "Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image." + type: "string" + - name: "repo" + in: "query" + description: "Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image." + type: "string" + - name: "tag" + in: "query" + description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled." + type: "string" + - name: "message" + in: "query" + description: "Set commit message for imported image." + type: "string" + - name: "inputImage" + in: "body" + description: "Image content if the value `-` has been specified in fromSrc query parameter" + schema: + type: "string" + required: false + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + - name: "changes" + in: "query" + description: | + Apply `Dockerfile` instructions to the image that is created, + for example: `changes=ENV DEBUG=true`. + Note that `ENV DEBUG=true` should be URI component encoded. + + Supported `Dockerfile` instructions: + `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR` + type: "array" + items: + type: "string" + - name: "platform" + in: "query" + description: | + Platform in the format os[/arch[/variant]]. + + When used in combination with the `fromImage` option, the daemon checks + if the given image is present in the local image cache with the given + OS and Architecture, and otherwise attempts to pull the image. If the + option is not set, the host's native OS and Architecture are used. + If the given image does not exist in the local image cache, the daemon + attempts to pull the image with the host's native OS and Architecture. + If the given image does exists in the local image cache, but its OS or + architecture does not match, a warning is produced. + + When used with the `fromSrc` option to import an image from an archive, + this option sets the platform information for the imported image. If + the option is not set, the host's native OS and Architecture are used + for the imported image. + type: "string" + default: "" + tags: ["Image"] + /images/{name}/json: + get: + summary: "Inspect an image" + description: "Return low-level information about an image." + operationId: "ImageInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/ImageInspect" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such image: someimage (tag: latest)" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or id" + type: "string" + required: true + tags: ["Image"] + /images/{name}/history: + get: + summary: "Get the history of an image" + description: "Return parent layers of an image." + operationId: "ImageHistory" + produces: ["application/json"] + responses: + 200: + description: "List of image layers" + schema: + type: "array" + items: + type: "object" + x-go-name: HistoryResponseItem + title: "HistoryResponseItem" + description: "individual image layer information in response to ImageHistory operation" + required: [Id, Created, CreatedBy, Tags, Size, Comment] + properties: + Id: + type: "string" + x-nullable: false + Created: + type: "integer" + format: "int64" + x-nullable: false + CreatedBy: + type: "string" + x-nullable: false + Tags: + type: "array" + items: + type: "string" + Size: + type: "integer" + format: "int64" + x-nullable: false + Comment: + type: "string" + x-nullable: false + examples: + application/json: + - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710" + Created: 1398108230 + CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /" + Tags: + - "ubuntu:lucid" + - "ubuntu:10.04" + Size: 182964289 + Comment: "" + - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8" + Created: 1398108222 + CreatedBy: "/bin/sh -c #(nop) MAINTAINER Tianon Gravi - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http://archive.ubuntu.com/ubuntu/" + Tags: [] + Size: 0 + Comment: "" + - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" + Created: 1371157430 + CreatedBy: "" + Tags: + - "scratch12:latest" + - "scratch:latest" + Size: 0 + Comment: "Imported from -" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + tags: ["Image"] + /images/{name}/push: + post: + summary: "Push an image" + description: | + Push an image to a registry. + + If you wish to push an image on to a private registry, that image must + already have a tag which references the registry. For example, + `registry.example.com/myimage:latest`. + + The push is cancelled if the HTTP connection is closed. + operationId: "ImagePush" + consumes: + - "application/octet-stream" + responses: + 200: + description: "No error" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + Name of the image to push. For example, `registry.example.com/myimage`. + The image must be present in the local image store with the same name. + + The name should be provided without tag; if a tag is provided, it + is ignored. For example, `registry.example.com/myimage:latest` is + considered equivalent to `registry.example.com/myimage`. + + Use the `tag` parameter to specify the tag to push. + type: "string" + required: true + - name: "tag" + in: "query" + description: | + Tag of the image to push. For example, `latest`. If no tag is provided, + all tags of the given image that are present in the local image store + are pushed. + type: "string" + - name: "platform" + type: "string" + in: "query" + description: | + JSON-encoded OCI platform to select the platform-variant to push. + If not provided, all available variants will attempt to be pushed. + + If the daemon provides a multi-platform image store, this selects + the platform-variant to push to the registry. If the image is + a single-platform image, or if the multi-platform image does not + provide a variant matching the given platform, an error is returned. + + Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + required: true + tags: ["Image"] + /images/{name}/tag: + post: + summary: "Tag an image" + description: "Tag an image so that it becomes part of a repository." + operationId: "ImageTag" + responses: + 201: + description: "No error" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID to tag." + type: "string" + required: true + - name: "repo" + in: "query" + description: "The repository to tag in. For example, `someuser/someimage`." + type: "string" + - name: "tag" + in: "query" + description: "The name of the new tag." + type: "string" + tags: ["Image"] + /images/{name}: + delete: + summary: "Remove an image" + description: | + Remove an image, along with any untagged parent images that were + referenced by that image. + + Images can't be removed if they have descendant images, are being + used by a running container or are being used by a build. + operationId: "ImageDelete" + produces: ["application/json"] + responses: + 200: + description: "The image was deleted successfully" + schema: + type: "array" + items: + $ref: "#/definitions/ImageDeleteResponseItem" + examples: + application/json: + - Untagged: "3e2f21a89f" + - Deleted: "3e2f21a89f" + - Deleted: "53b4f83ac9" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + - name: "force" + in: "query" + description: "Remove the image even if it is being used by stopped containers or has other tags" + type: "boolean" + default: false + - name: "noprune" + in: "query" + description: "Do not delete untagged parent images" + type: "boolean" + default: false + tags: ["Image"] + /images/search: + get: + summary: "Search images" + description: "Search for an image on Docker Hub." + operationId: "ImageSearch" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "array" + items: + type: "object" + title: "ImageSearchResponseItem" + properties: + description: + type: "string" + is_official: + type: "boolean" + is_automated: + description: | + Whether this repository has automated builds enabled. + +


+ + > **Deprecated**: This field is deprecated and will always be "false". + type: "boolean" + example: false + name: + type: "string" + star_count: + type: "integer" + examples: + application/json: + - description: "A minimal Docker image based on Alpine Linux with a complete package index and only 5 MB in size!" + is_official: true + is_automated: false + name: "alpine" + star_count: 10093 + - description: "Busybox base image." + is_official: true + is_automated: false + name: "Busybox base image." + star_count: 3037 + - description: "The PostgreSQL object-relational database system provides reliability and data integrity." + is_official: true + is_automated: false + name: "postgres" + star_count: 12408 + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "term" + in: "query" + description: "Term to search" + type: "string" + required: true + - name: "limit" + in: "query" + description: "Maximum number of results to return" + type: "integer" + - name: "filters" + in: "query" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: + + - `is-official=(true|false)` + - `stars=` Matches images that has at least 'number' stars. + type: "string" + tags: ["Image"] + /images/prune: + post: + summary: "Delete unused images" + produces: + - "application/json" + operationId: "ImagePrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: + + - `dangling=` When set to `true` (or `1`), prune only + unused *and* untagged images. When set to `false` + (or `0`), all unused images are pruned. + - `until=` Prune images created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune images with (or without, in case `label!=...` is used) the specified labels. + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "ImagePruneResponse" + properties: + ImagesDeleted: + description: "Images that were deleted" + type: "array" + items: + $ref: "#/definitions/ImageDeleteResponseItem" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Image"] + /auth: + post: + summary: "Check auth configuration" + description: | + Validate credentials for a registry and, if available, get an identity + token for accessing the registry without password. + operationId: "SystemAuth" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "An identity token was generated successfully." + schema: + type: "object" + title: "SystemAuthResponse" + required: [Status] + properties: + Status: + description: "The status of the authentication" + type: "string" + x-nullable: false + IdentityToken: + description: "An opaque token used to authenticate a user after a successful login" + type: "string" + x-nullable: false + examples: + application/json: + Status: "Login Succeeded" + IdentityToken: "9cbaf023786cd7..." + 204: + description: "No error" + 401: + description: "Auth error" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "authConfig" + in: "body" + description: "Authentication to check" + schema: + $ref: "#/definitions/AuthConfig" + tags: ["System"] + /info: + get: + summary: "Get system information" + operationId: "SystemInfo" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/SystemInfo" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["System"] + /version: + get: + summary: "Get version" + description: "Returns the version of Docker that is running and various information about the system that Docker is running on." + operationId: "SystemVersion" + produces: ["application/json"] + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/SystemVersion" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["System"] + /_ping: + get: + summary: "Ping" + description: "This is a dummy endpoint you can use to test if the server is accessible." + operationId: "SystemPing" + produces: ["text/plain"] + responses: + 200: + description: "no error" + schema: + type: "string" + example: "OK" + headers: + API-Version: + type: "string" + description: "Max API Version the server supports" + Builder-Version: + type: "string" + description: | + Default version of docker image builder + + The default on Linux is version "2" (BuildKit), but the daemon + can be configured to recommend version "1" (classic Builder). + Windows does not yet support BuildKit for native Windows images, + and uses "1" (classic builder) as a default. + + This value is a recommendation as advertised by the daemon, and + it is up to the client to choose which builder to use. + default: "2" + Docker-Experimental: + type: "boolean" + description: "If the server is running with experimental mode enabled" + Swarm: + type: "string" + enum: ["inactive", "pending", "error", "locked", "active/worker", "active/manager"] + description: | + Contains information about Swarm status of the daemon, + and if the daemon is acting as a manager or worker node. + default: "inactive" + Cache-Control: + type: "string" + default: "no-cache, no-store, must-revalidate" + Pragma: + type: "string" + default: "no-cache" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + headers: + Cache-Control: + type: "string" + default: "no-cache, no-store, must-revalidate" + Pragma: + type: "string" + default: "no-cache" + tags: ["System"] + head: + summary: "Ping" + description: "This is a dummy endpoint you can use to test if the server is accessible." + operationId: "SystemPingHead" + produces: ["text/plain"] + responses: + 200: + description: "no error" + schema: + type: "string" + example: "(empty)" + headers: + API-Version: + type: "string" + description: "Max API Version the server supports" + Builder-Version: + type: "string" + description: "Default version of docker image builder" + Docker-Experimental: + type: "boolean" + description: "If the server is running with experimental mode enabled" + Swarm: + type: "string" + enum: ["inactive", "pending", "error", "locked", "active/worker", "active/manager"] + description: | + Contains information about Swarm status of the daemon, + and if the daemon is acting as a manager or worker node. + default: "inactive" + Cache-Control: + type: "string" + default: "no-cache, no-store, must-revalidate" + Pragma: + type: "string" + default: "no-cache" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["System"] + /commit: + post: + summary: "Create a new image from a container" + operationId: "ImageCommit" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IdResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "containerConfig" + in: "body" + description: "The container configuration" + schema: + $ref: "#/definitions/ContainerConfig" + - name: "container" + in: "query" + description: "The ID or name of the container to commit" + type: "string" + - name: "repo" + in: "query" + description: "Repository name for the created image" + type: "string" + - name: "tag" + in: "query" + description: "Tag name for the create image" + type: "string" + - name: "comment" + in: "query" + description: "Commit message" + type: "string" + - name: "author" + in: "query" + description: "Author of the image (e.g., `John Hannibal Smith `)" + type: "string" + - name: "pause" + in: "query" + description: "Whether to pause the container before committing" + type: "boolean" + default: true + - name: "changes" + in: "query" + description: "`Dockerfile` instructions to apply while committing" + type: "string" + tags: ["Image"] + /events: + get: + summary: "Monitor events" + description: | + Stream real-time events from the server. + + Various objects within Docker report events when something happens to them. + + Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, `update`, and `prune` + + Images report these events: `create`, `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` + + Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune` + + Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune` + + The Docker daemon reports these events: `reload` + + Services report these events: `create`, `update`, and `remove` + + Nodes report these events: `create`, `update`, and `remove` + + Secrets report these events: `create`, `update`, and `remove` + + Configs report these events: `create`, `update`, and `remove` + + The Builder reports `prune` events + + operationId: "SystemEvents" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/EventMessage" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "since" + in: "query" + description: "Show events created since this timestamp then stream new events." + type: "string" + - name: "until" + in: "query" + description: "Show events created until this timestamp then stop streaming." + type: "string" + - name: "filters" + in: "query" + description: | + A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: + + - `config=` config name or ID + - `container=` container name or ID + - `daemon=` daemon name or ID + - `event=` event type + - `image=` image name or ID + - `label=` image or container label + - `network=` network name or ID + - `node=` node ID + - `plugin`= plugin name or ID + - `scope`= local or swarm + - `secret=` secret name or ID + - `service=` service name or ID + - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config` + - `volume=` volume name + type: "string" + tags: ["System"] + /system/df: + get: + summary: "Get data usage information" + operationId: "SystemDataUsage" + responses: + 200: + description: "no error" + schema: + type: "object" + title: "SystemDataUsageResponse" + properties: + LayersSize: + type: "integer" + format: "int64" + Images: + type: "array" + items: + $ref: "#/definitions/ImageSummary" + Containers: + type: "array" + items: + $ref: "#/definitions/ContainerSummary" + Volumes: + type: "array" + items: + $ref: "#/definitions/Volume" + BuildCache: + type: "array" + items: + $ref: "#/definitions/BuildCache" + example: + LayersSize: 1092588 + Images: + - + Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" + ParentId: "" + RepoTags: + - "busybox:latest" + RepoDigests: + - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6" + Created: 1466724217 + Size: 1092588 + SharedSize: 0 + Labels: {} + Containers: 1 + Containers: + - + Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148" + Names: + - "/top" + Image: "busybox" + ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" + Command: "top" + Created: 1472592424 + Ports: [] + SizeRootFs: 1092588 + Labels: {} + State: "exited" + Status: "Exited (0) 56 minutes ago" + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + IPAMConfig: null + Links: null + Aliases: null + NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92" + EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a" + Gateway: "172.18.0.1" + IPAddress: "172.18.0.2" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:12:00:02" + Mounts: [] + Volumes: + - + Name: "my-volume" + Driver: "local" + Mountpoint: "/var/lib/docker/volumes/my-volume/_data" + Labels: null + Scope: "local" + Options: null + UsageData: + Size: 10920104 + RefCount: 2 + BuildCache: + - + ID: "hw53o5aio51xtltp5xjp8v7fx" + Parents: [] + Type: "regular" + Description: "pulled from docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0" + InUse: false + Shared: true + Size: 0 + CreatedAt: "2021-06-28T13:31:01.474619385Z" + LastUsedAt: "2021-07-07T22:02:32.738075951Z" + UsageCount: 26 + - + ID: "ndlpt0hhvkqcdfkputsk4cq9c" + Parents: ["ndlpt0hhvkqcdfkputsk4cq9c"] + Type: "regular" + Description: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache" + InUse: false + Shared: true + Size: 51 + CreatedAt: "2021-06-28T13:31:03.002625487Z" + LastUsedAt: "2021-07-07T22:02:32.773909517Z" + UsageCount: 26 + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "type" + in: "query" + description: | + Object types, for which to compute and return data. + type: "array" + collectionFormat: multi + items: + type: "string" + enum: ["container", "image", "volume", "build-cache"] + tags: ["System"] + /images/{name}/get: + get: + summary: "Export an image" + description: | + Get a tarball containing all images and metadata for a repository. + + If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced. + + ### Image tarball format + + An image tarball contains one directory per image layer (named using its long ID), each containing these files: + + - `VERSION`: currently `1.0` - the file format version + - `json`: detailed layer information, similar to `docker inspect layer_id` + - `layer.tar`: A tarfile containing the filesystem changes in this layer + + The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. + + If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs. + + ```json + { + "hello-world": { + "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" + } + } + ``` + operationId: "ImageGet" + produces: + - "application/x-tar" + responses: + 200: + description: "no error" + schema: + type: "string" + format: "binary" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + tags: ["Image"] + /images/get: + get: + summary: "Export several images" + description: | + Get a tarball containing all images and metadata for several image + repositories. + + For each value of the `names` parameter: if it is a specific name and + tag (e.g. `ubuntu:latest`), then only that image (and its parents) are + returned; if it is an image ID, similarly only that image (and its parents) + are returned and there would be no names referenced in the 'repositories' + file for this image ID. + + For details on the format, see the [export image endpoint](#operation/ImageGet). + operationId: "ImageGetAll" + produces: + - "application/x-tar" + responses: + 200: + description: "no error" + schema: + type: "string" + format: "binary" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "names" + in: "query" + description: "Image names to filter by" + type: "array" + items: + type: "string" + tags: ["Image"] + /images/load: + post: + summary: "Import images" + description: | + Load a set of images and tags into a repository. + + For details on the format, see the [export image endpoint](#operation/ImageGet). + operationId: "ImageLoad" + consumes: + - "application/x-tar" + produces: + - "application/json" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "imagesTarball" + in: "body" + description: "Tar archive containing images" + schema: + type: "string" + format: "binary" + - name: "quiet" + in: "query" + description: "Suppress progress details during load." + type: "boolean" + default: false + tags: ["Image"] + /containers/{id}/exec: + post: + summary: "Create an exec instance" + description: "Run a command inside a running container." + operationId: "ContainerExec" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IdResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "container is paused" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "execConfig" + in: "body" + description: "Exec configuration" + schema: + type: "object" + title: "ExecConfig" + properties: + AttachStdin: + type: "boolean" + description: "Attach to `stdin` of the exec command." + AttachStdout: + type: "boolean" + description: "Attach to `stdout` of the exec command." + AttachStderr: + type: "boolean" + description: "Attach to `stderr` of the exec command." + ConsoleSize: + type: "array" + description: "Initial console size, as an `[height, width]` array." + x-nullable: true + minItems: 2 + maxItems: 2 + items: + type: "integer" + minimum: 0 + DetachKeys: + type: "string" + description: | + Override the key sequence for detaching a container. Format is + a single character `[a-Z]` or `ctrl-` where `` + is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + Tty: + type: "boolean" + description: "Allocate a pseudo-TTY." + Env: + description: | + A list of environment variables in the form `["VAR=value", ...]`. + type: "array" + items: + type: "string" + Cmd: + type: "array" + description: "Command to run, as a string or array of strings." + items: + type: "string" + Privileged: + type: "boolean" + description: "Runs the exec process with extended privileges." + default: false + User: + type: "string" + description: | + The user, and optionally, group to run the exec process inside + the container. Format is one of: `user`, `user:group`, `uid`, + or `uid:gid`. + WorkingDir: + type: "string" + description: | + The working directory for the exec process inside the container. + example: + AttachStdin: false + AttachStdout: true + AttachStderr: true + DetachKeys: "ctrl-p,ctrl-q" + Tty: false + Cmd: + - "date" + Env: + - "FOO=bar" + - "BAZ=quux" + required: true + - name: "id" + in: "path" + description: "ID or name of container" + type: "string" + required: true + tags: ["Exec"] + /exec/{id}/start: + post: + summary: "Start an exec instance" + description: | + Starts a previously set up exec instance. If detach is true, this endpoint + returns immediately after starting the command. Otherwise, it sets up an + interactive session with the command. + operationId: "ExecStart" + consumes: + - "application/json" + produces: + - "application/vnd.docker.raw-stream" + - "application/vnd.docker.multiplexed-stream" + responses: + 200: + description: "No error" + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Container is stopped or paused" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "execStartConfig" + in: "body" + schema: + type: "object" + title: "ExecStartConfig" + properties: + Detach: + type: "boolean" + description: "Detach from the command." + Tty: + type: "boolean" + description: "Allocate a pseudo-TTY." + ConsoleSize: + type: "array" + description: "Initial console size, as an `[height, width]` array." + x-nullable: true + minItems: 2 + maxItems: 2 + items: + type: "integer" + minimum: 0 + example: + Detach: false + Tty: true + ConsoleSize: [80, 64] + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + tags: ["Exec"] + /exec/{id}/resize: + post: + summary: "Resize an exec instance" + description: | + Resize the TTY session used by an exec instance. This endpoint only works + if `tty` was specified as part of creating and starting the exec instance. + operationId: "ExecResize" + responses: + 200: + description: "No error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + - name: "h" + in: "query" + required: true + description: "Height of the TTY session in characters" + type: "integer" + - name: "w" + in: "query" + required: true + description: "Width of the TTY session in characters" + type: "integer" + tags: ["Exec"] + /exec/{id}/json: + get: + summary: "Inspect an exec instance" + description: "Return low-level information about an exec instance." + operationId: "ExecInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "ExecInspectResponse" + properties: + CanRemove: + type: "boolean" + DetachKeys: + type: "string" + ID: + type: "string" + Running: + type: "boolean" + ExitCode: + type: "integer" + ProcessConfig: + $ref: "#/definitions/ProcessConfig" + OpenStdin: + type: "boolean" + OpenStderr: + type: "boolean" + OpenStdout: + type: "boolean" + ContainerID: + type: "string" + Pid: + type: "integer" + description: "The system process ID for the exec process." + examples: + application/json: + CanRemove: false + ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126" + DetachKeys: "" + ExitCode: 2 + ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b" + OpenStderr: true + OpenStdin: true + OpenStdout: true + ProcessConfig: + arguments: + - "-c" + - "exit 2" + entrypoint: "sh" + privileged: false + tty: true + user: "1000" + Running: false + Pid: 42000 + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + tags: ["Exec"] + + /volumes: + get: + summary: "List volumes" + operationId: "VolumeList" + produces: ["application/json"] + responses: + 200: + description: "Summary volume data that matches the query" + schema: + $ref: "#/definitions/VolumeListResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + JSON encoded value of the filters (a `map[string][]string`) to + process on the volumes list. Available filters: + + - `dangling=` When set to `true` (or `1`), returns all + volumes that are not in use by a container. When set to `false` + (or `0`), only volumes that are in use by one or more + containers are returned. + - `driver=` Matches volumes based on their driver. + - `label=` or `label=:` Matches volumes based on + the presence of a `label` alone or a `label` and a value. + - `name=` Matches all or part of a volume name. + type: "string" + format: "json" + tags: ["Volume"] + + /volumes/create: + post: + summary: "Create a volume" + operationId: "VolumeCreate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 201: + description: "The volume was created successfully" + schema: + $ref: "#/definitions/Volume" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "volumeConfig" + in: "body" + required: true + description: "Volume configuration" + schema: + $ref: "#/definitions/VolumeCreateOptions" + tags: ["Volume"] + + /volumes/{name}: + get: + summary: "Inspect a volume" + operationId: "VolumeInspect" + produces: ["application/json"] + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/Volume" + 404: + description: "No such volume" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + required: true + description: "Volume name or ID" + type: "string" + tags: ["Volume"] + + put: + summary: | + "Update a volume. Valid only for Swarm cluster volumes" + operationId: "VolumeUpdate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such volume" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "The name or ID of the volume" + type: "string" + required: true + - name: "body" + in: "body" + schema: + # though the schema for is an object that contains only a + # ClusterVolumeSpec, wrapping the ClusterVolumeSpec in this object + # means that if, later on, we support things like changing the + # labels, we can do so without duplicating that information to the + # ClusterVolumeSpec. + type: "object" + description: "Volume configuration" + properties: + Spec: + $ref: "#/definitions/ClusterVolumeSpec" + description: | + The spec of the volume to update. Currently, only Availability may + change. All other fields must remain unchanged. + - name: "version" + in: "query" + description: | + The version number of the volume being updated. This is required to + avoid conflicting writes. Found in the volume's `ClusterVolume` + field. + type: "integer" + format: "int64" + required: true + tags: ["Volume"] + + delete: + summary: "Remove a volume" + description: "Instruct the driver to remove the volume." + operationId: "VolumeDelete" + responses: + 204: + description: "The volume was removed" + 404: + description: "No such volume or volume driver" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Volume is in use and cannot be removed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + required: true + description: "Volume name or ID" + type: "string" + - name: "force" + in: "query" + description: "Force the removal of the volume" + type: "boolean" + default: false + tags: ["Volume"] + + /volumes/prune: + post: + summary: "Delete unused volumes" + produces: + - "application/json" + operationId: "VolumePrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune volumes with (or without, in case `label!=...` is used) the specified labels. + - `all` (`all=true`) - Consider all (local) volumes for pruning and not just anonymous volumes. + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "VolumePruneResponse" + properties: + VolumesDeleted: + description: "Volumes that were deleted" + type: "array" + items: + type: "string" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Volume"] + /networks: + get: + summary: "List networks" + description: | + Returns a list of networks. For details on the format, see the + [network inspect endpoint](#operation/NetworkInspect). + + Note that it uses a different, smaller representation of a network than + inspecting a single network. For example, the list of containers attached + to the network is not propagated in API versions 1.28 and up. + operationId: "NetworkList" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "array" + items: + $ref: "#/definitions/Network" + examples: + application/json: + - Name: "bridge" + Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566" + Created: "2016-10-19T06:21:00.416543526Z" + Scope: "local" + Driver: "bridge" + EnableIPv4: true + EnableIPv6: false + Internal: false + Attachable: false + Ingress: false + IPAM: + Driver: "default" + Config: + - + Subnet: "172.17.0.0/16" + Options: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + - Name: "none" + Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794" + Created: "0001-01-01T00:00:00Z" + Scope: "local" + Driver: "null" + EnableIPv4: false + EnableIPv6: false + Internal: false + Attachable: false + Ingress: false + IPAM: + Driver: "default" + Config: [] + Containers: {} + Options: {} + - Name: "host" + Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e" + Created: "0001-01-01T00:00:00Z" + Scope: "local" + Driver: "host" + EnableIPv4: false + EnableIPv6: false + Internal: false + Attachable: false + Ingress: false + IPAM: + Driver: "default" + Config: [] + Containers: {} + Options: {} + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + JSON encoded value of the filters (a `map[string][]string`) to process + on the networks list. + + Available filters: + + - `dangling=` When set to `true` (or `1`), returns all + networks that are not in use by a container. When set to `false` + (or `0`), only networks that are in use by one or more + containers are returned. + - `driver=` Matches a network's driver. + - `id=` Matches all or part of a network ID. + - `label=` or `label==` of a network label. + - `name=` Matches all or part of a network name. + - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`). + - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. + type: "string" + tags: ["Network"] + + /networks/{id}: + get: + summary: "Inspect a network" + operationId: "NetworkInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/Network" + 404: + description: "Network not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + - name: "verbose" + in: "query" + description: "Detailed inspect output for troubleshooting" + type: "boolean" + default: false + - name: "scope" + in: "query" + description: "Filter the network by scope (swarm, global, or local)" + type: "string" + tags: ["Network"] + + delete: + summary: "Remove a network" + operationId: "NetworkDelete" + responses: + 204: + description: "No error" + 403: + description: "operation not supported for pre-defined networks" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such network" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + tags: ["Network"] + + /networks/create: + post: + summary: "Create a network" + operationId: "NetworkCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "Network created successfully" + schema: + $ref: "#/definitions/NetworkCreateResponse" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 403: + description: | + Forbidden operation. This happens when trying to create a network named after a pre-defined network, + or when trying to create an overlay network on a daemon which is not part of a Swarm cluster. + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "plugin not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "networkConfig" + in: "body" + description: "Network configuration" + required: true + schema: + type: "object" + title: "NetworkCreateRequest" + required: ["Name"] + properties: + Name: + description: "The network's name." + type: "string" + example: "my_network" + Driver: + description: "Name of the network driver plugin to use." + type: "string" + default: "bridge" + example: "bridge" + Scope: + description: | + The level at which the network exists (e.g. `swarm` for cluster-wide + or `local` for machine level). + type: "string" + Internal: + description: "Restrict external access to the network." + type: "boolean" + Attachable: + description: | + Globally scoped network is manually attachable by regular + containers from workers in swarm mode. + type: "boolean" + example: true + Ingress: + description: | + Ingress network is the network which provides the routing-mesh + in swarm mode. + type: "boolean" + example: false + ConfigOnly: + description: | + Creates a config-only network. Config-only networks are placeholder + networks for network configurations to be used by other networks. + Config-only networks cannot be used directly to run containers + or services. + type: "boolean" + default: false + example: false + ConfigFrom: + description: | + Specifies the source which will provide the configuration for + this network. The specified network must be an existing + config-only network; see ConfigOnly. + $ref: "#/definitions/ConfigReference" + IPAM: + description: "Optional custom IP scheme for the network." + $ref: "#/definitions/IPAM" + EnableIPv4: + description: | + Enable IPv4 on the network. + To disable IPv4, the daemon must be started with experimental features enabled. + type: "boolean" + example: true + EnableIPv6: + description: "Enable IPv6 on the network." + type: "boolean" + example: true + Options: + description: "Network specific options to be used by the drivers." + type: "object" + additionalProperties: + type: "string" + example: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + tags: ["Network"] + + /networks/{id}/connect: + post: + summary: "Connect a container to a network" + description: "The network must be either a local-scoped network or a swarm-scoped network with the `attachable` option set. A network cannot be re-attached to a running container" + operationId: "NetworkConnect" + consumes: + - "application/json" + responses: + 200: + description: "No error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 403: + description: "Operation forbidden" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Network or container not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + - name: "container" + in: "body" + required: true + schema: + type: "object" + title: "NetworkConnectRequest" + properties: + Container: + type: "string" + description: "The ID or name of the container to connect to the network." + EndpointConfig: + $ref: "#/definitions/EndpointSettings" + example: + Container: "3613f73ba0e4" + EndpointConfig: + IPAMConfig: + IPv4Address: "172.24.56.89" + IPv6Address: "2001:db8::5689" + MacAddress: "02:42:ac:12:05:02" + tags: ["Network"] + + /networks/{id}/disconnect: + post: + summary: "Disconnect a container from a network" + operationId: "NetworkDisconnect" + consumes: + - "application/json" + responses: + 200: + description: "No error" + 403: + description: "Operation not supported for swarm scoped networks" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Network or container not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + - name: "container" + in: "body" + required: true + schema: + type: "object" + title: "NetworkDisconnectRequest" + properties: + Container: + type: "string" + description: | + The ID or name of the container to disconnect from the network. + Force: + type: "boolean" + description: | + Force the container to disconnect from the network. + tags: ["Network"] + /networks/prune: + post: + summary: "Delete unused networks" + produces: + - "application/json" + operationId: "NetworkPrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `until=` Prune networks created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune networks with (or without, in case `label!=...` is used) the specified labels. + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "NetworkPruneResponse" + properties: + NetworksDeleted: + description: "Networks that were deleted" + type: "array" + items: + type: "string" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Network"] + /plugins: + get: + summary: "List plugins" + operationId: "PluginList" + description: "Returns information about installed plugins." + produces: ["application/json"] + responses: + 200: + description: "No error" + schema: + type: "array" + items: + $ref: "#/definitions/Plugin" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the plugin list. + + Available filters: + + - `capability=` + - `enable=|` + tags: ["Plugin"] + + /plugins/privileges: + get: + summary: "Get plugin privileges" + operationId: "GetPluginPrivileges" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/PluginPrivilege" + example: + - Name: "network" + Description: "" + Value: + - "host" + - Name: "mount" + Description: "" + Value: + - "/data" + - Name: "device" + Description: "" + Value: + - "/dev/cpu_dma_latency" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "remote" + in: "query" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + tags: + - "Plugin" + + /plugins/pull: + post: + summary: "Install a plugin" + operationId: "PluginPull" + description: | + Pulls and installs a plugin. After the plugin is installed, it can be + enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). + produces: + - "application/json" + responses: + 204: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "remote" + in: "query" + description: | + Remote reference for plugin to install. + + The `:latest` tag is optional, and is used as the default if omitted. + required: true + type: "string" + - name: "name" + in: "query" + description: | + Local name for the pulled plugin. + + The `:latest` tag is optional, and is used as the default if omitted. + required: false + type: "string" + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration to use when pulling a plugin + from a registry. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + - name: "body" + in: "body" + schema: + type: "array" + items: + $ref: "#/definitions/PluginPrivilege" + example: + - Name: "network" + Description: "" + Value: + - "host" + - Name: "mount" + Description: "" + Value: + - "/data" + - Name: "device" + Description: "" + Value: + - "/dev/cpu_dma_latency" + tags: ["Plugin"] + /plugins/{name}/json: + get: + summary: "Inspect a plugin" + operationId: "PluginInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Plugin" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + tags: ["Plugin"] + /plugins/{name}: + delete: + summary: "Remove a plugin" + operationId: "PluginDelete" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Plugin" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "force" + in: "query" + description: | + Disable the plugin before removing. This may result in issues if the + plugin is in use by a container. + type: "boolean" + default: false + tags: ["Plugin"] + /plugins/{name}/enable: + post: + summary: "Enable a plugin" + operationId: "PluginEnable" + responses: + 200: + description: "no error" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "timeout" + in: "query" + description: "Set the HTTP client timeout (in seconds)" + type: "integer" + default: 0 + tags: ["Plugin"] + /plugins/{name}/disable: + post: + summary: "Disable a plugin" + operationId: "PluginDisable" + responses: + 200: + description: "no error" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "force" + in: "query" + description: | + Force disable a plugin even if still in use. + required: false + type: "boolean" + tags: ["Plugin"] + /plugins/{name}/upgrade: + post: + summary: "Upgrade a plugin" + operationId: "PluginUpgrade" + responses: + 204: + description: "no error" + 404: + description: "plugin not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "remote" + in: "query" + description: | + Remote reference to upgrade to. + + The `:latest` tag is optional, and is used as the default if omitted. + required: true + type: "string" + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration to use when pulling a plugin + from a registry. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + - name: "body" + in: "body" + schema: + type: "array" + items: + $ref: "#/definitions/PluginPrivilege" + example: + - Name: "network" + Description: "" + Value: + - "host" + - Name: "mount" + Description: "" + Value: + - "/data" + - Name: "device" + Description: "" + Value: + - "/dev/cpu_dma_latency" + tags: ["Plugin"] + /plugins/create: + post: + summary: "Create a plugin" + operationId: "PluginCreate" + consumes: + - "application/x-tar" + responses: + 204: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "query" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "tarContext" + in: "body" + description: "Path to tar containing plugin rootfs and manifest" + schema: + type: "string" + format: "binary" + tags: ["Plugin"] + /plugins/{name}/push: + post: + summary: "Push a plugin" + operationId: "PluginPush" + description: | + Push a plugin to the registry. + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + responses: + 200: + description: "no error" + 404: + description: "plugin not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Plugin"] + /plugins/{name}/set: + post: + summary: "Configure a plugin" + operationId: "PluginSet" + consumes: + - "application/json" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "body" + in: "body" + schema: + type: "array" + items: + type: "string" + example: ["DEBUG=1"] + responses: + 204: + description: "No error" + 404: + description: "Plugin not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Plugin"] + /nodes: + get: + summary: "List nodes" + operationId: "NodeList" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Node" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `id=` + - `label=` + - `membership=`(`accepted`|`pending`)` + - `name=` + - `node.label=` + - `role=`(`manager`|`worker`)` + type: "string" + tags: ["Node"] + /nodes/{id}: + get: + summary: "Inspect a node" + operationId: "NodeInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Node" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID or name of the node" + type: "string" + required: true + tags: ["Node"] + delete: + summary: "Delete a node" + operationId: "NodeDelete" + responses: + 200: + description: "no error" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID or name of the node" + type: "string" + required: true + - name: "force" + in: "query" + description: "Force remove a node from the swarm" + default: false + type: "boolean" + tags: ["Node"] + /nodes/{id}/update: + post: + summary: "Update a node" + operationId: "NodeUpdate" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID of the node" + type: "string" + required: true + - name: "body" + in: "body" + schema: + $ref: "#/definitions/NodeSpec" + - name: "version" + in: "query" + description: | + The version number of the node object being updated. This is required + to avoid conflicting writes. + type: "integer" + format: "int64" + required: true + tags: ["Node"] + /swarm: + get: + summary: "Inspect swarm" + operationId: "SwarmInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Swarm" + 404: + description: "no such swarm" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Swarm"] + /swarm/init: + post: + summary: "Initialize a new swarm" + operationId: "SwarmInit" + produces: + - "application/json" + - "text/plain" + responses: + 200: + description: "no error" + schema: + description: "The node ID" + type: "string" + example: "7v2t30z9blmxuhnyo6s4cpenp" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is already part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + type: "object" + title: "SwarmInitRequest" + properties: + ListenAddr: + description: | + Listen address used for inter-manager communication, as well + as determining the networking interface used for the VXLAN + Tunnel Endpoint (VTEP). This can either be an address/port + combination in the form `192.168.1.1:4567`, or an interface + followed by a port number, like `eth0:4567`. If the port number + is omitted, the default swarm listening port is used. + type: "string" + AdvertiseAddr: + description: | + Externally reachable address advertised to other nodes. This + can either be an address/port combination in the form + `192.168.1.1:4567`, or an interface followed by a port number, + like `eth0:4567`. If the port number is omitted, the port + number from the listen address is used. If `AdvertiseAddr` is + not specified, it will be automatically detected when possible. + type: "string" + DataPathAddr: + description: | + Address or interface to use for data path traffic (format: + ``), for example, `192.168.1.1`, or an interface, + like `eth0`. If `DataPathAddr` is unspecified, the same address + as `AdvertiseAddr` is used. + + The `DataPathAddr` specifies the address that global scope + network drivers will publish towards other nodes in order to + reach the containers running on this node. Using this parameter + it is possible to separate the container data traffic from the + management traffic of the cluster. + type: "string" + DataPathPort: + description: | + DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + if no port is set or is set to 0, default port 4789 will be used. + type: "integer" + format: "uint32" + DefaultAddrPool: + description: | + Default Address Pool specifies default subnet pools for global + scope networks. + type: "array" + items: + type: "string" + example: ["10.10.0.0/16", "20.20.0.0/16"] + ForceNewCluster: + description: "Force creation of a new swarm." + type: "boolean" + SubnetSize: + description: | + SubnetSize specifies the subnet size of the networks created + from the default subnet pool. + type: "integer" + format: "uint32" + Spec: + $ref: "#/definitions/SwarmSpec" + example: + ListenAddr: "0.0.0.0:2377" + AdvertiseAddr: "192.168.1.1:2377" + DataPathPort: 4789 + DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"] + SubnetSize: 24 + ForceNewCluster: false + Spec: + Orchestration: {} + Raft: {} + Dispatcher: {} + CAConfig: {} + EncryptionConfig: + AutoLockManagers: false + tags: ["Swarm"] + /swarm/join: + post: + summary: "Join an existing swarm" + operationId: "SwarmJoin" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is already part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + type: "object" + title: "SwarmJoinRequest" + properties: + ListenAddr: + description: | + Listen address used for inter-manager communication if the node + gets promoted to manager, as well as determining the networking + interface used for the VXLAN Tunnel Endpoint (VTEP). + type: "string" + AdvertiseAddr: + description: | + Externally reachable address advertised to other nodes. This + can either be an address/port combination in the form + `192.168.1.1:4567`, or an interface followed by a port number, + like `eth0:4567`. If the port number is omitted, the port + number from the listen address is used. If `AdvertiseAddr` is + not specified, it will be automatically detected when possible. + type: "string" + DataPathAddr: + description: | + Address or interface to use for data path traffic (format: + ``), for example, `192.168.1.1`, or an interface, + like `eth0`. If `DataPathAddr` is unspecified, the same address + as `AdvertiseAddr` is used. + + The `DataPathAddr` specifies the address that global scope + network drivers will publish towards other nodes in order to + reach the containers running on this node. Using this parameter + it is possible to separate the container data traffic from the + management traffic of the cluster. + + type: "string" + RemoteAddrs: + description: | + Addresses of manager nodes already participating in the swarm. + type: "array" + items: + type: "string" + JoinToken: + description: "Secret token for joining this swarm." + type: "string" + example: + ListenAddr: "0.0.0.0:2377" + AdvertiseAddr: "192.168.1.1:2377" + RemoteAddrs: + - "node1:2377" + JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" + tags: ["Swarm"] + /swarm/leave: + post: + summary: "Leave a swarm" + operationId: "SwarmLeave" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "force" + description: | + Force leave swarm, even if this is the last manager or that it will + break the cluster. + in: "query" + type: "boolean" + default: false + tags: ["Swarm"] + /swarm/update: + post: + summary: "Update a swarm" + operationId: "SwarmUpdate" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + $ref: "#/definitions/SwarmSpec" + - name: "version" + in: "query" + description: | + The version number of the swarm object being updated. This is + required to avoid conflicting writes. + type: "integer" + format: "int64" + required: true + - name: "rotateWorkerToken" + in: "query" + description: "Rotate the worker join token." + type: "boolean" + default: false + - name: "rotateManagerToken" + in: "query" + description: "Rotate the manager join token." + type: "boolean" + default: false + - name: "rotateManagerUnlockKey" + in: "query" + description: "Rotate the manager unlock key." + type: "boolean" + default: false + tags: ["Swarm"] + /swarm/unlockkey: + get: + summary: "Get the unlock key" + operationId: "SwarmUnlockkey" + consumes: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + title: "UnlockKeyResponse" + properties: + UnlockKey: + description: "The swarm's unlock key." + type: "string" + example: + UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Swarm"] + /swarm/unlock: + post: + summary: "Unlock a locked manager" + operationId: "SwarmUnlock" + consumes: + - "application/json" + produces: + - "application/json" + parameters: + - name: "body" + in: "body" + required: true + schema: + type: "object" + title: "SwarmUnlockRequest" + properties: + UnlockKey: + description: "The swarm's unlock key." + type: "string" + example: + UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Swarm"] + /services: + get: + summary: "List services" + operationId: "ServiceList" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Service" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the services list. + + Available filters: + + - `id=` + - `label=` + - `mode=["replicated"|"global"]` + - `name=` + - name: "status" + in: "query" + type: "boolean" + description: | + Include service status, with count of running and desired tasks. + tags: ["Service"] + /services/create: + post: + summary: "Create a service" + operationId: "ServiceCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/ServiceCreateResponse" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 403: + description: "network is not eligible for services" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "name conflicts with an existing service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/ServiceSpec" + - type: "object" + example: + Name: "web" + TaskTemplate: + ContainerSpec: + Image: "nginx:alpine" + Mounts: + - + ReadOnly: true + Source: "web-data" + Target: "/usr/share/nginx/html" + Type: "volume" + VolumeOptions: + DriverConfig: {} + Labels: + com.example.something: "something-value" + Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"] + User: "33" + DNSConfig: + Nameservers: ["8.8.8.8"] + Search: ["example.org"] + Options: ["timeout:3"] + Secrets: + - + File: + Name: "www.example.org.key" + UID: "33" + GID: "33" + Mode: 384 + SecretID: "fpjqlhnwb19zds35k8wn80lq9" + SecretName: "example_org_domain_key" + OomScoreAdj: 0 + LogDriver: + Name: "json-file" + Options: + max-file: "3" + max-size: "10M" + Placement: {} + Resources: + Limits: + MemoryBytes: 104857600 + Reservations: {} + RestartPolicy: + Condition: "on-failure" + Delay: 10000000000 + MaxAttempts: 10 + Mode: + Replicated: + Replicas: 4 + UpdateConfig: + Parallelism: 2 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + RollbackConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + EndpointSpec: + Ports: + - + Protocol: "tcp" + PublishedPort: 8080 + TargetPort: 80 + Labels: + foo: "bar" + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration for pulling from private + registries. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + tags: ["Service"] + /services/{id}: + get: + summary: "Inspect a service" + operationId: "ServiceInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Service" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + - name: "insertDefaults" + in: "query" + description: "Fill empty fields with default values." + type: "boolean" + default: false + tags: ["Service"] + delete: + summary: "Delete a service" + operationId: "ServiceDelete" + responses: + 200: + description: "no error" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + tags: ["Service"] + /services/{id}/update: + post: + summary: "Update a service" + operationId: "ServiceUpdate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/ServiceUpdateResponse" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + - name: "body" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/ServiceSpec" + - type: "object" + example: + Name: "top" + TaskTemplate: + ContainerSpec: + Image: "busybox" + Args: + - "top" + OomScoreAdj: 0 + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ForceUpdate: 0 + Mode: + Replicated: + Replicas: 1 + UpdateConfig: + Parallelism: 2 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + RollbackConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + EndpointSpec: + Mode: "vip" + + - name: "version" + in: "query" + description: | + The version number of the service object being updated. This is + required to avoid conflicting writes. + This version number should be the value as currently set on the + service *before* the update. You can find the current version by + calling `GET /services/{id}` + required: true + type: "integer" + - name: "registryAuthFrom" + in: "query" + description: | + If the `X-Registry-Auth` header is not specified, this parameter + indicates where to find registry authorization credentials. + type: "string" + enum: ["spec", "previous-spec"] + default: "spec" + - name: "rollback" + in: "query" + description: | + Set to this parameter to `previous` to cause a server-side rollback + to the previous service spec. The supplied spec will be ignored in + this case. + type: "string" + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration for pulling from private + registries. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + + tags: ["Service"] + /services/{id}/logs: + get: + summary: "Get service logs" + description: | + Get `stdout` and `stderr` logs from a service. See also + [`/containers/{id}/logs`](#operation/ContainerLogs). + + **Note**: This endpoint works only for services with the `local`, + `json-file` or `journald` logging drivers. + produces: + - "application/vnd.docker.raw-stream" + - "application/vnd.docker.multiplexed-stream" + operationId: "ServiceLogs" + responses: + 200: + description: "logs returned as a stream in response body" + schema: + type: "string" + format: "binary" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such service: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the service" + type: "string" + - name: "details" + in: "query" + description: "Show service context and extra details provided to logs." + type: "boolean" + default: false + - name: "follow" + in: "query" + description: "Keep connection after returning logs." + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Return logs from `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Return logs from `stderr`" + type: "boolean" + default: false + - name: "since" + in: "query" + description: "Only return logs since this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "timestamps" + in: "query" + description: "Add timestamps to every log line" + type: "boolean" + default: false + - name: "tail" + in: "query" + description: | + Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + type: "string" + default: "all" + tags: ["Service"] + /tasks: + get: + summary: "List tasks" + operationId: "TaskList" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Task" + example: + - ID: "0kzzo1i0y4jz6027t0k7aezc7" + Version: + Index: 71 + CreatedAt: "2016-06-07T21:07:31.171892745Z" + UpdatedAt: "2016-06-07T21:07:31.376370513Z" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:31.290032978Z" + State: "running" + Message: "started" + ContainerStatus: + ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" + PID: 677 + DesiredState: "running" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.10/16" + - ID: "1yljwbmlr8er2waf8orvqpwms" + Version: + Index: 30 + CreatedAt: "2016-06-07T21:07:30.019104782Z" + UpdatedAt: "2016-06-07T21:07:30.231958098Z" + Name: "hopeful_cori" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:30.202183143Z" + State: "shutdown" + Message: "shutdown" + ContainerStatus: + ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213" + DesiredState: "shutdown" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.5/16" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the tasks list. + + Available filters: + + - `desired-state=(running | shutdown | accepted)` + - `id=` + - `label=key` or `label="key=value"` + - `name=` + - `node=` + - `service=` + tags: ["Task"] + /tasks/{id}: + get: + summary: "Inspect a task" + operationId: "TaskInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Task" + 404: + description: "no such task" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID of the task" + required: true + type: "string" + tags: ["Task"] + /tasks/{id}/logs: + get: + summary: "Get task logs" + description: | + Get `stdout` and `stderr` logs from a task. + See also [`/containers/{id}/logs`](#operation/ContainerLogs). + + **Note**: This endpoint works only for services with the `local`, + `json-file` or `journald` logging drivers. + operationId: "TaskLogs" + produces: + - "application/vnd.docker.raw-stream" + - "application/vnd.docker.multiplexed-stream" + responses: + 200: + description: "logs returned as a stream in response body" + schema: + type: "string" + format: "binary" + 404: + description: "no such task" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such task: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID of the task" + type: "string" + - name: "details" + in: "query" + description: "Show task context and extra details provided to logs." + type: "boolean" + default: false + - name: "follow" + in: "query" + description: "Keep connection after returning logs." + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Return logs from `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Return logs from `stderr`" + type: "boolean" + default: false + - name: "since" + in: "query" + description: "Only return logs since this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "timestamps" + in: "query" + description: "Add timestamps to every log line" + type: "boolean" + default: false + - name: "tail" + in: "query" + description: | + Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + type: "string" + default: "all" + tags: ["Task"] + /secrets: + get: + summary: "List secrets" + operationId: "SecretList" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Secret" + example: + - ID: "blt1owaxmitz71s9v5zh81zun" + Version: + Index: 85 + CreatedAt: "2017-07-20T13:55:28.678958722Z" + UpdatedAt: "2017-07-20T13:55:28.678958722Z" + Spec: + Name: "mysql-passwd" + Labels: + some.label: "some.value" + Driver: + Name: "secret-bucket" + Options: + OptionA: "value for driver option A" + OptionB: "value for driver option B" + - ID: "ktnbjxoalbkvbvedmg1urrz8h" + Version: + Index: 11 + CreatedAt: "2016-11-05T01:20:17.327670065Z" + UpdatedAt: "2016-11-05T01:20:17.327670065Z" + Spec: + Name: "app-dev.crt" + Labels: + foo: "bar" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the secrets list. + + Available filters: + + - `id=` + - `label= or label==value` + - `name=` + - `names=` + tags: ["Secret"] + /secrets/create: + post: + summary: "Create a secret" + operationId: "SecretCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IdResponse" + 409: + description: "name conflicts with an existing object" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + schema: + allOf: + - $ref: "#/definitions/SecretSpec" + - type: "object" + example: + Name: "app-key.crt" + Labels: + foo: "bar" + Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" + Driver: + Name: "secret-bucket" + Options: + OptionA: "value for driver option A" + OptionB: "value for driver option B" + tags: ["Secret"] + /secrets/{id}: + get: + summary: "Inspect a secret" + operationId: "SecretInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Secret" + examples: + application/json: + ID: "ktnbjxoalbkvbvedmg1urrz8h" + Version: + Index: 11 + CreatedAt: "2016-11-05T01:20:17.327670065Z" + UpdatedAt: "2016-11-05T01:20:17.327670065Z" + Spec: + Name: "app-dev.crt" + Labels: + foo: "bar" + Driver: + Name: "secret-bucket" + Options: + OptionA: "value for driver option A" + OptionB: "value for driver option B" + + 404: + description: "secret not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + description: "ID of the secret" + tags: ["Secret"] + delete: + summary: "Delete a secret" + operationId: "SecretDelete" + produces: + - "application/json" + responses: + 204: + description: "no error" + 404: + description: "secret not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + description: "ID of the secret" + tags: ["Secret"] + /secrets/{id}/update: + post: + summary: "Update a Secret" + operationId: "SecretUpdate" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such secret" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID or name of the secret" + type: "string" + required: true + - name: "body" + in: "body" + schema: + $ref: "#/definitions/SecretSpec" + description: | + The spec of the secret to update. Currently, only the Labels field + can be updated. All other fields must remain unchanged from the + [SecretInspect endpoint](#operation/SecretInspect) response values. + - name: "version" + in: "query" + description: | + The version number of the secret object being updated. This is + required to avoid conflicting writes. + type: "integer" + format: "int64" + required: true + tags: ["Secret"] + /configs: + get: + summary: "List configs" + operationId: "ConfigList" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Config" + example: + - ID: "ktnbjxoalbkvbvedmg1urrz8h" + Version: + Index: 11 + CreatedAt: "2016-11-05T01:20:17.327670065Z" + UpdatedAt: "2016-11-05T01:20:17.327670065Z" + Spec: + Name: "server.conf" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the configs list. + + Available filters: + + - `id=` + - `label= or label==value` + - `name=` + - `names=` + tags: ["Config"] + /configs/create: + post: + summary: "Create a config" + operationId: "ConfigCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IdResponse" + 409: + description: "name conflicts with an existing object" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + schema: + allOf: + - $ref: "#/definitions/ConfigSpec" + - type: "object" + example: + Name: "server.conf" + Labels: + foo: "bar" + Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" + tags: ["Config"] + /configs/{id}: + get: + summary: "Inspect a config" + operationId: "ConfigInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Config" + examples: + application/json: + ID: "ktnbjxoalbkvbvedmg1urrz8h" + Version: + Index: 11 + CreatedAt: "2016-11-05T01:20:17.327670065Z" + UpdatedAt: "2016-11-05T01:20:17.327670065Z" + Spec: + Name: "app-dev.crt" + 404: + description: "config not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + description: "ID of the config" + tags: ["Config"] + delete: + summary: "Delete a config" + operationId: "ConfigDelete" + produces: + - "application/json" + responses: + 204: + description: "no error" + 404: + description: "config not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + description: "ID of the config" + tags: ["Config"] + /configs/{id}/update: + post: + summary: "Update a Config" + operationId: "ConfigUpdate" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such config" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID or name of the config" + type: "string" + required: true + - name: "body" + in: "body" + schema: + $ref: "#/definitions/ConfigSpec" + description: | + The spec of the config to update. Currently, only the Labels field + can be updated. All other fields must remain unchanged from the + [ConfigInspect endpoint](#operation/ConfigInspect) response values. + - name: "version" + in: "query" + description: | + The version number of the config object being updated. This is + required to avoid conflicting writes. + type: "integer" + format: "int64" + required: true + tags: ["Config"] + /distribution/{name}/json: + get: + summary: "Get image information from the registry" + description: | + Return image digest and platform information by contacting the registry. + operationId: "DistributionInspect" + produces: + - "application/json" + responses: + 200: + description: "descriptor and platform information" + schema: + $ref: "#/definitions/DistributionInspect" + 401: + description: "Failed authentication or no image found" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such image: someimage (tag: latest)" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or id" + type: "string" + required: true + tags: ["Distribution"] + /session: + post: + summary: "Initialize interactive session" + description: | + Start a new interactive session with a server. Session allows server to + call back to the client for advanced capabilities. + + ### Hijacking + + This endpoint hijacks the HTTP connection to HTTP2 transport that allows + the client to expose gPRC services on that connection. + + For example, the client sends this request to upgrade the connection: + + ``` + POST /session HTTP/1.1 + Upgrade: h2c + Connection: Upgrade + ``` + + The Docker daemon responds with a `101 UPGRADED` response follow with + the raw stream: + + ``` + HTTP/1.1 101 UPGRADED + Connection: Upgrade + Upgrade: h2c + ``` + operationId: "Session" + produces: + - "application/vnd.docker.raw-stream" + responses: + 101: + description: "no error, hijacking successful" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Session"] From 671ba031e56e334d8724b83213b9132b44803d94 Mon Sep 17 00:00:00 2001 From: Eugene Kazakov Date: Thu, 9 Jan 2025 18:41:32 +0100 Subject: [PATCH 4/5] Get rid of abandoned php-http/message-factory --- composer.json | 4 +--- src/Docker.php | 1 - src/DockerClient.php | 4 ++-- src/SocketClient/Client.php | 4 ++-- src/SocketClient/ResponseReader.php | 12 ++++++++---- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 650a0a09d..e5547dc78 100644 --- a/composer.json +++ b/composer.json @@ -18,12 +18,10 @@ "php": ">=8.2", "symfony/filesystem": "^6.3", "symfony/process": "^6.3", - "php-http/client-common": "^2.5", - "php-http/message": "^1.16", + "php-http/client-common": "^2.7", "guzzlehttp/psr7": "^2.6", "symfony/serializer": "^6.3", "symfony/options-resolver": "^6.3", - "php-http/message-factory": "^1.1", "jane-php/open-api-runtime": "^7.8" }, "require-dev": { diff --git a/src/Docker.php b/src/Docker.php index 8666521a0..9fb9c3240 100644 --- a/src/Docker.php +++ b/src/Docker.php @@ -2,7 +2,6 @@ namespace Docker; -use Docker\API\Client; use Docker\Manager\{ContainerManager, ExecManager, ImageManager, diff --git a/src/DockerClient.php b/src/DockerClient.php index 0b9f399ce..2b5be5d8a 100644 --- a/src/DockerClient.php +++ b/src/DockerClient.php @@ -2,13 +2,13 @@ namespace Docker; use GuzzleHttp\Psr7\Uri; +use GuzzleHttp\Psr7\HttpFactory; use Http\Client\Common\Plugin\{ AddHostPlugin, ContentLengthPlugin, DecoderPlugin, ErrorPlugin }; -use Http\Message\MessageFactory\GuzzleMessageFactory; use Http\Client\Common\PluginClient; use Docker\SocketClient\Client as SocketHttpClient; use Psr\Http\Message\RequestInterface; @@ -21,7 +21,7 @@ class DockerClient implements ClientInterface public function __construct($socketClientOptions = []) { - $socketClient = new SocketHttpClient(new GuzzleMessageFactory(), $socketClientOptions); + $socketClient = new SocketHttpClient(new HttpFactory(), $socketClientOptions); $host = preg_match('/unix:\/\//', $socketClientOptions['remote_socket']) ? 'http://localhost' : $socketClientOptions['remote_socket']; $this->httpClient = new PluginClient($socketClient, [ diff --git a/src/SocketClient/Client.php b/src/SocketClient/Client.php index 957ee3765..bf74073e9 100644 --- a/src/SocketClient/Client.php +++ b/src/SocketClient/Client.php @@ -7,10 +7,10 @@ use Docker\SocketClient\Exception\SSLConnectionException; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ResponseFactoryInterface; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; use Psr\Http\Client\ClientInterface; -use Http\Message\MessageFactory; /** * Socket Http Client. @@ -48,7 +48,7 @@ class Client implements ClientInterface * @var int $ssl_method Crypto method for ssl/tls, see PHP doc, defaults to STREAM_CRYPTO_METHOD_TLS_CLIENT * } */ - public function __construct(MessageFactory $responseFactory, array $config = []) + public function __construct(ResponseFactoryInterface $responseFactory, array $config = []) { $this->responseFactory = $responseFactory; $this->config = $this->configure($config); diff --git a/src/SocketClient/ResponseReader.php b/src/SocketClient/ResponseReader.php index 29b45bf50..67d77481e 100644 --- a/src/SocketClient/ResponseReader.php +++ b/src/SocketClient/ResponseReader.php @@ -4,9 +4,9 @@ use Docker\SocketClient\Exception\BrokenPipeException; use Docker\SocketClient\Exception\TimeoutException; -use Http\Message\MessageFactory; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ResponseFactoryInterface; /** * Method for reading response. @@ -18,9 +18,9 @@ trait ResponseReader { /** - * @var MessageFactory For creating response + * @var ResponseFactoryInterface For creating response */ - protected MessageFactory $responseFactory; + protected ResponseFactoryInterface $responseFactory; /** * Read a response from a socket. @@ -79,7 +79,11 @@ protected function readResponse(RequestInterface $request, $socket): ResponseInt : ''; } - $response = $this->responseFactory->createResponse($status, $reason, $responseHeaders, null, $protocol); + $response = $this->responseFactory->createResponse($status, $reason); + $response = $response->withProtocolVersion($protocol); + foreach ($responseHeaders as $name => $values) { + $response = $response->withAddedHeader($name, $values); + } $stream = $this->createStream($socket, $response); return $response->withBody($stream); From b996db2d71b23cfb70cb9a8e1075026e88e759d4 Mon Sep 17 00:00:00 2001 From: Valentin Deville Date: Fri, 31 Jan 2025 16:04:02 +0100 Subject: [PATCH 5/5] Allow symfony/process version 7 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index e5547dc78..fcba0b295 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "require": { "php": ">=8.2", "symfony/filesystem": "^6.3", - "symfony/process": "^6.3", + "symfony/process": "^6.3|^7.0", "php-http/client-common": "^2.7", "guzzlehttp/psr7": "^2.6", "symfony/serializer": "^6.3",