From 0716265b26bc6d35a2364a12d6766dec490fd2f1 Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Tue, 12 Feb 2019 00:30:42 -0500 Subject: [PATCH] reservation => reservations --- src/Model/TaskSpecResources.php | 12 ++++++------ src/Normalizer/TaskSpecResourcesNormalizer.php | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Model/TaskSpecResources.php b/src/Model/TaskSpecResources.php index a3f83e74..63852e9a 100644 --- a/src/Model/TaskSpecResources.php +++ b/src/Model/TaskSpecResources.php @@ -23,7 +23,7 @@ class TaskSpecResources * * @var ResourceObject */ - protected $reservation; + protected $reservations; /** * An object describing the resources which can be advertised by a node and requested by a task. @@ -54,21 +54,21 @@ public function setLimits(?ResourceObject $limits): self * * @return ResourceObject */ - public function getReservation(): ?ResourceObject + public function getReservations(): ?ResourceObject { - return $this->reservation; + return $this->reservations; } /** * An object describing the resources which can be advertised by a node and requested by a task. * - * @param ResourceObject $reservation + * @param ResourceObject $reservations * * @return self */ - public function setReservation(?ResourceObject $reservation): self + public function setReservations(?ResourceObject $reservations): self { - $this->reservation = $reservation; + $this->reservations = $reservations; return $this; } diff --git a/src/Normalizer/TaskSpecResourcesNormalizer.php b/src/Normalizer/TaskSpecResourcesNormalizer.php index a8b7e0fc..330b1b4b 100644 --- a/src/Normalizer/TaskSpecResourcesNormalizer.php +++ b/src/Normalizer/TaskSpecResourcesNormalizer.php @@ -41,8 +41,8 @@ public function denormalize($data, $class, $format = null, array $context = []) if (property_exists($data, 'Limits') && $data->{'Limits'} !== null) { $object->setLimits($this->denormalizer->denormalize($data->{'Limits'}, 'Docker\\API\\Model\\ResourceObject', 'json', $context)); } - if (property_exists($data, 'Reservation') && $data->{'Reservation'} !== null) { - $object->setReservation($this->denormalizer->denormalize($data->{'Reservation'}, 'Docker\\API\\Model\\ResourceObject', 'json', $context)); + if (property_exists($data, 'Reservations') && $data->{'Reservations'} !== null) { + $object->setReservations($this->denormalizer->denormalize($data->{'Reservations'}, 'Docker\\API\\Model\\ResourceObject', 'json', $context)); } return $object; @@ -54,8 +54,8 @@ public function normalize($object, $format = null, array $context = []) if (null !== $object->getLimits()) { $data->{'Limits'} = $this->normalizer->normalize($object->getLimits(), 'json', $context); } - if (null !== $object->getReservation()) { - $data->{'Reservation'} = $this->normalizer->normalize($object->getReservation(), 'json', $context); + if (null !== $object->getReservations()) { + $data->{'Reservations'} = $this->normalizer->normalize($object->getReservations(), 'json', $context); } return $data;