Skip to content

Commit 059b731

Browse files
authored
Merge pull request #3 from clwells/reservation-fix
reservation => reservations
2 parents 93bf8a3 + 0716265 commit 059b731

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/Model/TaskSpecResources.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class TaskSpecResources
2323
*
2424
* @var ResourceObject
2525
*/
26-
protected $reservation;
26+
protected $reservations;
2727

2828
/**
2929
* 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
5454
*
5555
* @return ResourceObject
5656
*/
57-
public function getReservation(): ?ResourceObject
57+
public function getReservations(): ?ResourceObject
5858
{
59-
return $this->reservation;
59+
return $this->reservations;
6060
}
6161

6262
/**
6363
* An object describing the resources which can be advertised by a node and requested by a task.
6464
*
65-
* @param ResourceObject $reservation
65+
* @param ResourceObject $reservations
6666
*
6767
* @return self
6868
*/
69-
public function setReservation(?ResourceObject $reservation): self
69+
public function setReservations(?ResourceObject $reservations): self
7070
{
71-
$this->reservation = $reservation;
71+
$this->reservations = $reservations;
7272

7373
return $this;
7474
}

src/Normalizer/TaskSpecResourcesNormalizer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public function denormalize($data, $class, $format = null, array $context = [])
4141
if (property_exists($data, 'Limits') && $data->{'Limits'} !== null) {
4242
$object->setLimits($this->denormalizer->denormalize($data->{'Limits'}, 'Docker\\API\\Model\\ResourceObject', 'json', $context));
4343
}
44-
if (property_exists($data, 'Reservation') && $data->{'Reservation'} !== null) {
45-
$object->setReservation($this->denormalizer->denormalize($data->{'Reservation'}, 'Docker\\API\\Model\\ResourceObject', 'json', $context));
44+
if (property_exists($data, 'Reservations') && $data->{'Reservations'} !== null) {
45+
$object->setReservations($this->denormalizer->denormalize($data->{'Reservations'}, 'Docker\\API\\Model\\ResourceObject', 'json', $context));
4646
}
4747

4848
return $object;
@@ -54,8 +54,8 @@ public function normalize($object, $format = null, array $context = [])
5454
if (null !== $object->getLimits()) {
5555
$data->{'Limits'} = $this->normalizer->normalize($object->getLimits(), 'json', $context);
5656
}
57-
if (null !== $object->getReservation()) {
58-
$data->{'Reservation'} = $this->normalizer->normalize($object->getReservation(), 'json', $context);
57+
if (null !== $object->getReservations()) {
58+
$data->{'Reservations'} = $this->normalizer->normalize($object->getReservations(), 'json', $context);
5959
}
6060

6161
return $data;

0 commit comments

Comments
 (0)