AsyncResponseInterface.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\AsynchronousOperations\Api\Data;
  8. /**
  9. * Interface AsyncResponseInterface
  10. * Temporary data object to give response from webapi async router
  11. *
  12. * @api
  13. * @since 100.2.3
  14. */
  15. interface AsyncResponseInterface
  16. {
  17. const BULK_UUID = 'bulk_uuid';
  18. const REQUEST_ITEMS = 'request_items';
  19. const ERRORS = 'errors';
  20. /**
  21. * Gets the bulk uuid.
  22. *
  23. * @return string Bulk Uuid.
  24. * @since 100.2.3
  25. */
  26. public function getBulkUuid();
  27. /**
  28. * Sets the bulk uuid.
  29. *
  30. * @param string $bulkUuid
  31. * @return $this
  32. * @since 100.2.3
  33. */
  34. public function setBulkUuid($bulkUuid);
  35. /**
  36. * Gets the list of request items with status data.
  37. *
  38. * @return \Magento\AsynchronousOperations\Api\Data\ItemStatusInterface[]
  39. * @since 100.2.3
  40. */
  41. public function getRequestItems();
  42. /**
  43. * Sets the list of request items with status data.
  44. *
  45. * @param \Magento\AsynchronousOperations\Api\Data\ItemStatusInterface[] $requestItems
  46. * @return $this
  47. * @since 100.2.3
  48. */
  49. public function setRequestItems($requestItems);
  50. /**
  51. * @param bool $isErrors
  52. * @return $this
  53. * @since 100.2.3
  54. */
  55. public function setErrors($isErrors = false);
  56. /**
  57. * Is there errors during processing bulk
  58. *
  59. * @return boolean
  60. * @since 100.2.3
  61. */
  62. public function isErrors();
  63. /**
  64. * Retrieve existing extension attributes object.
  65. *
  66. * @return \Magento\AsynchronousOperations\Api\Data\AsyncResponseExtensionInterface|null
  67. * @since 100.2.3
  68. */
  69. public function getExtensionAttributes();
  70. /**
  71. * Set an extension attributes object.
  72. *
  73. * @param \Magento\AsynchronousOperations\Api\Data\AsyncResponseExtensionInterface $extensionAttributes
  74. * @return $this
  75. * @since 100.2.3
  76. */
  77. public function setExtensionAttributes(
  78. \Magento\AsynchronousOperations\Api\Data\AsyncResponseExtensionInterface $extensionAttributes
  79. );
  80. }