Skip to content

reservation => reservations #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/Model/TaskSpecResources.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions src/Normalizer/TaskSpecResourcesNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down