Input.php 665 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace AsyncAws\Core;
  3. /**
  4. * Representation of a AWS Request.
  5. *
  6. * @author Jérémy Derussé <jeremy@derusse.com>
  7. *
  8. * @internal
  9. */
  10. abstract class Input
  11. {
  12. /**
  13. * @var string|null
  14. */
  15. public $region;
  16. /**
  17. * @param array{
  18. *
  19. * @region?: ?string,
  20. * } $input
  21. */
  22. protected function __construct(array $input)
  23. {
  24. $this->region = $input['@region'] ?? null;
  25. }
  26. public function setRegion(?string $region): void
  27. {
  28. $this->region = $region;
  29. }
  30. public function getRegion(): ?string
  31. {
  32. return $this->region;
  33. }
  34. abstract public function request(): Request;
  35. }